:root {
  --bg: #07111f;
  --bg2: #0b1629;
  --text: #f8fafc;
  --ink: #101827;
  --muted: #64748b;
  --brand: #38bdf8;
  --brand2: #a78bfa;
  --accent: #b46bff;
  --accent-soft: #f0d8ff;
  --accent-dark: #7141a6;
  --page-max: 1680px;
  --header-height: 72px;
  --footer-height: 46px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.30);
  --small-shadow: 0 14px 38px rgba(2, 6, 23, 0.27);
  --radius-xl: 30px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; }
img, video { display: block; max-width: 100%; }

.skip-link {
  position: absolute; left: -999px; top: 12px; z-index: 9999;
  padding: 10px 12px; border-radius: 10px; background: #fff; color: #111;
}
.skip-link:focus { left: 12px; }
.wrap { width: min(100%, var(--page-max)); margin: 0 auto; padding-inline: 18px; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 80;
  height: var(--header-height);
  background: rgba(7, 17, 31, 0.85);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.header-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; min-width: 230px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 15px;
  display: grid; place-items: center; overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.20);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; font-size: 19px; letter-spacing: -0.03em; }
.brand small { display: block; margin-top: 2px; color: #b7c5d8; font-size: 12px; }

.menu-btn {
  display: none; color: #fff; background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 9px 12px; border-radius: 999px; font-weight: 800;
}
.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-nav > a, .nav-dropbtn {
  color: #d7e4f7; background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px; padding: 9px 13px;
  font-size: 13px; font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.site-nav > a:hover, .site-nav > a.active, .nav-dropbtn:hover {
  color: #fff; background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.38);
  transform: translateY(-1px);
}
.nav-dropdown { position: relative; }
.nav-dropmenu {
  position: absolute; right: 0; top: calc(100% + 10px);
  display: none; min-width: 190px; padding: 8px;
  background: rgba(15, 29, 49, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px; box-shadow: var(--shadow); z-index: 90;
}
.nav-dropmenu a {
  display: block; color: #d7e4f7; font-weight: 750;
  font-size: 13px; padding: 10px 12px; border-radius: 12px;
}
.nav-dropmenu a:hover { background: rgba(56, 189, 248, 0.15); color: #fff; }
.nav-dropdown.open .nav-dropmenu, .nav-dropdown:hover .nav-dropmenu { display: block; }

/* Fullscreen Collections Desktop Shell */
.collections-page {
  position: fixed; inset: var(--header-height) 0 var(--footer-height);
  z-index: 1; padding: 8px 14px 9px; isolation: isolate;
}
.ambient-background { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: #cabbd7; }
.ambient-image, .ambient-video {
  position: absolute; inset: -7%; width: 114%; height: 114%;
  object-fit: cover; filter: blur(40px) saturate(0.96); transform: scale(1.08);
  opacity: 0; transition: opacity 0.55s ease;
}
.ambient-image.is-visible, .ambient-video.is-visible { opacity: 0.93; }
.ambient-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.34), rgba(7, 17, 31, 0.12) 34%, rgba(7, 17, 31, 0.28)),
              radial-gradient(circle at 50% 44%, transparent 0 34%, rgba(2, 6, 23, 0.30) 100%);
}
.collection-browser {
  width: min(100%, var(--page-max)); height: 100%; margin: 0 auto;
  display: flex; flex-direction: column; min-height: 0;
}
.top-bar {
  flex: 0 0 52px; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 0 48px 7px; color: #fff;
}
.eyebrow {
  margin: 0 0 2px; color: #b9e7ff; font-size: 0.68rem;
  font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase;
}
.top-bar h1 {
  margin: 0; font-family: "Playfair Display", serif;
  font-size: clamp(1.35rem, 2vw, 2.4rem); line-height: 1; letter-spacing: -0.035em;
}
.collection-status { display: grid; justify-items: end; gap: 7px; min-width: 120px; }
.collection-counter { display: flex; align-items: center; gap: 9px; font-weight: 900; letter-spacing: 0.08em; }
.counter-line { width: 34px; height: 1px; background: currentColor; opacity: 0.45; }
.auto-rotate-track {
  width: 120px; height: 3px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.23);
}
.auto-progress {
  display: block; width: 100%; height: 100%; transform-origin: left center;
  border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand2));
}
.auto-progress.is-paused { animation-play-state: paused !important; }
@keyframes autoProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Desktop Carousel Engine */
.carousel-shell { position: relative; flex: 1 1 auto; min-height: 0; }
.collection-viewport {
  width: 100%; height: 100%; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22); border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(20px);
  box-shadow: var(--shadow); touch-action: pan-y; cursor: grab;
}
.collection-viewport.is-dragging { cursor: grabbing; }
.collection-track {
  display: flex; width: 100%; height: 100%; will-change: transform;
  transition: transform 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}
.collection-track.no-transition { transition: none; }
.collection-slide { min-width: 100%; height: 100%; padding: clamp(7px, 0.75vw, 12px); position: relative; }
.collection-stage {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--radius-xl) - 8px);
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.40), transparent 58%);
}
.hero-frame {
  position: absolute; z-index: 1; top: 50%; left: 50%;
  height: calc(100% - 18px); max-width: calc(100% - clamp(330px, 35vw, 560px));
  aspect-ratio: 4/3; transform: translate(-50%, -50%); overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.54); border-radius: 27px;
  background: rgba(17, 12, 24, 0.36); box-shadow: 0 24px 72px rgba(2, 6, 23, 0.40);
}
.hero-frame img, .hero-frame video { width: 100%; height: 100%; object-fit: contain; }

.product-card {
  position: absolute; z-index: 6; width: clamp(138px, 15.2vw, 230px);
  overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.66); border-radius: 24px;
  color: var(--ink); background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--small-shadow); cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover, .product-card:focus-visible {
  z-index: 30; transform: translateY(-6px) scale(1.018);
  box-shadow: 0 26px 66px rgba(2, 6, 23, 0.38); outline: none;
}
.product-card[data-position="top-left"] { top: 2.4%; left: 1%; }
.product-card[data-position="top-right"] { top: 2.4%; right: 1%; }
.product-card[data-position="bottom-left"] { bottom: 2.4%; left: 2.3%; }
.product-card[data-position="bottom-right"] { right: 2.3%; bottom: 2.4%; }

.product-image-wrap { aspect-ratio: 1.34; overflow: hidden; background: #fff; }
.product-image-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.product-copy {
  min-height: 54px; display: flex; flex-direction: column; justify-content: center;
  padding: 9px 12px 10px; background: var(--product-tint, #f0e2ff);
}
.product-copy h3 {
  margin: 0; display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; font-size: clamp(0.67rem, 0.84vw, 0.86rem); line-height: 1.18;
}
.product-copy p { margin: 3px 0 0; color: rgba(31, 24, 48, 0.68); font-size: 0.62rem; font-weight: 800; }

.carousel-button {
  position: absolute; top: 50%; z-index: 45; width: 46px; aspect-ratio: 1;
  display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%; color: #fff; background: rgba(7, 17, 31, 0.74);
  backdrop-filter: blur(15px); transform: translateY(-50%); cursor: pointer;
}
.carousel-button.previous { left: -7px; }
.carousel-button.next { right: -7px; }
.carousel-button[disabled] { display: none; }

.collection-dots {
  position: absolute; z-index: 35; left: 50%; bottom: 10px; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 7px 10px; border-radius: 999px;
  background: rgba(7, 17, 31, 0.58); backdrop-filter: blur(14px);
}
.collection-dot {
  width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}
.collection-dot.is-active { width: 28px; background: #7dd3fc; }

/* Product Preview Modal / Popup */
.product-preview {
  position: fixed; z-index: 120; top: 100px; left: 18px;
  width: min(320px, calc(100vw - 24px)); max-height: min(570px, calc(100dvh - 112px));
  overflow: auto; padding: 11px; border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: 25px; background: rgba(251, 248, 253, 0.97); backdrop-filter: blur(24px);
  box-shadow: 0 25px 70px rgba(2, 6, 23, 0.46); opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(8px) scale(0.98); transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}
.product-preview.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.preview-close {
  position: absolute; z-index: 3; top: 17px; right: 17px; width: 34px; aspect-ratio: 1;
  display: grid; place-items: center; border-radius: 50%; color: var(--ink);
  background: rgba(255, 255, 255, 0.92); font-size: 1.2rem;
}
.preview-media img { width: 100%; aspect-ratio: 1.34; object-fit: contain; padding: 8px; border-radius: 19px; background: #fff; }
.preview-content { padding: 15px 7px 4px; }
.preview-label { margin: 0 0 5px; color: var(--accent-dark); font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.preview-content h2 { margin: 0; font-family: "Playfair Display", serif; font-size: 1.32rem; line-height: 1.04; }
.preview-content > p { margin: 9px 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.42; }
.preview-features { display: grid; gap: 5px; margin: 11px 0 13px; padding: 0; list-style: none; }
.preview-features li { position: relative; padding-left: 17px; color: #4d4557; font-size: 0.74rem; }
.preview-features li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-dark); font-weight: 900; }
.amazon-button {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 14px; border-radius: 15px; color: #fff; background: #07111f;
  font-size: 0.82rem; font-weight: 900;
}
.amazon-button:hover { background: linear-gradient(135deg, #0284c7, #7c3aed); }
.preview-scrim {
  position: fixed; inset: 0; z-index: 110; background: rgba(2, 6, 23, 0.46);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.preview-scrim.is-visible { opacity: 1; pointer-events: auto; }

/* Footer */
.site-footer {
  position: fixed; inset: auto 0 0; z-index: 75; height: var(--footer-height);
  color: #d7e4f7; background: rgba(7, 17, 31, 0.88); backdrop-filter: blur(18px);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}
.footer-grid { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.footer-copy strong { font-size: 14px; }
.footer-copy span { color: #93a4bb; font-size: 11px; margin-left: 8px; }
.footer-grid nav { display: flex; gap: 14px; }
.footer-grid a { color: #d7e4f7; font-size: 12px; font-weight: 800; }
.mobile-actions-bar, .mobile-products-drawer { display: none; }


/* ==========================================================================
   YOUTUBE SHORTS / REELS STYLE MOBILE INTERFACE (< 680px)
   ========================================================================== */
@media (max-width: 680px) {
  :root {
    --header-height: 52px;
    --footer-height: 0px;
  }

  html, body {
    overflow: hidden;
    touch-action: none;
    background: #000;
  }

  /* Compact Translucent Header */
  .site-header {
    height: var(--header-height);
    background: linear-gradient(180deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(8px);
    border-bottom: none;
  }
  .header-inner { padding-inline: 12px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
  .brand strong { font-size: 15px; }
  .brand small { display: none; }
  .menu-btn { display: inline-flex; padding: 6px 10px; font-size: 11px; }

  .site-nav {
    position: absolute; top: calc(100% + 4px); left: 8px; right: 8px;
    display: none; flex-direction: column; padding: 12px;
    background: rgba(10, 20, 36, 0.98); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.8);
  }
  .site-nav.open { display: flex; }
  .site-nav > a, .nav-dropbtn { text-align: center; width: 100%; margin-bottom: 4px; }

  /* Full Screen Container */
  .collections-page {
    position: fixed; inset: 0;
    padding: 0; isolation: auto;
  }

  .ambient-background { display: none; }
  .site-footer { display: none; }
  .carousel-button { display: none !important; }
  .collection-dots { display: none !important; }

  /* Top Overlay Info Bar */
  .top-bar {
    position: fixed; top: calc(var(--header-height) + 6px); left: 14px; right: 14px;
    z-index: 50; flex: none; padding: 0; pointer-events: none;
  }
  .eyebrow { font-size: 0.55rem; color: #a5f3fc; text-shadow: 0 2px 8px rgba(0,0,0,0.9); }
  .top-bar h1 {
    font-size: 1.15rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  }
  .collection-counter { font-size: 0.72rem; text-shadow: 0 2px 8px rgba(0,0,0,0.9); }
  .auto-rotate-track { width: 50px; height: 2px; }

  /* Vertical Snap Viewport */
  .carousel-shell { height: 100dvh; width: 100vw; }
  .collection-viewport {
    height: 100dvh; width: 100vw; overflow-x: hidden; overflow-y: auto;
    scroll-snap-type: y mandatory; scroll-behavior: smooth;
    border: none; border-radius: 0; background: #000; box-shadow: none;
    backdrop-filter: none; scrollbar-width: none;
  }
  .collection-viewport::-webkit-scrollbar { display: none; }

  .collection-track {
    display: block !important; width: 100% !important; height: auto !important;
    transform: none !important; transition: none !important;
  }

  /* Post Card Layout (Full 100dvh Reel Screen) */
  .collection-slide {
    width: 100vw; height: 100dvh; padding: 0;
    scroll-snap-align: start; scroll-snap-stop: always;
    position: relative; overflow: hidden; background: #000;
  }

  .collection-stage {
    width: 100%; height: 100%; border-radius: 0; background: #000;
  }

  .hero-frame {
    position: absolute; inset: 0; width: 100%; height: 100%;
    max-width: none; max-height: none; aspect-ratio: auto;
    transform: none; border: none; border-radius: 0; background: #000;
    box-shadow: none; z-index: 1;
  }

  .hero-frame img, .hero-frame video {
    width: 100%; height: 100%; object-fit: cover;
  }

  /* Gradient Vignette over video for legibility */
  .hero-frame::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(0,0,0,0.45) 0%,
      transparent 25%,
      transparent 60%,
      rgba(0,0,0,0.85) 100%
    );
  }

  /* Standard Product Cards transformed on mobile */
  .collection-stage > .product-card { display: none !important; }

  /* Floating Vertical Social Action Bar (Right side) */
  .mobile-actions-bar {
    position: absolute; right: 12px; bottom: 130px; z-index: 55;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
  }

  .action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  }

  .action-icon-circle {
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(20, 25, 35, 0.65); border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px); display: grid; place-items: center;
    font-size: 1.15rem; transition: transform 0.15s ease, background 0.15s ease;
  }

  .action-btn:active .action-icon-circle { transform: scale(0.88); }
  .action-btn.liked .action-icon-circle { background: #e11d48; border-color: #f43f5e; color: #fff; }
  .action-label { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.03em; }

  /* Bottom Swipeable Amazon Product Shelf */
  .mobile-products-drawer {
    position: absolute; left: 0; right: 0; bottom: 16px; z-index: 55;
    display: flex; flex-direction: column; gap: 8px; padding-inline: 12px;
  }

  .drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    color: rgba(255,255,255,0.9); font-size: 0.68rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.1em; padding-inline: 4px;
  }

  .drawer-products-scroll {
    display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px; scroll-snap-type: x mandatory;
  }
  .drawer-products-scroll::-webkit-scrollbar { display: none; }

  .mobile-product-pill {
    flex: 0 0 82vw; scroll-snap-align: center;
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    border-radius: 18px; background: rgba(12, 18, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22); backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); color: #fff;
  }

  .pill-img {
    width: 48px; height: 48px; border-radius: 12px; background: #fff;
    object-fit: contain; padding: 3px; flex-shrink: 0;
  }

  .pill-info { flex: 1; min-width: 0; }
  .pill-info h4 {
    margin: 0; font-size: 0.72rem; font-weight: 700; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; color: #f8fafc;
  }
  .pill-info p { margin: 2px 0 0; font-size: 0.6rem; color: #a78bfa; font-weight: 800; }

  .pill-buy-btn {
    flex-shrink: 0; padding: 7px 12px; border-radius: 999px;
    background: linear-gradient(135deg, #0284c7, #7c3aed);
    color: #fff; font-size: 0.68rem; font-weight: 900;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  }

  /* Double-tap Floating Heart Animation */
  .heart-burst {
    position: absolute; z-index: 100; width: 80px; height: 80px;
    pointer-events: none; transform: translate(-50%, -50%) scale(0);
    animation: heartPop 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.28) forwards;
    color: #f43f5e; font-size: 4rem; text-shadow: 0 10px 25px rgba(0,0,0,0.5);
  }

  @keyframes heartPop {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1) translateY(-40px); opacity: 0; }
  }

  .mobile-feed-hint {
    position: fixed; z-index: 58; left: 50%; bottom: 8px; transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px; padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.2); border-radius: 999px;
    color: rgba(255,255,255,0.85); background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px); font-size: 0.58rem; font-weight: 800;
    pointer-events: none; animation: mobileHintFade 4s ease forwards;
  }
  .mobile-feed-arrow { animation: mobileArrow 1.2s ease-in-out infinite; }
  @keyframes mobileArrow { 0%, 100% { transform: translateY(-1px); } 50% { transform: translateY(3px); } }
  @keyframes mobileHintFade { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

  /* Mobile Preview Override */
  .product-preview {
    top: auto !important; left: 8px !important; right: 8px !important; bottom: 12px !important;
    width: auto; max-height: 80dvh; border-radius: 26px; border-color: rgba(255,255,255,0.4);
  }
}

/* ============================================================
   V2 FIXES — MOBILE FULLSCREEN VIDEO + AUTO PRODUCT RAIL
   ============================================================ */

.product-preview[aria-hidden="true"]{pointer-events:none}
.product-preview[aria-hidden="false"]{pointer-events:auto}

@media (max-width:680px){
  html,body{
    touch-action:pan-y;
  }

  /* Keep the reel itself truly fullscreen. */
  .collections-page,
  .carousel-shell,
  .collection-viewport,
  .collection-slide,
  .collection-stage{
    height:100dvh;
    min-height:100dvh;
  }

  /* Preserve the entire 4:3 artwork/video rather than cutting off products. */
  .hero-frame{
    display:grid;
    place-items:center;
  }

  .hero-frame img,
  .hero-frame video{
    object-fit:contain;
    object-position:center;
    background:#000;
  }

  /* A blurred copy behind contain video fills unused portrait space elegantly. */
  .collection-stage::before{
    content:"";
    position:absolute;
    inset:0;
    z-index:0;
    background:var(--mobile-poster) center/cover no-repeat;
    filter:blur(26px) brightness(.58) saturate(.95);
    transform:scale(1.12);
    opacity:.88;
    pointer-events:none;
  }

  .hero-frame{
    z-index:1;
    background:rgba(0,0,0,.18);
  }

  .hero-frame::after{
    z-index:2;
    background:
      linear-gradient(180deg,rgba(0,0,0,.52) 0%,transparent 23%,transparent 62%,rgba(0,0,0,.88) 100%);
  }

  /* Products occupy one compact bottom rail and move automatically. */
  .mobile-products-drawer{
    bottom:max(14px,env(safe-area-inset-bottom));
    padding-inline:10px;
    overflow:hidden;
  }

  .drawer-header{
    padding-inline:5px;
    text-shadow:0 2px 8px rgba(0,0,0,.85);
  }

  .drawer-products-scroll{
    --rail-gap:10px;
    gap:var(--rail-gap);
    overflow-x:auto;
    overflow-y:hidden;
    scroll-behavior:smooth;
    scroll-snap-type:x mandatory;
    overscroll-behavior-inline:contain;
    touch-action:pan-x;
    padding:2px 1px 5px;
  }

  .mobile-product-pill{
    flex:0 0 min(82vw,340px);
    min-width:0;
    cursor:pointer;
    user-select:none;
    -webkit-user-select:none;
  }

  .mobile-product-pill:active{
    transform:scale(.985);
  }

  /* There is no direct Amazon link in the rail; preview opens first. */
  .pill-preview-btn{
    flex-shrink:0;
    padding:8px 12px;
    border-radius:999px;
    color:#fff;
    background:linear-gradient(135deg,#0284c7,#7c3aed);
    font-size:.68rem;
    font-weight:900;
    box-shadow:0 4px 12px rgba(2,132,199,.4);
  }

  .mobile-actions-bar{
    bottom:146px;
  }

  /* Modal opens above the reel, then its Amazon button performs navigation. */
  .product-preview{
    max-height:min(82dvh,680px);
    overflow:auto;
    padding:12px;
    background:rgba(250,248,253,.985);
  }

  .preview-media img{
    max-height:31dvh;
  }

  .preview-scrim.is-visible{
    backdrop-filter:blur(5px);
  }
}

@media (max-width:380px){
  .mobile-product-pill{
    flex-basis:88vw;
  }

  .mobile-actions-bar{
    right:8px;
    bottom:143px;
  }

  .action-icon-circle{
    width:40px;
    height:40px;
  }
}


/* ============================================================
   SOCIAL FEATURES: COMMENTS, PERSISTED LIKES, TOASTS
   ============================================================ */
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.comments-drawer{
  position:fixed;
  top:0;
  right:0;
  z-index:135;
  width:min(430px,calc(100vw - 22px));
  height:100dvh;
  display:flex;
  flex-direction:column;
  padding:20px;
  background:rgba(250,248,253,.985);
  backdrop-filter:blur(24px);
  box-shadow:-24px 0 80px rgba(2,6,23,.42);
  transform:translateX(110%);
  transition:transform .32s cubic-bezier(.22,1,.36,1);
}

.comments-drawer.is-open{transform:translateX(0)}

.comments-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:16px;
  border-bottom:1px solid #e5e7eb;
}

.comments-kicker{
  margin:0 0 4px;
  color:var(--accent-dark);
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.13em;
  text-transform:uppercase;
}

.comments-head h2{
  margin:0;
  font-family:"Playfair Display",serif;
  font-size:1.55rem;
  line-height:1.05;
}

.comments-close{
  width:38px;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#111827;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.12);
  font-size:1.3rem;
}

.comments-list{
  flex:1;
  min-height:0;
  overflow:auto;
  display:grid;
  align-content:start;
  gap:13px;
  padding:17px 2px;
}

.comment-item{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:10px;
}

.comment-avatar{
  width:38px;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,#0284c7,#7c3aed);
  font-size:.82rem;
  font-weight:900;
}

.comment-body{
  padding:10px 12px;
  border:1px solid #e5e7eb;
  border-radius:16px;
  background:#fff;
}

.comment-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.comment-meta strong{font-size:.78rem}
.comment-meta time{color:#94a3b8;font-size:.62rem}
.comment-body p{
  margin:6px 0 0;
  color:#475569;
  font-size:.78rem;
  line-height:1.5;
  overflow-wrap:anywhere;
}

.comments-empty{
  align-self:center;
  padding:28px 18px;
  color:#64748b;
  text-align:center;
}

.comments-empty span{display:block;font-size:2rem}
.comments-empty strong{display:block;margin-top:8px;color:#1f2937}
.comments-empty p{margin:5px 0 0;font-size:.78rem}

.comment-form{
  display:grid;
  gap:8px;
  padding-top:14px;
  border-top:1px solid #e5e7eb;
}

.comment-form input,
.comment-form textarea{
  width:100%;
  border:1px solid #dbe2ea;
  border-radius:13px;
  background:#fff;
  color:#111827;
  font:inherit;
  font-size:.8rem;
  outline:none;
}

.comment-form input{padding:10px 12px}
.comment-form textarea{
  min-height:82px;
  resize:vertical;
  padding:11px 12px;
}

.comment-form input:focus,
.comment-form textarea:focus{
  border-color:#38bdf8;
  box-shadow:0 0 0 3px rgba(56,189,248,.14);
}

.comment-form button{
  padding:11px 14px;
  border-radius:13px;
  color:#fff;
  background:linear-gradient(135deg,#0284c7,#7c3aed);
  font-weight:900;
}

.comments-scrim{
  position:fixed;
  inset:0;
  z-index:130;
  background:rgba(2,6,23,.5);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease;
}

.comments-scrim.is-visible{
  opacity:1;
  pointer-events:auto;
  backdrop-filter:blur(4px);
}

.social-toast{
  position:fixed;
  left:50%;
  bottom:74px;
  z-index:170;
  padding:9px 14px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  color:#fff;
  background:rgba(7,17,31,.92);
  box-shadow:0 12px 32px rgba(2,6,23,.35);
  font-size:.74rem;
  font-weight:800;
  opacity:0;
  transform:translate(-50%,10px);
  transition:opacity .2s ease,transform .2s ease;
}

.social-toast.is-visible{
  opacity:1;
  transform:translate(-50%,0);
}

@media (max-width:680px){
  .comments-drawer{
    top:auto;
    left:8px;
    right:8px;
    bottom:8px;
    width:auto;
    height:min(78dvh,680px);
    padding:15px;
    border-radius:26px;
    transform:translateY(110%);
  }

  .comments-drawer.is-open{transform:translateY(0)}

  .comments-head h2{font-size:1.28rem}
  .comments-list{padding-block:13px}
  .comment-form textarea{min-height:70px}
  .social-toast{bottom:24px}

  /* Prevent overshooting and keep the final product fully inside the rail. */
  .drawer-products-scroll{
    scroll-padding-inline:1px;
    padding-inline:1px;
  }

  .mobile-product-pill{
    scroll-snap-align:center;
  }
}

/* ============================================================
   V4 LAYOUT + INTERACTION FIXES
   ============================================================ */

/* Desktop preview follows the side of the hovered/selected product. */
@media (min-width: 681px) {
  .product-preview.preview-left {
    left: 18px;
    right: auto;
  }

  .product-preview.preview-right {
    left: auto;
    right: 18px;
  }

  /* Use substantially more of the desktop viewport while preserving 4:3. */
  .hero-frame {
    width: min(
      calc(100% - clamp(300px, 29vw, 430px)),
      calc((100% - 12px) * 4 / 3)
    );
    height: auto;
    max-width: none;
    max-height: calc(100% - 12px);
    aspect-ratio: 4 / 3;
  }

  .hero-frame img,
  .hero-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }

  .collection-viewport {
    touch-action: pan-y pinch-zoom;
  }
}

@media (max-width: 680px) {
  /* Mobile is a true portrait reel, using mobileImage/mobileVideo when supplied. */
  .hero-frame {
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: 9 / 16;
  }

  .hero-frame img,
  .hero-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #000;
  }

  .collection-viewport {
    touch-action: pan-y;
    overscroll-behavior-y: contain;
  }
}

/* Prevent accidental desktop hover while dragging or sliding posts. */
@media (min-width: 681px) {
  .collection-viewport.hover-suspended .product-card {
    pointer-events: none;
  }

  .collection-viewport.hover-suspended .product-card:hover,
  .collection-viewport.hover-suspended .product-card:focus-visible {
    z-index: 6;
    transform: none;
    box-shadow: var(--small-shadow);
  }
}
