/* single/index.css — Single (product detail) page composition CSS. Mobile-first.
   Figma frame: 1626:1015 (1440 × 5421 desktop).
   Goal: 1:1 fidelity with Figma absolute y positions of major sections (delta ≤5px). */

/* ─── Atoms ────────────────────────────────────────────────────────── */
@import url('../../_components/atoms/page-shell/page-shell.css');
@import url('../../_components/atoms/btn-tag/btn-tag.css');

/* ─── Molecules ────────────────────────────────────────────────────── */
@import url('../../_components/molecules/addon-card/addon-card.css');
@import url('../../_components/molecules/review-card/review-card.css');
@import url('../../_components/molecules/pagination-controls/pagination-controls.css');
@import url('../../_components/molecules/card-product/card-product.css');

/* ─── Sections ─────────────────────────────────────────────────────── */
@import url('../../_components/sections/header-full/header-full.css');
@import url('../../_components/sections/footer-full/footer-full.css');
@import url('../../_components/sections/mobile-menu/mobile-menu.css');
@import url('../../_components/sections/age-gate-modal/age-gate-modal.css');
@import url('../../_components/sections/addon-panel/addon-panel.css');
@import url('../../_components/sections/wide-stats-bar/wide-stats-bar.css');
@import url('../../_components/sections/accordion-list/accordion-list.css');
@import url('../../_components/sections/reviews-summary/reviews-summary.css');
@import url('../../_components/sections/vip-banner/vip-banner.css');
@import url('../../_components/sections/snap-banner/snap-banner.css');

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

.page-single .single-main {
  position: relative;
  overflow: hidden;
  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 */
  padding: 24px 16px 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('../../_shared/assets/single/single-glow-top.svg');
}
.page-single .single-glow--bottom {
  bottom: 0;
  transform: translateY(60%);
  background-image: url('../../_shared/assets/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;
  gap: 16px;
  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;
  color: rgb(var(--color-subs));
  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;
}

/* Sales pill overlay (Figma 1724:112 — y=292 = 8px above hero top, centered horizontally) */
.page-single .single-hero__sales-pill {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  /* Figma fill: edge #353D61 + 12px backdrop blur + 1px white border + radius 20 */
  background: rgb(var(--color-edge));
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  color: rgb(var(--color-lead));
  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: rgb(var(--color-lead));
  background-color: currentColor;
}
.page-single .single-hero__sales-text {
  color: rgb(var(--color-lead));
  font-weight: 500;
}
.page-single .single-hero__sales-text strong {
  font-weight: 700;
  color: rgb(var(--color-lead));
}

/* 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. */
}

/* ─── 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;
}

/* ─── 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;
  gap: 16px;
}
.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 {
    font-size: 36px;
    line-height: 48px;
  }
}
.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)); }

.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;
  }
}

/* ─── 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;
}
