/* ──────────────────────────────────────────────────────────────
   Bengali Hero Carousel — estilos
   Depende de tokens definidos en bengali/styles.css:
   --bg, --bg-deep, --ink, --ink-soft, --ink-mute, --rule,
   --rule-soft, --accent, --accent-deep, --sage,
   --serif, --sans, --mono
   ────────────────────────────────────────────────────────────── */

:root {
  --hero-photo-bg: #EFE9DE;         /* fondo crema — sólo en slides pieza/trio/conjunto */
  --hero-height: 800px;             /* altura del slide */
}

/* ── shell ─────────────────────────────────────────────────── */
.hero-shell {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--bg);
}
.hero-track {
  position: relative;
  height: var(--hero-height);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }

.hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  height: 100%;
  padding: 64px 56px 80px;
  position: relative;
}

/* ── controles ─────────────────────────────────────────────── */
.hero-controls {
  position: absolute; left: 56px; right: 56px; bottom: 28px;
  display: flex; align-items: center; gap: 24px;
  z-index: 5;
}
.hero-progress {
  flex: 1; height: 1px;
  background: rgba(0, 0, 0, 0.12);
  position: relative; overflow: hidden;
}
.hero-progress-bar {
  position: absolute; inset: 0 auto 0 0;
  background: var(--ink);
  width: 0%;
  transition: width 0.15s linear;
}
.hero-dots { display: flex; gap: 8px; align-items: center; }
.hero-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  border: none; padding: 0; cursor: pointer;
  transition: background 0.25s, width 0.25s, border-radius 0.25s;
}
.hero-dot.is-active {
  background: var(--ink);
  width: 22px;
  border-radius: 3px;
}
.hero-count {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--ink-mute);
  min-width: 50px;
}

/* ── typography del hero ───────────────────────────────────── */
.hero-eyebrow-row {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 28px;
}
.hero-eyebrow-row .line {
  height: 1px; background: var(--rule);
  flex: 1; max-width: 80px;
}
.hero-h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 78px;
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
}
.hero-h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.hero-h1.lg { font-size: 88px; }
.hero-h1.md { font-size: 56px; }
.hero-h1.sm { font-size: 48px; line-height: 1.05; }
.hero-body {
  font-size: 15px; line-height: 1.65;
  color: var(--ink-soft);
  max-width: 440px;
  margin: 0 0 32px;
}
.hero-ctas { display: flex; gap: 10px; align-items: center; }

/* ── trio: anular márgenes de tipografía dentro del grid ───── */
.slide-trio .hero-eyebrow-row { margin-bottom: 0; }
.slide-trio .hero-body { max-width: none; margin-bottom: 0; }

/* ── photo frame compartido ────────────────────────────────── */
.hero-photo {
  position: relative;
  overflow: hidden;
  margin: 0;
}
/* Bg crema sólo en los slides de producto (foto sobre fondo claro). Los
   slides con modelo (lookbook, editorial) llevan la foto a sangre, sin bg. */
.slide-pieza .hero-photo,
.slide-trio  .hero-photo,
.slide-conjunto .hero-photo { background: var(--hero-photo-bg); }
.hero-photo img {
  display: block; width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.hero-photo.fit-contain img {
  object-fit: contain;
  padding: 1%;
}
.hero-photo .photo-tag {
  position: absolute;
  left: 14px; bottom: 14px;
  background: var(--bg);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────
   Slide P1 · "pieza"
   ────────────────────────────────────────────────────────────── */
.slide-pieza .grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
  height: 100%;
}
.slide-pieza .stage {
  position: relative;
  height: 500px;
}
.slide-pieza .stage .hero-photo {
  position: absolute;
  inset: 0;
  height: 100%;
}
.slide-pieza .price-line {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: -8px 0 24px;
}
.slide-pieza .price-line b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink);
  margin-right: 6px;
}

/* ──────────────────────────────────────────────────────────────
   Slide P2 · "trio"
   ────────────────────────────────────────────────────────────── */
.slide-trio .wrap {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  height: 100%;
  gap: 24px;
}
.slide-trio .pieces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 0;
}
.slide-trio .piece {
  position: relative;
  height: 100%;
  min-height: 0;
}
.slide-trio .piece img {
  object-fit: contain;
  padding: 1%;
}
.slide-trio .piece .label {
  position: absolute;
  left: 12px; bottom: 12px;
  background: rgba(248, 242, 232, 0.95);
  backdrop-filter: blur(4px);
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.slide-trio .piece .label small {
  display: block;
  font-size: 8px;
  color: var(--ink-mute);
  margin-top: 2px;
  letter-spacing: 0.16em;
}
.slide-trio .piece .piece-price {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0;
  background: rgba(248, 242, 232, 0.95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 5px 12px;
}
/* Placeholder gris mientras llega data del catálogo (slides con `sku` o trio) */
.hero-photo.is-loading {
  background: var(--bg-deep);
  opacity: 0.6;
}
.slide-trio .footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
  padding: 20px 0 8px;
}
.slide-trio .footer .text-group {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 32px;
}
.slide-trio .h {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
.slide-trio .h em {
  font-style: italic;
  color: var(--accent);
}
.slide-trio .footer p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ──────────────────────────────────────────────────────────────
   Slide P3 · "editorial"
   ────────────────────────────────────────────────────────────── */
.slide-editorial .grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: stretch;
  height: 100%;
}
.slide-editorial .copy { padding-right: 12px; align-self: center; }
.slide-editorial .meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.slide-editorial .meta .dot { color: var(--ink-mute); }
.slide-editorial .stage {
  position: relative;
  height: 100%;
  width: 100%;
}
.slide-editorial .stage .hero-photo {
  position: absolute;
  inset: 0;
}

/* ──────────────────────────────────────────────────────────────
   Slide P4 · "conjunto"
   ────────────────────────────────────────────────────────────── */
.slide-conjunto .grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  height: 100%;
  align-items: center;
}
.slide-conjunto .cite {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.slide-conjunto .cite::before {
  content: "";
  width: 36px;
  height: 1px;
  background: var(--ink);
}
.slide-conjunto .stage {
  position: relative;
  height: 540px;
}
.slide-conjunto .stage .hero-photo {
  position: absolute;
  inset: 0;
}
.slide-conjunto .stat {
  position: absolute;
  right: -20px; top: -16px;
  background: var(--accent);
  color: var(--bg);
  padding: 14px 20px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  z-index: 2;
}
.slide-conjunto .stat b {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  display: block;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

/* ──────────────────────────────────────────────────────────────
   Slide P5 · "lookbook"
   ────────────────────────────────────────────────────────────── */
.slide-lookbook .grid {
  display: grid;
  grid-template-columns: 0.85fr 1.1fr 0.95fr;
  gap: 14px;
  height: 100%;
}
.slide-lookbook .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 16px;
}

/* ──────────────────────────────────────────────────────────────
   Mobile (≤900px) — todos los slides colapsan a 1 columna
   ────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --hero-height: auto; }
  .hero-h1 { font-size: 38px !important; }
  .hero-h1.lg { font-size: 42px !important; }
  .hero-body { font-size: 14px; margin: 0 0 22px; max-width: none; }

  .slide-pieza .grid,
  .slide-editorial .grid,
  .slide-conjunto .grid,
  .slide-lookbook .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .slide-trio .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .slide-trio .footer .text-group { flex: 1; width: 100%; }
  .slide-pieza .stage,
  .slide-editorial .stage,
  .slide-conjunto .stage {
    height: 380px;
  }
  .slide-pieza .stage .hero-photo { inset: 0; height: 100%; }
  .slide-conjunto .stat { right: 8px; top: -8px; }

  .slide-trio .pieces { grid-template-columns: 1fr; min-height: 360px; }
  .slide-trio .footer .h { font-size: 32px; }
  .slide-trio .pieces .piece:nth-child(n+2) { display: none; }

  .slide-lookbook .grid { grid-template-columns: 1fr; }
  .slide-lookbook .copy { grid-column: 1 / -1; }
  .slide-lookbook .hero-photo:nth-of-type(n+2) { display: none; }
  .slide-lookbook .hero-photo { height: 360px; }

  /* Fotos completas, sin recorte (sólo aplica bg crema a slides de producto) */
  .slide-pieza .hero-photo img,
  .slide-trio  .hero-photo img,
  .slide-conjunto .hero-photo img { object-fit: contain; padding: 1%; }

  .hero-controls { left: 24px; right: 24px; bottom: 18px; }
  .hero-shell { --hero-height: 820px; }
  .hero-inner { padding: 32px 24px 64px; }

  /* Quitar padding asimétrico de desktop en columnas de copy */
  .slide-lookbook .copy,
  .slide-editorial .copy {
    padding-right: 0;
  }

  /* Centrar texto y controles flex */
  .hero-eyebrow-row { justify-content: center; }
  .hero-h1          { text-align: center; }
  .hero-body        { text-align: center; }
  .hero-ctas        { justify-content: center; }

  /* Quitar max-width que recorta en pantallas pequeñas */
  .slide-trio .footer p { max-width: none; }
}
@media (max-width: 480px) {
  .hero-shell { --hero-height: 740px; }
  .hero-h1 { font-size: 34px !important; }
  .hero-h1.lg { font-size: 36px !important; }
  .slide-pieza .stage,
  .slide-editorial .stage,
  .slide-conjunto .stage { height: 320px; }
  .slide-trio .pieces { min-height: 300px; }
  .slide-lookbook .hero-photo { height: 300px; }
}

/* ── Hero Stories mode (≤768px) ────────────────────────── */
@media (max-width: 768px) {
  .hero-shell.stories-mode {
    display: flex;
    flex-direction: column;
    height: 100svh;
    max-height: 820px;
    min-height: 480px;
    overflow: hidden;
    background: var(--bg);
  }
  /* Zona de foto — crece/encoge con la imagen */
  .stories-photo-wrap {
    width: 100%;
    flex-shrink: 0;
    background: var(--bg);
    overflow: hidden;
  }
  .stories-photo-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top center;
    opacity: 0;
  }
  .stories-photo-img.is-loaded { opacity: 1; }

  /* Ocultar carousel en modo stories */
  .hero-shell.stories-mode .hero-track,
  .hero-shell.stories-mode .hero-controls { display: none; }

  /* Progress bars — sobre zona de foto */
  .stories-bars {
    position: absolute;
    top: 12px; left: 12px; right: 12px;
    display: flex;
    gap: 4px;
    z-index: 3;
  }
  .stories-bar {
    flex: 1; height: 2px;
    background: rgba(0,0,0,.18);
    border-radius: 1px;
    overflow: hidden;
  }
  .stories-bar-fill {
    height: 100%; width: 0%;
    background: var(--ink);
    border-radius: 1px;
  }

  /* Pause button */
  .stories-pause-btn {
    position: absolute;
    top: 28px; right: 14px;
    z-index: 4;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.12);
    border: none; border-radius: 50%;
    color: var(--ink); cursor: pointer;
    padding: 0;
  }

  /* Tap zones — solo zona de foto, no cubren el área de texto/CTA */
  .stories-tap {
    position: absolute; top: 0; height: 60svh;
    width: 20%;
    background: transparent;
    border: none;
    z-index: 2;
    cursor: pointer;
    min-height: 44px;
    padding: 0;
  }
  .stories-tap-left  { left: 0; }
  .stories-tap-right { right: 0; }

  /* Zona de texto — toma el espacio restante */
  .stories-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px 20px 24px;
    z-index: 1;
    background: var(--bg);
    border-top: 1px solid var(--rule-soft);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .stories-eyebrow {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }
  .stories-content .hero-h1 {
    font-size: 32px !important;
    color: var(--ink);
    margin: 0;
    line-height: 1.05;
  }
  .stories-content .hero-h1 em { color: var(--accent); font-style: italic; }
  .stories-body {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.5;
    margin: 0;
  }
  .stories-cta {
    margin-top: 2px;
    min-height: 44px;
  }
  .stories-hint {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: .1em;
    color: var(--ink-mute);
    margin-top: auto;
    align-self: center;
  }
}
