/* =========================================
   PRODUCT PAGE LAYOUT
========================================= */

.product-page-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 10vh;
  padding: 0 20px;
  background: var(--bg-color);
}

/* =========================================
   IMAGE GALLERY (LEFT SIDE)
========================================= */
.product-gallery {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  padding: 50px 20px 20px 0;
  /* overflow-x: hidden removed — it was clipping the 4th thumbnail's touch target */
  min-width: 0;
}

.main-image {
  position: relative;
  /* Fix for absolute positioned nav arrows */
  width: 100%;
  max-width: 540px;
  max-height: 720px;
  margin-left: 0;
  /* Align left within the column */
  margin-right: auto;
  margin-bottom: 16px;
  background-color: var(--surface-alt);
  overflow: hidden;
  cursor: zoom-in;
  /* Fixed aspect ratio — prevents height jump when switching images */
  aspect-ratio: 3 / 4;
  /* background-image/size/position set by JS hover zoom */
  background-repeat: no-repeat;
  background-size: 200%;
  /* Reduced from 220% — less aggressive zoom, less blur */
  transition: background-image 0s;
}

/* ── Gallery Stack: all images pre-loaded in DOM, opacity toggle = instant switch ── */
#gallery-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-img {
  /* absolute stack: every image occupies the same box */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  opacity: 0;
  /* transition added only after first image loads (.ready class via JS) */
}

.gallery-img.active {
  opacity: 1;
  z-index: 1;
  /* active image sits on top of the stack */
  position: relative;
  /* makes container inherit height from active image */
}

/* JS adds .ready to #gallery-stack once first image loads → enables crossfade */
#gallery-stack.ready .gallery-img {
  transition: opacity 0.15s ease;
}

.thumbnail-list {
  display: flex;
  justify-content: flex-start;
  /* Align thumbnails to the left with main image */
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0 4px 2px;
  /* minimal breathing room — no longer needs outline-offset hacks */
  width: 100%;
  /* constrain to parent — overflow-x:auto only works when width is bounded */
  max-width: 540px;
  /* Matches main-image width */
  margin-left: 0;
  margin-right: auto;
  min-width: 0;
  /* allow shrinking as flex child */
  box-sizing: border-box;
  /* Firefox */
}

.thumbnail-list::-webkit-scrollbar {
  display: none;
  /* Chrome/Safari */
}

.thumbnail {
  width: 88px;
  height: 116px;
  object-fit: cover;
  object-position: center top;
  /* show face/upper body, not waist */
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  border-radius: 6px;
  /* border always occupies box space — never overflows parent, never gets clipped */
  border: 2px solid transparent;
  box-sizing: border-box;
  /* border included in 88×116 — no layout shift */
  flex-shrink: 0;
  display: block;
}

.thumbnail:hover {
  opacity: 0.85;
}

.thumbnail.active {
  opacity: 1;
  border-color: var(--color-ink);
  /* crisp, premium black border — all 4 sides, always visible */
}

/* =========================================
   GALLERY COUNTER (X / N pill)
   Absolute overlay on bottom-right of main image
========================================= */
.gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 20px;
  z-index: 5;
  pointer-events: none;
  user-select: none;
  display: none;
}

.gallery-counter.visible {
  display: block;
}

/* =========================================
   THUMBNAIL STRIP — Right-Edge Fade Indicator
   Signals more images exist off-screen (mobile)
========================================= */
.thumbnail-wrapper {
  position: relative;
}

.thumb-fade-right {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-color));
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.thumbnail-wrapper.has-overflow .thumb-fade-right {
  opacity: 1;
}

/* Desktop: vertical strip has its own scrollbar — no fade needed */
@media (min-width: 993px) {
  .thumb-fade-right {
    display: none;
  }
}


/* =========================================
   DESKTOP GALLERY — Vertical Left Thumbnails
   ≥ 768px: thumbnails move to the left of
   the main image in a vertical scrollable strip.
   < 768px: keeps current horizontal-below layout.
========================================= */
@media (min-width: 993px) {

  /* Gallery becomes a row: [thumbs | main-image] */
  .product-gallery {
    flex-direction: row;
    align-items: flex-start;
    /* tops aligned */
    gap: 10px;
  }

  /* Thumbnail strip — vertical, left side */
  .thumbnail-list {
    order: -1;
    /* move before main-image without changing HTML */
    flex-direction: column;
    /* stack vertically */
    overflow-x: hidden;
    overflow-y: auto;
    /* scroll if more images than visible height */
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    max-height: 720px;
    /* matches .main-image max-height */
    padding: 0;
    scrollbar-gutter: stable;
    /* reserves scrollbar space — thumb never clips */
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
    justify-content: flex-start;
    /* Reset mobile overrides */
    overflow-x: hidden;
  }

  .thumbnail-list::-webkit-scrollbar {
    display: block;
    width: 3px;
  }

  .thumbnail-list::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 2px;
  }

  .thumbnail-list::-webkit-scrollbar-track {
    background: transparent;
  }

  /* Thumbnail size — exactly 3:4 within the 80px strip */
  .thumbnail {
    width: 80px;
    height: 107px;
    /* 80 × 4/3 = 106.6 → 107px */
  }

  /* Main image fills remaining width */
  .main-image {
    flex: 1;
    margin-bottom: 0;
    /* no gap below — thumbnails are now beside, not below */
  }
}

/* =========================================
   MAIN IMAGE NAVIGATION ARROWS (Desktop)
   Injected by initZoom() in product.js
========================================= */
.main-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass-light);
  border: none;
  width: 36px;
  height: 72px;
  cursor: pointer;
  font-size: 2rem;
  color: var(--color-ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  z-index: 10;
  border-radius: 0 4px 4px 0;
  line-height: 1;
  user-select: none;
  /* Don't trigger hover zoom */
  pointer-events: auto;
}

.main-img-nav.main-img-next {
  right: 0;
  border-radius: 4px 0 0 4px;
}

.main-img-nav.main-img-prev {
  left: 0;
}

/* Show on hover over main image (desktop only) */
.main-image:hover .main-img-nav {
  opacity: 1;
}

/* Mobile: never show arrows (swipe handles navigation) */
@media (max-width: 768px) {
  .main-img-nav {
    display: none !important;
  }
}


/* =========================================
   SIZE GUIDE PANEL
========================================= */
.size-guide-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 90vw;
  max-width: 400px;
  height: 100vh;
  background: var(--bg-color, var(--bg-color));
  z-index: 2000;
  transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-drawer);
  overflow: hidden;
}

.size-guide-panel.active {
  right: 0;
}

.size-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-scrim);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.size-guide-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.size-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-light, var(--border-light));
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
}

.close-panel-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-strong);
}

.size-guide-content {
  flex: 1;
  overflow-y: auto;
  padding: 25px;
}

.size-chart-image {
  width: 100%;
  height: auto;
  display: block;
}

.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.size-chart-table th,
.size-chart-table td {
  border: 1px solid var(--border-light);
  padding: 10px;
  text-align: center;
}

.size-chart-table th {
  background: var(--surface-subtle);
  font-weight: 600;
}


/* =========================================
   PRODUCT INFO (RIGHT SIDE STICKY)
========================================= */
.product-info-wrapper {
  padding: 50px 0 40px 20px;
  background: var(--bg-color);
  overflow-x: clip;
  /* clip: prevents overflow without creating a new scroll context (iOS scroll fix) */
  max-width: 100%;
  /* Grid items carry an implicit `min-width: auto`, so this track could never
     shrink below the widest unbreakable thing inside it. On mobile that let the
     1fr column blow out to 1322px inside a 375px grid — measured — and the
     `overflow-x: clip` above then sliced the accordion text off mid-sentence.
     `max-width: 100%` cannot help: the track itself was already too wide.
     Note `overflow-wrap: break-word` does NOT fix this — it only breaks at paint
     time and leaves the min-content contribution untouched. This does. */
  min-width: 0;
}

.product-info {
  position: sticky;
  top: 72px;
  /* Reduced from 100px — aligns closer to gallery image top */
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.product-breadcrumbs {
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: none;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-breadcrumbs a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.product-breadcrumbs a:hover {
  color: var(--text-color);
}

.product-page-title {
  font-size: clamp(1.35rem, 2.8vw, 1.8rem);
  /* Responsive — prevents 2-line wrap on desktop */
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.5px;
  margin: 0;
  line-height: 1.15;
  color: var(--text-color);
  word-break: break-word;
}

.product-title-tags-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 4px;
}

.product-price-badge-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-page-price {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-color);
  margin: 0;
}

.product-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

/* Promotion Badge */
.promo-badge-label {
  display: inline-block;
  background: var(--color-ink);
  color: var(--bg-color);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  padding: 3px 8px;
  text-transform: uppercase;
  margin: 0;
}

.promo-badge-text {
  display: inline-block;
  background: var(--surface-alt);
  color: var(--text-strong);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 8px;
  margin: 0;
}

.product-gender-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--gray-500);
  text-transform: uppercase;
  margin-top: 2px;
  margin-bottom: 8px;
}

/* Tags - chip style near title */
.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.tag-chip {
  display: inline-block;
  background: var(--bg-color);
  color: var(--color-ink);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 3px 8px;
  text-transform: uppercase;
  box-shadow: var(--shadow-sm);
}

.product-description {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  font-weight: 400;
  margin-bottom: 12px;
}

/* Typography safety — prevent mid-word breaks */
#product-description-content,
#dynamic-shipping-accordion {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

/* Specific element containment — no !important */
#product-description-content img,
#dynamic-shipping-accordion img {
  max-width: 100%;
  height: auto;
  display: block;
}

#product-description-content table,
#dynamic-shipping-accordion table {
  width: 100%;
  table-layout: fixed;
}

#product-description-content pre,
#dynamic-shipping-accordion pre {
  white-space: pre-wrap;
  word-break: break-all;
}

/* Rich text content from Quill editor */
#product-description-content h2,
#dynamic-shipping-accordion h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-ink);
  margin: 14px 0 6px;
}

#product-description-content h3,
#dynamic-shipping-accordion h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  margin: 12px 0 4px;
}

#product-description-content p,
#dynamic-shipping-accordion p {
  margin-bottom: 8px;
  color: var(--gray-700);
  line-height: 1.65;
}

#product-description-content ul,
#dynamic-shipping-accordion ul,
#product-description-content ol,
#dynamic-shipping-accordion ol {
  padding-left: 1.4rem;
  margin: 6px 0 10px;
}

/* Quill 2 writes every list as <ol> and marks the kind on each item. */
#product-description-content li[data-list="bullet"] { list-style-type: disc; }

#product-description-content li,
#dynamic-shipping-accordion li {
  margin-bottom: 4px;
  color: var(--gray-700);
  font-size: 0.88rem;
}

#product-description-content strong,
#dynamic-shipping-accordion strong {
  font-weight: 700;
}

#product-description-content em,
#dynamic-shipping-accordion em {
  font-style: italic;
}

#product-description-content a,
#dynamic-shipping-accordion a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#product-description-content a:hover,
#dynamic-shipping-accordion a:hover {
  color: var(--gray-700);
}

/* =========================================
   COLOR SELECTOR
========================================= */
.product-color-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.color-selector-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 10px;
}

.color-selector-label .selected-color-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
}

.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s, transform 0.15s;
  padding: 0;
}

.color-swatch:hover {
  transform: scale(1.1);
}

.color-swatch.active {
  outline-color: var(--text-color);
}

/* Size: out of stock */
.size-box.size-oos {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

/* =========================================
   SIZE SELECTOR
========================================= */
.size-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.size-label {
  font-size: 0.80rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.5px;
  color: var(--text-strong);
}

/* Inline Size Guide — bordered button beside "Select your size" */
.size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: 2px;
  font-size: 0.80rem;
  /* matches .size-label */
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: none;
  padding: 4px 10px;
  transition: color 0.2s, border-color 0.2s, transform 0.1s ease;
  animation: guide-pulse 2.2s ease-out infinite;
}

.size-guide-link:hover {
  color: var(--text-color);
  border-color: var(--text-color);
  animation: none;
  /* pause pulse on hover */
}

/* Press-down feel + pause pulse */
.size-guide-link:active {
  transform: scale(0.96);
  animation: none;
}

/* CSS Ripple on click */
.size-guide-link::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.10) 0%, transparent 65%);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
}

.size-guide-link:active::after {
  opacity: 1;
  transform: scale(2.5);
  transition: transform 0.45s ease-out, opacity 0.45s ease-out;
}

/* Breathing glow ring — signals this is clickable */
@keyframes guide-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.18);
  }

  60% {
    box-shadow: 0 0 0 5px rgba(0, 0, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }
}

/* gap before size grid */

.size-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

/* ── Size selection feedback ── */
@keyframes size-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(3px);
  }
}

.product-size-section.size-shake .size-grid {
  animation: size-shake 0.5s ease;
}

.size-hint-msg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #92400e;
  letter-spacing: 0.3px;
  background: rgba(217, 119, 6, 0.07);
  border-left: 2.5px solid #d97706;
  border-radius: 0 3px 3px 0;
  padding: 6px 10px;
  margin-top: 0;
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.size-hint-msg.show {
  max-height: 3em;
  opacity: 1;
  transform: translateY(0);
  margin-top: 10px;
  margin-bottom: 4px;
}

.size-box {
  border: 1px solid var(--border-color);
  padding: 10px 0;
  text-align: center;
  line-height: 1.4;
  /* vertical centering via line-height — avoids flex+hidden-input click bug */
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  transition: all 0.2s ease;
  user-select: none;
  touch-action: manipulation;
  /* eliminates 300ms tap-delay on mobile */
}

.size-box input {
  display: none;
}

.size-box:hover {
  border-color: var(--gray-500);
}

.size-box:has(input:checked) {
  border-color: var(--text-color);
  background-color: var(--text-color);
  color: var(--bg-color);
}

/* =========================================
   QUANTITY SELECTOR
========================================= */
.quantity-selector {
  display: flex;
  align-items: center;
  border: none;
  background-color: var(--surface-muted);
  height: 52px;
  width: 90px;
  flex-shrink: 0;
}

.qty-btn {
  background: none;
  border: none;
  width: 30px;
  height: 100%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s ease;
}

.qty-btn:hover {
  background: var(--border-color);
}

.qty-input {
  width: 30px;
  height: 100%;
  border: none;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-color);
  background: transparent;
}

.qty-input:focus {
  outline: none;
}

/* =========================================
   PRODUCT ACTIONS (BUTTONS)
========================================= */
.product-actions {
  display: grid;
  /* Row 1: qty (90px) | Add to Cart.  Row 2: Buy Now across both columns —
     a wishlist button used to sit in row-2 col-1; with it gone the primary
     action takes the whole width. */
  grid-template-columns: 90px 1fr;
  grid-template-rows: 52px 52px;
  gap: 10px;
}

.btn-buy-now {
  grid-column: 1 / -1;
}

.btn-add-to-cart,
.btn-buy-now {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Locked state — until the customer selects the required size/color */
.btn-add-to-cart.btn-locked,
.btn-buy-now.btn-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-add-to-cart {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: 1px solid var(--text-color);
}

.btn-add-to-cart:hover {
  background-color: var(--surface-muted);
}

/* Wishlist button — sits beside the product title, not in .product-actions.
   `margin-left: auto` pins it to the right edge of the title row; the explicit
   height replaces the old `height: 100%`, which only resolved because the button
   used to be a grid item. */
.btn-buy-now {
  /* Auto-placed at row 2, col 2 — same column as Add to Cart → identical width */
  background-color: var(--text-color);
  color: var(--bg-color);
  border: 1px solid var(--text-color);
}

.btn-buy-now:hover {
  opacity: 0.9;
  background-color: var(--color-ink-soft);
}

/* =========================================
   ACCORDIONS (PRODUCT DETAILS)
========================================= */
.product-accordion {
  border-top: 1px solid var(--border-light);
  margin-top: 12px;
}

.product-accordion details {
  border-bottom: 1px solid var(--border-light);
  width: 100%;
  /* bound <details> — prevents Quill content from expanding it */
  overflow: hidden;
  /* clip anything that still overflows */
}

.product-accordion summary {
  padding: 20px 0;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 1px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  /* Removes default arrow in most browsers */
}

.product-accordion summary::-webkit-details-marker {
  display: none;
  /* Removes default arrow in Safari/Chrome */
}

.product-accordion summary::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text-color);
}

.product-accordion details[open] summary::after {
  content: '−';
}

.accordion-content {
  width: 100%;
  /* bound width to parent — makes max-width:100% work on children */
  padding-bottom: 20px;
  font-size: 0.85rem;
  color: var(--gray-700);
  line-height: 1.6;
  word-break: normal;
  /* don't break words at arbitrary character positions */
  overflow-wrap: break-word;
  /* only break genuinely long tokens (URLs etc.) */
  overflow-x: hidden;
}

.accordion-content * {
  max-width: 100% !important;
  box-sizing: border-box;
  white-space: normal !important;
}

.accordion-content img,
.accordion-content iframe,
.accordion-content video {
  max-width: 100% !important;
  height: auto !important;
}

/* Questions & Answers (js/product-faq.js); hidden until a product has answers */
.product-accordion details[hidden] {
  display: none;
}

.product-faq {
  margin: 0;
  display: grid;
  gap: 4px;
}

.product-faq dt {
  font-weight: 600;
  color: var(--text-color);
  margin-top: 10px;
}

.product-faq dt:first-child {
  margin-top: 0;
}

.product-faq dd {
  margin: 0;
}

.product-faq-more {
  margin: 12px 0 0;
}

.product-faq-more a {
  color: var(--text-color);
  text-decoration: underline;
}

.accordion-content table {
  width: 100% !important;
  table-layout: fixed;
  overflow-wrap: break-word;
}

.accordion-content ul,
.accordion-content ol {
  padding-left: 20px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.accordion-content ul {
  list-style-type: disc !important;
}

.accordion-content ol {
  list-style-type: decimal !important;
}

.accordion-content li {
  margin-bottom: 6px;
}

/* =========================================
   RESPONSIVE DESIGN (MOBILE)
========================================= */
@media (max-width: 992px) {
  .product-page-container {
    grid-template-columns: 1fr;
    max-width: 100%;
    padding: 50px 0 0 0;
    /* Clear left/right padding on mobile, account for topbar */
    margin: 0;
  }

  .product-info-wrapper {
    padding: 2px 20px 20px 20px;
    /* Bottom padding for sticky cart btn if needed */
  }

  .product-info {
    position: static;
    max-width: 100%;
  }

  .product-page-title {
    font-size: 1.5rem;
  }

  /* Adjust gallery for mobile */
  .product-gallery {
    padding: 0;
    /* Edge to edge on mobile */
  }

  .main-image {
    width: 100%;
    max-height: none;
    max-width: 100%;
    margin: 0 0 8px 0;
    aspect-ratio: 3 / 4;
    border-radius: 0;
  }



  .thumbnail-list {
    padding: 4px 16px 16px 16px;
    justify-content: flex-start;
    /* reset desktop flex-end alignment */
    margin: 0;
    max-width: 100%;
  }


  /* Fix for cramped product actions on mobile */
  .product-actions {
    flex-wrap: wrap;
    gap: 12px;
  }

  .quantity-selector {
    width: 100%;
    justify-content: center;
    background-color: var(--surface-subtle);
  }

  .btn-add-to-cart,
  .btn-buy-now {
    flex: 1;
    min-width: 45%;
    padding: 0 10px;
  }

  /* Mobile size button: enforce minimum touch target height (Apple/Google: 44px) */
  .size-box {
    min-height: 44px;
    padding: 12px 0;
  }
}

/* =========================================
   YOU MAY ALSO LIKE (RECOMMENDATIONS)
========================================= */
.recommendations-section {
  width: 100%;
  padding: 30px 0;
  background: var(--bg-color);
  border-top: 1px solid var(--border-light);
}

.recommendations-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 28px;
}

/* ── Section (one per collection / recommended / new arrivals) ── */
.ymal-section {
  margin-bottom: 20px;
}

.ymal-section:last-child {
  margin-bottom: 0;
}

/* Section header — CENTERED, same on desktop + mobile */
.ymal-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 0;
}

/* Title: circle image stacked above text, both centered */
.ymal-section-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-color);
  text-align: center;
}

/* Collection circle image — 48px, centered */
.ymal-collection-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color, #eee);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Desktop header link — removed (not used) */
.ymal-show-more {
  display: none;
}

/* View All button wrapper — visible on ALL screen sizes */
.ymal-mobile-btn {
  display: block;
  width: 100%;
  text-align: center;
}

/* View All button (anchor tag styled as button) */
.ymal-more-btn {
  display: inline-block;
  width: auto;
  margin: 0 auto;
  background: none;
  border: 1.5px solid var(--text-color);
  padding: 11px 36px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-color);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ymal-more-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

/* ── Product grid ── */
.recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2px;
  background: var(--bg-color);
}

@media (max-width: 768px) {
  .recommendations-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Scoped product card styles (rec-product-*) kept for backwards compat ── */
.rec-product-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: var(--bg-color);
  text-decoration: none;
  color: inherit;
}

.rec-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background-color: var(--border-color);
}

.rec-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.rec-product-image .img-hover {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

@media (hover: hover) {
  .rec-product-card:hover .img-default {
    opacity: 0;
  }

  .rec-product-card:hover .img-hover {
    opacity: 1;
  }
}

.rec-product-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 15px 12px 25px 12px;
}

.rec-product-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 6px;
  line-height: 1.4;
}

.rec-product-price {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 15px;
}

/* Overlay icons */
.rec-love-icon,
.rec-add-icon {
  position: absolute;
  bottom: 10px;
  width: 36px;
  height: 36px;
  background: var(--glass-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s;
  z-index: 5;
  font-size: 0.9rem;
  color: var(--text-color);
}

.rec-love-icon {
  right: 52px;
}

.rec-add-icon {
  right: 10px;
}

.rec-product-card:hover .rec-love-icon,
.rec-product-card:hover .rec-add-icon {
  opacity: 1;
  transform: translateY(0);
}

.rec-love-icon:hover,
.rec-add-icon:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

/* =========================================
   IMAGE VIEWER (full screen) — js/product.js initZoom
========================================= */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: block;
  visibility: hidden;
  pointer-events: none;
  color: #fff;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
.img-lightbox.active { visibility: visible; pointer-events: auto; }
.pv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.94);
  opacity: 0;
  transition: opacity 0.36s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.img-lightbox.active .pv-backdrop { opacity: 1; }
.img-lightbox.is-closing .pv-backdrop { opacity: 0; }
/* The pictures, side by side; the track slides */
.pv-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-in;
}
.img-lightbox.is-zoomed .pv-stage { cursor: grab; }
.pv-stage.is-grabbing { cursor: grabbing; }
.pv-track { display: flex; height: 100%; will-change: transform; }
.pv-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 76px 104px;
  box-sizing: border-box;
}
.pv-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.pv-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 2px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
/* While the 1200px copy loads: a thin bar along the top of the picture */
.pv-slide::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 56px;
  width: 64px;
  height: 2px;
  margin-left: -32px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pv-slide.is-loading::after { opacity: 1; animation: pv-load 1s linear infinite; }
@keyframes pv-load { from { background-position: 100% 0; } to { background-position: -100% 0; } }
/* The controls: counter and tools on top, arrows at the sides, thumbnails below */
.pv-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  background: linear-gradient(rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
}
.pv-top > * { pointer-events: auto; }
.pv-count { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.8); font-variant-numeric: tabular-nums; }
.pv-tools { display: flex; align-items: center; gap: 6px; }
.pv-pct { min-width: 46px; text-align: center; font-size: 0.74rem; font-weight: 600; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.pv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.pv-btn:hover { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.3); }
.pv-btn:active { transform: scale(0.94); }
.pv-close { margin-left: 8px; }
.pv-btn:focus-visible, .pv-nav:focus-visible, .pv-thumb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pv-nav {
  position: absolute;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-top: -40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, opacity 0.25s ease;
}
.pv-nav:hover { background: rgba(255, 255, 255, 0.2); }
.pv-prev { left: 16px; }
.pv-next { right: 16px; }
.pv-prev:hover { transform: translateX(-2px); }
.pv-next:hover { transform: translateX(2px); }
.pv-thumbs {
  position: absolute;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
  max-width: calc(100vw - 40px);
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  transform: translateX(-50%);
}
.pv-thumbs::-webkit-scrollbar { display: none; }
.pv-thumb {
  flex: none;
  width: 48px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-thumb:hover { opacity: 0.85; }
.pv-thumb.is-on { opacity: 1; box-shadow: 0 0 0 2px #fff; transform: translateY(-2px); }
.pv-dots { display: none; }
/* One picture: no arrows, thumbnails or counter */
.pv-single .pv-nav, .pv-single .pv-thumbs, .pv-single .pv-dots { display: none; }
/* The controls come in after the picture, and step aside when hidden or zoomed in */
.pv-top, .pv-nav, .pv-thumbs, .pv-dots { opacity: 0; transition: opacity 0.25s ease; }
.img-lightbox.active .pv-top, .img-lightbox.active .pv-nav, .img-lightbox.active .pv-thumbs, .img-lightbox.active .pv-dots { opacity: 1; transition-delay: 0.12s; }
.img-lightbox.is-zoomed .pv-nav, .img-lightbox.is-zoomed .pv-thumbs, .img-lightbox.is-zoomed .pv-dots { opacity: 0; pointer-events: none; transition-delay: 0s; }
.img-lightbox.pv-ui-off .pv-top, .img-lightbox.pv-ui-off .pv-nav, .img-lightbox.pv-ui-off .pv-thumbs, .img-lightbox.pv-ui-off .pv-dots,
.img-lightbox.pv-dragging .pv-top, .img-lightbox.pv-dragging .pv-nav, .img-lightbox.pv-dragging .pv-thumbs, .img-lightbox.pv-dragging .pv-dots,
.img-lightbox.is-closing .pv-top, .img-lightbox.is-closing .pv-nav, .img-lightbox.is-closing .pv-thumbs, .img-lightbox.is-closing .pv-dots { opacity: 0; pointer-events: none; transition-delay: 0s; }
/* A phone: the picture fills the width, dots instead of thumbnails, no arrows (swipe) */
@media (max-width: 640px) {
  .pv-slide { padding: 60px 0 56px; }
  .pv-img { border-radius: 0; box-shadow: none; }
  .pv-nav, .pv-thumbs { display: none; }
  .pv-tools .pv-btn[data-pv="in"], .pv-tools .pv-btn[data-pv="out"], .pv-pct { display: none; }
  .pv-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: center;
    gap: 6px;
  }
  .pv-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.35); transition: width 0.25s ease, background 0.25s ease; }
  .pv-dots i.is-on { width: 18px; background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  .pv-backdrop, .pv-top, .pv-nav, .pv-thumbs, .pv-dots, .pv-thumb, .pv-btn { transition: none !important; }
  .pv-slide.is-loading::after { animation: none; }
}

/* =========================================
   DELIVERY INFO BLOCK (below ATC button)
   Geo-aware, populated by app.js
========================================= */
.product-delivery-block {
  margin: 2px 0 0;
  border: 1px solid var(--border-color);
  border-radius: 1px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--bg-secondary, var(--surface-subtle, #fafafa));
  font-size: 0.83rem;
  color: var(--text-color);
  animation: delivery-fadein 0.35s ease;
}

@keyframes delivery-fadein {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delivery-block-row {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.4;
}

/* ── Pulse dot — replaces bi-truck icon ── */
.delivery-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.delivery-dot--active {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: delivery-pulse 1.8s ease-in-out infinite;
}

.delivery-dot--muted {
  background: var(--gray-400, #9ca3af);
  opacity: 0.45;
}

@keyframes delivery-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }

  60% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* ── COD badge — replaces bi-cash-coin icon ── */
.delivery-cod-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 20px;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  flex-shrink: 0;
  user-select: none;
}

/* Secondary zone row — slightly muted */
.delivery-block-secondary {
  opacity: 0.55;
  font-size: 0.78rem;
}

/* Toggle button */
.delivery-toggle-btn {
  margin-left: auto;
  background: var(--surface-muted, #efefef);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.71rem;
  font-family: inherit;
  color: var(--text-color);
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.delivery-toggle-btn:hover {
  background: var(--color-ink, #111);
  color: var(--bg-color, #fff);
  border-color: var(--color-ink, #111);
}


/* COD row separator */
.delivery-cod-row {
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 1px;
}

/* =========================================
   STICKY ATC BAR (mobile product page)
========================================= */
.sticky-atc-bar {
  position: fixed;
  left: 0;
  width: 100%;
  background: var(--bg-color);
  border-top: 1px solid var(--border-light);
  z-index: 999;
  /* below bottom-bar (1000) */
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  bottom: 62px;
  /* above mobile-bottom-bar height */
  transform: translateY(110%);
  /* start off-screen */
  visibility: hidden;
  pointer-events: none;
  will-change: transform;
  /* GPU compositing — prevents scroll jank on slide-up */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    bottom 0.3s ease,
    visibility 0.3s;
}

.sticky-atc-bar.visible {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

/* Desktop: never show */
@media (min-width: 769px) {
  .sticky-atc-bar {
    display: none !important;
  }
}

/* Row wrapper */
.sticky-atc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Row 1: Sizes ── */
.sticky-sizes-row {
  min-height: 34px;
}

.sticky-size-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
  padding-block: 2px;
  /* prevent top/bottom border clipping from overflow-x:auto */
}

.sticky-size-chips::-webkit-scrollbar {
  display: none;
}

.sticky-size-chip {
  flex-shrink: 0;
  border: 1.5px solid var(--border-color);
  border-radius: 2px;
  background: none;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-primary);
  color: var(--text-color);
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.sticky-size-chip.active {
  background: var(--text-color);
  color: var(--bg-color);
  border-color: var(--text-color);
}

.sticky-size-chip.oos {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

.sticky-size-guide-link {
  flex-shrink: 0;
  background: none;
  border: 1.5px solid var(--border-color);
  border-radius: 2px;
  padding: 5px 8px;
  /* matches chip height */
  font-size: 0.68rem;
  /* compact — smaller than chips */
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: none;
  /* natural case — matches main page */
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.sticky-size-guide-link:hover {
  color: var(--text-color);
  border-color: var(--text-color);
}

/* ── Row 2: Action buttons ── */
.sticky-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sticky-btn {
  height: 46px;
  border: none;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  cursor: pointer;
  font-family: var(--font-primary);
  transition: all 0.2s ease;
}

.sticky-btn-atc {
  background: var(--surface-subtle);
  border: 1.5px solid var(--border-color);
  color: var(--text-color);
}

.sticky-btn-atc:hover {
  background: var(--border-color);
}

.sticky-btn-buy {
  background: var(--text-color);
  color: var(--bg-color);
}

.sticky-btn-buy:hover {
  background: var(--text-strong);
}

/* Locked state — visual only, still clickable for flash feedback */
.sticky-btn.btn-locked {
  opacity: 0.55;
}

/* Sticky bar inline hint message */
.sticky-hint-msg {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #92400e;
  background: rgba(217, 119, 6, 0.07);
  border-left: 2.5px solid #d97706;
  border-radius: 0 3px 3px 0;
  padding: 5px 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: -10px;
  /* cancel flex gap: 10px when hidden */
  transition: max-height 0.25s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.sticky-hint-msg.show {
  max-height: 2.5em;
  opacity: 1;
  margin-top: 0;
  /* normal position when visible */
}
/* ── Colour strip — the same design in other colours ─────────────────────────
   Separate from .color-swatch below, which is the within-product variant picker.
   These are different PRODUCTS, and the swatch is each one's own photograph rather
   than a flat chip: the buyer sees the actual fabric, and no hex codes get typed. */
.product-colour-strip { margin: 0 0 0.55rem; }

/* Matches .size-selector-header / .size-label exactly, so "Colour" and "Select your
   size" read as one pair rather than two designs stacked on top of each other. */
.cs-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 10px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}
.cs-title {
    font-size: 0.80rem; font-weight: 600; text-transform: none;
    letter-spacing: 0.5px; color: var(--text-strong);
}
.cs-current {
    font-size: 0.80rem; font-weight: 600; letter-spacing: 0.5px;
    color: var(--gray-500);
}

/* Scrolls rather than wraps: ten Drop-Shoulder colours would otherwise push the size
   chips off a phone screen entirely. */
.cs-row {
    display: flex; gap: 14px; overflow-x: auto;
    /* 5px, not 2px. The active swatch's ring sits 4px outside the circle, and
       overflow-x:auto clips anything past the padding box — so the top of the ring was
       being sliced off. */
    padding: 5px 5px 2px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.cs-row::-webkit-scrollbar { display: none; }

.cs-item {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
    gap: 4px; text-decoration: none; color: inherit; width: 58px;
}
.cs-dot {
    width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
    display: block; background: var(--gray-100, #f1f1f1);
    box-shadow: 0 0 0 1px rgba(0,0,0,.10);
    transition: box-shadow .18s ease, transform .18s ease;
}
.cs-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-blank { display: block; width: 100%; height: 100%; background: var(--gray-200, #e5e5e5); }

.cs-item.active .cs-dot {
    box-shadow: 0 0 0 2px var(--bg-color, #fff), 0 0 0 4px var(--text-color, #111);
}
.cs-item:hover .cs-dot { transform: translateY(-1px); }

.cs-name {
    font-size: 0.7rem; line-height: 1.15; text-align: center; color: var(--gray-500);
    max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cs-item.active .cs-name { color: var(--text-color, #111); font-weight: 600; }

/* Struck through when the chosen size is gone in that colour. Set by JS the moment a
   size is picked, so the row answers "who has my size" before it is asked. */
.cs-item.cs-nosize .cs-dot { opacity: .38; }
.cs-item.cs-nosize .cs-name { text-decoration: line-through; }

/* The answer under an out-of-stock size chip: which colours still have it. */
.cs-elsewhere {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    margin-top: 10px; font-size: 0.8rem;
}
.cs-elsewhere-label { color: var(--gray-500); }
.cs-go {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px 4px 4px; border-radius: 999px;
    border: 1px solid var(--border-light, #e5e5e5); background: var(--bg-color, #fff);
    text-decoration: none; color: inherit; font-size: 0.78rem; font-weight: 600;
    cursor: pointer;
}
.cs-go img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.cs-go:hover { border-color: var(--text-color, #111); }

/* ── The model in the photographs ────────────────────────────────────────────
   One line, under the size chips. The size chart already gives measurements; what it
   cannot say is whether the person wearing the shirt is anything like the person looking
   at it, and that is the part that makes a photo read as "not for me". */
.model-line {
    display: flex; align-items: center; gap: 7px;
    margin-top: 10px; font-size: .76rem; color: var(--gray-500);
}
.model-line i { font-size: .9rem; opacity: .7; }
.model-line strong { color: var(--text-strong); font-weight: 600; }

/* =========================================
   MANUAL COMBO OFFER (js/combo.js)
========================================= */
/* The card is back, but built from the page's own tokens — 1px var(--border-color) and
   the 2px radius the design system uses (.size-guide-link), not a bespoke rounded panel.
   The pickers inside reuse .color-swatch / .size-grid / .size-box / .size-selector-header
   / .size-guide-link, so nothing here restyles them. */
.combo-offer-section { width: 100%; padding: 8px 0 28px; margin: 0; }
.combo-card {
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 18px 16px;
  background: var(--bg-color);
}
.combo-desc { margin: 0 0 12px; font-size: .86rem; color: var(--text-muted, #666); }
.combo-cover-img { width: 100%; max-height: 320px; object-fit: cover; margin-bottom: 14px; }

/* One component per row, full width — so the reused 6-column .size-grid has room. */
.combo-items { display: flex; flex-direction: column; gap: 18px; }
.combo-item { display: flex; gap: 14px; min-width: 0; width: 100%; }
.combo-item-img { flex: 0 0 88px; }
.combo-item-img img { width: 88px; height: 116px; object-fit: cover; display: block; background: var(--surface-muted, #f3f3f3); }
.combo-item-body { min-width: 0; flex: 1; }
.combo-item-title { display: block; font-size: .9rem; font-weight: 600; color: var(--text-strong, #111); text-decoration: none; line-height: 1.25; }
.combo-item-title:hover { text-decoration: underline; }
.combo-item-price { font-size: .82rem; color: var(--text-muted, #777); margin: 2px 0 10px; }
/* Tighter spacing inside a combo row than on the main page. */
.combo-item .size-selector-header { margin-bottom: 8px; padding-bottom: 6px; }
/* The page's 6-column grid leaves ~33px cells in the combo's narrower column, which reads
   as a tall square. Fit as many ~52px cells as the row allows instead, and trim the
   vertical padding, so the chips are wider than they are tall. Cells themselves are still
   the page's .size-box — only the track sizing and padding are adjusted, and only here. */
.combo-item .size-grid { gap: 8px; grid-template-columns: repeat(4, 1fr); }
/* min-height:0 drops the mobile 44px touch-target floor, which was holding these cells
   tall whatever the padding. Scoped here — the product page's own cells keep it. */
.combo-item .size-box { padding: 5px 2px; line-height: 1.2; font-size: .75rem; letter-spacing: 0; min-height: 0; }
.combo-item .color-swatches { margin-bottom: 10px; }

.combo-foot {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border-color, #eee);
  display: flex; flex-direction: column; gap: 14px;
}
.combo-pricing { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; justify-content: center; }
.combo-now { font-size: 1.45rem; font-weight: 800; color: var(--text-strong, #111); }
.combo-was { font-size: .98rem; color: #999; text-decoration: line-through; }
.combo-save { font-size: .76rem; font-weight: 700; color: #1a7f45; background: #e8f6ee; padding: 3px 10px; border-radius: 2px; }

/* Primary actions REUSE the main product page buttons (.btn-add-to-cart / .btn-buy-now),
   so font, weight, radius, colours and hover all match it. This only lays them out: both
   in ONE row. The page's own .btn-buy-now spans `grid-column: 1 / -1` for the layout it
   sits in there, which would push it onto a second row here — so it is reset. */
.combo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.combo-btns .btn-add-to-cart,
.combo-btns .btn-buy-now { height: 52px; grid-column: auto; }


/* ── The combo card inside the quick-add sheet ─────────────────────────────── */
/* .qa-section's own padding, so the card lines up with the sheet's other rows
   instead of bleeding to the edges. The 20px bottom replaces the gap .qa-add-btn's
   margin normally leaves — that button is hidden while a combo is shown. */
#qa-combo { padding: 16px 20px 20px; }
#qa-combo .combo-offer-section { padding: 0; }
#qa-combo .combo-card { border: none; padding: 0; }
#qa-combo .combo-item { min-width: 0; }

/* =========================================
   RESTOCK PRE-ORDER (js/product.js sizeBoxHTML)
========================================= */
.size-box.size-pre { border-style: dashed; padding: 4px 0 3px; line-height: 1.25; }
.size-pre-tag { display: block; font-size: 0.56rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; opacity: .7; }
.size-box.size-pre:has(input:checked) { border-style: solid; }
.preorder-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--border-color); background: var(--surface-muted); font-size: 0.8rem; line-height: 1.5; }
.preorder-note[hidden] { display: none; }
.preorder-note i { margin-top: 2px; }
.preorder-note b { font-weight: 600; }
.sticky-size-chip.pre { border-style: dashed; }

/* =========================================
   NOTIFY ME (js/product.js renderNotifyMe)
========================================= */
.notify-me { margin-top: 10px; padding: 12px; border: 1px solid var(--border-color); background: var(--surface-muted); font-size: 0.8rem; line-height: 1.5; }
.notify-me-form { display: flex; gap: 8px; margin-top: 8px; }
.notify-me-form input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--border-color); background: var(--bg-color); color: var(--text-color); font: inherit; font-size: 0.9rem; }
.notify-me-form button { height: 40px; padding: 0 16px; border: 0; background: var(--text-color); color: var(--bg-color); font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.notify-me-form button:disabled { opacity: .6; cursor: default; }
.notify-me-msg:empty { display: none; }
.notify-me-msg { margin-top: 6px; font-weight: 600; }
.notify-me-msg.is-error { color: #b91c1c; }

/* =========================================
   SIZE GUIDE (js/size-guide.js)
   The drawer's contents, and the line under the size chips. Theme tokens only, so
   each shop's own colours and type carry through.
========================================= */
.sg { display: flex; flex-direction: column; gap: 14px; font-family: var(--font-primary); }
.sg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sg-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border-light); flex: 1; }
.sg-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 0 0 9px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: .02em; color: var(--text-subtle); cursor: pointer; }
.sg-tabs button.is-on { border-bottom-color: var(--color-ink); color: var(--color-ink); }
.sg-unit { display: inline-flex; flex: none; padding: 2px; border: 1px solid var(--border-color); border-radius: var(--radius-xs); }
.sg-unit button { min-width: 36px; height: 26px; padding: 0 8px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; font-size: .74rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.sg-unit button.is-on { background: var(--color-ink); color: var(--bg-color); }
.sg-panel[hidden] { display: none; }
.sg-panel { display: flex; flex-direction: column; gap: 12px; }

.sg-find { padding: 14px; border: 1px solid var(--border-light); border-radius: var(--radius-sm); background: var(--surface-subtle); }
.sg-find-lead { margin: 0 0 12px; font-size: .86rem; line-height: 1.45; color: var(--text-strong); }
.sg-find-head { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: .84rem; font-weight: 700; color: var(--color-ink); }
.sg-find-row { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.sg-find-row label { display: flex; flex-direction: column; gap: 4px; font-size: .7rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.sg-pair { display: flex; gap: 4px; }
.sg-find select, .sg-find input { height: 38px; padding: 0 8px; border: 1px solid var(--border-color); border-radius: var(--radius-xs); background: var(--bg-color); font: inherit; font-size: .86rem; color: var(--color-ink); }
.sg-find select { width: 64px; }
.sg-kg { position: relative; display: inline-flex; }
.sg-kg input { width: 78px; padding-right: 28px; }
.sg-kg em { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .76rem; color: var(--text-subtle); pointer-events: none; }
.sg-find-go { flex: 1; min-width: 70px; height: 38px; border: 0; border-radius: var(--radius-xs); background: var(--color-ink); font: inherit; font-size: .82rem; font-weight: 600; letter-spacing: .03em; color: var(--bg-color); cursor: pointer; }
.sg-find-out:empty { display: none; }
.sg-find-out { margin-top: 10px; font-size: .84rem; }
.sg-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--bg-color); border: 1px solid var(--border-light); }
.sg-result b { font-size: 1rem; color: var(--color-ink); }
.sg-result em { font-style: normal; font-size: .78rem; color: var(--text-subtle); }
.sg-choose { height: 34px; padding: 0 14px; border: 1px solid var(--color-ink); border-radius: var(--radius-xs); background: var(--color-ink); font: inherit; font-size: .8rem; font-weight: 600; color: var(--bg-color); cursor: pointer; }
.sg-err { color: var(--text-muted); font-size: .8rem; }

.sg-fit { margin: 0; font-size: .78rem; color: var(--text-muted); }
.sg-fit span { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: var(--radius-xs); background: var(--surface-muted); font-weight: 600; color: var(--color-ink); }
.sg-table-wrap { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-xs); }
.sg-table { width: 100%; border-collapse: collapse; font-size: .84rem; font-variant-numeric: tabular-nums; }
.sg-table th { padding: 10px 8px; background: var(--surface-subtle); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); text-align: center; white-space: nowrap; }
.sg-table td { padding: 11px 8px; border-top: 1px solid var(--border-light); text-align: center; color: var(--text-strong); }
.sg-table td b { color: var(--color-ink); }
.sg-table td small { display: block; font-size: .64rem; color: var(--text-subtle); }
.sg-table tbody tr { cursor: pointer; transition: background .15s; }
.sg-table tbody tr:hover { background: var(--surface-subtle); }
.sg-table tbody tr.is-on { background: var(--color-ink); }
.sg-table tbody tr.is-on td, .sg-table tbody tr.is-on td b { color: var(--bg-color); }
.sg-table tbody tr.is-out { cursor: default; }
.sg-table tbody tr.is-out td { color: var(--text-subtle); }
.sg-hint { margin: -4px 0 0; font-size: .72rem; color: var(--text-subtle); }
.sg-advice, .sg-model, .sg-tipline { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--surface-subtle); font-size: .8rem; line-height: 1.45; color: var(--text-strong); }
.sg-pic { width: 100%; height: auto; border: 1px solid var(--border-light); border-radius: var(--radius-xs); }
.sg-how { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.sg-how li { display: flex; flex-direction: column; gap: 2px; font-size: .82rem; line-height: 1.45; color: var(--text-muted); }
.sg-how b { font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; color: var(--color-ink); }

/* The chosen size's measurements, under the size chips. */
.sg-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; font-size: .8rem; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.sg-line[hidden] { display: none; }
.sg-line b { padding: 1px 8px; border-radius: var(--radius-xs); background: var(--color-ink); font-size: .74rem; color: var(--bg-color); }
.sg-line em { font-style: normal; color: var(--text-subtle); }

/* Phones: the guide comes up from the bottom. */
@media (max-width: 640px) {
    .size-guide-panel { top: auto; bottom: -100%; right: 0; left: 0; width: 100%; max-width: none; height: auto; max-height: 88vh; border-radius: 14px 14px 0 0; transition: bottom .35s cubic-bezier(0.77, 0, 0.175, 1); box-shadow: var(--shadow-sheet); }
    .size-guide-panel.active { right: 0; bottom: 0; }
    .size-guide-header { padding: 16px 18px; }
    .size-guide-content { padding: 16px 18px calc(18px + env(safe-area-inset-bottom)); }
    .sg-find-go { flex-basis: 100%; }
}

/* Size guide: icons, the "Not sure of your size?" prompt, the result, How we measure. */
.sg-ic { display: inline-flex; font-size: 1.05em; }
.sg-unit[hidden] { display: none; }
.sg-ask { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px dashed var(--color-ink); border-radius: var(--radius-sm); background: var(--bg-color); font: inherit; text-align: left; color: var(--color-ink); cursor: pointer; }
.sg-ask:hover { background: var(--surface-subtle); }
.sg-ask-ic { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--color-ink); font-size: 1.15rem; color: var(--bg-color); }
.sg-ask-text { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.sg-ask-text b { font-size: .88rem; }
.sg-ask-text small { font-size: .76rem; color: var(--text-muted); }
.sg-ask-go { display: inline-flex; align-items: center; gap: 4px; flex: none; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.sg-result { flex-wrap: wrap; }
.sg-result-size { display: flex; flex-direction: column; }
.sg-result-size small { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-subtle); }
.sg-result-size b { font-size: 1.5rem; line-height: 1.1; }
.sg-result-who { flex: 1 1 100%; order: 3; font-size: .76rem; color: var(--text-muted); }
.sg-howto { border-top: 1px solid var(--border-light); padding-top: 4px; }
.sg-howto summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: .84rem; font-weight: 600; color: var(--color-ink); cursor: pointer; list-style: none; }
.sg-howto summary::-webkit-details-marker { display: none; }
.sg-howto summary::after { content: '+'; margin-left: auto; font-size: 1.1rem; font-weight: 400; color: var(--text-subtle); }
.sg-howto[open] summary::after { content: '−'; }
.sg-howto[open] { display: flex; flex-direction: column; gap: 12px; padding-bottom: 6px; }

/* Size guide, tidier (overrides the first pass above). */
.sg { gap: 16px; }
.sg-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.sg-seg button { height: 38px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; font-size: .84rem; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.sg-seg button.is-on { background: var(--bg-color); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.sg-ask { gap: 10px; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.sg-ask-ic { width: 30px; height: 30px; font-size: .95rem; }
.sg-ask-text { display: block; font-size: .82rem; line-height: 1.35; color: var(--text-muted); }
.sg-ask-text b { font-size: .82rem; color: var(--color-ink); }
.sg-ask-go { font-size: 1rem; color: var(--color-ink); }
.sg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: -6px; }
.sg-head-text { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sg-head-text b { font-size: .9rem; color: var(--color-ink); }
.sg-head-text span { padding: 2px 8px; border-radius: var(--radius-xs); background: var(--surface-muted); font-size: .72rem; font-weight: 600; color: var(--text-strong); white-space: nowrap; }
.sg-unit { padding: 3px; border: 0; border-radius: var(--radius-sm); background: var(--surface-muted); }
.sg-unit button { min-width: 48px; height: 28px; font-size: .76rem; color: var(--text-muted); }
.sg-unit button.is-on { background: var(--bg-color); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.sg-table th { padding: 10px 6px; }
.sg-table td { padding: 12px 6px; }
.sg-table tbody tr.is-on { background: var(--surface-muted); box-shadow: inset 3px 0 0 var(--color-ink); }
.sg-table tbody tr.is-on td, .sg-table tbody tr.is-on td b { color: var(--color-ink); font-weight: 700; }
.sg-hint { margin: -8px 0 0; text-align: center; }

/* =========================================
   ZOOM ON HOVER (desktop) — js/product.js initZoom
   A layer over the photo with the same picture scaled up; the script moves it.
========================================= */
.pz-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  background: var(--surface-alt);
  transition: opacity 0.22s ease;
}
.pz-layer.is-on { opacity: 1; }
.pz-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform-origin: 0 0;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
/* While the 1200px copy loads: a small ring in the corner */
.pz-ring {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--white-a55, rgba(255, 255, 255, 0.55));
  border-top-color: transparent;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pz-layer.is-loading .pz-ring { opacity: 1; animation: pz-spin 0.8s linear infinite; }
@keyframes pz-spin { to { transform: rotate(360deg); } }
/* "Click to view full screen", on the first few hovers */
.pz-hint {
  position: absolute;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.pz-layer.pz-hinting .pz-hint { animation: pz-hint 2.8s ease forwards; }
@keyframes pz-hint {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  14%, 72% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}
/* The arrows and the counter stay above the zoom */
.main-image .main-img-nav { z-index: 10; }
.main-image .gallery-counter { z-index: 6; }
@media (prefers-reduced-motion: reduce) {
  .pz-layer { transition: none; }
  .pz-layer.pz-hinting .pz-hint { animation: none; }
}

/* =========================================
   MAIN PHOTO ON A PHONE — js/product.js initZoom
   The photo follows a sideways drag (the page still scrolls up and down); dots below.
========================================= */
.main-image { touch-action: pan-y; }
#gallery-stack.mg-swapping .gallery-img { transition: none !important; }
.mg-dots { display: none; }
@media (max-width: 768px) {
  .mg-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 6;
    display: flex;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
  }
  .mg-dots i {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.18);
    transition: width 0.25s ease, background 0.25s ease;
  }
  .mg-dots i.is-on { width: 18px; background: #fff; }
  /* The dots say it: the "2 / 4" pill steps aside on a phone */
  .main-image .gallery-counter.visible { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-dots i { transition: none; }
}


/* ── Specifications (js/spec-view.js) ──────────────────────────────────────────
   Tags under the title, the "Specifications" accordion, and the bag size guide that
   a product type set to "dimensions" builds from the product's measurements. */
.product-spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.product-spec-tags span { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: 999px; background: var(--surface-muted); color: var(--text-strong); font-size: 0.8rem; }

.spec-view { display: flex; flex-direction: column; gap: 18px; }
.spec-group h4 { margin: 0 0 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.spec-group dl { margin: 0; }
.spec-row { display: grid; grid-template-columns: minmax(110px, 40%) minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface-muted); font-size: 0.9rem; }
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--text-muted); }
.spec-row dd { margin: 0; color: var(--text-color); }

/* The per-size table scrolls inside its own box; the page never scrolls sideways. */
.spec-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 320px; }
.spec-table th, .spec-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--surface-muted); white-space: nowrap; }
.spec-table thead th { font-weight: 600; font-size: 0.75rem; color: var(--text-muted); }
.spec-table thead small { font-weight: 400; }
.spec-table tbody th { font-weight: 600; }
.spec-table tr.is-on th, .spec-table tr.is-on td { background: var(--surface-muted); }
.bag-guide .spec-table tbody tr { cursor: pointer; }

.bag-guide { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 16px; }
.bg-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.bg-sizes button { min-height: 40px; min-width: 64px; padding: 0 14px; border: 1px solid var(--gray-300); border-radius: 999px; background: var(--bg-color); color: var(--text-color); font: inherit; font-size: 0.85rem; cursor: pointer; }
.bg-sizes button.is-on { background: var(--color-ink); border-color: var(--color-ink); color: #fff; }
.bag-drawing { width: 100%; max-width: 320px; height: auto; align-self: center; color: var(--text-strong); }
.bg-fits h4 { margin: 0 0 8px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.bg-fits-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; align-items: start; padding: 6px 0; font-size: 0.86rem; }
.bg-fits-row span { display: flex; flex-wrap: wrap; gap: 6px; }
.bg-fits-row em { font-style: normal; padding: 3px 10px; border-radius: 999px; background: var(--surface-muted); }
.bg-note { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
