/* Navidad en popiuniformes.cl (17-11-2026, version 2).

   La v1 (franja roja, luces de 26 px, gorro de 46 px, nieve de puntitos) quedo
   en vivo y Diego la rechazo mirandola en un PC de 1920 px: "ni se nota que es
   Navidad". Esta version agranda todo lo que se ve quieto, porque Diego tiene
   "reducir movimiento" prendido y es lo unico que el va a ver:
   - la franja de arriba lleva el saludo "¡Felices Fiestas! les desea Popi",
     con copos y estrellas en el fondo y nieve acumulada en el borde de abajo;
   - bajo la cabecera cuelga una guirnalda de pino con esferas, moños y luces
     grandes con brillo (img/navidad/guirnalda.svg);
   - el gorro del logo crece y el WhatsApp flotante lleva el suyo;
   - el boton "Ver coleccion" de la portada lleva un moño;
   - la nieve que cae son copos dibujados, mas grandes y mas seguidos.

   Solo se carga mientras el aviso de temporada esta vigente con el tema Navidad
   (base.html: config.navidad_visible). Se apaga solo despues del 25-12; fuera de
   temporada este archivo ni se pide.

   Todo es decoracion: nada mueve el contenido, nada recibe clics y un lector de
   pantalla no lo lee. Con "reducir movimiento" se apagan la nieve que cae y el
   titileo de las luces; lo demas se queda quieto y se ve igual. */

:root {
  --nav-rojo: #C0283E;      /* franja: texto blanco 5,8:1 (AA) */
  --nav-rojo-vivo: #d6334a; /* gorro y ampolletas, sin texto encima */
  --nav-verde: #2e8b57;
  --nav-dorado: #e8b33a;
  --gorro: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path d='M13 44 C15 26 25 13 41 13 C50 13 55 18 54 25 C50 23 45 23 42 27 C39 32 41 39 51 44 Z' fill='%23d6334a'/><path d='M20 40 C22 28 29 19 38 17' fill='none' stroke='%23ef6b7f' stroke-width='2.5' stroke-linecap='round'/><circle cx='54' cy='26' r='6.5' fill='%23fff' stroke='%239fd9d2' stroke-width='2'/><rect x='7' y='40' width='50' height='13' rx='6.5' fill='%23fff' stroke='%239fd9d2' stroke-width='2'/></svg>");
}

/* ---- Franja de arriba: roja, con el saludo, copos y nieve acumulada ----
   Es la misma franja del aviso de temporada, no una segunda: dos franjas
   apiladas se comen el primer pantallazo del celular. En el computador va el
   saludo y despues el aviso; en el celular, solo el saludo en una linea. */
.navidad .aviso-temporada {
  position: relative;
  background: url("../img/navidad/franja.8428ef7d322f.svg") repeat left center / 150px 48px, var(--nav-rojo);
}
.navidad .aviso-inner { padding-block: .5rem .8rem; gap: 1rem; }
.navidad .aviso-detalle { color: #FFE3E6; }          /* 4,8:1 sobre el rojo */
.navidad .aviso-btn { color: var(--nav-rojo); }
.navidad .aviso-btn:hover { background: #FFE3E6; color: var(--nav-rojo); }
.aviso-saludo {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  flex-shrink: 0;
  font-family: var(--script);
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.1;
  color: #fff;                                       /* 5,8:1 */
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(120, 10, 30, .35);
}
.aviso-saludo span { color: #FFD36B; font-size: 1.2rem; }   /* 4,5:1, texto grande */
.aviso-saludo i { font-size: 1rem; color: #fff; opacity: .9; }
.navidad .aviso-texto {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, .35);
}
/* Nieve acumulada: el blanco de la cabecera sube en ondas sobre el rojo. */
.navidad .aviso-temporada::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 14px;
  pointer-events: none;
  background: url("../img/navidad/nieve-borde.bce10fd566b6.svg") repeat-x left bottom / 160px 14px;
}
@media (max-width: 991.98px) {
  .navidad .aviso-detalle { display: none; }
}
@media (max-width: 760px) {
  .navidad .aviso-inner { justify-content: center; padding-block: .4rem .75rem; }
  .navidad .aviso-texto,
  .navidad .aviso-btn { display: none; }
  .aviso-saludo { font-size: 1.35rem; }
  .aviso-saludo span { font-size: 1.08rem; }
}
@media (max-width: 359.98px) {
  .aviso-saludo { font-size: 1.18rem; gap: .35rem; }
  .aviso-saludo span { font-size: .98rem; }
  .aviso-saludo i { display: none; }
}

/* ---- Guirnalda de pino bajo el menu ----
   La cabecera le reserva su lugar (padding de abajo): colgando encima de la
   pagina tapaba las migas de la ficha y el titulo del catalogo. Como la clase
   .navidad la pone el servidor, ese espacio esta desde el primer pintado y el
   contenido no salta. Solo la punta de las esferas grandes pasa el borde.
   Encima, dos capas con el brillo de las luces pares e impares que se turnan
   para titilar; con "reducir movimiento" quedan prendidas, quietas. */
.navidad .site-header { padding-bottom: 46px; }
.navidad .header-row { padding-top: .95rem; }   /* aire para el gorro */
.guirnalda {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -16px;
  height: 66px;
  pointer-events: none;
  z-index: 1;
  background: url("../img/navidad/guirnalda.102d0bef08b3.svg") repeat-x center top / 480px 66px;
}
.guirnalda::before,
.guirnalda::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/navidad/brillo-a.ac92e675e71f.svg") repeat-x center top / 480px 66px;
  animation: luces-titilan 1.7s ease-in-out infinite alternate;
}
.guirnalda::after {
  background-image: url("../img/navidad/brillo-b.dc50fa9aff8e.svg");
  animation-direction: alternate-reverse;
}
@keyframes luces-titilan {
  from { opacity: .12; }
  to   { opacity: 1; }
}
@media (max-width: 760px) {
  .navidad .site-header { padding-bottom: 30px; }
  .guirnalda { bottom: -12px; }
  .guirnalda,
  .guirnalda::before,
  .guirnalda::after { height: 46px; background-size: 336px 46px; }
}

/* ---- Gorro del Viejito Pascuero sobre el logo (solo el de la cabecera) ----
   El ala va sobre el borde del circulo, a las 10 y media: mas adentro tapaba
   la P de "POPI". */
.navidad .site-header .brand-lockup { position: relative; }
.navidad .site-header .brand-lockup::before {
  content: "";
  position: absolute;
  left: -27px;
  top: -29px;
  width: 60px;
  height: 60px;
  transform: rotate(-38deg);
  pointer-events: none;
  z-index: 2;
  background: var(--gorro) no-repeat center / contain;
}

/* ---- Sello sobre la foto de portada ---- */
.hero-foto { position: relative; }
/* .hero-foto delante: sin foto de portada, las reglas de .hero-foto-vacia (span
   en bloque, icono de 2.4rem) lo deformaban en una burbuja gigante. */
.hero-foto .hero-sello {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: none;
  background: #fff;
  color: var(--nav-rojo);   /* 5,8:1 */
  font-weight: 600;
  font-size: .88rem;
  line-height: 1.2;
  padding: .38rem 1rem .38rem .65rem;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(192, 40, 62, .18), 0 8px 20px rgba(192, 40, 62, .22);
}
.hero-foto .hero-sello .gorro-navidad { display: inline; flex: 0 0 auto; margin: 0; }

/* ---- Bloque "Regalos de Navidad" de la portada ---- */
.regalo-navidad { padding-top: 2.4rem; }
.regalo-caja {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem 2.4rem;
  padding: 1.9rem 2.2rem 1.7rem;
  border-radius: var(--radius);
  color: #fff;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .16) 0 1.4px, transparent 1.9px) 0 0 / 22px 22px,
    radial-gradient(circle, rgba(255, 255, 255, .09) 0 1px, transparent 1.5px) 11px 11px / 22px 22px,
    var(--brand-dark);
  box-shadow: inset 0 6px 0 var(--nav-rojo), 0 14px 34px rgba(25, 96, 102, .22);
}
.regalo-caja > * { min-width: 0; }
.regalo-titulo {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .35rem;
  color: #fff;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
}
.regalo-titulo .gorro-navidad { flex: 0 0 auto; margin-top: -.3rem; }
.regalo-texto { margin: 0 0 1rem; color: #E6F4F1; font-size: 1rem; line-height: 1.5; max-width: 54ch; }
.regalo-cats { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.regalo-cats a {
  display: inline-block;
  padding: .34rem .85rem;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  color: #fff;
  font-size: .86rem;
  text-decoration: none;
}
.regalo-cats a:hover { background: #fff; color: var(--brand-dark); }
.regalo-botones { display: flex; flex-direction: column; gap: .6rem; }
.regalo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.regalo-btn--lleno { background: #fff; color: var(--nav-rojo); }
.regalo-btn--lleno:hover { background: #FFE3E6; color: var(--nav-rojo); }
.regalo-btn--linea { border: 1.5px solid rgba(255, 255, 255, .8); color: #fff; }
.regalo-btn--linea:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@media (max-width: 760px) {
  .regalo-navidad { padding-top: 1.8rem; }
  .regalo-caja { grid-template-columns: minmax(0, 1fr); padding: 1.6rem 1.25rem 1.35rem; }
  .regalo-btn { white-space: normal; }
}

/* ---- Nieve que cae: 30 copos, dos tercios dibujados ----
   Blancos con contorno verde de la marca (si no, sobre la crema no se ven).
   Debajo de la cabecera (60) y de los botones flotantes (40). No se dibuja en
   carrito, checkout ni confirmacion (base.html). */
.nieve {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 35;
}
.nieve i {
  position: absolute;
  top: -30px;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(33, 122, 129, .14), 0 1px 6px rgba(33, 122, 129, .55);
  opacity: .95;
  will-change: transform;
  animation: nieve-cae 17s linear infinite;
}
.nieve i.c1,
.nieve i.c2 {
  border-radius: 0;
  box-shadow: none;
  background: url("../img/navidad/copo-a.1484938d767d.svg") no-repeat center / contain;
}
.nieve i.c2 { background-image: url("../img/navidad/copo-b.a33cc6996ae1.svg"); }
.nieve i:nth-child(1) { left: 0.6%; width: 26px; height: 26px; animation-duration: 17.0s; animation-delay: -8.7s; }
.nieve i:nth-child(2) { left: 6.3%; width: 20px; height: 20px; animation-duration: 20.8s; animation-delay: -18.6s; animation-name: nieve-cae-b; }
.nieve i:nth-child(3) { left: 8.5%; width: 8px; height: 8px; animation-duration: 19.8s; animation-delay: -10.8s; }
.nieve i:nth-child(4) { left: 12.4%; width: 20px; height: 20px; animation-duration: 17.9s; animation-delay: -4.3s; animation-name: nieve-cae-b; }
.nieve i:nth-child(5) { left: 13.8%; width: 12px; height: 12px; animation-duration: 14.9s; animation-delay: -1.5s; }
.nieve i:nth-child(6) { left: 19.2%; width: 6px; height: 6px; animation-duration: 18.9s; animation-delay: -12.8s; animation-name: nieve-cae-b; }
.nieve i:nth-child(7) { left: 21.4%; width: 16px; height: 16px; animation-duration: 15.5s; animation-delay: -15.5s; }
.nieve i:nth-child(8) { left: 25.9%; width: 12px; height: 12px; animation-duration: 22.0s; animation-delay: -11.3s; animation-name: nieve-cae-b; }
.nieve i:nth-child(9) { left: 29.0%; animation-duration: 12.9s; animation-delay: -6.9s; }
.nieve i:nth-child(10) { left: 31.5%; width: 20px; height: 20px; animation-duration: 20.8s; animation-delay: -14.6s; animation-name: nieve-cae-b; }
.nieve i:nth-child(11) { left: 34.5%; width: 18px; height: 18px; animation-duration: 20.5s; animation-delay: -7.6s; }
.nieve i:nth-child(12) { left: 38.1%; width: 8px; height: 8px; animation-duration: 16.0s; animation-delay: -9.4s; animation-name: nieve-cae-b; }
.nieve i:nth-child(13) { left: 42.7%; width: 26px; height: 26px; animation-duration: 16.3s; animation-delay: -13.1s; }
.nieve i:nth-child(14) { left: 45.3%; width: 16px; height: 16px; animation-duration: 16.9s; animation-delay: -15.5s; animation-name: nieve-cae-b; }
.nieve i:nth-child(15) { left: 49.3%; width: 5px; height: 5px; animation-duration: 17.6s; animation-delay: -17.3s; }
.nieve i:nth-child(16) { left: 51.9%; width: 22px; height: 22px; animation-duration: 19.7s; animation-delay: -16.1s; animation-name: nieve-cae-b; }
.nieve i:nth-child(17) { left: 55.1%; width: 18px; height: 18px; animation-duration: 18.7s; animation-delay: -13.4s; }
.nieve i:nth-child(18) { left: 58.2%; width: 5px; height: 5px; animation-duration: 16.8s; animation-delay: -3.8s; animation-name: nieve-cae-b; }
.nieve i:nth-child(19) { left: 62.0%; width: 20px; height: 20px; animation-duration: 16.6s; animation-delay: -7.8s; }
.nieve i:nth-child(20) { left: 64.3%; width: 20px; height: 20px; animation-duration: 16.0s; animation-delay: -16.0s; animation-name: nieve-cae-b; }
.nieve i:nth-child(21) { left: 69.2%; width: 8px; height: 8px; animation-duration: 17.0s; animation-delay: -8.1s; }
.nieve i:nth-child(22) { left: 71.5%; width: 12px; height: 12px; animation-duration: 14.9s; animation-delay: -4.0s; animation-name: nieve-cae-b; }
.nieve i:nth-child(23) { left: 74.0%; width: 26px; height: 26px; animation-duration: 20.8s; animation-delay: -20.0s; }
.nieve i:nth-child(24) { left: 78.4%; animation-duration: 16.9s; animation-delay: -15.6s; animation-name: nieve-cae-b; }
.nieve i:nth-child(25) { left: 82.2%; width: 18px; height: 18px; animation-duration: 16.7s; animation-delay: -12.8s; }
.nieve i:nth-child(26) { left: 85.9%; width: 26px; height: 26px; animation-duration: 17.6s; animation-delay: -16.0s; animation-name: nieve-cae-b; }
.nieve i:nth-child(27) { left: 87.7%; width: 8px; height: 8px; animation-duration: 16.6s; animation-delay: -13.5s; }
.nieve i:nth-child(28) { left: 92.2%; width: 18px; height: 18px; animation-duration: 19.9s; animation-delay: -10.3s; animation-name: nieve-cae-b; }
.nieve i:nth-child(29) { left: 96.2%; width: 22px; height: 22px; animation-duration: 13.8s; animation-delay: -5.9s; }
.nieve i:nth-child(30) { left: 98.3%; width: 8px; height: 8px; animation-duration: 12.6s; animation-delay: -3.4s; animation-name: nieve-cae-b; }

@keyframes nieve-cae {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to   { transform: translate3d(40px, calc(100vh + 60px), 0) rotate(200deg); }
}
@keyframes nieve-cae-b {
  from { transform: translate3d(0, 0, 0) rotate(0deg); }
  to   { transform: translate3d(-34px, calc(100vh + 60px), 0) rotate(-170deg); }
}
@media (max-width: 760px) {
  .nieve i:nth-child(n+21) { display: none; }
}

/* Liviana (17-11-2026): base.html marca <html class="nieve-control"> y, con
   su JS, body.nieve-lista (1,2 s despues de cargar) y body.nieve-lejos
   (pasada la primera pantalla). Sin esas clases (/links, que no carga ese JS)
   todo queda como antes. display:none detiene las animaciones del todo. */
.nieve-control body:not(.nieve-lista) .nieve,
.nieve-lejos .nieve { display: none; }
.nieve-lejos .guirnalda::before,
.nieve-lejos .guirnalda::after { animation-play-state: paused; }

/* Con "reducir movimiento" no cae nieve ni titilan las luces. Franja, guirnalda,
   esferas, nieve acumulada, gorros, moño y bloque son quietos y se quedan. */
@media (prefers-reduced-motion: reduce) {
  .nieve { display: none; }
  .guirnalda::before,
  .guirnalda::after { animation: none; opacity: .8; }
}

@media (max-width: 992px) {
  /* En el celular el boton del menu va a la izquierda del logo: el gorro se
     da vuelta y cae hacia la derecha, donde no hay nada. */
  .navidad .site-header .brand-lockup::before {
    width: 44px; height: 44px; left: auto; right: -23px; top: -25px;
    transform: scaleX(-1) rotate(-38deg);
  }
}

/* ---- Gorrito en el WhatsApp flotante y moño en el boton de la portada ---- */
.navidad .float-wa { position: relative; }
.navidad .float-wa::before {
  content: "";
  position: absolute;
  left: -13px;
  top: -10px;
  width: 32px;
  height: 32px;
  transform: rotate(-26deg);
  pointer-events: none;
  background: var(--gorro) no-repeat center / contain;
}
.navidad .hero-botones .btn-red { position: relative; overflow: visible; }
.navidad .hero-botones .btn-red::after {
  content: "";
  position: absolute;
  top: -15px;
  right: -9px;
  width: 30px;
  height: 34px;
  transform: rotate(14deg);
  pointer-events: none;
  background: url("../img/navidad/mono.f22de80ff097.svg") no-repeat center / contain;
}
