/* =========================================================
   01. VARIABLES
   ---------------------------------------------------------
   Variables globales del tema.
   Centralizan colores y valores reutilizables.
========================================================= */
:root {

  --color-white: #ffffff;
  --color-black: #000000;

  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  --color-success: #22c55e;
  --color-warning-bg: #fef3c7;
  --color-warning-text: #92400e;

  --radius-sm: 8px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 60px rgba(0, 0, 0, 0.3);

  --transition-fast: 0.2s ease;
  --transition-medium: 0.25s ease;

  --font-base: "Inter", sans-serif;
}

/* =========================================================
   02. BASE
   ---------------------------------------------------------
   Reglas generales del documento.
========================================================= */
body {
  font-family: var(--font-base);
  scroll-behavior: smooth;
}

details summary::-webkit-details-marker {
  display: none;
}

/* =========================================================
   03. UTILIDADES
   ---------------------------------------------------------
   Clases simples y reutilizables.
========================================================= */
.text-cp {
  color: var(--cp);
}

.bg-cp {
  background-color: var(--cp);
}

.rounded-full {
  border-radius: var(--radius-full);
}

/* =========================================================
   04. BOTONES
   ---------------------------------------------------------
   Estilos de botones reutilizables.
========================================================= */
.btn-cp {
  background: var(--cp);
  color: var(--color-white);
  transition: filter var(--transition-fast);
}

.btn-cp:hover {
  filter: brightness(1.1);
}

.formato-btn {
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.formato-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-pulse {
  animation: pulse-blue 2s infinite;
}

/* =========================================================
   05. BADGES
   ---------------------------------------------------------
   Etiquetas visuales para estados y formatos.
========================================================= */
.badge-on,
.badge-pronto,
.badge-off {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.badge-on {
  background: var(--cp);
  color: var(--color-white);
}

.badge-pronto,
.badge-off {
  background: var(--color-slate-100);
  color: var(--color-slate-400);
}

/* Badge de formato */
.format-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-sm);
  background: var(--color-slate-100);
  color: var(--color-slate-800);
  font-size: 0.85rem;
  font-weight: 700;
}

.format-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

/* =========================================================
   06. TARJETAS
   ---------------------------------------------------------
   Componentes de contenido.
========================================================= */
.product-card {
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* =========================================================
   07. BOTÓN FLOTANTE DE WHATSAPP
   ---------------------------------------------------------
   Botón fijo flotante para contacto rápido.
========================================================= */
.whatsapp-button {
  position: fixed;
  right: 20px;
  bottom: 40px;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  cursor: pointer;
}

.whatsapp-button svg {
  width: 70px;
  height: 70px;
  display: block;
}

/* =========================================================
   08. MODAL
   ---------------------------------------------------------
   Overlay y contenedor modal con transición suave.
========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 1rem;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.modal-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  width: 100%;
  max-width: 440px;
  padding: 2rem;

  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);

  transform: translateY(20px);
  transition: transform var(--transition-medium);
}

.modal-overlay.visible .modal-box {
  transform: translateY(0);
}

/* =========================================================
   09. ANIMACIONES
   ---------------------------------------------------------
   Definición y aplicación de animaciones reutilizables.
========================================================= */
@keyframes float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 158, 227, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(0, 158, 227, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 158, 227, 0);
  }
}

.float-animation,
.float {
  animation: float 4s ease-in-out infinite;
}