/* ============================================================
   base.css — html/body base styles, selección, scrollbar
   Ilios Vounó — Paleta negra + neón
   ============================================================ */

html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  position: relative;
}

/* ── Text selection ── */
::selection {
  background-color: rgba(0, 240, 255, 0.2);
  color: var(--color-white);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-black); }
::-webkit-scrollbar-thumb {
  background: var(--color-cyan-500);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-cyan-400); }
* { scrollbar-width: thin; scrollbar-color: var(--color-cyan-500) var(--color-black); }

/* ── Smoke canvas ── */
#smoke-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.5s ease;
}
#smoke-canvas.is-ready { opacity: 1; }

/* ── Scroll offset para nav fijo ──
   Evita que el nav tape el inicio de la sección al hacer click en el menú.
   El valor ~86px cubre el nav (70px) + margen visual (16px). */
section[id],
footer[id],
div[id="historia"] {
  scroll-margin-top: 86px;
}

/* ── Layout container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

/* ── Section base ── */
section { position: relative; z-index: var(--z-content); }

/* ── Reveal default visible ── */
.reveal-fade-up { opacity: 1; }

/* ── Image fallback ── */
.img-fallback {
  background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
  min-height: 200px;
}

/* ── Visually hidden ── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border-width: 0;
}

/* ── Neon text utility ── */
.text-neon-cyan {
  color: var(--color-cyan-400);
  text-shadow: 0 0 10px var(--color-cyan-glow), 0 0 30px var(--color-cyan-glow);
}
.text-neon-magenta {
  color: var(--color-magenta-400);
  text-shadow: 0 0 10px var(--color-magenta-glow), 0 0 30px var(--color-magenta-glow);
}
.text-neon-lime {
  color: var(--color-lime-400);
  text-shadow: 0 0 10px var(--color-lime-glow), 0 0 30px var(--color-lime-glow);
}

/* ── Section divider (línea corta bajo título) ── */
.section-divider {
  width: 60px; height: 1px;
  background: linear-gradient(to right, var(--color-cyan-400), transparent);
  margin: 0 auto;
}

/* ── Section flourish (separador entre secciones — SVG geométrico) ── */
.section-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-2) var(--gutter);
  position: relative;
  z-index: var(--z-content);
}
.section-flourish__line {
  flex: 1;
  max-width: 280px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.18), transparent);
}
.section-flourish__motif {
  width: clamp(48px, 10vw, 60px);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.15));
}

/* ── Historia section ── */
.historia {
  padding: var(--space-16) 0;
  position: relative;
  z-index: var(--z-content);
}

.historia__header {
  text-align: center;
  margin-bottom: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}
.historia__body {
  max-width: 780px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.historia__text {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.9;
  color: var(--color-gray-400);
  text-align: justify;
  margin-bottom: var(--space-6);
}
.historia__text strong {
  color: var(--color-white);
  font-weight: 600;
}
.historia__text em {
  color: var(--color-cyan-400);
  font-style: italic;
}

/* ── Botella de Barro section ── */
.botella-barro {
  padding: var(--space-16) 0;
  position: relative;
  z-index: var(--z-content);
}
/* Título superior centrado */
.botella-barro__top-title {
  text-align: center;
  margin-bottom: var(--space-10);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* Layout: imagen + texto */
.botella-barro__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
}
@media (min-width: 768px) {
  .botella-barro__layout {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-12);
  }
}

/* Imagen / Carrusel */
.botella-barro__img-wrap {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* ── Carrusel ── */
.barro-carousel {
  width: 100%;
  overflow: hidden;
}

.barro-carousel__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.barro-carousel__slide {
  flex: 0 0 100%;
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .barro-carousel__slide {
    height: 600px;
  }
}

/* ── Dots ── */
.barro-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 14px 0 4px;
  background: transparent;
}

.barro-carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.3s;
}

.barro-carousel__dot.is-active {
  background: var(--color-cyan-400);
  transform: scale(1.3);
}

/* Contenido (header + body) */
.botella-barro__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}
.botella-barro__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: flex-start;
}
.botella-barro__header .section-title,
.botella-barro__header .section-label {
  text-align: left;
}
.botella-barro__body {
  display: flex;
  flex-direction: column;
}
.botella-barro__text {
  text-align: left;
}
.botella-barro__text--cierre {
  text-align: left;
}
.botella-barro__text {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.2vw, 1.05rem);
  line-height: 1.9;
  color: var(--color-gray-400);
  text-align: justify;
  margin-bottom: var(--space-6);
}
.botella-barro__text strong {
  color: var(--color-white);
  font-weight: 600;
}
.botella-barro__text em {
  color: var(--color-cyan-400);
  font-style: italic;
}
.botella-barro__text--cierre {
  margin-top: var(--space-6);
  text-align: center;
}
.botella-barro__steps {
  list-style: none;
  padding: 0;
  margin: var(--space-6) auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 480px;
  counter-reset: barro-step;
}
.botella-barro__steps li {
  counter-increment: barro-step;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
}
.botella-barro__steps li::before {
  content: counter(barro-step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-cyan-400);
  min-width: 2rem;
  text-align: right;
  flex-shrink: 0;
}

/* ── Toast notification ── */
#cart-toast {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--color-black-mid);
  border: 1px solid var(--color-cyan-400);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wide);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  z-index: var(--z-toast);
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s var(--ease-out-expo);
  white-space: nowrap;
  box-shadow: var(--glow-cyan-sm);
}
#cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
