/*
 * GicoPlay — FIESTAS 2026-2027 (Navidad 1-30 dic · Año Nuevo 31 dic-1 ene · Reyes 2-6 ene).
 * La banda va siempre en la fecha; el resto cuelga de `html.gp-fiestas`, que pone
 * js/fiestas.js (y quita el botón «Quitar adornos»). Sólo transform/opacity en lo que se mueve.
 */

/* ── Banda superior ── */
.gpf-banda {
    position: relative;
    z-index: 1001;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
    padding: 7px 14px;
    font-weight: 800;
    font-size: .92rem;
    letter-spacing: .02em;
    color: #FFF8EC;
    background: linear-gradient(90deg, #0B3B2A, #B3142B 35%, #B3142B 65%, #0B3B2A);
    border-bottom: 1px solid rgba(255, 200, 87, .45);
}
.gpf-banda.gpf-anionuevo { background: linear-gradient(90deg, #0b0b22, #3b2a6e 30%, #8a6a12 70%, #0b0b22); }
.gpf-banda.gpf-reyes { background: linear-gradient(90deg, #1b1340, #5a3d9a 50%, #1b1340); }
.gpf-banda small { font-weight: 600; opacity: .9; }
.gpf-reloj { font-variant-numeric: tabular-nums; color: #FFC857; letter-spacing: .04em; }
.gpf-banda button {
    font: inherit;
    font-size: .75rem;
    font-weight: 700;
    color: inherit;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    padding: 3px 10px;
    cursor: pointer;
}
.gpf-banda button:hover { background: rgba(255, 255, 255, .22); }
.gpf-banda button:focus-visible { outline: 2px solid #FFC857; outline-offset: 2px; }
@media (max-width: 600px) {
    .gpf-banda { font-size: .8rem; padding: 6px 10px; }
    .gpf-banda small { flex-basis: 100%; text-align: center; font-size: .74rem; }
}

/* ── Escena 3D de fondo: detrás de todo, no recibe clics ── */
.gpf-escena {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.gpf-escena.on { opacity: 1; }
.gpf-escena canvas { width: 100% !important; height: 100% !important; display: block; }
html[data-theme="light"] .gpf-escena.on { opacity: .6; }

/* ── Guirnalda bajo la cabecera ── */
.gp-fiestas .header { position: sticky; }
.gpf-guirnalda {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -16px;
    height: 30px;
    pointer-events: none;
    z-index: 2;
}
.gpf-guirnalda svg { width: 100%; height: 30px; display: block; }
.gpf-foco { animation: gpf-titila 1.6s ease-in-out infinite; }
@keyframes gpf-titila { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.gpf-reyes .gpf-guirnalda { opacity: .55; }
@media (max-width: 600px) { .gpf-guirnalda { height: 22px; bottom: -12px; } .gpf-guirnalda svg { height: 22px; } }

/* ── Gorro de Papá Noel en el logo ── */
.gpf-con-gorro { position: relative; }
.gpf-gorro {
    position: absolute;
    left: -10px;
    top: -16px;
    width: 34px;
    transform: rotate(-20deg);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45));
    pointer-events: none;
    z-index: 2;
    transition: transform .4s ease;
}
.gpf-con-gorro:hover .gpf-gorro { transform: rotate(-8deg) translateY(-2px); }
@media (max-width: 600px) { .gpf-gorro { width: 26px; left: -8px; top: -12px; } }

/* ── Tarjetas con nieve encima (sólo Navidad) ── */
.gpf-navidad #product-grid > .card { position: relative; overflow: visible; }
.gpf-navidad #product-grid > .card::before {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: -6px;
    height: 12px;
    border-radius: 12px 12px 8px 8px;
    background:
        radial-gradient(circle at 10% 100%, #fff 5px, transparent 6px),
        radial-gradient(circle at 32% 90%, #fff 7px, transparent 8px),
        radial-gradient(circle at 56% 100%, #fff 6px, transparent 7px),
        radial-gradient(circle at 80% 85%, #fff 8px, transparent 9px),
        radial-gradient(circle at 96% 100%, #fff 5px, transparent 6px),
        linear-gradient(#fff, #e6f6ff);
    opacity: .92;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .2));
    pointer-events: none;
    z-index: 3;
}
html[data-theme="light"].gpf-navidad #product-grid > .card::before { filter: drop-shadow(0 1px 2px rgba(10, 38, 48, .25)); }

/* ── Banner principal: nieve encima y lazo de regalo en la esquina ── */
.gpf-navidad .hero-carousel, .gpf-reyes .hero-carousel { position: relative; overflow: visible; }
.gpf-navidad .hero-carousel::before {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    top: -9px;
    height: 18px;
    border-radius: 16px 16px 10px 10px;
    background:
        radial-gradient(circle at 6% 100%, #fff 8px, transparent 9px),
        radial-gradient(circle at 22% 85%, #fff 11px, transparent 12px),
        radial-gradient(circle at 41% 100%, #fff 9px, transparent 10px),
        radial-gradient(circle at 63% 80%, #fff 12px, transparent 13px),
        radial-gradient(circle at 84% 100%, #fff 9px, transparent 10px),
        radial-gradient(circle at 97% 90%, #fff 8px, transparent 9px),
        linear-gradient(#fff, #e6f6ff);
    filter: drop-shadow(0 3px 3px rgba(0, 0, 0, .22));
    pointer-events: none;
    z-index: 3;
}
.gpf-navidad .hero-carousel::after, .gpf-reyes .hero-carousel::after {
    content: "";
    position: absolute;
    right: 22px;
    top: -18px;
    width: 64px;
    height: 46px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 46'%3E%3Cpath d='M32 22C22 4 4 6 8 18c3 8 16 6 24 4z' fill='%23E8263F'/%3E%3Cpath d='M32 22C42 4 60 6 56 18c-3 8-16 6-24 4z' fill='%23E8263F'/%3E%3Cpath d='M30 24 18 44l7-3 4 5 4-21zM34 24l12 20-7-3-4 5-4-21z' fill='%23B3142B'/%3E%3Ccircle cx='32' cy='22' r='6' fill='%23FF4D63'/%3E%3C/svg%3E");
    filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
    pointer-events: none;
    z-index: 4;
}
.gpf-reyes .hero-carousel::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-12 -12 24 24'%3E%3Cpath d='M0-11 3-3 11-3 4.5 2 7 10 0 5-7 10-4.5 2-11-3-3-3z' fill='%23FFC857' stroke='%23FFB000'/%3E%3C/svg%3E");
}
@media (max-width: 600px) {
    .gpf-navidad .hero-carousel::before { left: 10px; right: 10px; height: 12px; top: -6px; }
    .gpf-navidad .hero-carousel::after, .gpf-reyes .hero-carousel::after { width: 44px; height: 32px; top: -13px; right: 12px; }
}

/* ── Nieve CSS (respaldo sin 3D / equipos modestos) ── */
.gpf-nieve { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.gpf-nieve i {
    position: absolute;
    top: -10px;
    border-radius: 50%;
    background: #fff;
    animation: gpf-cae linear infinite;
    will-change: transform;
}
html[data-theme="light"] .gpf-nieve i { background: #8fd0e2; }
@keyframes gpf-cae { to { transform: translate3d(var(--dx), 110vh, 0); } }

/* ── Estallido al agregar al carrito ── */
.gpf-capa { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }
.gpf-emoji {
    position: fixed;
    font-size: 22px;
    transform: translate(-50%, -50%);
    animation: gpf-salta .95s cubic-bezier(.2, .8, .3, 1) forwards;
}
@keyframes gpf-salta {
    0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; }
    15% { opacity: 1; }
    60% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.2) rotate(var(--r)); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y) + 40px)) scale(1) rotate(var(--r)); opacity: 0; }
}

/* ── Gran final de Año Nuevo ── */
.gpf-final {
    position: fixed;
    inset: 0;
    z-index: 2900;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .6s ease;
    background: radial-gradient(ellipse at center, rgba(11, 11, 34, .55), transparent 70%);
}
.gpf-final.on { opacity: 1; }
.gpf-final h2 {
    margin: 0;
    padding: 0 16px;
    text-align: center;
    font-weight: 900;
    font-size: clamp(48px, 12vw, 140px);
    line-height: 1;
    letter-spacing: -.03em;
    background: linear-gradient(90deg, #FFC857, #fff 40%, #00F5FD 70%, #FF4D9D);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 30px rgba(255, 200, 87, .45));
    transform: scale(.6);
    transition: transform 1.2s cubic-bezier(.2, 1.4, .3, 1);
}
.gpf-final.on h2 { transform: scale(1); }

/* ── Reproductor abierto (GicoTV): nada de adornos encima ni detrás del vídeo ── */
.gpf-viendo .gpf-escena, .gpf-viendo .gpf-nieve, .gpf-viendo .gpf-guirnalda, .gpf-viendo .gpf-banda { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    .gpf-foco, .gpf-nieve i, .gpf-emoji { animation: none !important; }
    .gpf-nieve { display: none; }
}
