:root {
  --bg: #ffffff;
  --bg-alt: #f5f3f0;
  --ink: #0c0c0e;
  --ink-soft: #f5f5f2;
  --text: #14141a;
  --muted: #6b6b74;
  --muted-2: #9a9aa2;
  --card-border: #e8e6e1;
  --accent: #e6392c;
  --accent-hover: #cc2f24;
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1280px;
  --font-display: "Sora", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
main img, #lightbox-overlay img { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); }

.section-eyebrow {
  font-family: var(--font-body);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(230, 57, 44, 0.55); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline { background: transparent; color: var(--text); border-color: #d8d6d0; }
.btn-outline:hover { border-color: var(--text); }

.btn-outline-light { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.14); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f0f0ee; }

.btn-lg { padding: 0.95rem 2rem; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 12, 14, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--card-border);
}
.site-header.is-scrolled .category-nav a { color: var(--muted); }
.site-header.is-scrolled .category-nav a:hover { color: var(--text); }
.site-header.is-scrolled .category-nav a.is-active { color: var(--accent); }
.site-header.is-scrolled .nav-toggle span { background: var(--text); }

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
  padding: 0.8rem 1.75rem;
}
.brand-logo { height: 46px; width: auto; border-radius: 9px; display: block; }

.category-nav { flex: 1; display: flex; justify-content: center; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-nav a {
  font-size: 0.83rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  padding: 0.4rem 0;
  transition: color 0.15s ease;
  text-transform: capitalize;
}
.category-nav a:hover { color: #fff; }
.category-nav a.is-active { color: var(--accent); }

.header-cta { flex-shrink: 0; }

/* Header search */
.header-search { position: relative; flex-shrink: 0; }
.header-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: rgba(255,255,255,0.6);
  pointer-events: none;
  transition: color 0.2s ease;
}
.site-header.is-scrolled .header-search-icon { color: var(--muted-2); }
.header-search-input {
  width: 200px;
  padding: 0.55rem 1rem 0.55rem 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.85rem;
  font-family: var(--font-body);
  transition: background 0.18s ease, border-color 0.18s ease, width 0.18s ease;
}
.header-search-input::placeholder { color: rgba(255,255,255,0.55); }
.header-search-input:focus { outline: none; background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.55); }
.site-header.is-scrolled .header-search-input { background: var(--bg-alt); border-color: var(--card-border); color: var(--text); }
.site-header.is-scrolled .header-search-input::placeholder { color: var(--muted-2); }

.header-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-height: 60vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  box-shadow: 0 24px 48px -20px rgba(12, 12, 14, 0.35);
  padding: 0.4rem;
  display: none;
  z-index: 60;
}
.header-search-results.is-open { display: block; }
.header-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  transition: background 0.12s ease;
}
.header-search-item:hover { background: var(--bg-alt); }
.header-search-item-media {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.header-search-item-media img { width: 100%; height: 100%; object-fit: contain; }
.header-search-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.header-search-empty { padding: 1.2rem 0.9rem; text-align: center; color: var(--muted-2); font-size: 0.85rem; }
.header-search-viewall {
  display: block;
  text-align: center;
  padding: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  border-top: 1px solid var(--card-border);
  margin-top: 0.3rem;
}
.header-search-viewall:hover { color: var(--accent-hover); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { height: 2px; background: #fff; border-radius: 2px; transition: background 0.2s ease; }

/* Hero: full-bleed cinematic */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: #111 center/cover no-repeat;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(8,8,9,0.94) 0%, rgba(8,8,9,0.78) 32%, rgba(8,8,9,0.35) 58%, rgba(8,8,9,0.15) 100%),
    linear-gradient(0deg, rgba(8,8,9,0.5), transparent 40%);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 1.75rem;
}
.hero-eyebrow { letter-spacing: 0.24em; font-size: 0.8rem; font-weight: 700; color: #ff6a5c; margin: 0 0 1.2rem; }
.hero-title {
  font-size: clamp(2.6rem, 5.4vw, 4.6rem);
  line-height: 1.05;
  margin: 0 0 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 700px;
}
.hero-subtitle { color: rgba(255,255,255,0.78); font-size: 1.12rem; max-width: 460px; margin: 0 0 2.3rem; line-height: 1.6; }
.hero-actions { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 2.6rem; }
.hero-stat { display: flex; align-items: baseline; gap: 0.6rem; }
.hero-stat-number { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: #fff; }
.hero-stat-label { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* Full-bleed editorial feature blocks */
.feature-block {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  /* grid-template-rows fija la fila a 620px de verdad — height por si sola
     no basta: una fila "auto" crece para caber el texto (titulos largos),
     y al estirarse la columna de la foto por align-items:stretch el
     img (height:100%) se agrandaba con ella, viéndose gigante/recortado. */
  grid-template-rows: 620px;
  height: 620px;
  overflow: hidden;
}
.feature-block-reverse { grid-template-columns: 0.85fr 1.15fr; }
.feature-block-reverse .feature-media { order: 2; }
.feature-block-reverse .feature-copy { order: 1; }

.feature-link { display: contents; }
.feature-link .feature-copy .btn { pointer-events: none; }

/* background-image + cover recortaba fotos altas/estrechas (dejaba solo un
   fragmento visible). Con object-fit:contain la foto entera cabe siempre
   dentro del panel, centrada — el panel se queda con el color de fondo
   alrededor (ver tools/check_feature_images.py: las fotos que llegan aqui
   ya estan filtradas a fondo blanco, así que ese margen no se nota). */
.feature-media { display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 2rem; }
.feature-media-img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; }

.feature-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  padding: 4rem clamp(1.75rem, 6vw, 6rem);
  background: var(--ink);
}
.feature-familia {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ff6a5c;
  margin: 0;
}
.feature-nombre {
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.2;
  color: #fff;
  margin: 0 0 0.6rem;
  font-weight: 700;
  max-width: 22ch;
}

.feature-familia, .feature-nombre, .feature-copy .btn {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.feature-copy.is-visible .feature-familia { opacity: 1; transform: translateY(0); }
.feature-copy.is-visible .feature-nombre { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
.feature-copy.is-visible .btn { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }

/* Carousel */
.carousel-section { padding: 5rem 1.75rem; background: var(--bg); }
.carousel-inner { max-width: 1440px; margin: 0 auto; }
.carousel-title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); font-weight: 800; color: var(--ink); margin: 0 0 2.4rem; }

.carousel-viewport { overflow: hidden; width: 100%; }
.carousel-track { display: flex; transition: transform 0.5s ease; }
.carousel-page {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.carousel-item { display: block; }
.carousel-item-media {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  overflow: hidden;
  margin-bottom: 1rem;
}
.carousel-item-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.carousel-item:hover .carousel-item-media img { transform: scale(1.06); }
.carousel-item-nombre { font-weight: 700; font-size: 0.98rem; color: var(--ink); margin: 0 0 0.4rem; }
.carousel-item-link { font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.carousel-item:hover .carousel-item-link { color: var(--accent-hover); }

.carousel-dots { display: flex; justify-content: center; gap: 0.6rem; margin-top: 2.4rem; }
.carousel-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--card-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.is-active { background: var(--ink); transform: scale(1.2); }

@media (max-width: 1180px) { .carousel-page { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (max-width: 560px) { .carousel-page { grid-template-columns: 1fr; } }

.page-state { text-align: center; color: var(--muted); padding: 4rem 1rem; font-size: 0.95rem; }

.badge-destacado {
  position: absolute; top: 0.6rem; left: 0.6rem;
  background: var(--accent); color: #fff; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.06em; padding: 0.3rem 0.6rem; border-radius: 999px; text-transform: uppercase;
}
.badge-agotado {
  position: absolute; top: 0.6rem; right: 0.6rem;
  background: rgba(12,12,14,0.78); color: #f0f0ee; font-size: 0.62rem; font-weight: 700;
  padding: 0.3rem 0.6rem; border-radius: 999px;
}

/* CTA band */
/* Footer */
.site-footer { padding: 4rem 1.75rem 2rem; background: var(--bg); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: flex-start; gap: 6rem; flex-wrap: wrap; padding-bottom: 2.5rem; }
.footer-brand { max-width: 360px; }
.footer-logo { height: 32px; width: auto; margin-bottom: 1rem; border-radius: 6px; }
.footer-brand p { color: var(--muted-2); font-size: 0.88rem; line-height: 1.6; margin: 0; }
.footer-col h3 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.9rem; font-weight: 600; }
.footer-col a { display: block; color: var(--muted-2); font-size: 0.9rem; margin-bottom: 0.6rem; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: var(--max-width); margin: 0 auto; padding-top: 2rem;
  border-top: 1px solid var(--card-border); color: var(--muted-2); font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 980px) {
  .feature-block, .feature-block-reverse { grid-template-columns: 1fr; grid-template-rows: none; height: auto; overflow: visible; }
  .feature-block-reverse .feature-media, .feature-block .feature-media { order: 1; }
  .feature-block-reverse .feature-copy, .feature-block .feature-copy { order: 2; }
  .feature-media { min-height: 320px; }
  .feature-copy { padding: 3rem 1.75rem; align-items: flex-start; }

  .category-nav {
    position: fixed;
    top: 62px;
    left: 0; right: 0;
    background: rgba(12,12,14,0.97);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 1rem 1.5rem;
    display: none;
    gap: 0.2rem;
  }
  .category-nav.is-open { display: flex; }
  .category-nav a { padding: 0.6rem 0; color: rgba(255,255,255,0.9) !important; }
  .header-search { order: 2; }
  .header-search-input { width: 150px; }
  .header-cta { order: 3; }
  .nav-toggle { display: flex; order: 4; }
  .nav-toggle span { background: #fff !important; }
}

@media (max-width: 560px) {
  .header-inner { padding: 0.7rem 1.25rem; }
  .hero { min-height: 86vh; }
  .hero-actions .btn { flex: 1; }
  .header-search-input { width: 110px; }
  .header-search-results { position: fixed; left: 1rem; right: 1rem; width: auto; top: 64px; }
}

/* Product detail page */
.breadcrumb { color: var(--muted-2); font-size: 0.85rem; margin: 0 0 2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

.product-badges { display: flex; gap: 0.5rem; margin-bottom: 0.2rem; }
.product-badges .badge-destacado, .product-badges .badge-agotado, .badge-disponible {
  position: static;
  display: inline-block;
}
.badge-disponible {
  background: #e7f5ea; color: #1f7a3d; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.04em; padding: 0.3rem 0.65rem; border-radius: 999px; text-transform: uppercase;
}

.product-richtext { color: var(--muted); font-size: 0.95rem; line-height: 1.7; }
.product-richtext p { margin: 0 0 0.9rem; }
.product-richtext ul, .product-richtext ol { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.product-richtext li { margin-bottom: 0.4rem; }
.product-richtext strong, .product-richtext b { color: var(--text); }

/* Category listing page */
.category-page { padding: 3rem 1.75rem 5rem; }
.category-page-inner { max-width: 1680px; margin: 0 auto; }

.category-heading { margin-bottom: 1.6rem; position: relative; padding-left: 1.1rem; }
.category-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.35em;
  width: 4px;
  border-radius: 999px;
  background: var(--accent);
}
.category-heading h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.5rem;
  text-transform: capitalize;
  letter-spacing: -0.01em;
}
.category-heading h1.is-search { text-transform: none; }

.category-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.9rem 0;
  margin-bottom: 2rem;
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.category-count { color: var(--muted-2); font-size: 0.95rem; margin: 0; }
.category-sort-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.category-sort {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.category-sort:hover { border-color: var(--muted-2); }
.category-sort:focus { outline: none; border-color: var(--accent); }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.4rem; }

.category-card {
  opacity: 0;
  transform: translateY(14px);
  animation: cardIn 0.5s ease forwards;
  transition: transform 0.25s ease;
}
@keyframes cardIn { to { opacity: 1; transform: translateY(0); } }
.category-card:hover { transform: translateY(-4px); }

.category-card-link { display: block; }

.category-card-media {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.8rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.category-card-link:hover .category-card-media {
  border-color: #d8d6d0;
  box-shadow: 0 26px 46px -22px rgba(12, 12, 14, 0.28);
}
.category-card-media img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.35s ease; }
.category-card-link:hover .category-card-media img { transform: scale(1.05); }

/* Selector de color de las tarjetas cuyo modelo tiene mas de un color (ver
   tools/group_color_variants.py): se ve una sola tarjeta por modelo, con la
   foto del color que de verdad coincide con la descripcion, y aqui debajo
   un cuadradito por cada color disponible que lleva a esa variante. */
.color-swatches { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.color-swatches-label { font-size: 0.8rem; font-weight: 600; color: var(--muted-2); }
.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
  box-shadow: 0 0 0 0 transparent;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
  flex: none;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.is-active { box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--ink); }

.category-card-nombre {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1280px) { .category-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .category-grid { grid-template-columns: repeat(2, 1fr); gap: 1.6rem; } }
@media (max-width: 520px) { .category-grid { grid-template-columns: 1fr; } }

/* Lightbox with zoom lens */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 9, 0.94);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.lightbox-overlay.is-open { display: flex; }

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.18); }

.lightbox-zoom {
  position: relative;
  max-width: min(90vw, 900px);
  max-height: 84vh;
  cursor: crosshair;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}
.lightbox-zoom img { display: block; max-width: min(90vw, 900px); max-height: 84vh; object-fit: contain; }

.zoom-lens {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  background-repeat: no-repeat;
  pointer-events: none;
  display: none;
  z-index: 2;
}

@media (max-width: 640px) {
  .lightbox-overlay { padding: 1rem; }
  .zoom-lens { display: none !important; }
}

/* Story blocks: full-bleed photo + copy, alternating light/dark and side,
   used for the whole product page (hero included). One flat background per
   section — the photo floats on it, it is never boxed in its own card. */
.story-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* Ancladas arriba, no centradas: con textos largos (descripción completa,
     listado íntegro de características) la fila crece mucho más que la
     foto, y centrarla la dejaría "flotando" a media altura de un hueco
     enorme. Ancladas arriba se comportan como una maquetación editorial
     normal (foto arriba, texto fluye a su lado) sin importar la longitud. */
  align-items: start;
  gap: 2.5rem;
  padding: 4rem clamp(1.75rem, 6vw, 5rem);
  background: var(--bg);
}
/* Las fotos de catálogo llevan fondo blanco de estudio "quemado" en el
   archivo (no hay transparencia), así que solo se alternan dos tonos claros
   para dar ritmo — un panel oscuro haría visible el recorte blanco. */
.story-block-tint { background: var(--bg-alt); }
.story-block-reverse { direction: rtl; }
.story-block-reverse > * { direction: ltr; }

.story-media { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; position: sticky; top: 6.5rem; }
.story-media img {
  max-width: 96%;
  max-height: 560px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 38px rgba(12, 12, 14, 0.18));
}
.story-media-zoom { cursor: zoom-in; }

.story-copy { display: flex; flex-direction: column; justify-content: center; gap: 1rem; max-width: 480px; }
.story-eyebrow {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); margin: 0;
}

.story-title { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.7rem, 2.8vw, 2.3rem); line-height: 1.2; margin: 0; color: var(--ink); }

.story-text { font-size: 1rem; line-height: 1.7; color: var(--muted); margin: 0; }

.story-richtext { color: var(--muted); font-size: 0.98rem; line-height: 1.7; }
.story-richtext p { margin: 0 0 0.8rem; }
.story-richtext ul, .story-richtext ol { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.story-richtext strong, .story-richtext b { color: var(--text); }

.story-cta { align-self: flex-start; margin-top: 0.4rem; }

/* Compact spec rows inside a copy panel */
.story-specs { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.2rem; }
.story-spec-row { display: flex; gap: 0.6rem; font-size: 0.92rem; }
.story-spec-label { color: var(--muted); font-weight: 600; min-width: 150px; flex-shrink: 0; }
.story-spec-value { color: var(--text); font-weight: 500; }

@media (max-width: 900px) {
  .story-block, .story-block-reverse { grid-template-columns: 1fr; direction: ltr; padding: 2.75rem 1.75rem; gap: 1.75rem; }
  .story-media { position: static; }
  .story-media img { max-height: 320px; }
  .story-copy { max-width: none; }
}

/* Hero: full-bleed dark stage with a radial spotlight glow. Only possible
   because the hero photo is now a real cutout (transparent PNG generated by
   tools/generate_cutouts.py) — a flat white catalog JPEG would show as a
   broken box here, same as it did in the bento cards before the cutouts. */
.hero-block { position: relative; background: var(--ink); overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(closest-side, rgba(230, 57, 44, 0.22), transparent 70%) 26% 42% / 60% 60% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, 0.06), transparent 70%) 70% 60% / 50% 50% no-repeat;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
  gap: 1.25rem;
  min-height: 780px;
  padding: 3rem clamp(1.75rem, 6vw, 5rem);
}

.hero-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem; }
.hero-media img {
  max-width: 100%;
  max-height: 740px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.55));
  opacity: 0;
  transform: scale(0.94) translateY(10px);
  animation: heroImageIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}
.hero-media-zoom { cursor: zoom-in; }
@keyframes heroImageIn { to { opacity: 1; transform: scale(1) translateY(0); } }

.hero-copy { display: flex; flex-direction: column; gap: 1rem; max-width: 480px; }
.hero-copy > * { opacity: 0; transform: translateY(16px); animation: heroCopyIn 0.7s ease forwards; }
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.14s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.23s; }
@keyframes heroCopyIn { to { opacity: 1; transform: translateY(0); } }

/* Titular más pequeño que antes y en dos tonos: la primera palabra en rojo y
   marcada, el resto en blanco y más ligero — mismo tratamiento que "VIGOR
   Smart Watch" en la referencia, sobre la nueva fuente serif editorial. */
.hero-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  line-height: 1.25;
  margin: 0;
  color: #fff;
}
.hero-title-accent { font-weight: 800; color: var(--accent); }

.hero-block .badge-agotado { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.3); }
.hero-block .badge-disponible { background: rgba(64, 199, 109, 0.18); color: #7fe39c; }

/* Franja banner opcional, a todo lo ancho, justo debajo de la cabecera
   (ver data/product-banners.json). El fondo de la sección se fija por
   inline style al mismo color muestreado de la foto que ya se aplicó a
   .hero-block, así el corte entre ambas secciones no se nota. Cada
   diapositiva suelta del fabricante es su propio bloque y aparece con un
   fundido + desplazamiento al entrar en pantalla (ver setupBannerReveal). */
.banner-block { width: 100%; line-height: 0; }
.banner-slide {
  /* Tope de seguridad; el ancho real de cada diapositiva lo fija su propio
     inline style en producto.js, ajustado a la densidad de pantalla. */
  max-width: 1920px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.banner-slide.is-visible { opacity: 1; transform: translateY(0); }
.banner-slide img { display: block; width: 100%; height: auto; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; min-height: auto; padding: 2.75rem 1.75rem; gap: 1.75rem; }
  .hero-media img { max-height: 380px; }
  .hero-copy { max-width: none; }
}

/* Bento mosaic: the "wow" section for marketing-style características, one
   real product cutout per cell so nothing ever repeats. Explicit named grid
   areas per card count keep the asymmetric layout gap-free at every size. */
.bento-section { background: var(--ink); padding: 5rem clamp(1.75rem, 6vw, 5rem); }
.bento-inner { max-width: var(--max-width); margin: 0 auto; }

/* Ancho de tarjeta SIEMPRE fijo (nunca en % del contenedor), con flexbox
   centrado: así 1, 2, 4 o 6 tarjetas miden exactamente lo mismo y la fila
   queda centrada en vez de pegada a la izquierda cuando no la llenan. */
.bento-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.1rem; }
.bento-card {
  position: relative;
  flex: 0 0 400px;
  aspect-ratio: 7 / 4;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #1c1c20, #0c0c0e);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  margin: 0;
  font: inherit;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
}
.bento-card-img {
  max-width: 88%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.5));
  transition: transform 0.35s ease;
}
.bento-card:hover .bento-card-img { transform: scale(1.05); }
.bento-card-text { position: absolute; left: 1.3rem; right: 1.3rem; bottom: 1.1rem; }
.bento-card-title { color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: 1rem; line-height: 1.35; margin: 0; }

@media (max-width: 900px) {
  .bento-card { flex-basis: calc(50% - 0.55rem); }
}
@media (max-width: 560px) {
  .bento-card { flex-basis: 100%; }
}

/* Editorial text sections: fallback when there is no extra photo left to
   pair with a block (never repeats a photo the visitor already scrolled past) */
.text-block-section { padding: 5rem 1.75rem; background: var(--bg); }
.text-block-inner { max-width: 640px; margin: 0 auto; }
.text-block-inner .product-richtext > p:first-child {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
}

/* Closing CTA band */
.product-cta-band { background: var(--ink); padding: 4.5rem 1.75rem; text-align: center; }
.product-cta-band-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.product-cta-band h2 { font-family: var(--font-serif); color: #fff; font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin: 0; }
