
/* ==========================================================================
   CANDY ART MÉRIDA — DESIGN SYSTEM & TOKENS
   ========================================================================== */

:root {
  /* PALETA DE COLORES - FONDOS PASTELES */
  --bg-primary: #F8F4F1;
  /* Derivado ultra-claro de Dust Grey */
  --bg-secondary: #EAD7D1;
  /* Powder Petal */
  --bg-tertiary: #F3ECE8;
  /* Mezcla suave */
  --bg-hero: #F5EAE8;
  /* MEJORA: tono más cálido/rosado para diferenciarse del header */

  /* PALETA DE COLORES - ACENTOS */
  --accent-primary: #DD99BB;
  /* Pink Mist */
  --accent-hover: #C97DA5;
  /* Pink Mist oscurecido */
  --accent-secondary: #7B506F;
  /* Dusty Lavender */
  --accent-soft: #E8BFD4;
  /* Rosa suave */

  /* PALETA DE COLORES - TEXTOS */
  --text-primary: #1F1A38;
  /* Midnight Violet */
  --text-secondary: #4A3F5C;
  /* Derivado suave */
  --text-muted: #635A74;
  /* MEJORA: más contraste para legibilidad */
  --text-on-accent: #FFFFFF;

  /* BORDES Y SOMBRAS */
  --border-light: rgba(123, 80, 111, 0.10);
  --border-medium: rgba(123, 80, 111, 0.20);
  --shadow-sm: 0 2px 8px rgba(31, 26, 56, 0.06);
  --shadow-md: 0 4px 16px rgba(31, 26, 56, 0.10);
  --shadow-lg: 0 8px 32px rgba(31, 26, 56, 0.14);
  --shadow-glow: 0 0 20px rgba(221, 153, 187, 0.25);

  /* GRADIENTES */
  /* MEJORA: gradiente hero más rico y perceptible */
  --gradient-hero: linear-gradient(160deg, #F5EAE8 0%, #EAD7D1 40%, #F3ECE8 70%, #FDFBF9 100%);
  --gradient-accent: linear-gradient(135deg, #DD99BB 0%, #7B506F 100%);
  --gradient-divider: linear-gradient(to right, #DD99BB, #7B506F);

  /* TIPOGRAFÍA - TAMAÑOS CLAMP */
  --fs-display: clamp(2.8rem, 7vw, 4rem);
  --fs-h1: clamp(2rem, 5vw, 3rem);
  --fs-h2: clamp(1.4rem, 3vw, 1.8rem);
  --fs-h3: clamp(1.1rem, 2.5vw, 1.4rem);
  --fs-body: clamp(0.9rem, 1.8vw, 1rem);
  --fs-small: clamp(0.78rem, 1.5vw, 0.87rem);
  --fs-caption: 0.75rem;

  /* ESPACIADO Y BORDES */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 50px;

  /* TRANSICIONES */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  /* MEJORA H.2: curvas más elásticas y premium */
  --transition-slow: 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-flower: 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
      RESET Y BASE
      ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  opacity: 0;
  transition: opacity 0.5s ease;
}

body.loaded {
  opacity: 1;
}

h1,
h2,
h3,
.brand-font {
  font-family: 'DM Serif Display', serif;
  color: var(--text-primary);
  line-height: 1.2;
}

.accent-font {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea {
  font-family: inherit;
}

/* ==========================================================================
      UTILIDADES Y COMPONENTES COMUNES
      ========================================================================== */
.section {
  padding: 80px 24px;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-title {
  font-size: var(--fs-h1);
  margin-bottom: 8px;
}

/* MEJORA A.2: subtítulos con más contraste */
.section-subtitle {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 16px auto 24px;
}

.divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-divider);
  border-radius: var(--radius-pill);
  margin: 0 auto;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-body);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  border: none;
  text-align: center;
  will-change: transform;
  /* MEJORA H.2: GPU acceleration para hover */
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-on-accent);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-secondary);
  border: 2px solid var(--accent-secondary);
}

.btn-secondary:hover {
  background-color: rgba(123, 80, 111, 0.05);
  box-shadow: var(--shadow-md);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Animaciones Reveal */
/* MEJORA H.2: reveal más suave y natural */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: translateY(0);
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
      LOADING SCREEN
      ========================================================================== */
#loader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  width: 120px;
  height: auto;
  margin-bottom: 24px;
  animation: pulse 2s infinite ease-in-out;
}

.loader-bar-container {
  width: 200px;
  height: 4px;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-accent);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* ==========================================================================
      NAVBAR (HEADER) - REDISEÑO A PRUEBA DE BUGS iOS
      ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: transparent;
  border-bottom: 1px solid transparent;
  z-index: 1000;
  display: flex;
  align-items: center;
  backdrop-filter: none;
  transition: background var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), backdrop-filter var(--transition-normal), transform var(--transition-normal);
}

.header.scrolled,
.header.menu-open {
  background: rgba(248, 244, 241, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 12px rgba(31, 26, 56, 0.08);
  border-bottom-color: var(--border-light);
}

.header.header--hidden {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  height: 40px;
  width: auto;
  transition: transform var(--transition-fast);
}

.nav-brand:hover img {
  transform: scale(1.05);
}

.nav-brand-name {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-normal);
  left: 0;
}

.mobile-menu-btn span:nth-child(1) {
  top: 0;
}

.mobile-menu-btn span:nth-child(2) {
  top: 11px;
}

.mobile-menu-btn span:nth-child(3) {
  top: 22px;
}

.mobile-menu-btn.active span:nth-child(1) {
  top: 11px;
  transform: rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-45deg);
}

/* ==========================================================================
      HERO SECTION
      ========================================================================== */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

/* Decoración de fondo */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}

.hero::before {
  top: 10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: rgba(221, 153, 187, 0.15);
  /* Pink Mist suave */
}

.hero::after {
  bottom: -10%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  background: rgba(123, 80, 111, 0.1);
  /* Dusty Lavender sutil */
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-image-wrap {
  margin-bottom: 24px;
  display: inline-block;
  animation: fadeUp 0.8s ease-out forwards;
  position: relative;
  /* para posicionar blobs */
}

/* Formas decorativas detrás del logo */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.hero-blob--1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(221, 153, 187, 0.25) 0%, transparent 70%);
  top: -30px;
  left: -40px;
  animation: blobFloat 6s ease-in-out infinite;
}

.hero-blob--2 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(123, 80, 111, 0.18) 0%, transparent 70%);
  bottom: -20px;
  right: -35px;
  animation: blobFloat 8s ease-in-out infinite reverse;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(8px, -10px) scale(1.05);
  }
}

.hero-img {
  width: clamp(140px, 20vw, 220px);
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(123, 80, 111, 0.15));
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: var(--fs-display);
  margin-bottom: 8px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease-out forwards;
}

/* MEJORA A.2: subtítulo hero más visible y elegante */
.hero-subtitle {
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--accent-secondary);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease-out forwards;
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.5s ease-out forwards;
}

.hero-cta-group .btn {
  width: 100%;
  max-width: 280px;
}

@media (min-width: 640px) {
  .hero-cta-group {
    flex-direction: row;
  }

  .hero-cta-group .btn {
    width: auto;
    max-width: none;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
      GALERÍA (STACK CON ENFOQUE)
      ========================================================================== */
.gallery-section {
  background-color: var(--bg-tertiary);
  overflow: hidden;
}

.gallery-carousel-wrap {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.gallery-track {
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 1000px;
  transform-style: preserve-3d;
}

.gallery-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-primary);
  box-shadow: var(--shadow-md);
  /* Estado inicial centrado, se controla via JS */
  transform: translate(-50%, -50%);
  transition: transform var(--transition-slow), opacity var(--transition-slow), box-shadow var(--transition-slow);
  cursor: pointer;
  will-change: transform, opacity;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* Estados del Stack (aplicados via JS) */
.gallery-card.active {
  transform: translate(-50%, -50%) scale(1);
  z-index: 3;
  opacity: 1;
  box-shadow: var(--shadow-lg);
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-card.active:hover img {
    transform: scale(1.05);
  }
}

.gallery-card.prev-1 {
  transform: translate(-110%, -50%) scale(0.85);
  z-index: 2;
  opacity: 0.7;
}

.gallery-card.next-1 {
  transform: translate(10%, -50%) scale(0.85);
  z-index: 2;
  opacity: 0.7;
}

.gallery-card.prev-2 {
  transform: translate(-150%, -50%) scale(0.7);
  z-index: 1;
  opacity: 0.3;
}

.gallery-card.next-2 {
  transform: translate(50%, -50%) scale(0.7);
  z-index: 1;
  opacity: 0.3;
}

.gallery-card.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
}

/* Controles del Carrusel */
.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
  z-index: 4;
}

.carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  color: var(--accent-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  background: var(--accent-primary);
  color: var(--text-on-accent);
  border-color: var(--accent-primary);
  transform: scale(1.1);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.gallery-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-medium);
  transition: background-color var(--transition-fast), transform var(--transition-fast);
  cursor: pointer;
}

.indicator-dot.active {
  background-color: var(--accent-primary);
  transform: scale(1.3);
}

/* ==========================================================================
      WIZARD (DISEÑA TU TOCADO)
      ========================================================================== */
.wizard-section {
  background-color: var(--bg-primary);
}

.wizard-container {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
}

/* Wizard Progress */
.wizard-progress {
  display: flex;
  align-items: center;
  padding: 32px 40px 0;
}

.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all var(--transition-normal);
  z-index: 2;
  position: relative;
}

.step-indicator.active {
  background-color: var(--accent-primary);
  color: var(--text-on-accent);
  box-shadow: 0 0 0 4px rgba(221, 153, 187, 0.2);
}

.step-indicator.completed {
  background-color: var(--accent-secondary);
  color: var(--text-on-accent);
}

.step-line {
  flex: 1;
  height: 3px;
  background-color: var(--bg-tertiary);
  margin: 0 8px;
  position: relative;
}

.step-line-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--gradient-divider);
  transition: width 0.4s ease;
}

/* Wizard Body */
.wizard-body {
  padding: 40px;
  position: relative;
  min-height: 400px;
}

.wizard-step {
  display: none;
  animation: fadeUp 0.4s ease forwards;
}

.wizard-step.active {
  display: block;
}

.step-title {
  font-family: 'DM Serif Display', serif;
  font-size: var(--fs-h2);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-desc {
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* Wizard Selector de Flores (Stack) */
.flower-selector-container {
  position: relative;
  height: 280px;
  margin-bottom: 32px;
}

/* MEJORA: transición flower más elástica */
.flower-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  background: #FFFFFF;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: all var(--transition-flower);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Animación de cambio de categoría */
.category-refresh {
  animation: refreshAnim 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes refreshAnim {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animación de cierre de menú — suave y elegante */
.flower-card.closing-menu {
  animation: cardPulseClose 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cardPulseClose {
  0% {
    transform: translate(-50%, -50%) scale(1.1);
  }

  50% {
    transform: translate(-50%, -50%) scale(0.98);
  }

  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

.flower-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-bottom: 1px solid var(--border-light);
}

.flower-card-info {
  padding: 12px;
  text-align: center;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Estados Stack Flores */
.flower-card.active {
  transform: translate(-50%, -50%) scale(1.1);
  z-index: 3;
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-lg);
}

.flower-card.active .flower-card-info {
  color: var(--accent-secondary);
}

.flower-card.prev-1 {
  transform: translate(-120%, -50%) scale(0.85);
  z-index: 2;
  opacity: 0.6;
  pointer-events: auto;
}

.flower-card.next-1 {
  transform: translate(20%, -50%) scale(0.85);
  z-index: 2;
  opacity: 0.6;
  pointer-events: auto;
}

.flower-card.prev-2 {
  transform: translate(-150%, -50%) scale(0.7);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.flower-card.next-2 {
  transform: translate(50%, -50%) scale(0.7);
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

/* Selector de Colores (dentro de flor activa) */
.color-options {
  display: none;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-hero);
}

.flower-card.active.menu-open .color-options {
  display: block;
  animation: fadeUp 0.3s ease;
}

.flower-card.selected {
  border-color: var(--accent-secondary);
}

.color-dots {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 8px;
}

.color-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.color-dot:hover {
  transform: scale(1.1);
}

.color-dot.selected {
  border-color: var(--text-primary);
  transform: scale(1.2);
  animation: popDot 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@keyframes popDot {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1.2);
  }
}

/* MEJORA E.1: Substep nav (reemplaza flower-category-tabs) */
.substep-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.substep-label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  padding-bottom: 2px;
}

.substep-label.active {
  color: var(--accent-secondary);
  font-weight: 700;
}

.substep-label.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 2px;
}

.substep-label.completed {
  color: var(--accent-primary);
}

.substep-arrow {
  color: var(--border-medium);
  font-size: 0.8rem;
  user-select: none;
}

.substep-counter {
  font-size: var(--fs-caption);
  color: var(--accent-secondary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  margin-left: auto;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Wizard Inputs & Budget */
.wizard-input {
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--bg-hero);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.wizard-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(221, 153, 187, 0.1);
}

textarea.wizard-input {
  min-height: 120px;
  resize: vertical;
}

.budget-display {
  text-align: center;
  font-family: 'DM Serif Display', serif;
  font-size: 3rem;
  color: var(--accent-secondary);
  margin-bottom: 24px;
}

.budget-slider-wrap {
  padding: 0 20px;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  outline: none;
  margin-bottom: 16px;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: 4px solid #FFFFFF;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-fast);
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.budget-labels {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: var(--fs-small);
  font-weight: 500;
}

/* Wizard Summary */
.summary-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}

.summary-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-medium);
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-weight: 600;
  color: var(--accent-secondary);
  width: 120px;
  flex-shrink: 0;
}

.summary-value {
  color: var(--text-primary);
  flex: 1;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  width: 100%;
}

.btn-whatsapp:hover {
  background-color: #20BA5A;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
}

.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  transition: color var(--transition-fast);
}

.btn-text:hover {
  color: var(--text-primary);
}

/* ==========================================================================
      MEJORA F.1: CONTACTO (reemplaza social cards)
      ========================================================================== */
.contacto-section {
  background-color: var(--bg-secondary);
}

.contacto-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 700px;
  margin: 0 auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contacto-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contacto-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contacto-label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--accent-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contacto-info {
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.contacto-info-title {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: 16px;
  font-weight: 500;
}

.contacto-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacto-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.contacto-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent-primary);
}

.contacto-link:hover {
  color: var(--accent-primary);
}

/* ==========================================================================
      MEJORA C.3: HISTORIA SECTION
      ========================================================================== */
.historia-section {
  background: var(--bg-primary);
  padding: 100px 24px;
}

.historia-content {
  display: flex;
  flex-direction: column;
  gap: 56px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.historia-desc {
  color: var(--text-secondary);
  font-size: var(--fs-body);
  line-height: 1.85;
  max-width: 650px;
  margin: 0 auto;
}

.historia-badges {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: rgba(221, 153, 187, 0.06);
  border-radius: var(--radius-md);
  min-width: 140px;
}

.badge-num {
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--accent-secondary);
  line-height: 1;
}

.badge-label {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
      FOOTER
      ========================================================================== */
.footer {
  background-color: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 24px 24px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-divider);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand .brand-name {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: #FFFFFF;
  margin-bottom: 16px;
  display: block;
}

.footer-tagline {
  margin-bottom: 24px;
  max-width: 300px;
}

/* Icon inline en footer links */
.footer-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
  margin-right: 6px;
  opacity: 0.7;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-title {
  font-size: 1.1rem;
  color: #FFFFFF;
  font-weight: 600;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-caption);
}

.footer-bottom a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}


/* ==========================================================================
      MEDIA QUERIES (RESPONSIVE)
      ========================================================================== */

/* Tablet (640px - 1023px) */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Historia desktop-ish (768px+) */
@media (min-width: 768px) {
  .historia-section {
    padding: 120px 24px;
  }

  .historia-content {
    flex-direction: column;
    gap: 64px;
  }

  .historia-text {
    max-width: 700px;
    margin: 0 auto;
  }

  .historia-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }

  .badge-item {
    min-width: auto;
  }

  /* MEJORA: contacto dos columnas en tablet+ */
  .contacto-card {
    flex-direction: row;
    gap: 48px;
    align-items: flex-start;
  }

  .contacto-form-wrap {
    flex: 1;
  }

  .contacto-info {
    border-top: none;
    border-left: 1px solid var(--border-light);
    padding-top: 0;
    padding-left: 32px;
    min-width: 200px;
  }
}

/* Mobile (hasta 639px) */
@media (max-width: 639px) {
  .section {
    padding: 60px 16px;
  }

  /* MEJORA B.2: Navbar Mobile — menú se despliega DEBAJO del header */
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    max-height: calc(100vh - 72px);
    background: rgba(248, 244, 241, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 24px 24px;
    gap: 16px;
    border-top: 1px solid var(--border-medium);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-link {
    font-size: 1.2rem;
    display: inline-block;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* MEJORA C.2: Hero Mobile — imagen m\u00e1s grande, sin espacio muerto */
  .hero {
    min-height: calc(100vh - 72px);
    padding: 32px 0;
    align-items: center;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-img {
    width: clamp(200px, 55vw, 280px);
  }

  .hero-image-wrap {
    margin-bottom: 16px;
  }

  .hero::before {
    width: 80vw;
    height: 80vw;
    top: 5%;
  }

  /* Wizard Mobile */
  .wizard-body {
    padding: 32px 20px;
  }

  .wizard-progress {
    padding: 24px 20px 0;
  }

  .step-indicator {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  /* MEJORA E.2: flower cards visibles parcialmente en mobile */
  .flower-selector-container {
    height: 300px;
  }

  .flower-card {
    width: 160px;
  }

  /* Stack Mobile */
  .gallery-card.prev-1 {
    transform: translate(-85%, -50%) scale(0.85);
  }

  .gallery-card.next-1 {
    transform: translate(-15%, -50%) scale(0.85);
  }

  /* MEJORA E.2: mostrar cards laterales de flores */
  .flower-card.prev-1 {
    transform: translate(-110%, -50%) scale(0.82);
    opacity: 0.55;
    pointer-events: auto;
  }

  .flower-card.next-1 {
    transform: translate(10%, -50%) scale(0.82);
    opacity: 0.55;
    pointer-events: auto;
  }

  .carousel-controls {
    padding: 0 8px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    font-size: var(--fs-caption);
  }

  .footer-bottom p {
    margin: 0;
  }

  /* Gallery Mobile */
  .gallery-carousel-wrap {
    height: 380px;
    padding: 20px 0;
  }

  .gallery-card {
    width: 240px;
    height: 320px;
  }

  /* Contacto Mobile */
  .contacto-card {
    padding: 28px 20px;
    gap: 20px;
  }

  .contacto-form-wrap {
    gap: 16px;
  }

  .contacto-info {
    border-left: none;
    border-top: 1px solid var(--border-light);
    padding-left: 0;
    padding-top: 20px;
  }
}

/* ==========================================================================
      MEJORA I: DESKTOP ENHANCEMENTS (1024px+)
      ========================================================================== */
@media (min-width: 1024px) {
  .hero-content {
    max-width: 900px;
  }

  /* MEJORA C.2: Hero image desktop */
  .hero-img {
    width: clamp(220px, 18vw, 280px);
  }

  .gallery-carousel-wrap {
    height: 520px;
  }

  .gallery-card {
    width: 340px;
    height: 440px;
  }

  /* MEJORA I: Wizard desktop — dos columnas con progress vertical */
  .wizard-container {
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    min-height: 520px;
  }

  .wizard-progress {
    flex-direction: column;
    align-items: flex-start;
    padding: 48px 40px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-light);
    gap: 0;
  }

  .step-indicator {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  .step-line {
    width: 3px;
    height: 48px;
    flex: none;
    margin: 8px 20px;
  }

  .wizard-body {
    padding: 48px;
    min-height: auto;
  }

  .flower-selector-container {
    height: 320px;
  }

  .flower-card {
    width: 200px;
  }

  .footer-grid {
    gap: 64px;
  }

  .nav-container {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* ==========================================================================
      UTILITY CLASSES
      ========================================================================== */
.flower-custom-wrap {
  max-width: 400px;
  margin: 0 auto;
}

.wizard-footer--centered {
  justify-content: center;
  border-top: none;
}

.color-label {
  font-size: 0.75rem;
  color: var(--accent-secondary);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-item--stacked {
  flex-direction: column;
  align-items: flex-start;
}

.summary-item--stacked .summary-label {
  width: auto;
  margin-bottom: 4px;
}

.summary-item--stacked .summary-value {
  padding-left: 16px;
}

.summary-item--noborder {
  border-bottom: none;
  margin-top: 8px;
}

.order-id-badge {
  font-family: monospace;
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
}