/* The loading shapes occupy the same grid cells as the storefront content. */
.store-skeleton-shape,
.store-image-pending,
#page[aria-busy="true"] .mainphoto:empty {
  background-color: #e7edf3 !important;
  background-image: linear-gradient(105deg, transparent 28%, #fff8 47%, transparent 66%) !important;
  background-size: 230% 100% !important;
  animation: store-skeleton-sweep 1.65s ease-in-out infinite;
}

@keyframes store-skeleton-sweep {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .store-skeleton-shape,
  .store-image-pending,
  #page[aria-busy="true"] .mainphoto:empty {
    animation: none;
    background-image: none !important;
  }
}

.store-skeleton {
  pointer-events: none;
}

.store-skeleton .catalog-card-image {
  border-radius: 8px;
}

.store-skeleton-line {
  display: block;
  inline-size: 72%;
  block-size: .85em;
  border-radius: 5px;
}

.store-skeleton-price {
  inline-size: 45%;
  margin-block-start: 4px;
}

.store-skeleton-label {
  margin: 10px auto 0;
}

.store-catalog-page #storeHome,
html:not(.store-catalog-page) #storeCatalog,
#homeBannerSkeleton[hidden],
#catalogSkeleton[hidden],
#productDetailsSkeleton[hidden] {
  display: none;
}

#homeBannerSkeleton .home-banners-track {
  margin-block: 14px;
}

#storeHome[aria-busy="true"] > .hero {
  display: none;
}

#catalogSkeleton .store-skeleton-heading {
  block-size: clamp(24px, 4vw, 38px);
  inline-size: min(52%, 275px);
  margin: 12px 0 24px;
}

#catalogSkeleton ul {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#catalogSkeleton li {
  min-width: 0;
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: 12px;
  padding: 12px;
}

@media (min-width: 601px) {
  #catalogSkeleton ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 901px) {
  #catalogSkeleton ul { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

#page[aria-busy="true"] #productDetails > :not(#productDetailsSkeleton),
#page[aria-busy="true"] :is(.gallery-arrow, .gallery-counter, .gallery-actions, .thumbs, .sections),
#page.product-load-error #productDetails > :not(#name),
#page.product-load-error :is(#productGalleryPanel, .sections) {
  display: none;
}

#productDetailsSkeleton {
  display: grid;
  gap: 16px;
  padding-block: 12px;
}

#productDetailsSkeleton .store-skeleton-heading {
  block-size: clamp(24px, 4vw, 36px);
}

#productDetailsSkeleton .store-skeleton-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#productDetailsSkeleton .store-skeleton-choices span {
  block-size: 48px;
  border-radius: 10px;
}
