/* ==========================================================
   La Caleñita — Delicias Vallunas
   shared.css — variables, reset, tipografías, utilidades
   ========================================================== */

:root {
  --turquesa: #4FB3D9;
  --naranja: #E87730;
  --naranja-fuerte: #F49A2C;
  --crema: #FBE8C8;
  --crema-claro: #FFF6E4;
  --cafe: #4A2A1A;
  --cafe-medio: #8A5A3C;
  --azul-profundo: #1E3A5F;
  --amarillo: #F4C542;
  --rojo: #D64545;
  --verde: #7CB342;
  --blanco: #FFFFFF;
  --whatsapp: #25D366;
  --sombra: 0 4px 20px rgba(74, 42, 26, 0.15);
  --sombra-fuerte: 0 8px 30px rgba(74, 42, 26, 0.3);

  --font-titulo: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-cuerpo: 'Nunito', system-ui, -apple-system, sans-serif;

  --radio: 16px;
  --radio-pill: 999px;
  --transicion: 0.2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-cuerpo);
  font-size: 16px;
  line-height: 1.5;
  color: var(--cafe);
  background: var(--crema-claro);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-titulo);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--cafe);
}

p { margin: 0 0 1em; }

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

a { color: inherit; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; border: 0; background: none; }

/* Inputs a 16px evita zoom en iOS */
input, select, textarea { font-size: 16px; }

:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 2px;
}

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

/* ---------- Contenedor ---------- */
.contenedor {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: var(--radio-pill);
  font-family: var(--font-titulo);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform var(--transicion), box-shadow var(--transicion), background var(--transicion);
  box-shadow: var(--sombra);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sombra-fuerte); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-naranja { background: var(--naranja-fuerte); color: var(--cafe); }
.btn-cafe { background: var(--cafe); color: var(--crema); }
.btn-verde { background: var(--verde); color: var(--blanco); }
.btn-rojo { background: var(--rojo); color: var(--blanco); }
.btn-whatsapp { background: var(--whatsapp); color: var(--blanco); }
.btn-azul { background: var(--azul-profundo); color: var(--crema-claro); }
.btn-outline {
  background: transparent;
  color: var(--cafe);
  border: 2px solid var(--cafe);
  box-shadow: none;
}
.btn-bloque { width: 100%; white-space: normal; text-align: center; }
.btn-grande { font-size: 1.25rem; padding: 16px 32px; min-height: 56px; }
.btn-chico { font-size: 0.9rem; min-height: 40px; padding: 8px 16px; }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  left: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 360px;
  padding: 12px 18px;
  border-radius: var(--radio);
  color: var(--blanco);
  font-weight: 700;
  box-shadow: var(--sombra-fuerte);
  animation: toast-in 0.25s ease;
}
.toast-exito { background: var(--verde); }
.toast-error { background: var(--rojo); }
.toast-info { background: var(--azul-profundo); }
.toast-saliendo { animation: toast-out 0.25s ease forwards; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(20px); }
}

/* ---------- Modales ---------- */
.modal-fondo {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(74, 42, 26, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.2s ease;
}
.modal-fondo[hidden] { display: none; }
.modal {
  background: var(--crema-claro);
  border-radius: 24px;
  padding: 28px 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--sombra-fuerte);
  animation: modal-in 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h3 { font-size: 1.5rem; text-align: center; }
.modal-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.modal-acciones .btn { flex: 1; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---------- Utilidades ---------- */
.centrado { text-align: center; }
.texto-cafe { color: var(--cafe); }
.texto-verde { color: var(--verde); }
.texto-rojo { color: var(--rojo); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
