
/* ─── Page-scoped base ──────────────────────────────────────────────── */

.page-single .single-main {
  position: relative;
  /* overflow-x: clip (not hidden) so .single-glow--top can bleed above main into the
     header area instead of being clipped at y=main-top — that clip creates a visible
     "pasted rectangle" edge at the header/page boundary. X stays clipped because
     glow SVG canvas (1456px) > 1440 viewport. */
  overflow-x: clip;
  width: 100%;
  align-self: stretch;
}

.page-single .single-container {
  max-width: 1232px;
  width: 100%;
  margin: 0 auto;
  /* Figma: header bottom y=96; NEW badge y=140 → 44px gap header→content.
     Mobile: page-shell already provides the single 16px gutter → ZERO horizontal here
     to avoid the double-gutter (content was starting at x=32 instead of x=16). */
  padding: 24px 0 64px;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
@media (min-width: 1024px) {
  .page-single .single-container {
    /* Account for heading-row flex centering Updated pill (32h) which pushes NEW (24h) down 4px
       Figma absolute y=140 for NEW badge; container y=96; offset 44 - 4 align center = 40 */
    padding: 40px 16px 96px;
  }
}

/* ─── Page glow (Figma 1626:1022 top + 1685:1917 bottom) ────────────── */
.page-single .single-glow {
  display: block;
  position: absolute;
  pointer-events: none;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  left: 0;
  right: 0;
  width: 100%;
  aspect-ratio: 1456 / 448;
}
.page-single .single-glow--top {
  top: 0;
  transform: translateY(-60%);
  background-image: url('../img/single/single-glow-top.svg');
}
.page-single .single-glow--bottom {
  bottom: 0;
  transform: translateY(60%);
  background-image: url('../img/single/single-glow-bottom.svg');
}
@media (min-width: 768px) {
  .page-single .single-glow {
    width: 1456px;
    aspect-ratio: auto;
    height: 448px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
  .page-single .single-glow--top {
    top: -184px;
  }
  .page-single .single-glow--bottom {
    bottom: -224px;
  }
}

/* ─── Section 3: Top heading row ─────────────────────────────────────
   Figma absolute y inside frame:
     NEW badge: y=140 h=24
     Updated pill: y=136 h=32 (next to NEW)
     h1 title: y=172 h=48 (gap from NEW row: 8px since 172=140+24+8)
     stars+reviews row: y=224 h=20 (gap from h1: 4px since 224=172+48+4)
     BM+meta row: y=252 h=24 (gap from stars: 8px since 252=224+20+8)
     hero: y=300 h=768 (gap from meta: 24px since 300=252+24+24)
*/
.page-single .single-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 0;
  margin-bottom: 0;
}
@media (min-width: 1024px) {
  .page-single .single-top {
    grid-template-columns: minmax(0, 768px) 384px;
    column-gap: 48px;
    align-items: start;
    justify-content: center;
  }
}

.page-single .single-top__left {
  display: flex;
  flex-direction: column;
  gap: 0; /* set per-element margins for exact Figma offsets */
  min-width: 0;
}
.page-single .single-top__right {
  min-width: 0;
}
@media (min-width: 1024px) {
  /* Figma: right column top-price starts at y=244, left column NEW row at y=140 — 104px offset */
  .page-single .single-top__right {
    margin-top: 104px;
  }
}

.page-single .single-top__heading-row {
  display: flex;
  align-items: center;
  /* Figma: NEW badge (1724:54) ends x=162, Updated pill (1724:81) starts x=170 → 8px gap */
  gap: 8px;
  flex-wrap: wrap;
}

.page-single .single-top__badge-new {
  /* Figma 1724:54 — bg #22D3EE, text #0B0E16, radius 4, padding 4px 6px, Bold 12/16 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  background: rgb(var(--color-main));
  color: rgb(var(--color-fore));
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  border-radius: 4px;
  text-transform: uppercase;
}

.page-single .single-top__updated {
  /* Figma 1724:81 — bordered pill, border #242A43, radius 24, padding 8/12, gap 6,
     text #94A3B8 (--color-text), DemiBold 12/16 */
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgb(var(--color-line));
  border-radius: 24px;
  color: rgb(var(--color-text));
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
}
.page-single .single-top__updated svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
}

.page-single .single-top__title {
  margin: 8px 0 0 0; /* 8px gap below NEW row per Figma y=172 - (140+24) = 8 */
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: rgb(var(--color-lead));
}
@media (min-width: 768px) {
  .page-single .single-top__title {
    /* Figma 1626:1234 — 36px Bold (weight 700) line-height 48 */
    font-size: 36px;
    line-height: 48px;
    margin-top: 8px;
  }
}

.page-single .single-top__rating {
  /* Figma 1724:92 — y=224, gap from title: 4px */
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.page-single .single-top__stars {
  /* Figma 1724:93 — 5 stars, 16x16 each, gap ~3, color warn (gold) per single page */
  display: inline-flex;
  gap: 3px;
  color: rgb(var(--color-warn));
  align-items: center;
}
.page-single .single-top__stars .icon-star-01-solid {
  width: 16px;
  height: 16px;
}
.page-single .single-top__reviews-count {
  /* Figma 1724:109 — color #FFFFFF Medium 14/20 - BUT the page shows lead color */
  color: rgb(var(--color-lead));
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
}

.page-single .single-top__meta {
  /* Figma 1724:77 — y=252 (8px gap from rating row bottom 244) */
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.page-single .single-top__meta-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  /* Figma uses --color-text (#94A3B8 dark / #64748B light), not --color-subs */
  color: rgb(var(--color-text));
  font-size: 14px;
  font-weight: 500;
  line-height: 16px;
}
.page-single .single-top__meta-stat.icon-before::before {
  width: 16px;
  height: 16px;
}

/* ─── Section 4: Hero (inside single-top__left) ── */
/* Hero media (Figma 1626:1181 — 768×768 square, 8px radius)
   Figma y=300 — meta row ends at y=276 → 24px gap */
.page-single .single-hero {
  position: relative;
  width: 100%;
  max-width: 768px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: rgb(var(--color-soft));
  margin-top: 24px; /* gap from meta row → hero per Figma 24px */
}
@media (min-width: 1024px) {
  .page-single .single-hero {
    width: 768px;
    height: 768px;
  }
}
.page-single .single-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* WooCommerce product gallery fill (Figma 1626:1181 — image must FILL the 768px box).
   woocommerce_show_product_images() emits .woocommerce-product-gallery (with __wrapper /
   __image / <img>) whose intrinsic image (600x600) was rendering centered in the 768px
   box, leaving a light-grey under-fill in light mode [SPD-A1]. Force the gallery chrome
   to fill the .single-hero box and the featured image to object-fit:cover so the collage
   covers the full square instead of floating at native size. */
.page-single .single-hero .woocommerce-product-gallery {
  position: absolute;
  inset: 0;
  width: 100% !important; /* WC inline-styles a px width via flexslider; override to fill */
  height: 100%;
  margin: 0;
}
.page-single .single-hero .woocommerce-product-gallery__wrapper,
.page-single .single-hero .flex-viewport,
.page-single .single-hero .woocommerce-product-gallery__image {
  width: 100%;
  height: 100%;
  margin: 0;
}
.page-single .single-hero .woocommerce-product-gallery__image > a,
.page-single .single-hero .woocommerce-product-gallery__image {
  display: block;
}
.page-single .single-hero .woocommerce-product-gallery img,
.page-single .single-hero .woocommerce-product-gallery__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The gallery zoom trigger / thumbnail strip are WC chrome we don't surface in the
   Figma single-image hero — keep them out of the square. */
.page-single .single-hero .woocommerce-product-gallery__trigger {
  z-index: 6;
}
.page-single .single-hero .flex-control-thumbs {
  display: none; /* single-image collage: no thumbnail strip in Figma [SPD-A2] */
}

/* Sales pill overlay (Figma 1724:112 — y=292 = 8px above hero top, centered horizontally).
   ALWAYS-DARK island (Pitfall #23): Figma fills are static #353D61 bg + #FFFFFF border
   + #FFFFFF text in BOTH modes. Previously used --color-edge + --color-lead → BLACK text
   on light-gray pill in light mode (unreadable). */
.page-single .single-hero__sales-pill {
  position: absolute;
  /* Figma 1724:112 y=292; hero 1626:1181 y=300 → pill top is 8px above hero top */
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #353D61;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  color: #FFFFFF;
  font-family: 'Nationale', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  z-index: 5;
  white-space: nowrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.page-single .single-hero__sales-pill .single-hero__sales-icon {
  width: 16px;
  height: 16px;
  color: #FFFFFF;
  background-color: currentColor;
}
.page-single .single-hero__sales-text {
  color: #FFFFFF;
  font-weight: 500;
}
.page-single .single-hero__sales-text strong {
  font-weight: 700;
  color: #FFFFFF;
}

/* Top-right price pulled into desktop only via grid col */
@media (min-width: 1024px) {
  /* addon-panel column starts at same y=300 as hero, but the top price summary inside
     addon-panel renders at y=244 because section-h--first has no margin-top. */
}

/* ─── Addon panel: group title + Product Add-Ons cards + qty ──────────
   Figma 1745:184 "Addon: Premium Access Options" header above the option cards. */
.page-single .addon-panel__group-title {
  margin: 0 0 16px;
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  color: rgb(var(--color-lead));
}

/* Product Add-Ons plugin output (.wc-pao-* markup) picks up our card design so the
   real plugin radios read like the Figma option cards (1745:139/140/158). Scoped to
   the panel; harmless when the plugin is inactive (no such nodes render). */
.page-single .addon-panel .wc-pao-addon {
  border-top: 1px solid rgb(var(--color-line));
  padding-top: 16px;
  margin-top: 16px;
}
.page-single .addon-panel .wc-pao-addon-name {
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: rgb(var(--color-lead));
}
.page-single .addon-panel .wc-pao-addon-wrap label,
.page-single .addon-panel .wc-pao-addon-description {
  color: rgb(var(--color-text));
  font-size: 14px;
  line-height: 20px;
}

/* Bare WooCommerce quantity input [SPD-C2]. Figma's purchase block is a single
   prominent Add to cart button (1685:2012) with no qty stepper for these digital
   packs (qty fixed at 1). The live page shows a stray 1-char number box floating
   above the button. Hide the bare qty field while KEEPING it in the DOM (name=quantity)
   so the WC add-to-cart POST still carries quantity=1 — purchase stays functional. */
.page-single .addon-panel form.cart .quantity {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  margin: -1px;
  padding: 0;
  border: 0;
}
/* Full-width Add to cart button (Figma 1685:2012, 384×56) now that qty is hidden. */
.page-single .addon-panel form.cart .single_add_to_cart_button {
  width: 100%;
}

/* ─── Section 6: Wide stats bar ─────────────────────────────────────
   Figma: y=1116 — hero ends y=1068 → 48px gap */
.page-single .wide-stats-bar {
  margin-top: 48px;
  margin-bottom: 0;
}

/* Inline-SVG stat glyphs (year/calendar + download CTA). The shared
   [class*="icon-"] base rule matches `…__icon--svg` (it contains "icon-") and would
   mask the real <svg> away — undo that and render the SVG normally. Mirrors the
   existing `…__icon--text` reset in components.css. */
.page-single .wide-stats-bar__icon--svg {
  background: none;
  -webkit-mask: none;
  mask: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--color-text));
}
.page-single .wide-stats-bar__icon--svg svg {
  width: 28px;
  height: 28px;
  display: block;
}
/* Download call-to-item (Figma 1751:2) reads as the active/primary stat — tint it
   to the brand accent so it stands apart from the muted data cells. */
.page-single .wide-stats-bar__col--cta .wide-stats-bar__icon--svg,
.page-single .wide-stats-bar__col--cta .wide-stats-bar__label {
  color: rgb(var(--color-main));
}

/* ─── Section 7: Accordion list ─────────────────────────────────────
   Figma: y=1288 — wide-stats ends y=1240 → 48px gap */
.page-single .accordion-list {
  margin-top: 48px;
  margin-bottom: 0;
}

/* ─── Section 8: Reviews summary + cards ────────────────────────────
   Figma h2 at y=1793 — accordion frame ends y=1745 → 48px gap */
.page-single .reviews-summary {
  margin-top: 48px;
  margin-bottom: 0;
  text-align: center;
}
.page-single .single-reviews-list {
  /* Figma first review card at y=2004 — count text bottom y=1980 → 24px gap */
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Section 9: Pagination wrap ────────────────────────────────────
   Figma pagination at y=3076 — reviews list bottom 3024 → 52px gap */
.page-single .single-pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 52px;
  margin-bottom: 0;
}
.page-single .single-pagination-wrap .pagination {
  margin-top: 0; /* override component default */
}
.page-single .single-pagination-wrap .pagination-summary {
  margin-top: 0; /* gap from wrap */
}

/* ─── Section 10: Related products ─────────────────────────────────
   Figma h2 at y=3196 — pagination bottom y=3148 → 48px gap */
.page-single .single-related {
  margin-top: 48px;
}
.page-single .single-related__header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  /* Figma 1685:1761: title (1685:1762) ends x=215, more-chevron (1685:1763) starts x=223 → 8px gap.
     carousel-ctrls use margin-left:auto so this gap only governs title↔more spacing. */
  gap: 8px;
}
.page-single .single-related__title {
  margin: 0;
  font-family: 'Nationale', system-ui, sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.02em;
  color: rgb(var(--color-lead));
}
@media (min-width: 768px) {
  .page-single .single-related__title {
    /* Figma 1685:1762: "Related Products" 36px font, frame h=36 → line-height 36px
       (distinct from the page title 1626:1234 which is 36px/48px). */
    font-size: 36px;
    line-height: 36px;
  }
}
.page-single .single-related__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: rgb(var(--color-lead));
  text-decoration: none;
}
.page-single .single-related__more .icon-chevron-right {
  width: 20px;
  height: 20px;
}
.page-single .single-related__carousel-ctrls {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 16px;
}
@media (min-width: 768px) {
  .page-single .single-related__carousel-ctrls { display: inline-flex; }
}
.page-single .single-related__nav {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgb(var(--color-line));
  background: transparent;
  color: rgb(var(--color-lead));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.page-single .single-related__nav .icon-chevron-right { width: 20px; height: 20px; }
.page-single .single-related__nav--prev .icon-chevron-right { transform: rotate(180deg); }
.page-single .single-related__dots {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.page-single .single-related__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgb(var(--color-edge));
}
.page-single .single-related__dot:first-child { background: rgb(var(--color-main)); }

/* ─── Related products: GRID of card-product (matches static single design) ──
   single-product.php renders .single-related__grid > article.card-product directly
   (not WC's ul.products). Static rule: auto-fill 240 → 2-up @768 → 4×282 @1024.
   (The .single-related__viewport/ul.products rules below are kept for the WC-default
   markup path but are inert with the grid markup.) */
.page-single .single-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
@media (min-width: 768px) {
  .page-single .single-related__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .page-single .single-related__grid {
    grid-template-columns: repeat(4, minmax(0, 282px));
    justify-content: start;
  }
}

/* ─── Related products: horizontal scroll-snap carousel ──────────────
   Figma 1685:1761/1767 — a single 4-up row (cards 282px @ x120/426/732/1038) with
   prev/next chevrons + dot nav, NOT a vertical stack.
   woocommerce_output_related_products() emits:
     .single-related__viewport > section.related.products > ul.products > li.product
   The live `ul.products` computed display:block (cards stacked vertically) [SPD-F1].
   We override that into a horizontal scroll-snap row. CSS-only carousel: the row
   scrolls (touch/trackpad) and snaps; the header chevrons are visual affordances
   (no shared JS added — JS is owned by Faz1). */
.page-single .single-related__viewport {
  /* Bleed the scroll edges to the container gutter so the first card aligns flush. */
  margin: 0 -16px;
  padding: 0 16px;
}
.page-single .single-related .related.products,
.page-single .single-related section.products {
  margin: 0;
  width: 100%;
}
/* Hide WC's own "Related products" <h2> — our .single-related__header supplies it. */
.page-single .single-related .related.products > h2 {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.page-single .single-related ul.products {
  display: flex !important;          /* beat WC default block/grid */
  flex-wrap: nowrap;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;             /* Firefox */
  -ms-overflow-style: none;          /* IE/Edge */
}
.page-single .single-related ul.products::-webkit-scrollbar {
  display: none;                     /* WebKit */
}
.page-single .single-related ul.products > li.product {
  flex: 0 0 auto;
  width: 240px;
  margin: 0 !important;              /* beat WC ul.products li percentage margins */
  scroll-snap-align: start;
  float: none !important;            /* beat WC float-based grid */
}
@media (min-width: 768px) {
  .page-single .single-related ul.products > li.product {
    /* 4 cards across the 1200px row minus 3×24 gaps → 282px (Figma card width). */
    width: 282px;
  }
}

/* ─── Section 11: VIP banner ─────────────────────────────────────
   Figma at y=3708 — related cards bottom y=3618 → 90px gap */
.page-single .vip-banner {
  margin-top: 90px;
}

/* ─── Section 12: Snap banner ───────────────────────────────────
   Figma at y=4304 — VIP banner bottom y=4256 → 48px gap */
.page-single .snap-banner {
  margin-top: 48px;
}
