/* MCWARS Christmas edition (2026-11). Only active with body.xmas (set by xmas.js): Christmas red + pine green instead
   of the pink accent, falling snow, the home banner with our lobby render, a snowy edge on the panels.
   To end the season: drop xmas.css + xmas.js from index.html (and store.js EVENT.theme = ""). */

body.xmas {
  --accent: #e3323f;
  --accent-hi: #ff5865;
  --accent-dark: #8a121e;
  --accent-text: #ff7d87;
  --accent-soft: #2a0a0f;
  --violet: #1fae5b;
  --pine: #1fae5b;
  --pine-dark: #0f6e38;
  --snow: #f4f8ff;
  --sale: #e3323f;
  background:
    radial-gradient(900px 420px at 18% -120px, rgba(227, 50, 63, .13), transparent 70%),
    radial-gradient(900px 420px at 82% -120px, rgba(31, 174, 91, .12), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.xmas .site, body.xmas .shop { position: relative; z-index: 1; }

/* snow */
.xmas-snow { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; }

/* the sort-button glow was pink */
body.xmas .sorts button:hover { text-shadow: 0 0 6px rgba(227, 50, 63, .9), 0 0 14px rgba(227, 50, 63, .5); }

/* green gift-wrap stripe under the top bar */
body.xmas .topbar { border-bottom-color: transparent; position: relative; }
body.xmas .topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--accent) 0 18px, var(--snow) 18px 24px, var(--pine) 24px 42px, var(--snow) 42px 48px);
  opacity: .55; border-radius: 2px;
}

/* ---------------------------------------------------------------- home banner */
.xmas-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  flex-wrap: wrap; margin: 0 0 26px; padding: 28px 30px; min-height: 200px;
  border: 2px solid #2b2228; border-radius: 18px; background: #0b0a0d;
}
.xh-photo { position: absolute; inset: 0; background: url("/xmas/home.jpg") center 55% / cover no-repeat; opacity: .55; }
.xmas-hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(8, 7, 10, .96) 0%, rgba(8, 7, 10, .78) 45%, rgba(8, 7, 10, .25) 100%);
}
.xmas-hero > :not(.xh-photo) { position: relative; z-index: 3; }
.xh-text { max-width: 600px; display: flex; flex-direction: column; gap: 10px; }
.xh-kicker {
  display: inline-flex; align-items: center; gap: 10px; color: var(--accent-text); letter-spacing: 3px; font-size: 15px;
}
.xh-kicker img { image-rendering: pixelated; }
.xh-text h2 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: .5px; color: var(--snow); text-shadow: 2px 2px 0 #000; }
.xh-text p { margin: 0; color: #ddd6dc; font-family: var(--font-ui); font-size: 16px; max-width: 520px; }
.xh-text p b { color: var(--snow); }
.xh-count {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 16px; margin-right: 150px;
  background: rgba(8, 7, 10, .82); border: 2px solid var(--pine); border-radius: 16px;
}
.xh-count > small { color: #cfe8d9; letter-spacing: 2px; font-size: 13px; }
.xh-count .cd { display: flex; gap: 8px; }
.xh-count .cd-box {
  display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 8px 6px 6px;
  background: #121015; border: 2px solid #2a2530; border-bottom-color: var(--accent); border-radius: 10px;
}
.xh-count .cd-box b { font-size: 26px; color: var(--snow); line-height: 1; }
.xh-count .cd-box small { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-top: 4px; }
.xh-count.merry b { font-size: 26px; color: var(--accent-text); }
.xh-count.merry small { color: #cfe8d9; }
.xh-gift { position: absolute !important; z-index: 3; image-rendering: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); pointer-events: none; }
.xh-gift.g1 { right: 22px; bottom: 14px; }
.xh-gift.g2 { right: 82px; bottom: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .xh-gift.g1 { animation: xgift 3.2s ease-in-out infinite; }
  .xh-gift.g2 { animation: xgift 3.2s ease-in-out -1.6s infinite; }
}
@keyframes xgift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }

@media (max-width: 760px) {
  .xmas-hero { padding: 22px 18px 72px; }
  .xh-text h2 { font-size: 26px; }
  .xh-count { margin-right: 0; }
  .xh-count .cd-box { min-width: 48px; }
  .xh-count .cd-box b { font-size: 22px; }
  .xh-gift.g1 { right: 14px; bottom: 10px; width: 50px; height: auto; }
  .xh-gift.g2 { right: 62px; bottom: 10px; width: 38px; height: auto; }
}

/* ---------------------------------------------------------------- store (store.js EVENT.theme = "christmas") */
.shop.theme-christmas .ev-photo { background-image: url("/xmas/store.jpg"); background-position: center 45%; opacity: .75; }
.shop.theme-christmas .event-banner { border-color: #2b2228; min-height: 210px; }
.shop.theme-christmas .ev-kicker { color: var(--accent-text); }
.shop.theme-christmas .ev-kicker img { width: 20px; height: 20px; image-rendering: pixelated; }
.shop.theme-christmas .ev-gifts { display: flex; align-items: flex-end; gap: 6px; margin-right: 6px; }
.shop.theme-christmas .ev-gifts img { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
@media (max-width: 760px) { .shop.theme-christmas .ev-gifts { display: none; } }
