/* ==========================================================================
   ÑANDE SHOP — Design System (Core)
   ========================================================================== */

:root {
  /* Paleta oficial de marca (obligatoria) */
  --blanco-hielo: #E1DFDE;
  --beige: #CDC1AF;
  --madera-clara: #C2A988;
  --verde-oliva: #8E9A70;
  --arena: #D5C7B6;

  /* Variantes derivadas de la paleta oficial */
  --verde-oliva-dark: #747F59;
  --madera-oscura: #A68A63;
  --beige-dark: #B7A990;

  /* Neutros */
  --color-white: #FFFFFF;
  --color-text: #2B2620;
  --color-text-muted: #6B6157;
  --color-border: #D8CCBB;
  --color-dark: #2B2620;
  --color-dark-soft: #3C352C;

  /* Estados */
  --color-error: #A3462C;
  --color-success: var(--verde-oliva-dark);

  /* Tipografía */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', 'Segoe UI', sans-serif;

  /* Espaciado */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Radios y sombras (con tinte cálido, no azulado) */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 2px 8px rgba(43, 38, 32, 0.08);
  --shadow-md: 0 12px 32px rgba(43, 38, 32, 0.12);
  --shadow-lg: 0 24px 60px rgba(43, 38, 32, 0.18);

  /* Movimiento */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset y base
   ========================================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 136px; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--blanco-hielo);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

input, select, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark);
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 1rem;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  z-index: 2000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 1rem;
}

/* ==========================================================================
   Sección genérica
   ========================================================================== */

.section {
  padding: var(--space-xl) 0;
}

.section--alt {
  background: var(--arena);
}

.section--dark {
  background: linear-gradient(160deg, var(--color-dark) 0%, var(--color-dark-soft) 100%);
  color: var(--color-white);
}

.section--dark h2, .section--dark h3 { color: var(--color-white); }

.section__head {
  max-width: 680px;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--verde-oliva-dark);
  margin-bottom: 0.75rem;
}

.section--dark .eyebrow { color: var(--madera-clara); }

.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 0.85rem;
}

.section__head p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.section--dark .section__head p { color: rgba(255, 255, 255, 0.75); }

/* ==========================================================================
   Encabezados de sección estilo "marketplace" (inspirados en la referencia
   pedida por el cliente) — caja con línea a los costados, o versión simple
   con link "Ver más".
   ========================================================================== */

.section-header--boxed {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--space-md);
}

.section-header--boxed::before,
.section-header--boxed::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.section-header--boxed__box {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.5rem;
  white-space: nowrap;
}

.section-header--boxed__box svg { color: var(--verde-oliva-dark); flex-shrink: 0; }

.section-header--boxed__box h2 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
}

.section-header--simple {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.85rem;
  margin-bottom: var(--space-md);
}

.section-header--simple h2 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.section-header--simple a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--verde-oliva-dark);
  white-space: nowrap;
}

.section-header--simple a:hover { color: var(--color-dark); }

/* ==========================================================================
   Animación al hacer scroll (reveal)
   ========================================================================== */

/* Visible por defecto; JS agrega .reveal--armed solo si puede observar y
   volver a revelar el contenido (así un script bloqueado/lento nunca deja
   nada invisible para siempre). El retraso escalonado lo fija JS por
   elemento vía --reveal-delay para que las grillas entren en cascada.

   Usa `animation` (no `transition`) a propósito: varios componentes
   (`.category-card`, `.testimonial-card`, etc.) definen su propia
   `transition` para sus hovers en hojas de estilo que cargan después de
   esta — si el reveal también usara `transition`, esa declaración
   posterior ganaría la cascada completa (incluida `opacity`) y el fade-in
   se rompería en silencio. `animation` es una propiedad distinta que
   nunca choca con `transition`, así que conviven sin importar el orden
   de carga de los CSS. */
.reveal--armed {
  opacity: 0;
  transform: translateY(26px);
  will-change: opacity, transform;
}

.reveal--armed.is-visible {
  animation: revealIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes revealIn {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal--zoom.reveal--armed { transform: scale(0.92); }
.reveal--zoom.reveal--armed.is-visible { animation-name: revealInZoom; }

@keyframes revealInZoom {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Animaciones y micro-interacciones generales
   ========================================================================== */

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -22px) scale(1.06); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(142, 154, 112, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(142, 154, 112, 0); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes sparkleTwinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes starGlow {
  0%, 100% { opacity: 0.85; transform: scale(1); text-shadow: none; }
  50% { opacity: 1; transform: scale(1.04); text-shadow: 0 0 12px rgba(194, 169, 136, 0.65); }
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

@keyframes shimmerSweep {
  0% { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}

/* Brillo continuo y sutil en los CTA principales — refuerza la sensación
   de interfaz "viva" sin recurrir a colores fuera de la paleta de marca. */
.btn--primary {
  position: relative;
  overflow: hidden;
}

.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.35) 40%, transparent 60%);
  background-size: 250% 100%;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

.btn--primary:hover::after {
  opacity: 1;
  animation: shimmerSweep 1.1s ease-in-out infinite;
}

.whatsapp-float { animation: pulseGlow 2.6s ease-in-out infinite; }
.whatsapp-float:hover { animation: none; }

/* ==========================================================================
   Utilidades de foco (accesibilidad)
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--verde-oliva-dark);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
