/* ── Carousel Root ──────────────────────────────────────────────────────── */
.reel-carousel-root {
  padding: 20px 0 60px;
}

/* ── Brand Filter Pills ─────────────────────────────────────────────────── */
.reel-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  padding: 0 20px;
}

.reel-filter-btn {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 40px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 7px 18px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.reel-filter-btn:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
  color: rgba(255, 255, 255, 0.9);
}

.reel-filter-btn.active {
  background: rgba(139, 92, 246, 0.32);
  border-color: rgba(139, 92, 246, 0.7);
  color: #fff;
}

/* ── Stage ──────────────────────────────────────────────────────────────── */
.reel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 680px;
  overflow: visible;
}

/* ── Track ──────────────────────────────────────────────────────────────── */
.reel-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.reel-card {
  position: absolute;
  width: 340px;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: #0d0d0d;
  flex-shrink: 0;
  will-change: transform, opacity;
  transition:
    transform  0.55s var(--ease-out-expo),
    opacity    0.55s var(--ease-out-expo),
    box-shadow 0.55s ease;
}

/* Active — big center card */
.reel-card.state-active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 10;
  box-shadow:
    0 0 0 2px rgba(139, 92, 246, 0.85),
    0 0 56px rgba(139, 92, 246, 0.25),
    0 40px 100px rgba(0, 0, 0, 0.8);
}

/* Adjacent cards -- offset scales with viewport width (capped at the desktop
   value) so the peek card can never sit further off-center than the screen
   actually has room for, at any width above the mobile breakpoint. */
.reel-card.state-prev1 {
  transform: translateX(calc(-1 * min(390px, 28vw))) scale(0.76);
  opacity: 0.6;
  z-index: 5;
  cursor: pointer;
}
.reel-card.state-next1 {
  transform: translateX(min(390px, 28vw)) scale(0.76);
  opacity: 0.6;
  z-index: 5;
  cursor: pointer;
}

/* Far cards */
.reel-card.state-prev2 {
  transform: translateX(calc(-1 * min(660px, 32vw))) scale(0.56);
  opacity: 0.22;
  z-index: 2;
  cursor: pointer;
}
.reel-card.state-next2 {
  transform: translateX(min(660px, 32vw)) scale(0.56);
  opacity: 0.22;
  z-index: 2;
  cursor: pointer;
}

/* Hidden */
.reel-card.state-hidden {
  transform: scale(0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Active Card — Drive iframe with chrome clipping ────────────────────── */

/* Thumbnail shown as background while iframe loads */
.card-thumb-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Clips the Drive player bar (44px) off the top */
.card-iframe-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.card-iframe-inner {
  position: absolute;
  top: -44px;
  left: 0;
  width: 100%;
  height: calc(100% + 44px);
}

.card-iframe-inner iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Brand pill overlaid on active card */
.card-brand-pill {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 5px 14px;
  pointer-events: none;
  text-transform: uppercase;
}

/* ── Tap-to-play overlay (first load, before user gesture) ─────────────── */
.card-tap-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  z-index: 20;
}

.card-tap-btn {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 40px rgba(139, 92, 246, 0.5);
  transition: transform 0.18s ease, background 0.18s ease;
}

.card-tap-btn:hover {
  transform: scale(1.1);
  background: rgba(139, 92, 246, 1);
}

.card-tap-overlay:active .card-tap-btn {
  transform: scale(0.92);
  transition: transform var(--transition-press);
}

/* ── Side Card — thumbnail + overlay ───────────────────────────────────── */
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 30%, rgba(0,0,0,0.15) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.card-play-icon {
  opacity: 0.88;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.9));
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.reel-card:hover .card-play-icon {
  opacity: 1;
  transform: scale(1.12);
}

.card-side-brand {
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
  text-transform: uppercase;
}

/* ── Nav Buttons ────────────────────────────────────────────────────────── */
.reel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 36px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
  user-select: none;
}

.reel-nav:hover {
  background: rgba(139, 92, 246, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.reel-nav:active {
  transform: translateY(-50%) scale(0.9);
  transition: transform var(--transition-press);
}

.reel-nav-prev { left: 20px; }
.reel-nav-next { right: 20px; }

/* ── Meta below the carousel ────────────────────────────────────────────── */
.reel-meta {
  text-align: center;
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reel-brand {
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.3px;
}

.reel-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
}

.reel-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  margin-top: 2px;
}

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .reel-stage { height: 650px; }
  /* Fixed, not fluid: Drive's own player-control bar needs ~320px of real
     width to render without clipping, regardless of the phone's screen size. */
  .reel-card  { width: 320px; }

  .reel-card.state-prev1,
  .reel-card.state-next1,
  .reel-card.state-prev2,
  .reel-card.state-next2 { transform: scale(0.4); opacity: 0; pointer-events: none; }

  .reel-nav { width: 44px; height: 44px; font-size: 28px; }
  .reel-nav-prev { left: 8px; }
  .reel-nav-next { right: 8px; }

  .reel-filters { gap: 6px; }
  .reel-filter-btn { font-size: 11px; padding: 6px 14px; }
}
