/* =========================================================
   PRODUCT PAGE — pinned horizontal showcase
   ========================================================= */

/* ---------- hero ---------- */
.product-hero {
  position: relative;
  overflow: hidden;
}
/* faint warm wash bleeding from the top, echoing the brand's warm tints */
.product-hero::before {
  content: "";
  position: absolute;
  top: -55%;
  left: 50%;
  transform: translateX(-50%);
  width: min(1500px, 150vw);
  aspect-ratio: 1;
  background:
    radial-gradient(closest-side, rgba(184,106,63,0.05), rgba(184,106,63,0) 78%);
  pointer-events: none;
}
.product-hero .container { position: relative; z-index: 1; }

.ph-accent {
  font-style: italic;
  color: var(--accent);
}
[dir="rtl"] .ph-accent { font-style: normal; }

.product-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--body-2);
}
[dir="rtl"] .product-hero-meta { font-family: var(--sans-ar); }
.product-hero-meta strong { color: var(--ink); font-weight: 600; }
.phm-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-3);
}

.product-hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: clamp(40px, 6vh, 64px);
}
.phs-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--body-2);
}
.phs-rail {
  position: relative;
  width: 1px;
  height: 46px;
  background: var(--line-2);
  overflow: hidden;
}
.phs-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 12px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .phs-dot { animation: phsDrop 1.8s var(--ease) infinite; }
}
@keyframes phsDrop {
  0%   { transform: translateY(-14px); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(46px); opacity: 0; }
}

.pshow {
  position: relative;
  background: var(--bg-warm);
}

.pshow-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* ---------- the moving rail of full-width panels ---------- */
.pshow-rail {
  display: flex;
  height: 100%;
  width: max-content;
  will-change: transform;
}
.pshow-panel {
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  display: flex;
  align-items: center;
}
.pshow-panel-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.78fr) minmax(0, 0.72fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  width: 100%;
}

/* media side */
.pshow-media { will-change: transform, opacity; }
.pshow-media-frame {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #FFFFFF;
  padding: 10px;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-card);
}
.pshow-media-frame image-slot { border-radius: 9px; }

/* Live product demos (DC iframes) */
.pshow-media-frame.is-demo {
  aspect-ratio: 16 / 9;
  padding: 0;
  background: #DCD8D2;
  position: relative;
}
.demo-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  pointer-events: none;
}
.demo-video {
  opacity: 0;
  transition: opacity 0.45s var(--ease-out);
}
.demo-video.is-ready { opacity: 1; }

/* text side */
.pshow-text { will-change: transform, opacity; max-width: 38ch; }
.pshow-text .eyebrow { margin-bottom: 20px; }
.pshow-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: pretty;
}
[dir="rtl"] .pshow-title { font-family: var(--serif-ar); letter-spacing: 0; }
.pshow-body {
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.65;
  color: var(--body);
  margin: 0 0 30px;
}
.pshow-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-3);
  transition: border-color var(--t-fast) var(--ease), gap var(--t-fast) var(--ease);
}
[dir="rtl"] .pshow-cta { font-family: var(--sans-ar); }
.pshow-cta .arrow { transition: transform 0.25s var(--ease-out); }
.pshow-cta:hover { border-color: var(--ink); gap: 14px; }
.pshow-cta:hover .arrow { transform: translateX(4px); }
[dir="rtl"] .pshow-cta:hover .arrow { transform: translateX(-4px); }

/* ---------- progress chrome (sits above the rail) ---------- */
.pshow-chrome {
  position: absolute;
  top: clamp(96px, 12vh, 132px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}
.pshow-count {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--body-2);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.pshow-count-now { color: var(--ink); font-size: 15px; }
.pshow-count-sep { opacity: 0.5; }

.pshow-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 4px;
  pointer-events: auto;
}
.pshow-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--body-2);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.pshow-tab-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--line-3);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.pshow-tab:hover { color: var(--ink); }
.pshow-tab.is-active { color: var(--ink); background: #FFFFFF; }
.pshow-tab.is-active .pshow-tab-dot { background: var(--accent); transform: scale(1.3); }

/* ---------- bottom progress line ---------- */
.pshow-progress {
  position: absolute;
  bottom: clamp(40px, 7vh, 72px);
  left: 50%;
  transform: translateX(-50%);
  width: min(1200px, calc(100vw - 2 * var(--gutter, 48px)));
  height: 2px;
  background: var(--line-2);
  z-index: 5;
}
.pshow-progress-bar {
  height: 100%;
  background: var(--ink);
  transition: width 0.25s var(--ease-out);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  /* The pinned horizontal scroll can't fit a tall panel inside a 100vh
     overflow:hidden stage on short phones (content + CTA get clipped and
     become unreachable). On mobile, unpin it and render the panels as a
     natural vertical stack instead. !important beats the inline height
     (React sets `height:N*100vh`) and the per-frame transforms motion.js
     writes to the rail / media / text. */
  .pshow { height: auto !important; }
  .pshow-stage {
    position: static;
    height: auto;
    display: block;
    overflow: visible;
  }
  .pshow-rail {
    display: block;
    width: 100%;
    height: auto;
    transform: none !important;
  }
  .pshow-panel {
    flex: none;
    width: 100%;
    height: auto;
    display: block;
    padding: clamp(44px, 9vw, 72px) 0;
    border-bottom: 1px solid var(--line-2);
  }
  .pshow-panel:last-child { border-bottom: 0; }
  .pshow-media,
  .pshow-text {
    transform: none !important;
    opacity: 1 !important;
  }

  .pshow-panel-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 0;
  }
  .pshow-media { order: -1; }
  .pshow-text { max-width: none; }
  .pshow-media-frame { aspect-ratio: 16 / 10; }
  .pshow-title { font-size: clamp(24px, 6vw, 32px); }

  /* the pinned-scroll chrome (counter + progress bar + tab rail) is
     meaningless in a vertical stack */
  .pshow-chrome,
  .pshow-progress { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pshow-media, .pshow-text { transition: none; }
}
