/* ============================================================
   STACK — showroom component styles. Industrial loft + glass.
   ============================================================ */

/* ---------- loft environment ---------- */
.loft { position: fixed; inset: 0; overflow: hidden; }
.loft-bg { position: absolute; inset: 0; z-index: 0; }
.loft-wall { position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, var(--bg) 58%, var(--bg-2) 58%, var(--bg-deep) 100%); }
.loft-light {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 22% 8%, color-mix(in oklab, #fff 22%, transparent), transparent 60%),
    radial-gradient(50% 50% at 88% 0%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 65%);
}
.loft-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--bg-deep) 70%, transparent));
  box-shadow: inset 0 1px 0 var(--line);
}

/* ---------- shelf ---------- */
.shelf-stage {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center;
  overflow: hidden; cursor: grab; touch-action: none;
}
.shelf-stage:active { cursor: grabbing; }
.shelf-track {
  display: flex; align-items: center; gap: 40px;
  height: 100%; padding: 0 8vw; will-change: transform;
  transform-origin: center center;
}

/* lead intro (scrolls with the shelf) */
.shelf-lead { flex: none; width: min(440px, 80vw); padding-right: 20px; }
.lead-kicker { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.lead-title { font-size: clamp(36px, 4.6vw, 64px); font-weight: 500; line-height: 1.1; letter-spacing: -0.02em; margin: 16px 0 14px; padding-bottom: 0.08em; }
.lead-sub { color: var(--ink-dim); font-size: 16px; line-height: 1.6; max-width: 32ch; }

.shelf-tail { flex: none; width: 6vw; }

/* ---------- slab ---------- */
.slab { flex: none; width: 320px; cursor: pointer; perspective: 1100px; transition: filter 0.4s var(--ease), opacity 0.4s var(--ease); }

/* When a user interacts with the shelf, dim and blur the un-hovered slabs */
.shelf-track:has(.slab:hover) .slab:not(:hover) {
  filter: blur(3px);
  opacity: 0.55;
}
.slab-tilt {
  position: relative; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s var(--ease);
}
.slab-card {
  position: relative; border-radius: 22px; padding: 16px 16px 18px;
  /* Solid panel (no backdrop-filter) — the translucent glass blur smeared the
     background and flickered during the hover tilt. */
  background: var(--panel-solid);
  border: 1px solid var(--line);
  box-shadow: var(--slab-shadow);
  transition: transform 0.55s var(--spring), box-shadow 0.4s var(--ease);
}
.slab-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 22px; pointer-events: none;
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 0 0 1px rgba(255,255,255,0.04);
}
.slab:hover .slab-card { transform: translateY(-16px) scale(1.025); box-shadow: 0 70px 90px -34px rgba(30,22,12,0.5), 0 12px 30px -12px rgba(30,22,12,0.35); }

.slab-img { position: relative; aspect-ratio: 1; border-radius: 15px; overflow: hidden; background: #f3f1ec; }
html[data-vibe="dark"] .slab-img { background: #f3f1ec; }
/* contain (not cover) so tall/portrait product photos fit fully, uncropped */
.slab-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; display: block; }
/* ad cover art is designed to fill the frame */
.slab-ad .slab-img img { padding: 0; object-fit: cover; }
.slab-ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-display); font-size: 100px; color: var(--ink-faint); background: linear-gradient(160deg, #eceae4, #d8d3ca); }
html[data-vibe="dark"] .slab-ph { background: linear-gradient(160deg, #2c2722, #211d18); }
.slab-gloss {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay;
  background: radial-gradient(60% 50% at var(--sx, 50%) 0%, rgba(255,255,255,0.55), transparent 60%);
}

/* badges */
.slab-badges { position: absolute; top: 26px; left: 26px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; z-index: 3; }
.badge { font-family: var(--font-ui); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; padding: 5px 9px; border-radius: 8px; backdrop-filter: blur(6px); display: inline-flex; align-items: center; gap: 6px; }
.badge.save { background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; padding: 6px 11px; letter-spacing: 0.04em; }
.badge.save.big-deal { background: #e53935; animation: dealglow 1.8s ease-in-out infinite; }
@keyframes dealglow { 0%,100% { box-shadow: 0 0 0 0 rgba(229,57,53,0.5); } 50% { box-shadow: 0 0 16px 4px rgba(229,57,53,0.45); } }
.badge.trend { background: color-mix(in oklab, var(--ink) 88%, transparent); color: var(--bg); }
.badge.low { background: color-mix(in oklab, var(--warn) 16%, var(--panel-solid)); color: var(--warn); border: 1px solid color-mix(in oklab, var(--warn) 40%, transparent); }
.badge.low .pulse { width: 7px; height: 7px; border-radius: 99px; background: var(--warn); animation: lowpulse 1.6s infinite; }
@keyframes lowpulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--warn) 60%, transparent); } 50% { box-shadow: 0 0 0 5px transparent; } }
.badge.trend { position: relative; overflow: hidden; }
.badge.trend::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%); transform: translateX(-120%); animation: shimmer 3.4s infinite; }
@keyframes shimmer { 0% { transform: translateX(-120%); } 55%,100% { transform: translateX(120%); } }

/* ---------- star ratings (admin-entered social proof) ---------- */
.stars { display: inline-flex; align-items: center; gap: 7px; line-height: 1; }
.stars-track { position: relative; display: inline-block; font-size: 15px; letter-spacing: 1px; }
.stars-base { color: var(--line-strong); }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: #f5a623; }
.stars-num { font-size: 12px; font-weight: 600; color: var(--ink); }
.stars-count { font-size: 12px; color: var(--ink-dim); }
.stars-sm .stars-track { font-size: 12px; letter-spacing: 0.5px; }
.stars-sm .stars-num, .stars-sm .stars-count { font-size: 11px; }
.slab-rating { margin-top: 6px; }
.ub-rating { margin: 6px 0 2px; }

/* live countdown timer (inside .badge.low) */
.cd { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.cd-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--warn); animation: lowpulse 1.4s infinite; }
.cd-over { opacity: 0.7; }

/* meta */
.slab-meta { padding: 14px 4px 0; }
.slab-brand { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
.slab-name { font-size: 21px; font-weight: 500; line-height: 1.12; margin-top: 4px; letter-spacing: -0.01em; }
.slab-pricerow { display: flex; align-items: baseline; gap: 10px; margin-top: 8px; }
.slab-price { font-size: 18px; font-weight: 600; }
.slab-was { position: relative; font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.slab-was::after { content: ""; position: absolute; left: -2px; right: -2px; top: 45%; height: 2px; background: #e53935; transform: rotate(-8deg); border-radius: 1px; }

/* cta — invisible until intent */
.slab-cta {
  position: absolute; bottom: 16px; left: 16px; right: 16px; z-index: 3;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.slab-actions { display: flex; gap: 8px; width: 100%; }
.sa-btn {
  flex: 1; padding: 10px 0; border-radius: 12px; font-size: 13px; font-weight: 600; font-family: var(--font-mono);
  text-align: center; border: none; cursor: pointer; transition: 0.2s;
}
.sa-view { background: color-mix(in oklab, var(--ink) 90%, transparent); color: var(--bg); }
.sa-view:hover { background: var(--ink); }
.sa-grab { background: #e53935; color: #fff; box-shadow: 0 4px 12px rgba(229,57,53,0.3); }
.sa-grab:hover { filter: brightness(1.1); transform: scale(1.02); }

.slab:hover .slab-cta { opacity: 1; transform: none; }

/* reflection */
.slab-reflect { display: none; }
.loft.refl .slab-reflect {
  display: block; position: absolute; left: 8%; right: 8%; top: calc(100% + 10px); height: 120px;
  background-size: cover; background-position: top center; transform: scaleY(-1);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 70%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.5), transparent 70%);
  filter: blur(1.5px); opacity: 0.16; pointer-events: none; border-radius: 14px;
}

/* ---------- Ticker Tape ---------- */
.ticker-wrap {
  position: absolute; top: 0; left: 0; right: 0; height: 28px;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; overflow: hidden; z-index: 55;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.ticker {
  display: flex; gap: 4rem; white-space: nowrap;
  animation: ticker-scroll 20s linear infinite;
  padding-left: 2rem;
}
.ticker-item {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.15em;
}
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- topbar ---------- */
.topbar { position: absolute; top: 28px; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 22px 28px; pointer-events: none; }
.topbar > * { pointer-events: auto; }
.topbar-l { display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-logo { width: 26px; height: 26px; object-fit: contain; display: block; }
.brand-word { font-family: var(--font-ui); font-size: 19px; font-weight: 700; letter-spacing: 0.18em; }
.kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); border-left: 1px solid var(--line); padding-left: 16px; }
.topbar-r { display: flex; align-items: center; gap: 12px; }
.theme-toggle { position: relative; display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 4px; backdrop-filter: blur(12px); overflow: hidden; }
.to-opt { position: relative; z-index: 2; font-size: 11px; letter-spacing: 0.06em; padding: 5px 13px; color: var(--ink-dim); transition: color 0.3s; }
.to-opt.on { color: var(--on-accent); }
.to-knob { position: absolute; z-index: 1; top: 4px; left: 4px; bottom: 4px; width: calc(50% - 4px); background: var(--accent); border-radius: 99px; transition: transform 0.4s var(--ease); }
.admin-link { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 13px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 7px 15px; backdrop-filter: blur(12px); transition: 0.25s; }
.admin-link:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.admin-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--good); }

/* ---------- Honey referral pill (top-right cluster) ---------- */
.honey-badge {
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  color: #d98a1f;                 /* Honey amber, readable on both themes */
  background: var(--panel);
  border: 1px solid color-mix(in oklab, #f5a623 38%, var(--line));
  border-radius: 99px; padding: 7px 14px;
  backdrop-filter: blur(12px);
  transition: 0.25s var(--ease);
}
.honey-badge:hover {
  color: #f5a623;
  border-color: color-mix(in oklab, #f5a623 62%, transparent);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px color-mix(in oklab, #f5a623 70%, transparent);
}
.honey-glyph { width: 16px; height: 16px; flex: none; display: block; }

/* ---------- filters ---------- */
.filter-dock { position: absolute; left: 28px; bottom: 30px; z-index: 50; }
.filters { display: flex; gap: 7px; flex-wrap: wrap; max-width: 60vw; }
.chip { font-size: 12px; letter-spacing: 0.02em; color: var(--ink-dim); background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 8px 15px; backdrop-filter: blur(12px); transition: 0.2s var(--ease); }
.chip:hover { color: var(--ink); border-color: var(--line-strong); }
.chip.on { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

/* auto-tuck: when no category is picked ("All"), collapse to just the
   "All" chip and reveal the rest on hover/focus. */
.filter-dock .chip:not(:first-child) {
  transition: 0.28s var(--ease), opacity 0.22s var(--ease), max-width 0.28s var(--ease);
}
.filter-dock.is-tucked .chip:not(:first-child) {
  opacity: 0; max-width: 0; padding-left: 0; padding-right: 0;
  border-width: 0; margin: 0; pointer-events: none; overflow: hidden;
  white-space: nowrap;
}
.filter-dock.is-tucked:hover .chip:not(:first-child),
.filter-dock.is-tucked:focus-within .chip:not(:first-child) {
  opacity: 1; max-width: 240px; padding-left: 15px; padding-right: 15px;
  border-width: 1px; margin: 0; pointer-events: auto;
}
/* fade the lone "All" chip slightly so it reads as a quiet handle. */
.filter-dock.is-tucked .chip:first-child { opacity: 0.7; }
.filter-dock.is-tucked:hover .chip:first-child,
.filter-dock.is-tucked:focus-within .chip:first-child { opacity: 1; }

/* ---------- browse bar ---------- */
.browsebar { position: absolute; right: 28px; bottom: 34px; z-index: 50; display: flex; align-items: center; gap: 14px; }
.bb-count, .bb-hint { font-size: 11px; letter-spacing: 0.06em; color: var(--ink-faint); }
.bb-track { position: relative; width: 200px; height: 3px; border-radius: 99px; background: var(--line); cursor: ew-resize; touch-action: none; }
.bb-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 99px; }
.bb-knob { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 99px; background: var(--panel-solid); border: 2px solid var(--accent); transform: translate(-50%, -50%); box-shadow: var(--shadow); }
@media (max-width: 720px) { .bb-hint { display: none; } .bb-track { width: 110px; } .kicker { display: none; } }

/* ---------- empty ---------- */
.shelf-empty { flex: none; width: min(460px, 86vw); text-align: left; }
.shelf-empty h2 { font-size: 34px; font-weight: 500; margin: 0 0 10px; }
.shelf-empty p { color: var(--ink-dim); line-height: 1.6; }
.empty-cta, .shelf-empty .empty-cta { display: inline-block; margin-top: 18px; text-decoration: none; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 12px 22px; border-radius: 12px; }

/* ---------- sponsored bounty ad slab ---------- */
.slab-ad { text-decoration: none; color: inherit; display: block; }
.slab-ad .slab-card {
  /* Opaque (no translucency) so the background floor line sits BEHIND it,
     matching the regular slabs. */
  background: linear-gradient(165deg,
    color-mix(in oklab, var(--accent) 14%, var(--panel-solid)),
    var(--panel-solid));
  border-color: color-mix(in oklab, var(--accent) 40%, var(--line-strong));
}
/* eBay sale-event slab — distinct blue accent vs the clay bounty ads */
.slab-event .slab-card {
  background: linear-gradient(165deg,
    color-mix(in oklab, #1f6feb 14%, var(--panel-solid)),
    var(--panel-solid));
  border-color: color-mix(in oklab, #1f6feb 40%, var(--line-strong));
}
.slab-event .ad-badge { background: #1f6feb; color: #fff; }
.slab-event .ad-tag {
  color: #1f6feb; background: color-mix(in oklab, #1f6feb 14%, transparent);
  border-color: color-mix(in oklab, #1f6feb 35%, transparent);
}
.slab-event .ad-art {
  background: linear-gradient(150deg, #2b6fdb, #0b3b8c);
}
.slab-event .slab-cta { background: #1f6feb; }

.ad-art {
  display: grid; place-items: center; position: relative;
  background: linear-gradient(150deg,
    color-mix(in oklab, var(--accent) 30%, var(--bg-2)),
    color-mix(in oklab, var(--accent-deep) 30%, var(--bg-deep)));
}
.ad-emblem {
  font-family: var(--font-display); font-size: 92px; font-weight: 600;
  color: color-mix(in oklab, var(--on-accent) 88%, transparent);
  text-shadow: 0 10px 30px rgba(0,0,0,0.3); line-height: 1;
}
.ad-amazon {
  position: absolute; bottom: 12px; right: 14px;
  font-size: 12px; letter-spacing: 0.04em; font-weight: 600;
  color: color-mix(in oklab, var(--on-accent) 85%, transparent); opacity: 0.9;
}
.ad-amazon::after { content: ""; display: inline-block; width: 18px; height: 6px; margin-left: 3px;
  border-radius: 0 0 8px 8px; border-bottom: 2px solid currentColor; }
.badge.ad-badge {
  background: color-mix(in oklab, var(--ink) 80%, transparent); color: var(--bg);
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 10px;
}
.ad-pitch { font-size: 13px; color: var(--ink-dim); line-height: 1.45; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ad-tagrow { margin-top: 10px; }
.ad-tag {
  display: inline-block; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in oklab, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in oklab, var(--accent) 35%, transparent);
  padding: 4px 10px; border-radius: 99px;
}
.slab-ad .slab-cta { opacity: 1; transform: none; background: var(--accent); }

/* ---------- legal dock (FTC affiliate disclosure + links) ---------- */
.legal-dock {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  z-index: 40; display: flex; align-items: center; gap: 12px;
  font-size: 10px; letter-spacing: 0.04em; color: var(--ink-faint);
  background: color-mix(in oklab, var(--bg) 55%, transparent);
  border: 1px solid var(--line); border-radius: 99px; padding: 5px 14px;
  backdrop-filter: blur(10px); max-width: 92vw; white-space: nowrap; overflow: hidden;
}
.legal-dock a { color: var(--ink-dim); text-decoration: none; }
.legal-dock a:hover { color: var(--ink); text-decoration: underline; }
.legal-aff { color: var(--ink-faint); }
@media (max-width: 720px) { .legal-dock .legal-aff { display: none; } }

/* ============================================================
   UNBOXING overlay
   ============================================================ */
.ub-root { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 4vh 4vw; background: color-mix(in oklab, var(--bg-deep) 62%, transparent); backdrop-filter: blur(16px) saturate(1.1); opacity: 0; transition: opacity 0.4s var(--ease); }
.ub-root.in { opacity: 1; }
.ub-panel {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  width: min(1040px, 94vw); height: 90vh; max-height: 90vh;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow);
  transform: translateY(24px) scale(0.96); opacity: 0; transition: transform 0.5s var(--spring), opacity 0.4s;
}
/* let the scrollable info column actually scroll inside the grid */
.ub-panel > * { min-height: 0; }
.ub-root.in .ub-panel { transform: none; opacity: 1; }
.ub-close { position: absolute; top: 16px; right: 16px; z-index: 6; width: 38px; height: 38px; border-radius: 99px; font-size: 14px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.ub-close:hover { border-color: var(--line-strong); }

.ub-media { position: relative; padding: 44px; display: grid; place-items: center; background: linear-gradient(170deg, color-mix(in oklab, #fff 8%, transparent), transparent), var(--bg-2); overflow: hidden; }
.ub-slab { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; border-radius: 20px; overflow: hidden; box-shadow: var(--slab-shadow); animation: ubfloat 7s ease-in-out infinite; background: #f3f1ec; }
@keyframes ubfloat { 0%,100% { transform: translateY(-7px) rotate(-0.5deg); } 50% { transform: translateY(7px) rotate(0.5deg); } }
.ub-slab img { width: 100%; height: 100%; object-fit: contain; padding: 16px; display: block; }
.ub-ph { width: 100%; height: 100%; display: grid; place-items: center; font-family: var(--font-display); font-size: 130px; color: var(--ink-faint); background: linear-gradient(160deg, #eceae4, #d8d3ca); }
.ub-sheen { position: absolute; inset: 0; background: linear-gradient(120deg, transparent 42%, rgba(255,255,255,0.3) 50%, transparent 58%); mix-blend-mode: overlay; }
.ub-reflect { position: absolute; left: 22%; right: 22%; bottom: 18px; height: 70px; background-size: cover; background-position: top; transform: scaleY(-1); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent); mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent); opacity: 0.18; filter: blur(2px); }

.ub-info { padding: 44px 42px; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.ub-kicker { display: flex; gap: 10px; align-items: center; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.ub-brand { color: var(--accent); font-weight: 600; }
.ub-cat { color: var(--ink-faint); }
.ub-title { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; line-height: 1.04; letter-spacing: -0.02em; margin: 12px 0 0; text-wrap: balance; }
.ub-pricerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; }
.ub-price { font-size: 30px; font-weight: 600; }
.ub-was { position: relative; font-size: 16px; color: var(--ink-faint); text-decoration: none; }
.ub-was::after { content: ""; position: absolute; left: -3px; right: -3px; top: 45%; height: 2px; background: #e53935; transform: rotate(-8deg); border-radius: 1px; }
.ub-save { font-size: 14px; font-weight: 700; color: #fff; background: #e53935; padding: 5px 11px; border-radius: 8px; letter-spacing: 0.03em; }
.ub-verified { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--good); margin-left: auto; }
.ub-verified .tick { font-weight: 700; }
.ub-flags { display: flex; gap: 10px; margin-top: 16px; }
.ub-flag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 9px; }
.ub-flag.low { color: var(--warn); background: color-mix(in oklab, var(--warn) 12%, transparent); }
.ub-flag.low .pulse { width: 7px; height: 7px; border-radius: 99px; background: var(--warn); animation: lowpulse 1.6s infinite; }
.ub-flag.trend { color: var(--ink); background: color-mix(in oklab, var(--ink) 8%, transparent); }
.ub-flag.view-count { color: #e53935; background: color-mix(in oklab, #e53935 12%, transparent); }
.ub-desc { color: var(--ink-dim); line-height: 1.65; font-size: 15px; margin: 20px 0 0; max-width: 46ch; }
.ub-features { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 9px; }
.ub-features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); }
.ub-features .fk { color: var(--good); font-weight: 700; }
.ub-actions { position: relative; display: flex; gap: 12px; margin-top: 28px; align-items: stretch; }
.ub-cta { position: relative; flex: 1; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 600; font-size: 15px; background: var(--accent); color: var(--on-accent); padding: 16px 22px; border-radius: 14px; transition: transform 0.15s var(--ease), box-shadow 0.3s; box-shadow: 0 12px 30px -10px color-mix(in oklab, var(--accent) 70%, transparent); }
.ub-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -10px color-mix(in oklab, var(--accent) 75%, transparent); }
.ub-cta:active { transform: translateY(1px) scale(0.99); }
.ub-cta-label { position: relative; z-index: 2; display: inline-flex; align-items: center; }
.ub-arrow { transition: transform 0.25s var(--ease); }
.ub-cta:hover .ub-arrow { transform: translateX(4px); }
.ub-cta-fill { position: absolute; inset: 0; z-index: 1; background: var(--accent-deep); transform: scaleX(0); transform-origin: left; }
.ub-cta.opening .ub-cta-fill { animation: ctafill 0.6s var(--ease) forwards; }
@keyframes ctafill { to { transform: scaleX(1); } }
/* idle shimmer sweep to draw the eye to the primary CTA (FOMO/CTR).
   Pauses while hovering (the fill animation takes over) and respects
   reduced-motion via the global override. */
.ub-cta::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,0.42) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: ctashimmer 3.6s var(--ease) infinite;
}
.ub-cta:hover::after, .ub-cta.disabled::after, .ub-cta.opening::after { animation-play-state: paused; opacity: 0; }
@keyframes ctashimmer { 0% { transform: translateX(-130%); } 60%, 100% { transform: translateX(130%); } }
.ub-cta.disabled { background: var(--line); color: var(--ink-faint); box-shadow: none; cursor: not-allowed; }
.ub-back { background: transparent; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 14px; transition: 0.25s; }
.ub-back:hover { color: var(--ink); border-color: var(--line-strong); }
.ub-share { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 14px; font-weight: 600; transition: 0.25s; white-space: nowrap; }
.ub-share:hover { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.ub-share-ic { width: 17px; height: 17px; flex: none; display: block; }

/* ---- Honey "save more?" nudge — floating STICKER over the actions row ----
   Absolutely positioned (out of flow) so it NEVER resizes or moves the
   "View Deal" button. Sits just above the top edge, anchored left. Hidden
   until the user hovers/focuses the actions row, then it pops in.
   Framed as POTENTIAL savings — no promise. */
.ub-honey {
  position: absolute; left: 0; bottom: 100%; z-index: 4;
  display: inline-flex; align-items: center; gap: 9px;
  white-space: nowrap;
  text-decoration: none; color: #d98a1f;
  background: var(--panel-solid);
  border: 1px solid color-mix(in oklab, #f5a623 42%, var(--line));
  border-radius: 12px; padding: 8px 13px;
  /* invisible bridge: the chip's box extends 14px down to the button so the
     cursor never crosses a dead gap (which was making it vanish mid-reach). */
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px -14px color-mix(in oklab, #f5a623 75%, transparent);
  /* hidden state: lifted + faded, no pointer events so it can't block */
  opacity: 0; transform: translateY(6px) scale(0.96);
  transform-origin: bottom left; pointer-events: none;
  /* small fade-out delay so a quick cursor move from button → sticker
     doesn't make it disappear before you can click it. */
  transition: opacity 0.28s var(--ease) 0.12s, transform 0.28s var(--spring) 0.12s;
}
/* transparent hover-bridge filling the margin gap down to the button */
.ub-honey::before {
  content: ""; position: absolute; left: 0; right: 0; top: 100%;
  height: 16px;
}
/* little pointer connecting the sticker to the CTA */
.ub-honey::after {
  content: ""; position: absolute; left: 22px; top: 100%;
  width: 10px; height: 10px; margin-top: -5px;
  background: var(--panel-solid);
  border-right: 1px solid color-mix(in oklab, #f5a623 42%, var(--line));
  border-bottom: 1px solid color-mix(in oklab, #f5a623 42%, var(--line));
  transform: rotate(45deg);
}
.ub-honey-glyph { width: 20px; height: 20px; flex: none; display: block; }
.ub-honey-text {
  display: inline-flex; flex-direction: column; justify-content: center;
  line-height: 1.15;
}
.ub-honey-text b { font-size: 13px; font-weight: 700; }
.ub-honey-text i { font-size: 11px; font-style: normal; color: var(--ink-dim); }

/* reveal on hover/focus of the actions row (covers hovering the CTA) */
.ub-actions.has-honey:hover .ub-honey,
.ub-actions.has-honey:focus-within .ub-honey {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: auto;
  /* show immediately; the fade-out delay only applies on un-hover */
  transition: opacity 0.2s var(--ease), transform 0.26s var(--spring);
}
@media (prefers-reduced-motion: reduce) {
  .ub-honey { transition: opacity 0.15s linear; transform: none; }
  .ub-actions.has-honey:hover .ub-honey,
  .ub-actions.has-honey:focus-within .ub-honey { transform: none; }
}
.ub-fine { margin-top: 14px; font-size: 11px; color: var(--ink-faint); }

/* ---------- responsive: tablet ---------- */
@media (max-width: 820px) {
  .slab { width: 250px; }
  .shelf-track { gap: 26px; padding: 0 24px; }
  /* single column: the whole panel scrolls; the info column flows naturally */
  .ub-panel { grid-template-columns: 1fr; height: auto; max-height: 88vh; overflow: auto; }
  .ub-media { padding: 28px 28px 0; }
  .ub-slab { max-width: 260px; }
  .ub-info { padding: 28px; height: auto; overflow: visible; }
  .topbar { padding: 14px 16px; }
  .filter-dock { left: 16px; bottom: 22px; }
  .browsebar { right: 16px; bottom: 24px; }
}

/* ---------- responsive: phone ---------- */
@media (max-width: 640px) {
  /* use the real viewport height (accounts for mobile browser chrome) */
  .loft { height: 100dvh; }

  /* top bar — compact, single tidy row */
  .topbar { padding: 12px 14px; gap: 8px; }
  .topbar-l { gap: 8px; min-width: 0; }
  .brand-word { font-size: 17px; letter-spacing: 0.14em; }
  .topbar-r { gap: 8px; }
  .theme-toggle { transform: scale(0.92); transform-origin: right center; }
  .admin-link { padding: 6px 12px; font-size: 12px; }
  /* collapse the Honey pill to its icon so the top row stays tidy */
  .honey-badge { padding: 6px; }
  .honey-word { display: none; }

  /* lead intro — narrower so the first product peeks in, smaller type */
  .shelf-lead { width: 78vw; padding-right: 12px; }
  .lead-title { font-size: clamp(30px, 8.5vw, 40px); margin: 12px 0 10px; }
  .lead-sub { font-size: 14px; }
  .shelf-track { gap: 18px; padding: 0 18px; align-items: center; }

  /* slabs sized to the phone, with scroll-snap feel */
  .slab { width: 76vw; max-width: 300px; }
  .slab-name { font-size: 19px; }

  /* bottom controls: stack them so nothing overlaps.
     filters scroll horizontally just above the browse bar + legal line. */
  .filter-dock {
    left: 0; right: 0; bottom: 64px; padding: 0 14px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .filters { flex-wrap: nowrap; max-width: none; width: max-content; }
  .filter-dock::-webkit-scrollbar { display: none; }

  .browsebar { left: 14px; right: 14px; bottom: 34px; justify-content: center; }
  .bb-track { width: 100%; max-width: 220px; }
  .bb-count { display: none; }

  .legal-dock { bottom: 6px; font-size: 9px; gap: 9px; padding: 4px 12px; }

  /* unboxing — full-bleed sheet on phones */
  .ub-root { padding: 0; }
  .ub-panel { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: none; }
  .ub-media { padding: 40px 24px 0; }
  .ub-slab { max-width: 220px; }
  .ub-info { padding: 22px 22px 32px; }
  .ub-title { font-size: clamp(26px, 7vw, 34px); }
  .ub-price { font-size: 26px; }
  .ub-verified { margin-left: 0; }
  .ub-actions { flex-direction: column; margin-top: 44px; }
  .ub-back, .ub-share { width: 100%; justify-content: center; }
  /* no hover on touch → keep the sticker permanently visible above the buttons */
  .ub-honey { opacity: 1; transform: none; pointer-events: auto; }
}

/* avoid the iOS "tap to zoom" + give comfy touch targets */
@media (max-width: 640px) and (hover: none) {
  .slab:hover .slab-card { transform: none; }   /* no phantom hover-lift on touch */
  .slab:hover .slab-cta { opacity: 1; transform: none; } /* CTA always visible */
}

/* ============================================================
   Gamification + retention + UX additions
   ============================================================ */

/* ---- Save for Later: bookmark button on each slab ---- */
.slab-save {
  position: absolute; top: 22px; right: 22px; z-index: 4;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; background: var(--panel); border: 1px solid var(--line);
  color: var(--ink-dim); backdrop-filter: blur(8px); transition: 0.2s var(--ease);
}
.slab-save svg { width: 17px; height: 17px; }
.slab-save:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.slab-save.on { color: var(--accent); border-color: color-mix(in oklab, var(--accent) 55%, transparent); }
.slab-save.on svg { animation: savepop 0.3s var(--spring); }
@keyframes savepop { 0% { transform: scale(0.7); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }

/* saved / gems filter chips */
.chip-saved.on, .chip-gems.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip-count { display: inline-block; min-width: 16px; padding: 0 4px; margin-left: 3px; border-radius: 99px;
  background: color-mix(in oklab, var(--ink) 14%, transparent); font-size: 10px; line-height: 16px; text-align: center; }
.chip-saved.on .chip-count, .chip-gems.on .chip-count { background: rgba(255,255,255,0.28); }

/* ---- Sale-price countdown (on slab + unboxing) ---- */
.sale-timer { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  color: var(--warn); font-variant-numeric: tabular-nums; }
.st-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--warn); animation: lowpulse 1.4s infinite; }
/* Urgent: under 24h — neon red pulse */
.sale-timer.st-urgent { color: #e53935; animation: urgentpulse 1s ease-in-out infinite; }
.sale-timer.st-urgent .st-dot { background: #e53935; animation: lowpulse 0.6s infinite; }
@keyframes urgentpulse { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }
.slab-saletimer { margin-top: 8px; }
.slab-saletimer .sale-timer { font-size: 11px; }
.ub-saletimer { margin: 10px 0 2px; }
.ub-saletimer .sale-timer {
  padding: 7px 12px; border-radius: 10px;
  background: color-mix(in oklab, var(--warn) 12%, var(--panel-solid));
  border: 1px solid color-mix(in oklab, var(--warn) 32%, transparent);
}
.ub-saletimer .sale-timer.st-urgent {
  background: color-mix(in oklab, #e53935 14%, var(--panel-solid));
  border-color: color-mix(in oklab, #e53935 40%, transparent);
}

/* ---- Deal Stamp (unboxing overlay) ---- */
.deal-stamp {
  position: absolute; bottom: 14px; right: 14px; z-index: 5;
  font-family: var(--font-ui); font-size: 22px; font-weight: 800; letter-spacing: 0.04em;
  color: #fff; background: #e53935;
  padding: 8px 14px; border-radius: 10px;
  transform: rotate(-12deg);
  box-shadow: 0 8px 24px rgba(229,57,53,0.4);
  animation: stampin 0.4s var(--spring) both;
  border: 2px solid rgba(255,255,255,0.3);
}
@keyframes stampin {
  0% { transform: rotate(-12deg) scale(2.5); opacity: 0; }
  60% { transform: rotate(-12deg) scale(0.9); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}

/* ---- Mystery / secret slabs ---- */
.slab-mystery .slab-card { background: var(--glass-bg); }
.slab-img.is-mystery {
  background: repeating-linear-gradient(135deg,
    color-mix(in oklab, var(--accent) 26%, var(--bg-2)) 0 14px,
    color-mix(in oklab, var(--accent) 14%, var(--bg-2)) 14px 28px);
  display: grid; place-items: center;
}
.mystery-face { display: grid; place-items: center; gap: 8px; text-align: center; filter: drop-shadow(0 6px 14px rgba(0,0,0,0.3)); }
.mystery-q { font-family: var(--font-display); font-size: 84px; font-weight: 600; line-height: 1; color: #fff;
  animation: mystwobble 3.5s var(--ease) infinite; }
.mystery-tag { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.9); }
@keyframes mystwobble { 0%,100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.06); } }
.badge.mystery-badge { background: #fff; color: #111; }

/* ---- Easter-egg glowing dot ---- */
.egg-dot {
  position: absolute; right: 16px; top: 50%; z-index: 45;
  width: 14px; height: 14px; border-radius: 99px; background: transparent; border: none; padding: 0;
  opacity: 0.5; transition: opacity 0.3s; cursor: pointer;
}
.egg-dot:hover { opacity: 1; }
.egg-glow { position: absolute; inset: 0; border-radius: 99px; background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent); animation: eggpulse 2.6s infinite; }
@keyframes eggpulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 12px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---- Sound toggle ---- */
.sfx-toggle {
  position: absolute; right: 28px; top: 78px; z-index: 50;
  width: 38px; height: 38px; border-radius: 99px; font-size: 15px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px);
  transition: 0.2s var(--ease);
}
.sfx-toggle:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.sfx-toggle.on { border-color: color-mix(in oklab, var(--accent) 50%, transparent); }

/* ---- Related Finds (in unboxing) ---- */
.ub-related { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 16px; }
.ub-related-head { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.ub-related-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.ub-rel { flex: none; width: 120px; text-align: left; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; transition: 0.2s var(--ease); }
.ub-rel:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ub-rel-img { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #f3f1ec; display: grid; place-items: center; }
.ub-rel-img img { width: 100%; height: 100%; object-fit: cover; }
.ub-rel-ph { font-family: var(--font-display); font-size: 28px; color: var(--ink-faint); }
.ub-rel-name { font-size: 12px; line-height: 1.25; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ub-rel-price { font-size: 13px; font-weight: 600; color: var(--accent); }

@media (max-width: 640px) {
  .sfx-toggle { right: 14px; top: 64px; }
  .egg-dot { right: 10px; }
}

/* ---- Exit Intent Modal ---- */
.exit-modal-wrap {
  position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,0.6);
  display: grid; place-items: center; padding: 20px;
  animation: fadein 0.3s ease;
}
.exit-modal {
  position: relative; background: var(--panel-solid);
  width: 100%; max-width: 440px; border-radius: 20px;
  padding: 40px; text-align: center;
  box-shadow: 0 30px 60px rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  animation: slideup 0.4s var(--spring);
}
.exit-close {
  position: absolute; top: 16px; right: 16px; background: none; border: none;
  font-size: 16px; color: var(--ink-faint); cursor: pointer; padding: 8px;
}
.exit-title { font-size: 32px; font-weight: 500; margin-bottom: 8px; }
.exit-sub { font-size: 15px; color: var(--ink-dim); margin-bottom: 24px; }
.exit-form { display: flex; flex-direction: column; gap: 12px; }
.exit-input {
  padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 16px; outline: none;
}
.exit-input:focus { border-color: var(--accent); }
.exit-btn {
  padding: 14px; border-radius: 12px; background: var(--accent); color: var(--on-accent);
  border: none; font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s;
}
.exit-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.exit-btn:disabled { opacity: 0.7; pointer-events: none; }
.exit-success { font-size: 16px; color: var(--good); font-weight: 600; padding: 20px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .slab-tilt, .slab-card { transition: none !important; }
  .ub-slab { animation: none; }
  .badge.trend::after, .badge.low .pulse, .ub-flag.low .pulse { animation: none; }
  .mystery-q, .egg-glow, .st-dot, .cd-dot { animation: none; }
}
