/* ==========================================================================
   CRO elements — styling only. Data lives in cro-config.js, logic in cro.js.
   Tokens sampled from the live theme so these read as part of the brand:
     pink #EC008C (marquee), button #1C1C1E r48, page #FAFAFC, font Circular.
   ========================================================================== */

.cro {
  --cro-ink: #1c1c1e;
  --cro-ink-60: #6b6b70;
  --cro-ink-40: #9a9aa0;
  --cro-line: #e6e6ea;
  --cro-paper: #ffffff;
  --cro-shell: #fafafc;
  --cro-pink: #ec008c;
  --cro-green: #0f7b52;
  --cro-alert: #d92d20;
  --cro-amber: #fef08a;
  --cro-radius: 12px;
  --cro-radius-pill: 48px;
  font-family: Circular, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--cro-ink);
  box-sizing: border-box;
}
.cro *, .cro *::before, .cro *::after { box-sizing: border-box; }

.cro-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------- 1. PRICE ANCHOR */
.cro-price-anchor {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 4px;
}
.cro-rrp {
  color: var(--cro-ink-40);
  text-decoration: line-through;
  font-size: 15px;
}
.cro-save {
  display: inline-flex; align-items: center;
  background: var(--cro-pink); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 4px 10px; border-radius: var(--cro-radius-pill);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- 2. TIMER */
.cro-timer {
  display: flex; align-items: center; gap: 8px;
  background: #fff5fa; border: 1px solid #ffd6ec;
  border-radius: var(--cro-radius);
  padding: 10px 14px; margin: 14px 0 0;
  font-size: 14px;
}
.cro-timer svg { flex: 0 0 auto; color: var(--cro-pink); }
.cro-timer__label { color: var(--cro-ink-60); }
.cro-timer__clock {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 16px; color: var(--cro-pink);
}

/* ---------------------------------------------------------------- 3. STOCK */
.cro-stock { margin: 14px 0 0; }
.cro-stock__row {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 14px; margin-bottom: 7px;
}
.cro-stock__text { font-weight: 600; }
.cro-stock__hint { font-size: 12.5px; color: var(--cro-ink-40); }
.cro-stock__track {
  height: 6px; border-radius: 99px; background: var(--cro-line); overflow: hidden;
}
.cro-stock__fill {
  height: 100%; border-radius: 99px; background: var(--cro-ink);
  transition: width .45s ease, background-color .3s ease;
}
.cro-stock.is-low .cro-stock__text { color: var(--cro-alert); }
.cro-stock.is-low .cro-stock__fill { background: var(--cro-alert); }

/* -------------------------------------------------------- 4. SOCIAL PROOF */
.cro-proof {
  position: fixed; left: 16px; bottom: 16px; z-index: 9998;
  width: min(330px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px;
  background: var(--cro-paper); border: 1px solid var(--cro-line);
  border-radius: var(--cro-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  padding: 12px 34px 12px 12px;
  transform: translateY(140%); opacity: 0;
  transition: transform .4s cubic-bezier(.16, 1, .3, 1), opacity .3s ease,
              bottom .25s ease;
}
.cro-proof.is-in { transform: translateY(0); opacity: 1; }
.cro-proof__img {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 8px;
  object-fit: cover; background: var(--cro-shell);
}
.cro-proof__body { min-width: 0; line-height: 1.35; }
.cro-proof__who { font-size: 13.5px; font-weight: 700; }
.cro-proof__what {
  font-size: 12.5px; color: var(--cro-ink-60);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cro-proof__meta { font-size: 11.5px; color: var(--cro-ink-40); margin-top: 2px; }
.cro-proof__verified { color: var(--cro-green); font-weight: 600; }
.cro-proof__close {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: var(--cro-ink-40);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.cro-proof__close:hover { background: var(--cro-shell); color: var(--cro-ink); }

/* ------------------------------------------------------------ 7. TRUST BAR */
.cro-trust {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin: 16px 0 0;
  border-top: 1px solid var(--cro-line); padding-top: 16px;
}
.cro-trust__item {
  display: flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--cro-ink-60); line-height: 1.3;
}
.cro-trust__item svg { flex: 0 0 auto; color: var(--cro-ink); }
@media (min-width: 1000px) {
  .cro-trust { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------- 8b. BUNDLES */
.cro-bundles { margin: 16px 0 0; display: grid; gap: 8px; }
.cro-bundles__title {
  margin: 0 0 2px; font-size: 13px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--cro-ink-60);
}
.cro-bundle {
  position: relative; display: grid; gap: 12px; align-items: center;
  grid-template-columns: 20px 1fr auto;
  border: 1.5px solid var(--cro-line); border-radius: var(--cro-radius);
  background: var(--cro-paper); padding: 13px 15px; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.cro-bundle:hover { border-color: var(--cro-ink-40); }
.cro-bundle[aria-checked="true"] { border-color: var(--cro-pink); background: #fff7fb; }
.cro-bundle__dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--cro-ink-40); display: grid; place-items: center;
}
.cro-bundle[aria-checked="true"] .cro-bundle__dot { border-color: var(--cro-pink); }
.cro-bundle[aria-checked="true"] .cro-bundle__dot::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cro-pink);
}
.cro-bundle__body { min-width: 0; }
.cro-bundle__label { display: block; font-weight: 700; font-size: 15px; }
.cro-bundle__sub { display: block; font-size: 12.5px; color: var(--cro-ink-60); margin-top: 2px; }
.cro-bundle__price { text-align: right; font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.cro-bundle__price s { display: block; font-weight: 400; font-size: 12px; color: var(--cro-ink-40); }
.cro-bundle__badge {
  position: absolute; top: -9px; right: 12px;
  background: var(--cro-pink); color: #fff;
  font-size: 10px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 99px;
}
.cro-bundle:focus-visible { outline: 3px solid var(--cro-pink); outline-offset: 2px; }

/* --------------------------------------------------------------- 8. BUY CTA */
.cro-buy { display: flex; align-items: stretch; gap: 10px; margin: 14px 0 0; }
.cro-qty {
  display: flex; align-items: center; flex: 0 0 auto;
  border: 1px solid var(--cro-line); border-radius: var(--cro-radius-pill);
  background: var(--cro-paper); overflow: hidden;
}
.cro-qty button {
  width: 40px; height: 100%; min-height: 52px;
  border: 0; background: transparent; cursor: pointer;
  font-size: 19px; line-height: 1; color: var(--cro-ink);
}
.cro-qty button:disabled { color: var(--cro-ink-40); cursor: not-allowed; }
.cro-qty__value {
  min-width: 26px; text-align: center;
  font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cro-buy__btn {
  flex: 1; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--cro-pink); color: #fff;
  border: 0; border-radius: var(--cro-radius-pill);
  font-size: 16px; font-weight: 700; cursor: pointer;
  text-decoration: none; padding: 6px 18px;
  transition: filter .15s ease, transform .1s ease;
}
.cro-buy__btn:hover { filter: brightness(1.06); }
.cro-buy__btn:active { transform: scale(.99); }
.cro-buy__sub { font-size: 11.5px; font-weight: 400; opacity: .85; margin-top: 1px; }

/* ---- sticky bar: compact price anchor + rating ----
   Everything here is deliberately small; the bar must not get taller. */
.cro-sticky-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 2px; line-height: 1;
}
.cro-rrp--sm { font-size: 12.5px; }
.cro-save--sm { font-size: 10.5px; padding: 2px 7px; letter-spacing: 0; }

/* the rating is a clone of the one in the page — scale it instead of restyling */
.cro-sticky-rating {
  transform: scale(.72); transform-origin: left center;
  margin: 0 -22% 0 0;                  /* claw back the space scaling leaves */
  pointer-events: none;
}
.cro-sticky-rating .amazon-feature__stars,
.cro-sticky-rating img { max-height: 14px; width: auto; }

/* compact variant used inside the sticky bar */
.cro-block--sticky { flex: 1; min-width: 0; }
.cro-block--sticky .cro-buy { margin: 0; }
.cro-buy__btn--compact { min-height: 48px; font-size: 15px; }

/* ------------------------------------------------------------- SECTION CHROME */
.cro-section { padding: clamp(40px, 6vw, 72px) 0; background: var(--cro-shell); }
.cro-section + .cro-section { border-top: 1px solid var(--cro-line); }
.cro-wrap { max-width: 1180px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.cro-eyebrow {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--cro-ink-40); margin: 0 0 8px;
}
.cro-h2 {
  font-size: clamp(24px, 3.4vw, 34px); font-weight: 300;
  letter-spacing: -.02em; margin: 0 0 24px;
}

/* ------------------------------------------------------------------ 5. UGC */
.cro-ugc__grid {
  display: grid; gap: 14px;
  /* column count is set from JS to the real number of creator folders */
  grid-template-columns: repeat(var(--cro-ugc-cols, 3), minmax(0, 1fr));
  /* 9:16 cards across a full 1180px row would be ~870px tall — cap the width per
     column so each card stays near the height of a real TikTok embed */
  max-width: calc(var(--cro-ugc-cols, 3) * 290px);
}
@media (max-width: 999px) {
  .cro-ugc__grid {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: calc(clamp(16px, 4vw, 40px) * -1);
    padding-inline: clamp(16px, 4vw, 40px);
  }
  .cro-ugc__grid::-webkit-scrollbar { display: none; }
  .cro-ugc__card { flex: 0 0 78%; scroll-snap-align: center; }
}
.cro-ugc__card {
  background: var(--cro-paper); border: 1px solid var(--cro-line);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
}
.cro-ugc__media { position: relative; aspect-ratio: 9 / 16; background: #000; }
.cro-ugc__media video {
  width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer;
}
.cro-ugc__head {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; gap: 8px;
  color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}
.cro-ugc__avatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, .85); flex: 0 0 auto;
}
.cro-ugc__handle { font-size: 12.5px; font-weight: 700; }
.cro-ugc__followers { font-size: 11.5px; opacity: .85; margin-left: auto; }
.cro-ugc__sound {
  position: absolute; right: 10px; bottom: 10px; z-index: 3;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(0, 0, 0, .55); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  backdrop-filter: blur(4px);
}
.cro-ugc__paused {
  position: absolute; inset: 0; z-index: 2; display: none;
  place-items: center; background: rgba(0, 0, 0, .25); color: #fff; pointer-events: none;
}
.cro-ugc__media.is-paused .cro-ugc__paused { display: grid; }
.cro-ugc__foot { padding: 14px; }
.cro-ugc__name {
  font-size: 14.5px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
}
.cro-ugc__quote { font-size: 13.5px; color: var(--cro-ink-60); margin: 6px 0 0; }

/* -------------------------------------------------------------- STAR ICONS */
.cro-stars { display: inline-flex; gap: 1px; color: #f5a524; line-height: 1; }
.cro-stars svg { width: 15px; height: 15px; }

/* -------------------------------------------------------------- 6. REVIEWS */
.cro-rev__summary {
  display: grid; gap: 24px; grid-template-columns: 1fr;
  background: var(--cro-paper); border: 1px solid var(--cro-line);
  border-radius: 16px; padding: clamp(20px, 3vw, 28px); margin-bottom: 22px;
}
@media (min-width: 700px) {
  .cro-rev__summary { grid-template-columns: 220px 1fr; align-items: center; }
}
.cro-rev__score { text-align: center; }
.cro-rev__avg { font-size: 46px; font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.cro-rev__count { font-size: 13px; color: var(--cro-ink-60); margin-top: 8px; }
.cro-rev__bars { display: grid; gap: 7px; }
.cro-rev__bar { display: grid; grid-template-columns: 44px 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; }
.cro-rev__bar-track { height: 7px; border-radius: 99px; background: var(--cro-line); overflow: hidden; }
.cro-rev__bar-fill { height: 100%; background: #f5a524; border-radius: 99px; }
.cro-rev__bar-pct { color: var(--cro-ink-40); text-align: right; }

.cro-rev__list { display: grid; gap: 12px; }
.cro-rev__card {
  background: var(--cro-paper); border: 1px solid var(--cro-line);
  border-radius: 14px; padding: 18px;
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start;
}
.cro-rev__who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.cro-rev__name { font-weight: 700; }
.cro-rev__badge { color: var(--cro-green); font-size: 12px; font-weight: 600; }
.cro-rev__source {
  font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--cro-ink-60); background: var(--cro-shell);
  border: 1px solid var(--cro-line); border-radius: 99px; padding: 2px 8px;
}
.cro-rev__date { color: var(--cro-ink-40); font-size: 12.5px; margin-left: auto; }
.cro-rev__title { font-weight: 700; font-size: 15px; margin: 10px 0 4px; }
.cro-rev__text { font-size: 14.5px; color: var(--cro-ink-60); margin: 0; }
.cro-rev__text mark { background: var(--cro-amber); color: var(--cro-ink); padding: 0 2px; }
.cro-rev__thumb {
  position: relative; width: 84px; height: 84px; flex: 0 0 auto;
  border: 0; padding: 0; border-radius: 10px; overflow: hidden;
  background: var(--cro-shell); cursor: pointer;
}
.cro-rev__thumb img, .cro-rev__thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cro-rev__thumb-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .3); color: #fff;
}
.cro-rev__thumb-more {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(0, 0, 0, .68); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px;
}
.cro-rev__more {
  display: block; margin: 20px auto 0; background: transparent;
  border: 1.5px solid var(--cro-ink); color: var(--cro-ink);
  border-radius: var(--cro-radius-pill); padding: 13px 30px;
  font-size: 14.5px; font-weight: 700; cursor: pointer;
}
.cro-rev__more:hover { background: var(--cro-ink); color: #fff; }

/* -------------------------------------------------------------- LIGHTBOX */
.cro-lb {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0, 0, 0, .72);
  display: grid; place-items: center; padding: 24px;
}
.cro-lb[hidden] { display: none; }
.cro-lb__panel {
  background: var(--cro-paper); border-radius: 16px; overflow: hidden;
  width: min(940px, 100%); max-height: min(86vh, 720px);
  display: grid; grid-template-columns: 1fr;
  /* minmax(0,1fr), not 1fr: an auto-sized row track grows to the media's
     natural height and overflows the panel's max-height */
  grid-template-rows: minmax(0, 1fr);
  position: relative;
}
/* Grid items default to min-height:auto, so a tall portrait photo pushed the
   media column past the panel's max-height and everything overlaying it (the
   n/N counter) got clipped by overflow:hidden. */
.cro-lb__panel > * { min-height: 0; min-width: 0; }
@media (min-width: 760px) {
  .cro-lb__panel { grid-template-columns: 1.15fr .85fr; }
}
@media (max-width: 759px) {
  .cro-lb { padding: 0; }
  .cro-lb__panel { width: 100%; height: 100%; max-height: none; border-radius: 0; grid-template-rows: minmax(0, 1fr) auto; }
}
.cro-lb__media {
  position: relative; background: #000; display: grid; place-items: center;
  min-height: 260px; overflow: hidden;
}
.cro-lb__media img, .cro-lb__media video { max-width: 100%; max-height: 100%; display: block; }
.cro-lb__side { padding: 24px; overflow-y: auto; }
.cro-lb__close, .cro-lb__nav {
  position: absolute; z-index: 2; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: var(--cro-ink);
  border-radius: 50%; width: 38px; height: 38px; display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
}
.cro-lb__close { top: 12px; right: 12px; font-size: 18px; line-height: 1; }
.cro-lb__nav--prev { left: 12px; top: 50%; transform: translateY(-50%); }
.cro-lb__nav--next { right: 12px; top: 50%; transform: translateY(-50%); }
.cro-lb__counter {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 3;
  background: rgba(0, 0, 0, .7); color: #fff;
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 99px;
}
.cro-lb__close:focus-visible, .cro-lb__nav:focus-visible,
.cro-buy__btn:focus-visible, .cro-rev__thumb:focus-visible,
.cro-ugc__sound:focus-visible, .cro-qty button:focus-visible {
  outline: 3px solid var(--cro-pink); outline-offset: 2px;
}

body.cro-lb-open { overflow: hidden; }
/* one modal at a time: a purchase popup sliding in over an open lightbox
   is noise, and it sits outside the focus trap */
body.cro-lb-open .cro-proof { display: none; }

@media (prefers-reduced-motion: reduce) {
  .cro-proof, .cro-stock__fill, .cro-buy__btn { transition: none; }
}
