/*
 * Tema navideño. Solo se carga en temporada (ver christmas_theme_active()
 * en includes/functions.php) y nunca en el panel. Quitarlo no afecta nada:
 * el diseño normal no depende de este archivo.
 * Rojo navidad para lo principal, dorado para detalles; el rosa de la marca se queda.
 * Todas las animaciones se apagan con "reducir movimiento".
 */

.theme-navidad {
    --season-red: #a8163a;
    --season-red-dark: #8a1130;
    --season-gold: #c9a24a;
    --season-gold-text: #8a6a1f; /* Dorado oscuro: legible sobre fondos claros y con texto blanco. */
    --season-candy: repeating-linear-gradient(135deg, #a8163a 0 8px, #fff 8px 16px);
}

/* ---------- Franja y luces ---------- */

.season-banner {
    padding: 8px 16px;
    background: var(--season-red);
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-align: center;
}

/* Foquitos: dos capas que parpadean por turnos. */
.season-lights {
    position: relative;
    height: 22px;
    background: linear-gradient(#5a1a2b, #5a1a2b) center 2px / 100% 2px no-repeat, #fff;
    overflow: hidden;
}

.season-lights::before,
.season-lights::after {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: repeat-x;
    background-size: 80px 22px;
}

.season-lights::before {
    background-image:
        radial-gradient(circle at 10px 11px, #e03a5a 0 5px, transparent 6px),
        radial-gradient(circle at 50px 11px, #e6c15a 0 5px, transparent 6px);
    animation: season-twinkle 1.6s ease-in-out infinite;
}

.season-lights::after {
    background-image:
        radial-gradient(circle at 30px 11px, #ff9ec4 0 5px, transparent 6px),
        radial-gradient(circle at 70px 11px, #8fd4a6 0 5px, transparent 6px);
    animation: season-twinkle 1.6s ease-in-out -.8s infinite;
}

@keyframes season-twinkle {
    0%, 100% { opacity: 1; }
    50%      { opacity: .25; }
}

.brand-season {
    font-size: .9em;
}

/* ---------- Nieve en todo el sitio ---------- */

/* Debajo del encabezado (50) y del carrito (998+); no estorba clics. */
.snow-page {
    position: fixed;
    inset: 0;
    z-index: 40;
    overflow: hidden;
    pointer-events: none;
}

.snow-page span {
    position: absolute;
    top: -24px;
    color: #f4b6cf;
    font-size: 14px;
    line-height: 1;
    animation: season-snow linear infinite;
}

.snow-page span:nth-child(1)  { left: 4%;  animation-duration: 14s; }
.snow-page span:nth-child(2)  { left: 12%; animation-duration: 18s; animation-delay: -6s;  font-size: 10px; }
.snow-page span:nth-child(3)  { left: 21%; animation-duration: 15s; animation-delay: -11s; }
.snow-page span:nth-child(4)  { left: 30%; animation-duration: 20s; animation-delay: -3s;  font-size: 11px; }
.snow-page span:nth-child(5)  { left: 39%; animation-duration: 16s; animation-delay: -9s; }
.snow-page span:nth-child(6)  { left: 48%; animation-duration: 19s; animation-delay: -14s; font-size: 10px; }
.snow-page span:nth-child(7)  { left: 57%; animation-duration: 14.5s; animation-delay: -5s; }
.snow-page span:nth-child(8)  { left: 66%; animation-duration: 17s; animation-delay: -12s; font-size: 12px; }
.snow-page span:nth-child(9)  { left: 74%; animation-duration: 21s; animation-delay: -8s; }
.snow-page span:nth-child(10) { left: 82%; animation-duration: 15.5s; animation-delay: -2s; font-size: 10px; }
.snow-page span:nth-child(11) { left: 90%; animation-duration: 18.5s; animation-delay: -10s; }
.snow-page span:nth-child(12) { left: 96%; animation-duration: 16.5s; animation-delay: -7s; font-size: 11px; }

@keyframes season-snow {
    to {
        transform: translate(24px, 108vh) rotate(200deg);
    }
}

/* ---------- Portada ---------- */

.hero-navidad {
    position: relative;
    overflow: hidden;
    background: #ffe9f2;
    border-bottom: 3px solid var(--season-gold);
}

.hero-navidad .eyebrow {
    color: var(--season-red);
}

/* ---------- Botones ---------- */

.theme-navidad .button:not(.button-soft):not(.button-whatsapp) {
    background: var(--season-red);
    box-shadow: 0 5px 14px rgba(168, 22, 58, .2);
}

.theme-navidad .button:not(.button-soft):not(.button-whatsapp):hover {
    background: var(--season-red-dark);
}

.theme-navidad .cart-open-button {
    border-color: #d9a0b0;
    background: #fff3f5;
    color: var(--season-red);
}

.theme-navidad .cart-open-button .cart-count {
    background: var(--season-red);
}

/* ---------- Tarjetas de producto ---------- */

/* Franja de bastón de caramelo arriba de cada foto (la tarjeta recorta las esquinas). */
.theme-navidad .product-image::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 1;
    height: 5px;
    background: var(--season-candy);
}

.theme-navidad .product-card:hover,
.theme-navidad .product-card:focus-within {
    border-color: var(--season-gold);
    box-shadow: 0 14px 32px rgba(168, 22, 58, .14);
}

.theme-navidad .product-card .price-row strong,
.theme-navidad .product-card-hint {
    color: var(--season-red);
}

.theme-navidad .sale-badge {
    z-index: 2;
    background: var(--season-red);
    box-shadow: 0 4px 10px rgba(168, 22, 58, .25);
}

.theme-navidad .gift-badge {
    background: var(--season-gold-text);
    box-shadow: 0 4px 10px rgba(138, 106, 31, .25);
    animation: season-wiggle 4s ease-in-out 1s infinite;
}

@keyframes season-wiggle {
    0%, 88%, 100% { transform: rotate(0); }
    91%           { transform: rotate(-6deg); }
    94%           { transform: rotate(5deg); }
    97%           { transform: rotate(-3deg); }
}

.theme-navidad #ideas-regalo .eyebrow {
    color: var(--season-gold-text);
}

.theme-navidad .page-intro .eyebrow {
    color: var(--season-red);
}

/* ---------- Carrito ---------- */

.theme-navidad .girly-cart-head {
    position: relative;
    padding-top: 30px;
    border-bottom: 3px solid var(--season-gold);
}

.theme-navidad .girly-cart-head::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: var(--season-candy);
}

.theme-navidad .girly-cart-eyebrow,
.theme-navidad .girly-cart-continue {
    color: var(--season-red);
}

.theme-navidad .girly-cart-item-price,
.theme-navidad .girly-cart-total strong {
    color: var(--season-red);
}

.theme-navidad .girly-cart-footer {
    border-top: 2px dashed var(--season-gold);
}

.theme-navidad .girly-cart-toast {
    border-color: var(--season-gold);
    color: var(--season-red);
}

/* ---------- Pie de página ---------- */

.theme-navidad .footer {
    border-top: 3px solid var(--season-gold);
}

.season-footer {
    color: var(--season-red);
    font-weight: 600;
}

/* ---------- Lluvia de regalos (cart.js: celebrate()) ---------- */

.season-confetti {
    position: fixed;
    inset: 0;
    z-index: 1300;
    overflow: hidden;
    pointer-events: none;
}

.season-confetti span {
    position: absolute;
    top: -48px;
    left: var(--x, 50%);
    font-size: var(--size, 22px);
    line-height: 1;
    animation: season-confetti var(--dur, 2.6s) ease-in var(--delay, 0s) forwards;
}

@keyframes season-confetti {
    to {
        transform: translate(30px, 112vh) rotate(360deg);
        opacity: .85;
    }
}

/* ---------- Reducir movimiento ---------- */

@media (prefers-reduced-motion: reduce) {
    .season-lights::before,
    .season-lights::after,
    .theme-navidad .gift-badge {
        animation: none;
    }

    /* Copos quietos repartidos como decoración. */
    .snow-page span {
        animation: none;
    }

    .snow-page span:nth-child(odd)  { top: 22%; }
    .snow-page span:nth-child(even) { top: 68%; }
}
