/* ============================================================================
 * tema-navidad.css — Capa Navideña Enchufable para toda la app (100% reversible).
 * Cubre: Login, Barra superior, Catálogo/Cotizar, Comisiones y Sucursales.
 * Para desactivar al terminar temporada: quitar <link> y <script> en index.html.
 * ==========================================================================*/

/* 1) Mini serie navideña colgante (hilo fino + foquitos en gotita) en .top */
.xmas-lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 0 22px;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='12' viewBox='0 0 120 12'%3E%3Cpath d='M0 2 Q60 11 120 2' fill='none' stroke='rgba(165,180,252,0.28)' stroke-width='1'/%3E%3C/svg%3E") repeat-x top left / 120px 12px;
}
.xmas-bulb {
  position: relative;
  margin-top: 4px;
  width: 5.5px;
  height: 8.5px;
  border-radius: 45% 45% 55% 55%;
  animation: xmasTwinkle 2.8s ease-in-out infinite;
}
.xmas-bulb::before {
  content: "";
  position: absolute;
  top: -2.5px;
  left: 1px;
  width: 3.5px;
  height: 3px;
  border-radius: 1px;
  background: rgba(148, 163, 184, 0.7);
}
.xmas-bulb:nth-child(2n) { margin-top: 6px; }
.xmas-bulb:nth-child(3n+1) {
  background: #FDE68A;
  box-shadow: 0 2px 10px rgba(253, 230, 138, 0.95);
  animation-delay: 0s;
}
.xmas-bulb:nth-child(3n+2) {
  background: #7DD3FC;
  box-shadow: 0 2px 10px rgba(125, 211, 252, 0.95);
  animation-delay: 0.9s;
}
.xmas-bulb:nth-child(3n) {
  background: #F9A8D4;
  box-shadow: 0 2px 10px rgba(249, 168, 212, 0.9);
  animation-delay: 1.8s;
}
@keyframes xmasTwinkle {
  0%, 100% { opacity: 0.48; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.12); }
}

/* 2) Gorrito navideño ajustado a la curvatura del Logo Principal, Login y Comisiones */
.top .brand-lockup {
  position: relative !important;
  overflow: visible !important;
}
.top .brand-lockup::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: -11px;
  left: -3px;
  width: 44px;
  height: 28px;
  transform: rotate(-14deg);
  transform-origin: center bottom;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 42'%3E%3Cdefs%3E%3ClinearGradient id='hr' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23F43F5E'/%3E%3Cstop offset='55%25' stop-color='%23DC2626'/%3E%3Cstop offset='100%25' stop-color='%23991B1B'/%3E%3C/linearGradient%3E%3ClinearGradient id='hf' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23FFFFFF'/%3E%3Cstop offset='100%25' stop-color='%23E2E8F0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 28 C14 9, 34 2, 53 16 C48 16, 44 20, 44 27 C34 22, 20 22, 9 28 Z' fill='url(%23hr)' stroke='%237F1D1D' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M16 20 C22 10, 34 8, 43 13' fill='none' stroke='rgba(255,255,255,0.28)' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M5 29 C18 21, 35 21, 47 29 C49 30.5, 48.5 34.5, 45.5 35 C34 28.5, 19 28.5, 7.5 35 C4.5 34.5, 3.5 30.5, 5 29 Z' fill='url(%23hf)' stroke='%23CBD5E1' stroke-width='1.2'/%3E%3Ccircle cx='54.5' cy='18.5' r='5.8' fill='url(%23hf)' stroke='%23CBD5E1' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 3px 4px rgba(15, 23, 42, 0.45));
}

/* Gorrito en el logo del Login (centrado y abrazando el círculo del logo) */
.auth-logo {
  position: relative !important;
  overflow: visible !important;
}
.auth-logo::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  top: -16px;
  left: 50%;
  margin-left: -34px;
  width: 62px;
  height: 40px;
  transform: rotate(-14deg);
  transform-origin: center bottom;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 42'%3E%3Cdefs%3E%3ClinearGradient id='hr' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23F43F5E'/%3E%3Cstop offset='55%25' stop-color='%23DC2626'/%3E%3Cstop offset='100%25' stop-color='%23991B1B'/%3E%3C/linearGradient%3E%3ClinearGradient id='hf' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23FFFFFF'/%3E%3Cstop offset='100%25' stop-color='%23E2E8F0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M9 28 C14 9, 34 2, 53 16 C48 16, 44 20, 44 27 C34 22, 20 22, 9 28 Z' fill='url(%23hr)' stroke='%237F1D1D' stroke-width='1.4' stroke-linejoin='round'/%3E%3Cpath d='M16 20 C22 10, 34 8, 43 13' fill='none' stroke='rgba(255,255,255,0.28)' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M5 29 C18 21, 35 21, 47 29 C49 30.5, 48.5 34.5, 45.5 35 C34 28.5, 19 28.5, 7.5 35 C4.5 34.5, 3.5 30.5, 5 29 Z' fill='url(%23hf)' stroke='%23CBD5E1' stroke-width='1.2'/%3E%3Ccircle cx='54.5' cy='18.5' r='5.8' fill='url(%23hf)' stroke='%23CBD5E1' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  pointer-events: none;
  z-index: 5;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.38));
}



/* 3) Pantalla de Login (.auth-gate) — Noche invernal con aurora boreal */
.auth-gate {
  background:
    radial-gradient(680px 360px at 18% 12%, rgba(56, 189, 248, 0.28), transparent 68%),
    radial-gradient(620px 360px at 84% 18%, rgba(167, 139, 250, 0.26), transparent 68%),
    radial-gradient(580px 320px at 50% 88%, rgba(45, 212, 191, 0.20), transparent 70%),
    linear-gradient(155deg, #121426 0%, #1E1B4B 52%, #131629 100%) !important;
}
.auth-card {
  position: relative;
  border: 1px solid rgba(165, 180, 252, 0.45) !important;
  box-shadow:
    0 26px 64px -16px rgba(10, 12, 28, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.45) inset !important;
}

/* 4) Cotizador (al cotizar un equipo .eq-cabeza), Comisiones (.com-banner) y Sucursales */
.eq-cabeza,
.com-banner {
  position: relative;
}
.eq-cabeza::before,
.com-banner::before {
  content: "❄  ✦  ❄";
  position: absolute;
  top: 8px;
  right: 16px;
  font-size: 11px;
  letter-spacing: 6px;
  color: rgba(186, 230, 253, 0.52);
  pointer-events: none;
  z-index: 2;
}

/* Toque invernal sutil en el encabezado de Catálogo y Sucursales */
.hero-intro h1::after,
.loc-head h2::after {
  content: " ❄️";
  font-size: 0.82em;
  opacity: 0.85;
}

@media (max-width: 900px) {
  .top .brand-lockup::after {
    top: -9px;
    left: -2px;
    width: 36px;
    height: 23px;
  }
  .xmas-lights {
    padding: 0 10px;
  }
}

/* 5) Canvas global de nieve sobre toda la app (siempre visible, nunca bloquea clics) */
#xmas-snow-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

.auth-card {
  z-index: 2;
}

/* 7) Brillo "escarcha" al pasar el cursor por tarjetas de equipos y cortes */
.card:hover,
.com-corte-card:hover {
  border-color: #38BDF8 !important;
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.22),
    0 14px 30px -8px rgba(56, 189, 248, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}
.com-corte-card.is-active {
  box-shadow:
    0 10px 26px -8px rgba(79, 70, 229, 0.30),
    0 0 14px -4px rgba(125, 211, 252, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}


/* 8) Botón circular minimalista de copo de nieve en la barra superior (34px igual a Panel/Usuario) */
.xmas-snow-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(125, 211, 252, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.42);
  color: #BAE6FD;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease, transform .14s ease;
  flex: 0 0 auto;
}
.xmas-snow-btn:hover {
  background: rgba(125, 211, 252, 0.24);
  border-color: rgba(186, 230, 253, 0.72);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.xmas-snow-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}
.xmas-snow-btn.is-off {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(203, 213, 225, 0.55);
}
.xmas-snow-btn.is-off:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #E2E8F0;
}


@media (max-width: 640px) {
  .xmas-snow-btn {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
  }
  .xmas-snow-btn svg {
    width: 15px;
    height: 15px;
  }
  .auth-chip.pm-on {
    gap: 5px !important;
  }
  .auth-chip.pm-on #auth-panel-btn.pm-panel {
    padding: 0 9px !important;
    height: 30px !important;
    min-height: 30px !important;
    font-size: 12px !important;
  }
  .auth-chip.pm-on .pm-trigger {
    height: 30px !important;
    min-height: 30px !important;
  }
}

/* 9) Destello suave tipo aurora boreal en la barra superior (puro degradado, cero ruido visual) */
.top {
  background:
    radial-gradient(460px 140px at 22% 0%, rgba(56, 189, 248, 0.22), transparent 70%),
    radial-gradient(520px 150px at 78% 10%, rgba(167, 139, 250, 0.20), transparent 72%),
    radial-gradient(360px 120px at 52% 100%, rgba(45, 212, 191, 0.14), transparent 70%),
    linear-gradient(135deg, rgba(22, 24, 38, 0.94) 0%, rgba(36, 33, 86, 0.92) 55%, rgba(22, 24, 38, 0.95) 100%) !important;
}
