/* =========================================================
   SOLAR STUDIOS — Welcome sale bar + Christmas theme
   Theme turns on via SOLAR.christmas.enabled in config.js
   ========================================================= */
:root {
    --xmas-red: #e2263b;
    --xmas-red-deep: #b5122a;
    --xmas-green: #1fa463;
    --xmas-green-hi: #34d399;
    --xmas-gold: #ffcf5a;
}

/* ---------- Welcome sale bar ---------- */
.sale-bar {
    position: relative; z-index: 51;
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px;
    min-height: 46px; padding: 7px 16px;
    background:
        radial-gradient(1px 1px at 8% 30%, rgba(255,255,255,.7), transparent 60%),
        radial-gradient(1px 1px at 22% 70%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1.5px 1.5px at 63% 25%, rgba(255,255,255,.6), transparent 60%),
        radial-gradient(1px 1px at 81% 65%, rgba(255,255,255,.5), transparent 60%),
        radial-gradient(1px 1px at 94% 35%, rgba(255,255,255,.6), transparent 60%),
        #0b0a10;
    border-bottom: 1px solid var(--line);
    font-size: 14px; font-weight: 700; color: var(--text);
}
.sale-pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
    background: var(--xmas-green); color: #eafff4; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
    box-shadow: 0 0 18px rgba(31,164,99,.45);
}
.sale-text b { color: var(--xmas-red); font-weight: 800; }
.sale-code {
    display: inline-flex; align-items: center; gap: 10px; padding: 3px 3px 3px 12px; border-radius: 10px;
    border: 1.5px solid var(--xmas-red); box-shadow: 0 0 16px rgba(226,38,59,.3);
}
.sale-code .mono { letter-spacing: .1em; font-weight: 500; }
.sale-copy {
    display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 11px; border-radius: 7px; border: 0;
    background: var(--xmas-red); color: #fff; font-weight: 700; font-size: 13px; transition: background .2s, transform .2s;
}
.sale-copy:hover { background: #ff3b51; }
.sale-copy:active { transform: scale(.95); }
.sale-sep { width: 1px; height: 18px; background: var(--line-hi); }
.sale-xmas { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- Header festive touches ---------- */
.xmas .nav.scrolled { box-shadow: 0 10px 30px -20px rgba(226,38,59,.5); }
.brand-mark { position: relative; display: inline-block; line-height: 0; }
.santa-hat {
    position: absolute; top: -11px; left: 9px; width: 24px; height: 18px; pointer-events: none;
    transform: rotate(18deg);
}
.santa-hat::before { /* hat body */
    content: ""; position: absolute; left: 2px; bottom: 3px; width: 20px; height: 14px;
    background: linear-gradient(160deg, #ff4a5d, var(--xmas-red-deep));
    clip-path: polygon(0 100%, 100% 100%, 70% 0);
}
.santa-hat::after { /* fur trim + bobble */
    content: ""; position: absolute; left: 0; bottom: 0; width: 24px; height: 5px; border-radius: 4px; background: #fff;
    box-shadow: 13px -14px 0 -1px #fff;
}
.brand:hover .santa-hat { animation: hat-bob .6s var(--ease); }
.nav .brand .brand-mark, .nav .brand .santa-hat { display: inline-block; } /* survive the mobile "hide brand text" rule */
.nav .brand .santa-hat { position: absolute; }

/* String of lights under the header */
.xmas-lights {
    position: absolute; left: 0; right: 0; bottom: -10px; height: 14px; display: flex; justify-content: space-between;
    padding: 0 12px; pointer-events: none; overflow: hidden;
}
.xmas-lights::before {
    content: ""; position: absolute; left: 0; right: 0; top: 1px; height: 6px;
    border-top: 1px solid rgba(255,255,255,.15); border-radius: 50%;
}
.xmas-lights i {
    position: relative; width: 6px; height: 9px; margin-top: 3px; border-radius: 50% 50% 45% 45%;
    --c: var(--xmas-red);
    background: var(--c); box-shadow: 0 2px 10px 1px var(--c);
    animation: twinkle 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s);
}
.xmas-lights i:nth-child(4n+2) { --c: var(--xmas-green-hi); }
.xmas-lights i:nth-child(4n+3) { --c: var(--xmas-gold); }
.xmas-lights i:nth-child(4n+4) { --c: var(--acc-hi); }
.xmas-lights i:nth-child(n+21) { display: none; }
@media (min-width: 900px) { .xmas-lights i:nth-child(n+21) { display: block; } }

.badge[hidden] { display: none; }

/* ---------- Snow ---------- */
.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* Background glow gets a red/green holiday tint */
.xmas .bg-glow {
    background:
        radial-gradient(40% 50% at 50% 0%, rgba(var(--acc-rgb), .2), transparent 70%),
        radial-gradient(28% 36% at 12% 8%, rgba(226,38,59,.14), transparent 70%),
        radial-gradient(28% 36% at 88% 10%, rgba(31,164,99,.12), transparent 70%);
}

/* Hero eyebrow + banner frame */
.xmas .eyebrow .live-dot { background: var(--xmas-red); box-shadow: 0 0 10px var(--xmas-red); }
.xmas .hero-banner { box-shadow: 0 0 0 1px rgba(226,38,59,.25), 0 30px 80px -30px rgba(226,38,59,.45); border-radius: 22px; }

/* Snow cap on cards + section buttons */
.xmas .pkg-card::before {
    content: ""; position: absolute; z-index: 3; left: -1px; right: -1px; top: -1px; height: 12px; pointer-events: none;
    background:
        radial-gradient(9px 7px at 10% 0, #fff 98%, transparent) ,
        radial-gradient(12px 9px at 30% 0, #fff 98%, transparent),
        radial-gradient(8px 6px at 52% 0, #fff 98%, transparent),
        radial-gradient(13px 9px at 74% 0, #fff 98%, transparent),
        radial-gradient(9px 7px at 93% 0, #fff 98%, transparent),
        linear-gradient(#fff, #fff) top / 100% 3px no-repeat;
    opacity: .9; border-radius: inherit;
}
.xmas .tag-sale { background: var(--xmas-red); box-shadow: 0 0 16px rgba(226,38,59,.7); }
.xmas .pill-xmas { color: #eafff4; background: rgba(31,164,99,.18); border-color: rgba(52,211,153,.35); }

/* Promo card: candy-cane edge */
.xmas-promo { position: relative; }
.xmas-promo::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; border-radius: 22px 22px 0 0;
    background: repeating-linear-gradient(-45deg, var(--xmas-red) 0 12px, #fff 12px 24px);
    opacity: .85;
}
.xmas-kicker {
    display: inline-flex; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: #eafff4; background: var(--xmas-green);
}
.btn-row.left { justify-content: flex-start; }

/* Product / cart */
.xmas-hint { color: var(--text); }
.xmas-hint b { color: var(--xmas-red); }
.center-price { justify-content: center; }
.welcome-apply {
    width: 100%; padding: 11px 14px; border-radius: 12px; text-align: left; font-size: 14px;
    background: rgba(31,164,99,.12); border: 1px dashed rgba(52,211,153,.5); color: var(--text);
    transition: background .2s, border-color .2s;
}
.welcome-apply:hover { background: rgba(31,164,99,.2); border-color: var(--xmas-green-hi); }
.welcome-apply b { font-family: var(--mono); color: var(--xmas-green-hi); }
.sub-line { display: flex; justify-content: space-between; font-size: 14px; }
.coupon button { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; border: 0; background: none; color: inherit; padding: 0; }
.coupon button:hover { background: rgba(255,255,255,.1); }
#cartBox.busy { opacity: .55; pointer-events: none; transition: opacity .2s; }

/* Loading skeletons */
.pkg-card.skel { min-height: 280px; background: linear-gradient(100deg, var(--surface) 30%, var(--raised) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: skel 1.4s linear infinite; }
.pkg-card.skel::before { display: none; }

/* Footer snowdrift + Tebex note */
.footer-snow {
    position: absolute; left: 0; right: 0; top: -14px; height: 16px; pointer-events: none;
    background:
        radial-gradient(30px 14px at 5% 100%, #e9ecf5 98%, transparent),
        radial-gradient(44px 16px at 20% 100%, #e9ecf5 98%, transparent),
        radial-gradient(36px 12px at 38% 100%, #e9ecf5 98%, transparent),
        radial-gradient(50px 16px at 57% 100%, #e9ecf5 98%, transparent),
        radial-gradient(34px 13px at 76% 100%, #e9ecf5 98%, transparent),
        radial-gradient(46px 16px at 94% 100%, #e9ecf5 98%, transparent);
    opacity: .12;
}
.tebex-note { margin-top: -14px; }
.tebex-note a { text-decoration: underline; text-underline-offset: 2px; }

@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: none; } }
@keyframes hat-bob { 50% { transform: rotate(4deg) translateY(-2px); } }
@keyframes skel { to { background-position: -300% 0; } }

@media (max-width: 640px) {
    .sale-bar { font-size: 12.5px; gap: 8px; }
    .sale-pill, .sale-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .xmas-lights i, .pkg-card.skel { animation: none; }
}
