/* =========================================================
   Modo Navidad (Panel → Navidad). Solo se carga si está encendido.
   ========================================================= */

/* ---------- Gorro navideño sobre el logo ---------- */
.navidad-gorro .site-header .logo { position: relative; }
.navidad-gorro .site-header .logo::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -15px;
  left: -13px;
  width: 38px;
  height: 32px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 54'%3E%3Cpath d='M8 40 C10 22 22 6 40 6 C50 6 56 12 58 22 C54 18 48 17 44 20 C40 24 40 32 42 40 Z' fill='%23d32f2f'/%3E%3Cpath d='M40 6 C50 6 56 12 58 22 C55 19 51 18 48 18 C46 12 44 8 40 6 Z' fill='%23b71c1c'/%3E%3Crect x='4' y='38' width='42' height='11' rx='5.5' fill='%23fff'/%3E%3Crect x='4' y='38' width='42' height='11' rx='5.5' fill='none' stroke='%23e3e3e3' stroke-width='1.2'/%3E%3Ccircle cx='57' cy='25' r='6.5' fill='%23fff'/%3E%3Ccircle cx='57' cy='25' r='6.5' fill='none' stroke='%23e3e3e3' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat center / contain;
  transform: rotate(-22deg);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
@media (max-width: 860px) {
  .navidad-gorro .site-header .logo::before { top: -12px; left: -10px; width: 30px; height: 26px; }
}

/* ---------- Guirnalda de luces colgando del menú ---------- */
.navidad-luces {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 22px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 44px;
  overflow: hidden;
  pointer-events: none;
  /* cable ondulado */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22'%3E%3Cpath d='M0 3 Q22 15 44 3' fill='none' stroke='%232b2b2b' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 44px 22px;
}
.site-header:has(.navidad-luces) { position: sticky; }
.navidad-luces i {
  position: relative;
  justify-self: center;
  margin-top: 8px;
  width: 7px;
  height: 11px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: #ff3b3b;
  box-shadow: 0 0 6px 2px rgba(255, 59, 59, .65);
  animation: navidad-titila 2.4s ease-in-out infinite;
}
.navidad-luces i::before {          /* casquillo */
  content: "";
  position: absolute;
  top: -3px;
  left: 1px;
  width: 5px;
  height: 4px;
  border-radius: 1px;
  background: #3a3a3a;
}
.navidad-luces i:nth-child(4n+2) { background: #ffd23f; box-shadow: 0 0 6px 2px rgba(255, 210, 63, .7); animation-delay: .6s; }
.navidad-luces i:nth-child(4n+3) { background: #2ee66b; box-shadow: 0 0 6px 2px rgba(46, 230, 107, .65); animation-delay: 1.2s; }
.navidad-luces i:nth-child(4n+4) { background: #39b6ff; box-shadow: 0 0 6px 2px rgba(57, 182, 255, .65); animation-delay: 1.8s; }
.navidad-luces i:nth-child(3n) { animation-duration: 3.1s; }
@keyframes navidad-titila {
  0%, 100% { opacity: 1; filter: brightness(1.15); }
  50% { opacity: .45; filter: brightness(.8); box-shadow: none; }
}
@media (max-width: 860px) {
  .navidad-luces { grid-auto-columns: 36px; background-size: 36px 22px; }
}

/* ---------- Acentos rojo y dorado ---------- */
.navidad-colores .site-header {
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.06) 1px, transparent 1.4px) 0 0 / 18px 18px,
    radial-gradient(60% 140% at 0% 0%, rgba(19,189,13,.16), transparent 60%),
    radial-gradient(50% 140% at 100% 100%, rgba(211,47,47,.22), transparent 60%),
    #1b1a1a;
}
/* Líneas animadas del menú y del pie: verde, rojo y dorado */
.navidad-colores .site-header::after,
.navidad-colores .menu-principal::before,
.navidad-colores .site-footer.pie::before {
  background: linear-gradient(90deg, #13bd0d, #f5c542, #d32f2f, #f5c542, #13bd0d, #f5c542, #d32f2f, #f5c542, #13bd0d) !important;
  background-size: 200% 100% !important;
  box-shadow: 0 0 12px rgba(245, 197, 66, .55) !important;
}
/* Etiquetas de los productos (Nuevo, Top…) en rojo con borde dorado */
.navidad-colores .producto-etiqueta {
  color: #fff;
  background: #c62828;
  box-shadow: inset 0 0 0 1.5px #f5c542;
}

/* ---------- Lazo de regalo en todos los productos ---------- */
.navidad-lazo .producto .producto-img::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  width: 54px;
  height: 54px;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E %3Cpath d='M30 0 H44 L64 20 V34 Z' fill='%23c62828'/%3E %3Cpath d='M35 0 H39 L64 25 V29 Z' fill='%23e57373' opacity='.55'/%3E %3Cpath d='M44 21 L36 38 L41 36 L43 41 L47 23 Z' fill='%23b71c1c'/%3E %3Cpath d='M48 21 L58 36 L59 31 L64 32 L50 19 Z' fill='%23a31515'/%3E %3Cellipse cx='37' cy='11' rx='11' ry='6.5' transform='rotate(40 37 11)' fill='%23e53935'/%3E %3Cellipse cx='38.5' cy='12.5' rx='6' ry='3' transform='rotate(40 38.5 12.5)' fill='%23b71c1c'/%3E %3Cellipse cx='55' cy='14' rx='11' ry='6.5' transform='rotate(-40 55 14)' fill='%23e53935'/%3E %3Cellipse cx='53.5' cy='15.5' rx='6' ry='3' transform='rotate(-40 53.5 15.5)' fill='%23b71c1c'/%3E %3Ccircle cx='46' cy='19' r='5' fill='%23c62828' stroke='%23f5c542' stroke-width='1.6'/%3E %3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25));
}

/* ---------- Nieve (la dibuja js/navidad.js) ---------- */
.navidad-nieve-lienzo {
  position: fixed;
  inset: 0;
  z-index: 150;            /* sobre el menú (100), debajo del asistente (900) y las ventanas */
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Aviso de vista previa (solo lo ve el admin) */
.navidad-previa::after {
  content: "Vista previa de Navidad · solo tú la ves";
  position: fixed;
  z-index: 9999;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(198, 40, 40, .92);
  font: 700 12px/1.3 system-ui, sans-serif;
  pointer-events: none;
}

/* Sin movimiento para quien lo pidió en su equipo */
@media (prefers-reduced-motion: reduce) {
  .navidad-luces i { animation: none; }
}
