/* ==========================================================================
   CERVO SPORT · SISTEMA DE DISEÑO, ESCALA DE COLOR Y MICRO-INTERACCIONES
   ========================================================================== */

:root {
  /* --- ESCALA NEUTRAL / SUPERFICIES (Slate) --- */
  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;

  /* --- ESCALA DE MARCA DEPORTIVA (Athletic Cobalt / Electric Blue) --- */
  --primary-50:  #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;

  /* --- ESCALA SEMÁNTICA Y DE ACCIÓN --- */
  --ok: #16a34a;
  --ok-dark: #15803d;
  --ok-bg: #dcfce7;
  --ok-bd: #86efac;

  --er: #dc2626;
  --er-dark: #b91c1c;
  --er-bg: #fee2e2;
  --er-bd: #fca5a5;

  /* --- VARIABLES COMPATIBLES CON LA ARQUITECTURA EXISTENTE --- */
  --bg: #ffffff;
  --bg2: #f8fafc;
  --card-bg: #ffffff;
  --tx: #0f172a;
  --tx2: #475569;
  --ac: #2563eb;
  --ach: #1d4ed8;
  --bd: #e2e8f0;
  --bd-focus: #3b82f6;
  --r: 16px;

  /* --- SOMBRAS Y ELEVACIÓN --- */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);

  /* --- TRANSICIONES Y CURVAS DE ANIMACIÓN --- */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.18s;
  --dur-normal: 0.28s;
}

/* ==========================================================================
   RESET & ESTILOS BASE
   ========================================================================== */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tx);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.mon-on {
  padding-right: 380px;
}

a {
  color: var(--ac);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}

a:hover {
  color: var(--ach);
  text-decoration: underline;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   CABECERA & NAVEGACIÓN
   ========================================================================== */

.cab {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--bd);
  transition: background-color var(--dur-normal) ease, border-color var(--dur-normal) ease;
}

.cab-in {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  color: var(--tx);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--dur-fast) var(--ease-spring), color var(--dur-fast) ease;
}

.logo:hover {
  text-decoration: none;
  color: var(--ac);
  transform: translateY(-1px);
}

nav a {
  color: var(--slate-700);
  margin-left: 24px;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--dur-fast) ease;
}

nav a:hover {
  color: var(--ac);
  text-decoration: none;
}

/* Contador del carrito animado */
.cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 980px;
  background: var(--ac);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast) ease;
}

.carro:hover .cnt {
  transform: scale(1.15);
  background: var(--ach);
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

/* ==========================================================================
   HERO & TITULARES
   ========================================================================== */

.hero {
  text-align: center;
  padding: 68px 0 36px;
  animation: fadeUp 0.6s var(--ease-out) backwards;
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 14px;
  background: linear-gradient(135deg, var(--slate-950) 25%, var(--primary-700) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--tx2);
  font-size: 20px;
  margin: 0 auto;
  max-width: 600px;
  line-height: 1.5;
}

.sec, .tit {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 44px 0 22px;
  color: var(--slate-900);
}

.tit {
  font-size: 34px;
}

/* ==========================================================================
   BANNER DE BIENVENIDA / PROMOCIONAL
   ========================================================================== */

.banner {
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #090e17 0%, #0f172a 45%, #1e3a8a 100%);
  color: #fff;
  border-radius: var(--r);
  padding: 32px 36px;
  margin: 28px 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 34px -6px rgba(15, 23, 42, 0.22);
  animation: bannerEntrance 0.65s var(--ease-out) backwards;
}

.banner::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: ambientFloat 8s ease-in-out infinite alternate;
}

.banner h2 {
  margin: 4px 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.banner p {
  margin: 0;
  color: #cbd5e1;
  font-size: 15.5px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.banner .eyebrow::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 2s infinite;
}

.banner .btn {
  background: #ffffff;
  color: var(--slate-950);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.banner .btn:hover {
  background: #f1f5f9;
  color: var(--primary-700);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   CATÁLOGO & TARJETAS DE PRODUCTO
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 64px;
}

.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  overflow: hidden;
  color: var(--tx);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-normal) var(--ease-out), box-shadow var(--dur-normal) var(--ease-out), border-color var(--dur-normal) ease;
  animation: cardEntrance 0.5s var(--ease-out) backwards;
}

/* Retardo progresivo para animación de entrada escalonada */
.card:nth-child(1) { animation-delay: 0.04s; }
.card:nth-child(2) { animation-delay: 0.08s; }
.card:nth-child(3) { animation-delay: 0.12s; }
.card:nth-child(4) { animation-delay: 0.16s; }
.card:nth-child(5) { animation-delay: 0.20s; }
.card:nth-child(6) { animation-delay: 0.24s; }
.card:nth-child(7) { animation-delay: 0.28s; }
.card:nth-child(8) { animation-delay: 0.32s; }

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--primary-300);
  border-color: var(--primary-300);
  text-decoration: none;
}

/* Bloques de color / Swatches deportivos */
.bloque {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.98);
  font-weight: 800;
  font-size: 48px;
  letter-spacing: -0.04em;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25), inset 0 -4px 10px rgba(0, 0, 0, 0.15);
  transition: transform var(--dur-normal) var(--ease-out);
}

/* Efecto destello luminoso en hover */
.bloque::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -80%;
  width: 50%;
  height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: rotate(25deg);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.card:hover .bloque::after {
  transform: rotate(25deg) translate(360%, -10%);
}

.bloque span {
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transition: transform var(--dur-normal) var(--ease-spring);
}

.card:hover .bloque span {
  transform: scale(1.08);
}

.bloque.mini {
  width: 76px;
  height: 76px;
  aspect-ratio: auto;
  font-size: 22px;
  border-radius: 12px;
  flex: none;
}

.bloque.grande {
  border-radius: var(--r);
  font-size: 104px;
  aspect-ratio: 1;
  box-shadow: var(--shadow-lg), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.card-b {
  padding: 18px 20px 22px;
}

.card-b small {
  color: var(--tx2);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-b h3 {
  margin: 4px 0 8px;
  font-size: 17.5px;
  font-weight: 600;
  color: var(--slate-900);
  transition: color var(--dur-fast) ease;
}

.card:hover .card-b h3 {
  color: var(--primary-600);
}

.precio {
  margin: 0;
  font-weight: 700;
  color: var(--slate-900);
  font-size: 16px;
}

.precio.g {
  font-size: 28px;
  margin: 10px 0 14px;
  color: var(--slate-950);
}

/* ==========================================================================
   BOTONES & ENLACES DE ACCIÓN
   ========================================================================== */

.btn, .btn-sec {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 980px;
  padding: 11px 24px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--ac);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) ease, background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}

.btn:hover {
  background: var(--ach);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

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

.btn-sec {
  background: transparent;
  color: var(--ac);
  border: 1.5px solid var(--ac);
  box-shadow: none;
}

.btn-sec:hover {
  background: var(--primary-50);
  border-color: var(--ach);
  color: var(--ach);
  transform: translateY(-2px);
}

.btn-sec:active {
  transform: translateY(0) scale(0.97);
}

.bloque-btn {
  display: block;
  text-align: center;
  margin-top: 20px;
}

.lnk {
  background: none;
  border: 0;
  color: var(--ac);
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  padding: 0;
  transition: color var(--dur-fast) ease;
}

.lnk:hover {
  color: var(--ach);
  text-decoration: underline;
}

/* ==========================================================================
   DETALLE DE PRODUCTO
   ========================================================================== */

.mig {
  margin: 28px 0 0;
}

.mig a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--tx2);
}

.mig a:hover {
  color: var(--ac);
  text-decoration: none;
}

.det {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  padding: 28px 0 64px;
  align-items: start;
  animation: fadeUp 0.5s var(--ease-out) backwards;
}

.det h1 {
  margin: 6px 0;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--slate-900);
}

.det p {
  color: var(--slate-600);
  line-height: 1.6;
}

/* ==========================================================================
   FORMULARIOS & CHECKOUT
   ========================================================================== */

.campo {
  display: block;
  margin: 18px 0;
  border: 0;
  padding: 0;
}

.campo legend {
  padding: 0;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--slate-800);
  font-size: 14.5px;
}

.campo input, .campo select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  font: inherit;
  background: #fff;
  color: var(--tx);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.campo input:focus, .campo select:focus {
  outline: none;
  border-color: var(--bd-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.cantidad input {
  width: 110px;
}

/* Opciones de selección animadas (envío / pago) */
.op {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
  transition: all var(--dur-fast) var(--ease-out);
}

.op:hover {
  border-color: var(--primary-300);
  background: var(--primary-50);
  transform: translateY(-1px);
}

.op:has(input:checked) {
  border-color: var(--ac);
  background: var(--primary-50);
  box-shadow: 0 0 0 1px var(--ac), 0 3px 10px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

.op input[type="radio"] {
  accent-color: var(--ac);
  width: 17px;
  height: 17px;
  cursor: pointer;
}

.op span {
  flex: 1;
  font-weight: 500;
  color: var(--slate-900);
}

.op em {
  font-style: normal;
  color: var(--tx2);
  font-weight: 600;
}

.aviso {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.5;
}

.ok {
  color: var(--ok-dark);
  font-weight: 500;
}

#ok:not([hidden]) {
  animation: popIn 0.35s var(--ease-spring);
}

.error {
  color: var(--er);
  font-size: 13.5px;
  font-weight: 500;
}

.nota {
  color: var(--tx2);
  font-size: 13px;
}

.verde {
  color: var(--ok-dark);
  font-weight: 600;
}

.cols {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 36px;
  align-items: start;
  margin-bottom: 64px;
}

.caja {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 12px 30px 30px;
}

.caja h2 {
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Indicador de pasos del checkout */
.pasos {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.pasos span {
  padding: 8px 20px;
  border-radius: 980px;
  background: var(--bg2);
  color: var(--tx2);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--bd);
  transition: all var(--dur-normal) var(--ease-out);
}

.pasos .on {
  background: var(--slate-900);
  color: #fff;
  border-color: var(--slate-900);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
  transform: translateY(-1px);
}

.acciones {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
}

/* ==========================================================================
   RESUMEN DEL CARRITO & PEDIDO
   ========================================================================== */

.resumen {
  background: var(--bg2);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  padding: 12px 26px 26px;
}

.resumen h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.resumen.centro {
  max-width: 500px;
  margin: 0 auto 64px;
  animation: fadeUp 0.5s var(--ease-out) backwards;
}

.fila {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bd);
  font-size: 15px;
  color: var(--slate-700);
}

.fila.total {
  font-weight: 700;
  font-size: 19px;
  border: 0;
  color: var(--slate-950);
  padding-top: 14px;
}

.linea {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--bd);
  transition: background-color var(--dur-fast) ease;
}

.linea-i {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.linea-i b {
  font-size: 16px;
  color: var(--slate-900);
}

.linea-i small {
  color: var(--tx2);
  font-size: 12.5px;
  margin: 2px 0 4px;
}

.linea-i span {
  font-weight: 600;
  color: var(--slate-800);
}

.linea-i s {
  color: var(--slate-400);
  margin-right: 4px;
}

/* Controles de cantidad animados */
.cant {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cant span {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cant button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--bd);
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--slate-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--dur-fast) var(--ease-spring);
}

.cant button:hover {
  background: var(--primary-50);
  border-color: var(--ac);
  color: var(--ac);
  transform: scale(1.12);
}

.cant button:active {
  transform: scale(0.92);
}

.sub {
  min-width: 96px;
  text-align: right;
  font-weight: 700;
  color: var(--slate-900);
}

.cupon {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.cupon input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1.5px solid var(--bd);
  border-radius: 12px;
  font: inherit;
  transition: border-color var(--dur-fast) ease;
}

.cupon input:focus {
  outline: none;
  border-color: var(--ac);
}

.vacio {
  text-align: center;
  padding: 72px 0;
  animation: gentleFloat 4s ease-in-out infinite alternate;
}

.vacio h1, .vacio h2 {
  letter-spacing: -0.03em;
  font-weight: 800;
  color: var(--slate-900);
}

.pie {
  background: var(--slate-100);
  border-top: 1px solid var(--bd);
  color: var(--slate-600);
  font-size: 13.5px;
  padding: 32px 0;
}

.pie p {
  margin: 0;
  line-height: 1.6;
}

/* ==========================================================================
   MONITOR DE EVENTOS DIDÁCTICO (GA4)
   ========================================================================== */

#monitor {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  background: var(--slate-950);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  z-index: 100;
  font-size: 13px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
  transition: transform var(--dur-normal) var(--ease-out);
}

.mon-cab {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mon-cab strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: #fff;
}

.mon-cab strong::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
  animation: pulseDot 2s infinite;
}

.mon-cab button, #mon-mostrar, .mon-reset {
  background: var(--slate-800);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  padding: 6px 14px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--dur-fast) ease;
}

.mon-cab button:hover, #mon-mostrar:hover, .mon-reset:hover {
  background: var(--slate-700);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

#mon-mostrar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 100;
  display: none;
  background: var(--slate-900);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

body.mon-off #mon-mostrar {
  display: block;
  animation: popIn 0.3s var(--ease-spring);
}

body.mon-off #monitor {
  display: none;
}

.mon-estado {
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.4;
}

.mon-estado.ok {
  background: rgba(34, 197, 94, 0.14);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.28);
}

.mon-estado.err {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.mon-tit {
  display: block;
  color: var(--slate-400);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.mon-sec {
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mon-lista-sec {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#mon-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  flex: 1;
}

#mon-lista li {
  padding: 8px 10px;
  border-radius: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 2px 8px;
  transition: background-color var(--dur-fast) ease;
}

#mon-lista li:hover {
  background: rgba(255, 255, 255, 0.04);
}

/* Animación cuando entra un nuevo evento en el monitor */
#mon-lista li:first-child {
  animation: eventFlash 0.5s ease-out;
}

#mon-lista time {
  color: var(--slate-400);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

#mon-lista b {
  color: #38bdf8;
  font-weight: 600;
}

#mon-lista span {
  grid-column: 2;
  color: #e2e8f0;
  word-break: break-word;
  font-size: 12.5px;
}

/* ==========================================================================
   ANIMACIONES (KEYFRAMES)
   ========================================================================== */

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

@keyframes bannerEntrance {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ambientFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(-30px, 20px) scale(1.15);
  }
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(4px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes eventFlash {
  0% {
    opacity: 0;
    transform: translateX(18px);
    background: rgba(37, 99, 235, 0.35);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
    background: transparent;
  }
}

@keyframes gentleFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px);
  }
}

/* ==========================================================================
   RESPONSIVIDAD
   ========================================================================== */

@media (max-width: 819.98px) {
  body.mon-on {
    padding-right: 0;
    padding-bottom: 300px;
  }

  #monitor {
    top: auto;
    left: 0;
    width: 100%;
    height: 300px;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  .det, .cols {
    grid-template-columns: 1fr;
  }

  .banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }
}

/* ==========================================================================
   ACCESIBILIDAD: PREFERS-REDUCED-MOTION
   ========================================================================== */

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