/* Navidad, segunda capa (04/12/2026, Agustín: «ambientala mucho más a Navidad toda la aplicación completa»).
   Todo bajo body.dic-on: fuera de diciembre, o en bebé y autismo, no cambia nada. */

/* Fondo: noche verde con estrellitas doradas y brillo rojo */
body.dic-on .main.fondo, body.bf-on.dic-on[data-tema] .main.fondo {
  background:
    radial-gradient(1.4px 1.4px at 8% 12%, rgba(255, 227, 163, .55) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 32% 40%, rgba(255, 255, 255, .35) 50%, transparent 51%),
    radial-gradient(1.6px 1.6px at 70% 22%, rgba(255, 227, 163, .5) 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 88% 64%, rgba(255, 255, 255, .3) 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 52% 80%, rgba(255, 227, 163, .45) 50%, transparent 51%),
    radial-gradient(900px 500px at 50% -10%, rgba(225, 29, 72, .22), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(22, 163, 74, .14), transparent 60%),
    #04130d;
  background-size: 260px 260px, 260px 260px, 260px 260px, 260px 260px, 260px 260px, auto, auto, auto;
  background-attachment: fixed;
}

/* Nieve que cae sobre toda la app */
#xm-nieve { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
#xm-nieve i { position: absolute; top: -20px; left: var(--x); font-style: normal; color: #fff; font-size: var(--s); opacity: var(--o);
  text-shadow: 0 0 6px rgba(255, 255, 255, .6); animation: xmCae var(--d) linear infinite; animation-delay: var(--t); }
@keyframes xmCae { 0% { transform: translate(0, -20px) rotate(0); } 50% { transform: translate(var(--w), 50vh) rotate(180deg); } 100% { transform: translate(0, 105vh) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #xm-nieve { display: none; } }

/* Encabezado rojo con borde de nieve y luces */
body.dic-on .top {
  position: sticky; background: linear-gradient(100deg, #7f0d1e 0%, #b91c1c 50%, #9f1239 100%) !important;
  border-bottom: 0 !important; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); color: #fff;
}
body.dic-on .top::after { /* borde de nieve ondulado */
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 10px; pointer-events: none;
  background: radial-gradient(circle at 8px 0, #fff 7px, transparent 7.5px) 0 0 / 16px 10px repeat-x;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25));
}
body.dic-on .top .marca, body.dic-on .top #top-marca, body.dic-on .top .crumb, body.dic-on .top .crumb b { color: #fff !important; }
body.dic-on .top .sel, body.dic-on .top .carro-btn, body.dic-on .top .av { background: rgba(255, 255, 255, .14) !important; border-color: rgba(255, 255, 255, .35) !important; color: #fff !important; }
body.dic-on .marca .sq { position: relative; overflow: visible !important; }
body.dic-on .marca .sq::after { /* gorrito navideño sobre el logo */
  content: ""; position: absolute; top: -13px; right: -9px; width: 26px; height: 22px; transform: rotate(18deg); pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 44'%3E%3Cpath d='M6 34 C10 14 24 2 40 6 C44 7 46 12 44 18 L40 14 C36 22 38 30 40 34 Z' fill='%23dc2626'/%3E%3Crect x='2' y='31' width='42' height='10' rx='5' fill='%23fff'/%3E%3Ccircle cx='44' cy='18' r='6' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
body.dic-on .side .marca .sq::after { top: -12px; right: -10px; }

/* Menú de abajo: rojo oscuro con línea dorada; la pestaña activa, en dorado */
body.dic-on .mnav { background: linear-gradient(180deg, #5c0a16, #3d0710) !important; border-top: 2px solid #e4b04a !important; }
body.dic-on .mnav button { color: #f5d9a8 !important; }
body.dic-on .mnav button.on { color: #ffe3a3 !important; }
body.dic-on .mnav button.on .xm-ico { transform: scale(1.18) translateY(-2px); filter: drop-shadow(0 0 8px rgba(255, 209, 102, .85)); }
body.dic-on .mnav .num { background: #16a34a !important; color: #fff !important; box-shadow: 0 0 0 2px #3d0710; }
.xm-ico { display: inline-grid; place-items: center; width: 24px; height: 24px; font-size: 20px; line-height: 1; transition: transform .2s; }
body.dic-on .side { background: linear-gradient(180deg, #5c0a16, #2a050b) !important; }
body.dic-on .side .item.on { background: rgba(228, 176, 74, .18) !important; color: #ffe3a3 !important; }
body.dic-on .side .item .xm-ico { margin-right: 2px; }

/* Franja «tu regalo» arriba de los libros y del curso */
.xm-franja { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 18px; padding: 12px 14px;
  border: 0; border-radius: 16px; cursor: pointer; font: inherit; text-align: left; color: #1d1405;
  background: linear-gradient(100deg, #f7d27a, #e4b04a 55%, #f3c766); box-shadow: 0 10px 26px rgba(228, 176, 74, .3), inset 0 0 0 1px rgba(255, 255, 255, .5); overflow: hidden; }
.xm-franja::before { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%); transform: translateX(-100%); animation: xmBrillo 3.2s ease-in-out infinite; }
@keyframes xmBrillo { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.xm-fr-reg { font-size: 30px; animation: xmSalta 1.8s ease-in-out infinite; }
@keyframes xmSalta { 0%, 100% { transform: translateY(0) rotate(0); } 20% { transform: translateY(-5px) rotate(-8deg); } 40% { transform: translateY(0) rotate(6deg); } }
.xm-fr-tx { position: relative; display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.xm-fr-tx small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.xm-fr-tx b { font-size: 15px; font-weight: 800; }
.xm-fr-tx s { opacity: .55; font-weight: 600; }
.xm-fr-pct { position: relative; background: #b91c1c; color: #fff; font-weight: 900; font-size: 14px; padding: 6px 9px; border-radius: 10px; box-shadow: 0 4px 10px rgba(185, 28, 28, .4); }

/* Libros como regalos: borde dorado, cinta bastón de caramelo arriba y moño */
body.dic-on .lb-card { position: relative; background: linear-gradient(180deg, #102a1f, #0b2018) !important; border: 1px solid rgba(228, 176, 74, .45) !important; overflow: visible; }
body.dic-on .lb-card::before { content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 4px; border-radius: 0 0 4px 4px;
  background: repeating-linear-gradient(135deg, #dc2626 0 8px, #fff 8px 14px); }
body.dic-on .lb-btn { box-shadow: 0 0 0 2px rgba(228, 176, 74, .35), 0 6px 16px rgba(22, 163, 74, .35); }
body.dic-on .lb-cab h1 { color: #ffe3a3; text-shadow: 0 2px 12px rgba(228, 176, 74, .35); }

/* Mi curso: marco dorado y guirnalda en el hero */
body.dic-on .hero { box-shadow: 0 0 0 2px rgba(228, 176, 74, .55), 0 18px 44px rgba(0, 0, 0, .45) !important; }
body.dic-on .hero::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 10px 6px, #ffd166 3px, transparent 4px) 0 0 / 40px 18px, radial-gradient(circle at 30px 12px, #ef4444 3px, transparent 4px) 0 0 / 40px 18px, radial-gradient(circle at 20px 9px, #22c55e 3px, transparent 4px) 0 0 / 40px 18px;
  filter: drop-shadow(0 0 4px rgba(255, 209, 102, .8)); animation: xmLuces 1.6s steps(2) infinite; }
@keyframes xmLuces { 50% { filter: drop-shadow(0 0 1px rgba(255, 209, 102, .3)) brightness(.75); } }
body.dic-on .xm-guirnalda { animation: xmLuces 1.6s steps(2) infinite; }
body.dic-on .curso-barra { background: linear-gradient(100deg, #7f0d1e, #b91c1c) !important; border-color: rgba(228, 176, 74, .5) !important; color: #fff !important; }
body.dic-on .cab-sec h2::before { content: "❄ "; color: #ffe3a3; }

/* Aviso de regalo al entrar */
.xm-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 18px; background: rgba(2, 10, 6, .72);
  backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.xm-modal.on { opacity: 1; }
.xm-m-card { position: relative; width: min(420px, 100%); max-height: calc(100vh - 36px); overflow: auto; text-align: center; color: #16343a;
  background: linear-gradient(180deg, #fffaf2, #fbf1e3); border-radius: 24px; padding: 0 18px 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 3px #e4b04a; transform: translateY(20px) scale(.96); transition: transform .3s cubic-bezier(.2, .9, .3, 1.3); }
.xm-modal.on .xm-m-card { transform: none; }
.xm-m-x { position: absolute; top: 8px; right: 10px; z-index: 3; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .25); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.xm-m-cinta { margin: 0 -18px; padding: 13px 44px; color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(100deg, #9e0c22, #c8102e 45%, #e23b4e); }
.xm-m-regalo { font-size: 54px; margin: 10px 0 2px; animation: xmSalta 1.8s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .2)); }
.xm-m-card h2 { font-size: 21px; line-height: 1.22; font-weight: 900; margin: 0 4px 12px; }
.xm-m-tapas { position: relative; margin: 0 0 12px; }
.xm-m-tapas .sx-tapas { background: radial-gradient(120% 90% at 50% 0%, rgba(228, 176, 74, .3), transparent 70%), #f3e9da; box-shadow: 0 0 0 1px rgba(228, 176, 74, .5); }
.xm-m-tapas .ox-sello { position: absolute; top: -8px; left: -6px; z-index: 2; background: #c8102e; color: #fff; font-weight: 900; font-size: 16px; padding: 6px 11px; border-radius: 12px; transform: rotate(-8deg); box-shadow: 0 6px 14px rgba(200, 16, 46, .4); }
.xm-m-precio { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.xm-m-precio s { font-size: 17px; color: #8a8378; }
.xm-m-precio b { font-size: 34px; font-weight: 900; color: #c8102e; }
.xm-m-por { font-size: 13px; font-weight: 700; color: #5d6b6b; margin: 2px 0 14px; }
.xm-m-btn { width: 100%; padding: 15px 14px; border: 0; border-radius: 14px; cursor: pointer; font: inherit; font-size: 16.5px; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #16a34a, #12863d); box-shadow: 0 10px 22px rgba(22, 163, 74, .4), inset 0 -3px 0 rgba(0, 0, 0, .15); animation: xmLatido 2.2s ease-in-out infinite; }
@keyframes xmLatido { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
.xm-m-48 { margin-top: 10px; font-size: 12px; font-weight: 700; color: #9e0c22; }

/* Israel, países árabes y Turquía: sin gorrito de Papá Noel (misma regla que el arbolito, OK de Agustín 02/12) */
body.dic-on.xm-sa .marca .sq::after { display: none; }
