/* Souci Mall — product card + single product page · Bourbon edition */

/* Card ---------------------------------------------------------- *
 * Dark surface + thin gold hairline. Product image dominates;
 * caption below is restrained sans, gold price, and a gold-outline
 * "ADD TO CART" hover-revealed CTA. */
.sm-prod-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: var(--sm-radius-card);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.sm-prod-card:hover {
  border-color: var(--sm-accent);
  transform: translateY(-2px);
  box-shadow: 0 24px 48px -24px rgba(0,0,0,0.6);
}
.sm-prod-card__link {
  display: flex;
  flex-direction: column;
  color: var(--sm-ink);
  height: 100%;
  text-decoration: none;
}
.sm-prod-card__link:hover { color: var(--sm-ink); }

.sm-prod-card__media {
  aspect-ratio: 1 / 1;
  /* Plain white — source product photos are shot on white, so the padding
   * area continues the same white seamlessly. The per-product chroma was
   * dropped here because `object-fit: contain` exposes the padding area
   * and the chroma read as a colored frame around each bottle. */
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Inner padding so bottles never touch the card edges. With object-fit:
   * contain below, this is what gives every product a consistent visual
   * size regardless of how the source PNG is cropped. */
  padding: 8%;
}
.sm-prod-card__img {
  /* `contain` (not `cover`) — product photos have white backgrounds and
   * the bottle is positioned differently in each source PNG. `cover` was
   * cropping each image inconsistently; `contain` shows the whole product
   * centered, identical visual treatment across all cards. */
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.sm-prod-card:hover .sm-prod-card__img { transform: scale(1.04); }

.sm-prod-card__badges {
  position: absolute;
  top: 12px; left: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
/* Wishlist + Quick-view buttons sit in the top-right corner of every
 * product card. Bourbon styling: dark glass surface + gold hairline,
 * 30px circle. On hover/focus they fill with brand gold. They stack
 * vertically (heart on top, eye below) to keep horizontal real-estate
 * for the product image. */
.sm-prod-card__fav,
.sm-prod-card__qv {
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.5);
  border: 1px solid var(--sm-line-strong);
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sm-ink-soft);
  z-index: 2;
  padding: 0;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s, opacity .15s;
}
.sm-prod-card__fav { top: 12px; right: 12px; }
.sm-prod-card__qv  { top: 50px; right: 12px; left: auto; }   /* under the heart */
.sm-prod-card__fav:hover,
.sm-prod-card__qv:hover,
.sm-prod-card__fav:focus-visible,
.sm-prod-card__qv:focus-visible {
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
  border-color: var(--sm-accent);
  transform: scale(1.08);
}
/* Touch devices — buttons always visible (no hover trigger). */
@media (hover: none) {
  .sm-prod-card__fav,
  .sm-prod-card__qv { opacity: 1; }
}
@media (max-width: 600px) {
  .sm-prod-card__fav,
  .sm-prod-card__qv { width: 28px; height: 28px; }
  .sm-prod-card__qv { top: 46px; }
}

.sm-prod-card__rank {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 3;
  min-width: 32px;
  height: 24px;
  padding: 0 10px;
  border-radius: 0;
  background: rgba(8,8,12,0.85);
  color: var(--sm-accent);
  border: 1px solid var(--sm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: var(--sm-body-font);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 1px;
  box-shadow: none;
}
.sm-prod-card__rank.is-top {
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
}
.sm-rank-no {
  font-family: var(--sm-body-font);
  font-size: 9px;
  font-weight: 700;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.sm-prod-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.sm-prod-card.is-compact .sm-prod-card__body { padding: 16px 18px; }

.sm-prod-card__meta {
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--sm-ink-muted);
}
.sm-prod-card__name {
  font-family: var(--sm-body-font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  line-height: 1.35;
  margin: 0;
  color: var(--sm-ink);
  text-transform: uppercase;
  /* allow 2 lines so longer names like "FEMALE ANAL RELAX GEL" don't truncate */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sm-prod-card.is-compact .sm-prod-card__name { font-size: 12px; letter-spacing: 1px; }

.sm-prod-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
}
.sm-prod-card__sub {
  font-family: var(--sm-body-font);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sm-ink-muted);
  margin: 0;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sm-prod-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  gap: 10px;
}
.sm-prod-card__price {
  font-family: var(--sm-body-font);
  font-weight: 700;
  font-size: 16px;
  color: var(--sm-accent);
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  letter-spacing: 0.5px;
}
.sm-prod-card__price .price ins { text-decoration: none; color: var(--sm-accent); }
.sm-prod-card__price .price del { color: var(--sm-ink-muted); font-size: 0.7em; font-weight: 400; }
.sm-prod-card__price del,
.sm-prod-card__price s { color: var(--sm-ink-muted); font-size: 0.7em; font-weight: 400; }
.sm-prod-card__sold { font-size: 10px; color: var(--sm-ink-muted); letter-spacing: 0.5px; }
.sm-prod-card.is-compact .sm-prod-card__price { font-size: 14px; }

/* Add to cart — mini gold-outline button replacing the price-only foot */
.sm-prod-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--sm-accent);
  color: var(--sm-accent);
  font-family: var(--sm-body-font);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.sm-prod-card__cta:hover {
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
}

/* Stars — gold filled */
.sm-stars { display: inline-flex; gap: 2px; align-items: center; }
.sm-star { color: var(--sm-line-strong); }
.sm-star.is-on { color: var(--sm-accent); }
.sm-star path { fill: currentColor; }

/* ============================================================
 * Single product page — gallery + info side-by-side (1fr 1fr)
 * ============================================================ */
.sm-single-product-wrap { padding-block: 0 80px; }

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 50px;
  padding-block: 30px 50px;
  max-width: none;
}

/* ---------- Gallery with thumbnail rail ---------- */
.woocommerce div.product .woocommerce-product-gallery {
  background: transparent;
  border: 0;
  padding: 0;
  position: relative;
}

/* Clip the Flexslider window — but ONLY `.flex-viewport`.
 *
 * `.flex-viewport` is the fixed-size window Flexslider builds around the
 * gallery; clipping it with `overflow:hidden` + `max-width:100%` stops
 * the wide slide track from spilling out and shoving the page sideways
 * (the Android "页面偏移" bug).
 *
 * `.woocommerce-product-gallery__wrapper` is the *track* — Flexslider
 * sets an inline `width: <slideCount × slideWidth>px` on it, and that
 * width MUST be allowed to exceed the viewport (it's how a multi-slide
 * carousel works). An earlier version of this rule wrongly applied
 * `max-width:100%` to the track too, which capped it at one viewport
 * width and squashed every slide after the first into nothing — the
 * "右滑第二张图看不到" bug. The track is left unconstrained here. */
.woocommerce div.product .woocommerce-product-gallery .flex-viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.woocommerce div.product .woocommerce-product-gallery__wrapper {
  position: relative;
}

.woocommerce div.product .woocommerce-product-gallery__image,
.woocommerce div.product .woocommerce-product-gallery__image--placeholder {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--sm-surface-alt);
  background-image: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
  position: relative;
}

.woocommerce div.product .woocommerce-product-gallery__image img,
.woocommerce div.product .woocommerce-product-gallery__image--placeholder img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

/* Gallery — main image takes the full column width; thumbnails are a
 * horizontal scrollable strip BELOW. This matches Lovehoney / Apple Store /
 * Lovense modern e-commerce patterns and avoids the WC quirk where the old
 * 80px-vertical-rail showed empty until Flexslider had a chance to run.
 *
 * The `width: 100%; float: none` resets are critical — WooCommerce's stock
 * stylesheet hardcodes `.images { float: left; width: 48% }`, which pushes
 * the summary column off-screen inside our 1fr/1fr grid. */
.woocommerce div.product .woocommerce-product-gallery.images,
.woocommerce div.product .woocommerce-product-gallery {
  width: 100%;
  max-width: 100%;
  float: none;
  margin: 0;
}
.woocommerce div.product .woocommerce-product-gallery.images {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; /* room for the focus ring on the active thumb */
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs::-webkit-scrollbar { display: none; }
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li {
  width: 96px;
  flex: 0 0 96px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.55;
  transition: opacity .15s ease, border-color .15s ease, transform .12s ease;
  background: var(--sm-surface-alt);
  scroll-snap-align: start;
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li.flex-active {
  opacity: 1;
  border-color: var(--sm-accent);
}
.woocommerce div.product .woocommerce-product-gallery__trigger {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: 18px;
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(6px);
  color: #fff;
  text-indent: -999em;
}

/* ---------- Summary (right column) ---------- */
.woocommerce div.product .summary.entry-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  float: none;
}

.woocommerce div.product .product_title {
  font-family: var(--sm-display-font);
  font-weight: var(--sm-display-weight);
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -1px;
  text-transform: var(--sm-display-transform);
  margin: 8px 0 0;
  color: var(--sm-ink);
}

.woocommerce div.product .woocommerce-product-rating {
  margin: 14px 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--sm-ink-muted);
}
.woocommerce div.product .woocommerce-product-rating .star-rating {
  font-size: 14px;
  color: var(--sm-accent-2);
}
.woocommerce div.product .woocommerce-product-rating .woocommerce-review-link {
  color: var(--sm-ink-muted);
  font-size: 12px;
}

/* Price card — outlined block, horizontal flow: NEW big → OLD small → -X% chip */
.woocommerce div.product p.price {
  margin: 24px 0 0 !important;
  padding: 22px 24px !important;
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  line-height: 1;
  font-size: 0; /* reset — children set their own sizes */
}
/* Current price (sale) — first, big, accent */
.woocommerce div.product p.price ins,
.woocommerce div.product p.price > .amount:only-child,
.woocommerce div.product p.price > bdi:only-child {
  order: 0;
  background: transparent;
  text-decoration: none;
  font-family: var(--sm-display-font);
  font-weight: 900;
  font-size: 42px;
  color: var(--sm-accent);
  line-height: 1;
}
.woocommerce div.product p.price ins .amount,
.woocommerce div.product p.price ins bdi { color: var(--sm-accent); font-weight: 900; font-size: 42px; }

/* Original price — second, small, struck, muted */
.woocommerce div.product p.price del {
  order: 1;
  color: var(--sm-ink-muted) !important;
  text-decoration: line-through;
  opacity: 1;
  margin: 0;
  align-self: baseline;
}
.woocommerce div.product p.price del .amount,
.woocommerce div.product p.price del bdi {
  font-family: var(--sm-display-font);
  font-size: 20px;
  font-weight: 600;
  color: var(--sm-ink-muted);
  letter-spacing: -0.2px;
}

/* Discount chip — third, pill, accent-2 */
.sm-price-chip {
  order: 2;
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--sm-accent-2);
  color: var(--sm-accent-ink);
  font-family: var(--sm-mono-font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1;
  white-space: nowrap;
}

/* Screen-reader helper text from WC — keep hidden, don't break flex layout */
.woocommerce div.product p.price .screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Stock / urgency strip below the price */
.sm-price-urgency {
  margin-top: 10px;
  font-family: var(--sm-body-font);
  font-size: 12px;
  color: var(--sm-ink-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}
.sm-price-urgency strong {
  color: var(--sm-accent-2);
  font-weight: 700;
  font-family: var(--sm-mono-font);
  letter-spacing: 0.3px;
}

/* Short description block */
.woocommerce-product-details__short-description {
  margin: 20px 0 0;
  padding: 0;
  font-family: var(--sm-body-font);
  font-size: 15px;
  color: var(--sm-ink-soft);
  line-height: 1.7;
}
.woocommerce-product-details__short-description p { margin: 0 0 8px; }

/* Variations table — clean */
.woocommerce div.product form.cart table.variations {
  width: 100%;
  margin: 24px 0 0;
  border: 0;
}
.woocommerce div.product form.cart table.variations tr { display: block; margin-bottom: 14px; }
.woocommerce div.product form.cart table.variations th,
.woocommerce div.product form.cart table.variations td {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
}
.woocommerce div.product form.cart table.variations th {
  font-family: var(--sm-mono-font);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  font-weight: 500;
  padding-bottom: 8px;
}
.woocommerce div.product form.cart .reset_variations {
  font-size: 11px;
  color: var(--sm-accent);
  margin-left: 8px;
}

/* Cart form — qty + CTA row.
 * Capped at 620px so the buttons stay natural width on single-column
 * layouts (≤1024px viewport) where the summary column fills the page. */
.woocommerce div.product form.cart {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 28px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  flex-wrap: wrap;
  max-width: 620px;
}
.woocommerce div.product form.cart .quantity {
  height: 56px;
  padding: 3px;
  background: var(--sm-surface);
  border: 1.5px solid var(--sm-line-strong);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.woocommerce div.product form.cart .quantity .qty,
.woocommerce div.product form.cart .quantity input[type="number"] {
  width: 52px;
  height: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--sm-mono-font);
  font-size: 15px;
  font-weight: 700;
  color: var(--sm-ink);
  padding: 0;
}
.woocommerce div.product form.cart button.single_add_to_cart_button {
  flex: 1;
  min-width: 200px;
  height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
  font-family: var(--sm-body-font);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: var(--sm-button-tracking);
  text-transform: var(--sm-display-transform);
  border: 0;
  cursor: pointer;
  transition: filter .15s ease, box-shadow .2s ease;
}
.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--sm-accent) 35%, transparent);
}
.sm-buy-now-btn {
  flex: 1;
  min-width: 160px;
  height: 56px;
  padding: 0 32px;
  border-radius: 999px;
  background: var(--sm-ink);
  color: var(--sm-bg);
  font-family: var(--sm-body-font);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: var(--sm-button-tracking);
  text-transform: var(--sm-display-transform);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
}
.sm-buy-now-btn:hover { color: var(--sm-bg); filter: brightness(1.15); }

/* Trust badges — 2x2 inside summary */
.sm-product-trust {
  margin-top: 28px;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--sm-line);
  background: var(--sm-surface-alt);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.sm-product-trust__item {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.sm-product-trust__icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sm-accent) 15%, transparent);
  color: var(--sm-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sm-mono-font);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.sm-product-trust__label {
  font-family: var(--sm-body-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--sm-ink);
  line-height: 1.3;
}
.sm-product-trust__sub {
  font-family: var(--sm-mono-font);
  font-size: 9px;
  color: var(--sm-ink-muted);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* WC meta (categories/tags) under summary — subdued */
.woocommerce div.product .product_meta {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--sm-line);
  font-family: var(--sm-mono-font);
  font-size: 11px;
  color: var(--sm-ink-muted);
  letter-spacing: 0.3px;
}
.woocommerce div.product .product_meta a { color: var(--sm-ink); }
.woocommerce div.product .product_meta a:hover { color: var(--sm-accent); }
.woocommerce div.product .product_meta .posted_in,
.woocommerce div.product .product_meta .tagged_as { display: block; margin-bottom: 4px; }

/* ---------- Tabs — full-width below grid ---------- */
.woocommerce div.product .woocommerce-tabs {
  grid-column: 1 / -1;
  margin-top: 20px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 28px;
  padding: 10px 0 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--sm-line) !important;
  list-style: none;
  /* Sticky tab nav — pins below the sticky header so users can switch
   * Description / Reviews / Shipping / Q&A from any scroll depth without
   * scrolling back up. Uses backdrop-blur so the underlying content shows
   * through subtly while the bar stays readable. */
  position: sticky;
  top: 60px;                  /* mobile header is ~58px tall + 2px buffer */
  z-index: 30;
  background: color-mix(in srgb, var(--sm-bg) 92%, transparent) !important;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  /* When stuck, give a soft drop-shadow to lift the bar off the content
   * below. Pure CSS — no scroll-listener needed. */
  box-shadow: 0 6px 14px -10px rgba(0, 0, 0, 0.18);
}
/* Desktop header is ~72px (padding-block: 14px + ~44px chip-btn items) — push
 * the sticky tab offset down so the tabs don't tuck under the header. */
@media (min-width: 901px) {
  .woocommerce div.product .woocommerce-tabs ul.tabs {
    top: 76px;
  }
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before,
.woocommerce div.product .woocommerce-tabs ul.tabs::after { display: none !important; }
/* Kill the default WC "folder-tab corner curls" — tiny rounded squares
 * on each li::before / li::after that don't fit our flat underline tabs. */
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; content: none !important; border: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: var(--sm-body-font);
  font-weight: 700;
  font-size: 14px;
  color: var(--sm-ink-muted);
  margin-bottom: -1px !important;
  transition: color .15s, border-color .15s;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  padding: 16px 0;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li:hover { color: var(--sm-ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  color: var(--sm-ink) !important;
  border-bottom-color: var(--sm-accent) !important;
}
.woocommerce div.product .woocommerce-tabs .panel {
  padding: 30px 0 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.woocommerce div.product .woocommerce-tabs .panel h2 {
  font-family: var(--sm-display-font);
  font-weight: var(--sm-display-weight);
  font-size: 24px;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
  color: var(--sm-ink);
}
.woocommerce div.product .woocommerce-tabs .panel h3 {
  font-family: var(--sm-display-font);
  font-weight: 700;
  font-size: 16px;
  margin: 24px 0 10px;
  color: var(--sm-ink);
}
.woocommerce div.product .woocommerce-tabs .panel p {
  font-family: var(--sm-body-font);
  font-size: 15px;
  line-height: 1.75;
  color: var(--sm-ink-soft);
  margin: 0 0 12px;
}
.woocommerce div.product .woocommerce-tabs .panel ul,
.woocommerce div.product .woocommerce-tabs .panel ol {
  font-family: var(--sm-body-font);
  font-size: 15px;
  color: var(--sm-ink-soft);
  line-height: 1.8;
  padding-left: 0;
  list-style: none;
}
.woocommerce div.product .woocommerce-tabs .panel ul li { padding: 6px 0; }

/* Additional information (specs) table rendered as grid cards */
.woocommerce-product-attributes,
.shop_attributes {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  border: 0 !important;
  background: transparent !important;
  width: 100%;
}
.woocommerce-product-attributes tbody,
.shop_attributes tbody { display: contents; }
.woocommerce-product-attributes tr,
.shop_attributes tr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 10px;
}
.woocommerce-product-attributes th,
.shop_attributes th {
  font-family: var(--sm-mono-font);
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-weight: 500;
  text-align: left;
}
.woocommerce-product-attributes td,
.shop_attributes td {
  font-family: var(--sm-body-font);
  font-size: 13px;
  color: var(--sm-ink);
  font-weight: 600;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  text-align: right;
}

/* Responsive ------------------------------------------------ */
@media (max-width: 1024px) {
  /* minmax(0,1fr) — NOT a bare `1fr`. Bare `1fr` resolves to minmax(auto,1fr),
   * whose `auto` minimum is the column content's min-content width. A wide
   * intrinsic image (e.g. a long product-description detail image, which
   * only carries max-width:100% — a percentage that can't resolve while the
   * column width is itself being computed) would then blow the single
   * column past the viewport and shove the whole mobile page sideways.
   * minmax(0,…) lets the column shrink so max-width:100% content is bounded. */
  .woocommerce div.product { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  /* Gallery thumbs already render below as a horizontal strip via flex-column;
   * just shrink each thumb a touch so 6-8 fit on a tablet row. */
  .woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li { width: 80px; flex: 0 0 80px; }
}
@media (max-width: 700px) {
  .woocommerce div.product { padding-block: 12px 28px; gap: 16px; }
  .woocommerce div.product .product_title { font-size: 30px; letter-spacing: -0.6px; }
  .woocommerce div.product p.price { font-size: 32px !important; padding: 14px 16px !important; margin-top: 14px !important; }
  .woocommerce-product-details__short-description { margin-top: 14px; font-size: 14px; }
  .woocommerce div.product form.cart { margin-top: 18px !important; }
  .woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li { width: 64px; flex: 0 0 64px; }
  /* Trust strip — single column with tighter rows */
  .sm-product-trust { grid-template-columns: 1fr; padding: 14px; gap: 8px; margin-top: 18px; }
  .sm-product-trust__item { gap: 12px; padding: 4px 2px; }
  .sm-product-trust__icon { width: 32px; height: 32px; }
  .sm-product-trust__sub { margin-top: 1px; }
  .woocommerce div.product .product_meta { margin-top: 16px; padding-top: 16px; }
  .woocommerce-product-attributes, .shop_attributes { grid-template-columns: 1fr; }
}

/* Variation swatches */
.sm-variation-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0 10px;
}
/* Hide the native dropdown now that we render pretty swatches */
.sm-variation-swatches + table.variations select,
table.variations select { display: none !important; }
table.variations th {
  font-family: var(--sm-mono-font);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  font-weight: 500;
  padding: 12px 0 4px;
}
table.variations td { padding: 0 0 12px; }
.sm-swatch {
  padding: 0;
  border: 1px solid var(--sm-line);
  background: var(--sm-surface);
  color: var(--sm-ink);
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
.sm-swatch.is-selected,
.sm-swatch:hover { border-color: var(--sm-accent); }
.sm-swatch.is-selected { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sm-accent) 35%, transparent); }

.sm-swatch--color {
  width: 34px; height: 34px;
  border-radius: 17px;
  position: relative;
  padding: 2px;
  background: transparent;
}
.sm-swatch__dot {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--sw, #ccc);
}

.sm-swatch--pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================
 * Sticky cart — floating PILL design (mobile + desktop)
 * Outer wrapper: fixed full-width transparent strip used for
 *   positioning + slide animation only. Pointer events pass through
 *   so the rest of the page stays clickable around the pill.
 * Inner pill: thumbnail + name/price + Add-to-bag + Buy-now,
 *   centered, max-width 620px, drop shadow + backdrop blur.
 * ============================================================ */
.sm-sticky-cart {
  position: fixed;
  left: 0; right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;   /* above tabbar (50) so the ATC pill never gets clipped */
  display: flex;
  justify-content: center;
  pointer-events: none; /* clicks pass through outside the pill */
  padding: 0 20px;
  transform: translateY(160%);
  transition: transform .28s cubic-bezier(.5,0,.2,1), opacity .2s ease;
  opacity: 0;
}
/* Mobile (≤ 760px): the bottom tabbar is visible, so push the ATC pill
 * above it. tabbar height ≈ 60px + 8px safe-area; +12px breathing gap. */
@media (max-width: 760px) {
  .sm-sticky-cart {
    bottom: calc(64px + env(safe-area-inset-bottom) + 12px);
    padding: 0 12px;
  }
}
.sm-sticky-cart.is-visible { transform: translateY(0); opacity: 1; }

.sm-sticky-cart__inner {
  pointer-events: auto;
  width: min(820px, 100%);
  background: color-mix(in srgb, var(--sm-surface) 90%, transparent);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--sm-line);
  border-radius: 999px;
  box-shadow:
    0 22px 56px -18px rgba(0, 0, 0, 0.26),
    0 8px 20px -8px rgba(0, 0, 0, 0.12);
  padding: 12px 12px 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sm-sticky-cart__thumb {
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--sm-chroma, var(--sm-surface-alt));
  display: block;
  position: relative;
  border: 1.5px solid var(--sm-line);
}
.sm-sticky-cart__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.sm-sticky-cart__copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm-sticky-cart__name {
  font-family: var(--sm-display-font);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  color: var(--sm-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sm-sticky-cart__price {
  font-family: var(--sm-display-font);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.1;
  color: var(--sm-accent);
}
.sm-sticky-cart__price .amount,
.sm-sticky-cart__price ins,
.sm-sticky-cart__price bdi { font-size: inherit; color: inherit; background: transparent; text-decoration: none; }
.sm-sticky-cart__price del { display: none; } /* keep the pill compact: only show current price */

.sm-sticky-cart__right {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.sm-sticky-cart__btn.sm-btn {
  border-radius: 999px;
  padding: 0 26px;
  height: 46px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Reserve space below page content so the sticky pill never covers the
 * last paragraph or the footer when it slides in. */
body.single-product { padding-bottom: 110px; }

/* Mobile chrome already adds tabbar (~64px) + FAB clearance (~16px); push the
 * pill higher on phones so the centred Flash FAB doesn't poke into it. */
@media (max-width: 900px) {
  .sm-sticky-cart {
    bottom: calc(80px + env(safe-area-inset-bottom));
    padding: 0 14px;
  }
  body.single-product { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
}

/* ============================================================
 * Reviews tab — summary + list + form, all branded
 * ============================================================ */

.woocommerce #reviews { display: flex; flex-direction: column; gap: 24px; }
.woocommerce #reviews #comments { margin: 0; padding: 0; }

.woocommerce #reviews .woocommerce-Reviews-title {
  font-family: var(--sm-display-font);
  font-weight: var(--sm-display-weight);
  font-size: 24px;
  letter-spacing: -0.4px;
  color: var(--sm-ink);
  margin: 0 0 14px;
  text-transform: var(--sm-display-transform);
}

/* Empty state — branded card */
.woocommerce #reviews .woocommerce-noreviews {
  padding: 32px;
  background: var(--sm-surface);
  border: 1px dashed var(--sm-line-strong);
  border-radius: var(--sm-radius-card);
  color: var(--sm-ink-soft);
  font-size: 14px;
  text-align: center;
  margin: 0 0 8px;
}
.woocommerce #reviews .woocommerce-noreviews::before {
  content: "✦ ✦ ✦ ✦ ✦";
  display: block;
  font-size: 22px;
  color: var(--sm-line-strong);
  letter-spacing: 4px;
  margin-bottom: 14px;
}

/* Existing reviews — card list */
.woocommerce #reviews ol.commentlist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.woocommerce #reviews ol.commentlist li {
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 16px;
  padding: 20px 22px;
}
.woocommerce #reviews ol.commentlist li::before,
.woocommerce #reviews ol.commentlist li::after { display: none; }
.woocommerce #reviews ol.commentlist li img.avatar {
  float: none;
  width: 40px; height: 40px;
  border-radius: 20px;
  padding: 0;
  border: 0;
  background: linear-gradient(135deg, var(--sm-accent-3), var(--sm-accent));
}
.woocommerce #reviews ol.commentlist li .comment-text {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.woocommerce #reviews ol.commentlist li .meta {
  font-family: var(--sm-mono-font);
  font-size: 11px;
  color: var(--sm-ink-muted);
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}
.woocommerce #reviews ol.commentlist li .meta strong {
  font-family: var(--sm-display-font);
  font-size: 14px;
  color: var(--sm-ink);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  margin-right: 8px;
}
.woocommerce #reviews ol.commentlist li .star-rating {
  float: none;
  font-size: 13px;
  color: var(--sm-accent-2);
  margin: 4px 0 10px;
}
.woocommerce #reviews ol.commentlist li .description p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--sm-ink);
}

/* ---------- Review form ---------- */
.woocommerce #review_form_wrapper {
  margin-top: 24px;
}
.woocommerce #review_form {
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: var(--sm-radius-card);
  padding: 28px 30px;
}
.woocommerce #review_form #respond {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.woocommerce #review_form .comment-reply-title {
  display: block;
  font-family: var(--sm-display-font);
  font-weight: var(--sm-display-weight);
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--sm-ink);
  margin: 0 0 4px;
  text-transform: var(--sm-display-transform);
}
.woocommerce #review_form .comment-reply-title small {
  display: block;
  font-family: var(--sm-body-font);
  font-size: 12px;
  color: var(--sm-ink-muted);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  margin-top: 4px;
}
.woocommerce #review_form p.comment-notes {
  font-size: 13px;
  color: var(--sm-ink-soft);
  margin: 8px 0 20px;
}

/* Rating row */
.woocommerce #review_form .comment-form-rating {
  margin: 0 0 20px;
  padding: 16px 18px;
  background: var(--sm-surface-alt);
  border-radius: 12px;
}
.woocommerce #review_form .comment-form-rating label {
  display: block;
  font-family: var(--sm-mono-font);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.woocommerce #review_form .comment-form-rating label .required { color: var(--sm-accent); }
.woocommerce #review_form .comment-form-rating p.stars {
  margin: 0;
  display: inline-flex;
  gap: 4px;
}
.woocommerce #review_form .comment-form-rating p.stars > span { display: inline-flex; gap: 4px; }
.woocommerce #review_form .comment-form-rating p.stars a {
  display: inline-block;
  width: 32px;
  height: 32px;
  text-indent: -9999em;
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 0;
  margin: 0;
  text-decoration: none;
}
.woocommerce #review_form .comment-form-rating p.stars a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23d9d1cc'><path d='M10 1l3 6 6 1-4.5 4.5 1 6.5L10 16l-5.5 3 1-6.5L1 8l6-1z'/></svg>");
  transition: background-image .1s;
}
.woocommerce #review_form .comment-form-rating p.stars a:hover::before,
.woocommerce #review_form .comment-form-rating p.stars a.active::before,
.woocommerce #review_form .comment-form-rating p.stars:hover a::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23FF8A5B'><path d='M10 1l3 6 6 1-4.5 4.5 1 6.5L10 16l-5.5 3 1-6.5L1 8l6-1z'/></svg>");
}
/* Reset trailing stars (cascade to unfilled for hover-right/active-right) */
.woocommerce #review_form .comment-form-rating p.stars:hover a:hover ~ a::before,
.woocommerce #review_form .comment-form-rating p.stars.selected a.active ~ a:not(.active)::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23d9d1cc'><path d='M10 1l3 6 6 1-4.5 4.5 1 6.5L10 16l-5.5 3 1-6.5L1 8l6-1z'/></svg>");
}

/* Fields */
.woocommerce #review_form .comment-form-comment label,
.woocommerce #review_form .comment-form-author label,
.woocommerce #review_form .comment-form-email label {
  display: block;
  font-family: var(--sm-mono-font);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--sm-ink-muted);
  margin-bottom: 6px;
  font-weight: 500;
}
.woocommerce #review_form .comment-form-comment label .required,
.woocommerce #review_form .comment-form-author label .required,
.woocommerce #review_form .comment-form-email label .required { color: var(--sm-accent); }

.woocommerce #review_form .comment-form-author,
.woocommerce #review_form .comment-form-email {
  display: inline-block;
  width: calc(50% - 7px);
  margin-bottom: 14px;
  vertical-align: top;
}
.woocommerce #review_form .comment-form-author { margin-right: 14px; }

.woocommerce #review_form textarea,
.woocommerce #review_form input[type="text"],
.woocommerce #review_form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  background: var(--sm-bg);
  border: 1.5px solid var(--sm-line);
  border-radius: 12px;
  font-family: var(--sm-body-font);
  font-size: 14px;
  color: var(--sm-ink);
  transition: border-color .15s, box-shadow .15s;
  box-shadow: none;
}
.woocommerce #review_form textarea {
  min-height: 120px;
  resize: vertical;
}
.woocommerce #review_form textarea:focus,
.woocommerce #review_form input:focus {
  border-color: var(--sm-accent);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sm-accent) 22%, transparent);
}

/* Submit — pill primary */
.woocommerce #review_form .form-submit { margin: 8px 0 0; }
.woocommerce #review_form input.submit,
.woocommerce #review_form button.submit,
.woocommerce #review_form #submit {
  appearance: none;
  -webkit-appearance: none;
  padding: 14px 32px;
  border: 0;
  border-radius: 999px;
  background: var(--sm-accent) !important;
  color: var(--sm-accent-ink) !important;
  font-family: var(--sm-body-font);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: var(--sm-button-tracking);
  text-transform: var(--sm-display-transform);
  cursor: pointer;
  transition: filter .15s, box-shadow .2s;
  min-width: 180px;
  box-shadow: none;
}
.woocommerce #review_form input.submit:hover,
.woocommerce #review_form button.submit:hover,
.woocommerce #review_form #submit:hover {
  filter: brightness(1.05);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--sm-accent) 35%, transparent);
}

/* Login-required notice */
.woocommerce #review_form .must-log-in {
  padding: 16px 20px;
  background: var(--sm-surface-alt);
  border-radius: 12px;
  font-size: 13px;
  color: var(--sm-ink-soft);
}
.woocommerce #review_form .must-log-in a { color: var(--sm-accent); font-weight: 700; }

@media (max-width: 700px) {
  .woocommerce #review_form { padding: 22px; }
  .woocommerce #review_form .comment-form-author,
  .woocommerce #review_form .comment-form-email { width: 100%; margin-right: 0; display: block; }
}

/* Q&A list */
.sm-qa-list { display: flex; flex-direction: column; gap: 8px; }
.sm-qa-item {
  background: var(--sm-surface);
  border: 1px solid var(--sm-line);
  border-radius: 12px;
  padding: 14px 18px;
}
.sm-qa-item summary {
  cursor: pointer;
  font-family: var(--sm-display-font);
  font-weight: 700;
  font-size: 14px;
  color: var(--sm-ink);
  list-style: none;
  position: relative;
  padding-right: 24px;
}
.sm-qa-item summary::-webkit-details-marker { display: none; }
.sm-qa-item summary::after {
  content: '+';
  position: absolute;
  right: 0; top: 50%;
  transform: translateY(-50%);
  font-family: var(--sm-mono-font);
  color: var(--sm-ink-muted);
  font-weight: 400;
  font-size: 18px;
  transition: transform .2s, color .2s;
}
.sm-qa-item[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--sm-accent); }
.sm-qa-item > div {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sm-line);
  font-size: 13px;
  color: var(--sm-ink-soft);
  line-height: 1.7;
}

/* ============================================================
 * Mobile responsive audit — single product (≤900 / ≤700 / ≤520)
 * ============================================================ */

/* FIX 1 — Sticky pill micro-tweaks on phones (positioning is set in the main
 * .sm-sticky-cart block above; here we just compact the inner buttons + thumb). */
@media (max-width: 700px) {
  .sm-sticky-cart__inner { padding: 6px 6px 6px 10px; gap: 10px; }
  .sm-sticky-cart__thumb { width: 40px; height: 40px; }
  .sm-sticky-cart__name  { font-size: 13px; }
  .sm-sticky-cart__price { font-size: 13px; }
  .sm-sticky-cart__btn.sm-btn { padding: 0 14px; height: 36px; font-size: 11px; letter-spacing: 0.03em; }
}
/* iPhone-class widths — the pill can't fit thumb + name + price + 2 wide
 * buttons in one row without overflowing. Let the inner flex-wrap so the
 * buttons drop to a SECOND row, displayed as a CSS grid (2 cols 1fr 1fr)
 * so they're guaranteed equal width side-by-side regardless of label
 * length or theme. */
@media (max-width: 480px) {
  .sm-sticky-cart__inner {
    flex-wrap: wrap;
    row-gap: 12px;
    /* Generous padding all around — the wrapped 2-row layout is a card,
     * not a pill, so it needs roomier breathing space than the unwrapped
     * single-row form. Override the @700 rule above. */
    padding: 14px 14px !important;
    /* Rounded-rect (not full pill) — once content is 2 rows tall the
     * 999px capsule end caps look awkward. 24px keeps a friendly soft
     * curve without the over-rounded "lozenge" feel. */
    border-radius: 26px !important;
  }
  .sm-sticky-cart__copy { min-width: 0; flex: 1 1 0; }
  .sm-sticky-cart__right {
    width: 100%;
    flex-basis: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .sm-sticky-cart__btn.sm-btn {
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    height: 44px;
    font-size: 12px;
    letter-spacing: 0.05em;
    justify-content: center;
  }
}

/* On the tightest phones (≤380), drop the price line — the bag drawer holds
 * the same info and the user has clearly seen it on the product page above. */
@media (max-width: 380px) {
  .sm-sticky-cart__price { display: none; }
}

/* ============================================================
 * Sticky pill — dark mode polish
 * Three problems we're fixing:
 *  1. The default `--sm-accent` price color was the same neon green as the
 *     "Buy now" button — too many competing accent surfaces in one row.
 *     Switch the price to ink (white in dark mode) so the buttons stand out.
 *  2. The pill background blended into the page bg in dark mode — bump it
 *     a notch lighter and add a slightly stronger border for separation.
 *  3. The "Add to bag" ghost button in dark mode now reads as transparent
 *     with an accent border, distinct from the filled "Buy now" beside it.
 * ============================================================ */
[data-theme="dark"] .sm-sticky-cart__inner {
  background: color-mix(in srgb, var(--sm-surface-alt) 92%, transparent);
  border-color: var(--sm-line-strong);
}
[data-theme="dark"] .sm-sticky-cart__price {
  color: var(--sm-ink);
}
/* Accent the price subtly with a coloured "$" prefix to keep it brand-y
 * without competing with the buttons. */
[data-theme="dark"] .sm-sticky-cart__price .woocommerce-Price-currencySymbol {
  color: var(--sm-accent);
  margin-right: 1px;
}
/* Ghost-style "Add to bag" — outline that contrasts with the filled
 * "Buy now" beside it, in both light and dark modes. */
.sm-sticky-cart__btn.sm-btn.is-ghost {
  background: transparent;
  border: 1.5px solid var(--sm-line-strong);
  color: var(--sm-ink);
}
.sm-sticky-cart__btn.sm-btn.is-ghost:hover,
.sm-sticky-cart__btn.sm-btn.is-ghost:focus-visible {
  border-color: var(--sm-accent);
  color: var(--sm-accent);
  background: transparent;
}

/* FIX 2 — Tabs row scrolls horizontally instead of overflowing the wrap.
 * Long labels (Description / Additional information / Reviews / Q&A) push
 * past viewport on iPhone widths. */
@media (max-width: 700px) {
  .woocommerce div.product .woocommerce-tabs ul.tabs {
    gap: 18px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .woocommerce div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar { display: none; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li { flex: 0 0 auto; white-space: nowrap; }
  .woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 12px 0; }
}

/* FIX 3 — Phones: shrink each thumb a bit more so 4-5 fit in the row width.
 * The horizontal-strip layout itself is the default now (set above), so this
 * is just a sizing pass for very small viewports. */
@media (max-width: 600px) {
  .woocommerce div.product .woocommerce-product-gallery.images { gap: 10px; }
  .woocommerce div.product .woocommerce-product-gallery .flex-control-thumbs li {
    width: 56px;
    flex: 0 0 56px;
  }
}

/* FIX 4 — Cart form (qty + Add to cart + Buy now) wraps cleanly at ≤520.
 * Min-widths of 200/160 cause horizontal overflow on 320–414px. Force
 * full-width stacking with 44px+ touch targets. */
@media (max-width: 520px) {
  .woocommerce div.product form.cart {
    gap: 8px;
    max-width: none;
  }
  /* Quantity stepper full-width with edge-aligned − / + so the bar stops feeling empty */
  .woocommerce div.product form.cart .quantity {
    width: 100%;
    height: 46px;
    justify-content: space-between;
    padding: 3px 12px;
  }
  .woocommerce div.product form.cart .quantity .qty,
  .woocommerce div.product form.cart .quantity input[type="number"] { width: 64px; }
  .woocommerce div.product form.cart button.single_add_to_cart_button,
  .sm-buy-now-btn {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* FIX 5 — Variation swatches hit the 44×44 touch target on mobile.
 * Color dots are 34px and pills only 28–30px tall — below WCAG/iOS guidance. */
@media (max-width: 700px) {
  .sm-swatch--color {
    width: 44px; height: 44px;
    border-radius: 22px;
  }
  .sm-swatch--pill {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 13px;
  }
  .sm-variation-swatches { gap: 10px; }
}

/* FIX 6 — Price block on phones: drop the card chrome (border + bg) so the
 * big accent number reads as a price, not as an oversized empty card. */
@media (max-width: 520px) {
  .woocommerce div.product p.price {
    padding: 0 !important;
    margin-top: 12px !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    gap: 10px;
  }
  .woocommerce div.product p.price ins,
  .woocommerce div.product p.price > .amount:only-child,
  .woocommerce div.product p.price > bdi:only-child,
  .woocommerce div.product p.price ins .amount,
  .woocommerce div.product p.price ins bdi { font-size: 30px; }
  .woocommerce div.product p.price del .amount,
  .woocommerce div.product p.price del bdi { font-size: 15px; }
  .sm-price-chip { padding: 4px 8px; font-size: 10px; }
  .sm-price-urgency { margin-top: 6px; }
  .woocommerce div.product .product_title { font-size: 24px; letter-spacing: -0.4px; margin-top: 4px !important; }
}

/* ============================================================
 * Souci Carousel — shared by related / upsells / cross-sells
 * Native scroll-snap drives the layout; product-carousel.js
 * adds prev/next/dots/autoplay on top. Works without JS too.
 * ============================================================ */
.sm-carousel {
  position: relative;
  /* When this section is dropped into the product page's 1fr/1fr grid (via
   * single-product/related.php), default behaviour would limit it to one
   * column = half-screen on desktop. Span the full grid so the related-
   * products carousel stretches to the full content width. Plain pages
   * (homepage / category) ignore the property because there's no grid. */
  grid-column: 1 / -1;
}
/* flex-direction:row pinned — .sm-section-head's mobile media query flips
 * itself to flex-direction:column, which would re-interpret align-items:
 * flex-end as "right-align" (cross axis), pushing the carousel title to the
 * right side of the head on mobile. Forcing row keeps title flex-grow:1 →
 * full-width → text-align:left starts the text at the cards' left edge. */
.sm-carousel__head { display: flex; flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; text-align: left; }
/* Reset two side-effects of `.sm-section-head` (which the carousel head also
 * carries for shared typography). `.sm-section-head > div { flex: 1 }` is
 * intended for the single title <div> on centered home/shop section heads;
 * here it ALSO grabs the carousel nav button group, bloating it to half the
 * head width and pushing the title text to centre. Pin the title div to
 * `flex:1` and the nav to its content width, both left-aligned. */
.sm-carousel__head > div { text-align: left; }
.sm-carousel__head > .sm-carousel__nav { flex: 0 0 auto; }
.sm-carousel__head .sm-eyebrow { display: block; color: var(--sm-ink-muted); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 8px; font-weight: 700; }
.sm-carousel__head .sm-h2 { font-family: var(--sm-display-font); font-weight: 800; font-size: 32px; line-height: 1.1; letter-spacing: -0.4px; margin: 0; color: var(--sm-ink); }
.sm-carousel__head .sm-sub { color: var(--sm-ink-muted); font-size: 13px; margin: 6px 0 0; line-height: 1.5; }

.sm-carousel__nav { display: flex; gap: 10px; flex-shrink: 0; }
.sm-carousel__btn {
  appearance: none;
  border: 1px solid var(--sm-line-strong);
  background: var(--sm-surface);
  color: var(--sm-ink);
  width: 44px; height: 44px;
  border-radius: 999px;
  display: inline-grid; place-items: center;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .25s ease;
}
.sm-carousel__btn:hover:not(:disabled) {
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
  border-color: var(--sm-accent);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px -10px rgba(230,25,92,0.55);
}
.sm-carousel__btn:focus-visible { outline: 2px solid var(--sm-accent); outline-offset: 3px; }
.sm-carousel__btn:disabled { opacity: 0.32; cursor: not-allowed; }
.sm-carousel__btn svg { width: 20px; height: 20px; }

.sm-carousel__viewport { position: relative; }

/* Carousel mode — horizontal scroll-snap track */
.sm-carousel.is-carousel .sm-carousel__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 18px * (var(--sm-per-row, 5) - 1)) / var(--sm-per-row, 5));
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}
.sm-carousel.is-carousel .sm-carousel__track::-webkit-scrollbar { display: none; }
.sm-carousel.is-carousel .sm-carousel__track > * { scroll-snap-align: start; min-width: 0; }
.sm-carousel.is-carousel .sm-carousel__track:focus-visible { outline: 2px solid var(--sm-accent); outline-offset: 4px; border-radius: var(--sm-radius); }

/* Grid mode — same per-row but no scrolling */
.sm-carousel.is-grid .sm-carousel__track {
  display: grid;
  grid-template-columns: repeat(var(--sm-per-row, 5), minmax(0, 1fr));
  gap: 18px;
}

/* Dots */
.sm-carousel__dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; min-height: 8px; }
.sm-carousel__dot {
  appearance: none; border: 0; padding: 0;
  background: var(--sm-line-strong);
  width: 8px; height: 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, width .25s cubic-bezier(.5,0,.2,1);
}
.sm-carousel__dot:hover { background: var(--sm-ink-muted); }
.sm-carousel__dot.is-active { background: var(--sm-accent); width: 26px; }

/* Cards inside the carousel — feel a touch larger / airier than shop loop */
.sm-carousel .sm-prod-card { background: var(--sm-card-bg); border-radius: var(--sm-radius-card); }
.sm-carousel .sm-prod-card__media { aspect-ratio: 1 / 1; }

/* Responsive — collapse columns on narrower viewports */
@media (max-width: 1280px) {
  .sm-carousel.is-grid .sm-carousel__track { grid-template-columns: repeat(min(var(--sm-per-row, 5), 4), minmax(0, 1fr)); }
  .sm-carousel.is-carousel .sm-carousel__track { grid-auto-columns: calc((100% - 18px * (min(var(--sm-per-row, 5), 4) - 1)) / min(var(--sm-per-row, 5), 4)); }
}
@media (max-width: 980px) {
  .sm-carousel__head .sm-h2 { font-size: 26px; }
  .sm-carousel.is-grid .sm-carousel__track,
  .sm-carousel.is-carousel .sm-carousel__track { gap: 14px; }
  .sm-carousel.is-grid .sm-carousel__track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm-carousel.is-carousel .sm-carousel__track { grid-auto-columns: calc((100% - 14px * 2) / 3); }
  .sm-carousel__btn { width: 38px; height: 38px; }
}
@media (max-width: 720px) {
  .sm-carousel { padding-top: 28px; } /* tighter than the 40px desktop default */
  .sm-carousel__head { margin-bottom: 14px; }
  .sm-carousel__head .sm-eyebrow { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 4px; }
  .sm-carousel__head .sm-h2 { font-size: 22px; letter-spacing: -0.2px; }
  .sm-carousel__head .sm-sub { font-size: 12px; }
  .sm-carousel__nav { display: none; } /* native swipe is enough on touch */
  .sm-carousel.is-grid .sm-carousel__track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sm-carousel.is-carousel .sm-carousel__track { grid-auto-columns: calc((100% - 12px) / 2.15); gap: 12px; } /* peek next card */
  /* Dots stay visually small (8px) but the button gains 10×6px padding so the
   * tap target reaches ~28×20px — comfortable for thumbs without bloating UI. */
  .sm-carousel__dots { margin-top: 14px; gap: 6px; }
  .sm-carousel__dot {
    width: auto; height: auto;
    padding: 10px 6px;
    background: transparent;
    position: relative;
    display: inline-grid;
    place-items: center;
  }
  .sm-carousel__dot::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 999px;
    background: var(--sm-line-strong);
    transition: width .25s cubic-bezier(.5,0,.2,1), background .2s ease;
  }
  .sm-carousel__dot.is-active::before { background: var(--sm-accent); width: 22px; }
}
@media (max-width: 460px) {
  .sm-carousel.is-carousel .sm-carousel__track { grid-auto-columns: calc((100% - 10px) / 1.7); gap: 10px; }
}

/* ============================================================
 * Hero video — uploaded MP4 or YouTube/Vimeo embed.
 * Two contexts:
 *   --gallery → renders in the left gallery column above the images.
 *               Aspect 1:1 to match product image ratio.
 *   --section → renders below summary, above tabs. Full-width 16:9.
 * ============================================================ */
.sm-product-video {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--sm-radius-card, 18px);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 12px 36px -16px rgba(0, 0, 0, 0.25);
}
.sm-product-video video,
.sm-product-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
  background: #000;
}

/* In-gallery — square to match product cards */
.sm-product-video--gallery {
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
}

/* Below-summary cinema strip — spans both grid columns */
.sm-product-video--section {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 9;
  margin: 24px 0 8px;
  max-width: 100%;
}

/* Tiny "Video" pill in top-left so users see at a glance it's a video, not an image */
.sm-product-video::before {
  content: 'VIDEO';
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--sm-mono-font);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
}
/* Hide the pill while the native video controls are showing on hover/focus
 * to avoid clutter — only effective for <video>, iframes can't be detected */
.sm-product-video--mp4:hover::before,
.sm-product-video--mp4:focus-within::before { opacity: 0.35; }

@media (max-width: 700px) {
  .sm-product-video { border-radius: 14px; }
  .sm-product-video--gallery { margin-bottom: 10px; }
  .sm-product-video--section { margin: 16px 0; aspect-ratio: 16 / 10; }
  .sm-product-video::before { top: 8px; left: 8px; font-size: 9px; padding: 3px 7px; }
}

/* ============================================================
 * Product highlights — short attribute strip rendered above
 * the Add-to-Cart button on single-product pages.
 *
 * 2x2 grid on desktop, single column on mobile. Each row has
 * a 28×28 accent-tinted icon tile + bold title + optional
 * one-line sub. Renders via template-parts/product/highlights.php
 * which reads `_souci_highlights` meta or Customizer fallback.
 * ============================================================ */
.sm-product-highlights {
  list-style: none;
  margin: 18px 0 22px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 22px;
  background: var(--sm-surface, #15151E);
  border: 1px solid var(--sm-line);
  border-radius: 14px;
  position: relative;
}
.sm-product-highlights::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(190, 149, 93, 0.06), transparent 40%);
}
.sm-product-highlights__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
}
.sm-product-highlights__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(190, 149, 93, 0.10);
  border: 1px solid rgba(190, 149, 93, 0.18);
  color: var(--sm-accent, #BE955D);
  transition: background .25s ease, border-color .25s ease;
}
.sm-product-highlights__icon svg {
  width: 18px;
  height: 18px;
  display: block;
}
.sm-product-highlights__item:hover .sm-product-highlights__icon {
  background: rgba(190, 149, 93, 0.18);
  border-color: rgba(190, 149, 93, 0.32);
}
.sm-product-highlights__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sm-product-highlights__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--sm-ink, #F5F0E8);
  letter-spacing: 0.01em;
  line-height: 1.3;
  margin: 0;
}
.sm-product-highlights__sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--sm-ink-muted, #9C9587);
  line-height: 1.45;
  margin: 0;
}
@media (max-width: 600px) {
  .sm-product-highlights {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 16px;
    margin: 14px 0 18px;
  }
  .sm-product-highlights__icon { width: 30px; height: 30px; }
  .sm-product-highlights__icon svg { width: 16px; height: 16px; }
  .sm-product-highlights__title { font-size: 13px; }
  .sm-product-highlights__sub { font-size: 11px; }
}
