/* A compact, focused product gallery. The first image remains visible without JS. */
.product-detail .product-layout {
  grid-template-columns: minmax(0, 440px) minmax(0, 520px);
  justify-content: center;
  align-items: start;
  gap: clamp(42px, 6vw, 108px);
}
.product-detail .product-gallery { width: 100%; max-width: 440px; }
.gallery-stage { position: relative; width: 100%; aspect-ratio: 1; background: #f1eee8; overflow: hidden; }
.gallery-slide { width: 100%; height: 100%; }
.gallery-slide[hidden] { display: none !important; }
.gallery-slide img,
.gallery-slide .catalog-sprite { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 46px; height: 46px; border: 1px solid #d8d7cf; border-radius: 50%; background: #fbfbf7ee; color: var(--ink); display: grid; place-items: center; font-size: 23px; line-height: 1; box-shadow: 0 2px 12px #00000012; }
.gallery-arrow:hover { background: var(--lime); border-color: var(--lime); }
.gallery-arrow-prev { left: 12px; }
.gallery-arrow-next { right: 12px; }
.gallery-controls { padding-top: 13px; }
.gallery-counter { margin: 0 0 8px; color: var(--muted); font-size: .75rem; }
.gallery-thumbnails { display: flex; gap: 9px; flex-wrap: wrap; }
.gallery-thumb { width: 72px; height: 72px; padding: 0; border: 2px solid transparent; background: #f1eee8; overflow: hidden; }
.gallery-thumb.is-active { border-color: var(--blue); }
.gallery-thumb img,
.gallery-thumb .catalog-sprite { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-detail .product-info { width: 100%; max-width: 520px; padding-top: 4px; }
.product-detail .product-info h1 { overflow-wrap: anywhere; }
.product-detail .product-buy { margin-top: 25px; }
.product-detail .variant-picker { display: none; }
.product-detail .product-buy.is-enhanced .variant-picker { display: block; }
.product-detail .product-buy.is-enhanced .variant-fallback { display: none; }
.variant-picker fieldset { margin-bottom: 19px; }
.variant-picker legend,
.variant-fallback label { display: block; margin-bottom: 9px; font-size: .875rem; font-weight: 700; }
.variant-choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-choice { min-width: 48px; min-height: 46px; padding: 8px 15px; border: 1px solid #aaaea7; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 600; }
.variant-choice:not(:disabled):hover { border-color: var(--ink); }
.variant-choice[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: white; }
.variant-choice:disabled { opacity: .38; text-decoration: line-through; }
.variant-help,
.stock-note { margin: -4px 0 16px; color: var(--muted); font-size: .8rem; }
.variant-help[data-selected="true"] { color: #315d40; }
.variant-fallback select { max-width: 380px; }
.product-detail .quantity-label input { width: 86px !important; text-align: center; }

@media (max-width: 1100px) {
  .product-detail .product-layout { grid-template-columns: minmax(0, .92fr) minmax(0, 1fr); gap: 5%; }
}
@media (max-width: 800px) {
  .product-detail .product-layout { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 24px; }
  .product-detail .product-gallery { max-width: 325px; }
  .product-detail .product-info { max-width: 560px; }
  .product-detail .gallery-stage { margin: 0; }
  .gallery-arrow { width: 44px; height: 44px; }
  .gallery-thumb { width: 64px; height: 64px; }
  .product-detail .product-info h1 { font-size: clamp(2.3rem, 8vw, 3rem); }
}
@media (max-width: 360px) {
  .product-detail .product-gallery { max-width: 280px; }
  .gallery-thumb { width: 58px; height: 58px; }
}
