/* ============================================================
   HOLIDAY LAYER  (snow · Christmas countdown · lights · Black Friday strip)
   ------------------------------------------------------------
   Loaded last on every page, together with js/holiday.js.

   Everything under "html.xmas" only shows while js/holiday.js says
   it is the season (1 Nov – 31 Dec); on 1 Jan it switches itself
   off with no edit needed. The Black Friday strip colours at the
   bottom are NOT date-driven — they stay until this file (or that
   block) is removed.

   To take the whole thing down: delete the holiday.css <link> and
   the holiday.js <script> from each page.
   ============================================================ */

/* ---------- falling snow (canvas drawn by holiday.js) ----------
   The snow is a BACKGROUND layer: it sits above the section backgrounds
   and hero photos (z-index 1) and below everything people read or tap.
   The content wrappers are lifted to z-index 2 to make that true.

   Its height is the LARGE viewport (lvh), which does not change when a
   phone's address bar slides in and out. Sizing it to 100% made the
   picture stretch and snap on every scroll. */
.xmas-snow {
  position: fixed;
  left: 0; top: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: translateZ(0);     /* own compositor layer: no repaint while scrolling */
  will-change: transform;
  backface-visibility: hidden;
}
.xmas-snow.on { opacity: 1; }
html.xmas .container, html.xmas .wrap, html.xmas .px-wrap,
html.xmas .px-tile, html.xmas .deal-strip, html.xmas .topbar,
html.xmas .xmas-bar { position: relative; z-index: 2; }

/* ---------- Christmas countdown bar (inserted above the header) ---------- */
.xmas-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 8px 14px 11px;
  background: linear-gradient(90deg, #6a0c18 0%, #a91729 50%, #6a0c18 100%);
  color: #fff;
  font-family: var(--fb, "Montserrat", Arial, sans-serif);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
/* candy-cane edge */
.xmas-bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(135deg, #fff 0 7px, #c8102e 7px 14px);
}
.xmas-bar .xb-label { white-space: nowrap; }
.xmas-bar .xb-clock { display: inline-flex; align-items: center; gap: 5px; }
.xmas-bar .xb-unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  min-width: 2.5em;
  justify-content: center;
  padding: 2px 6px 1px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(255, 255, 255, .16);
}
.xmas-bar .xb-unit b {
  font-family: var(--fd, "Staatliches", "Arial Narrow", sans-serif);
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: .03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.xmas-bar .xb-unit i { font-style: normal; font-size: .62rem; color: #ffd166; letter-spacing: .04em; }
.xmas-bar .xb-cta { color: #ffd166; white-space: nowrap; border-bottom: 1px solid rgba(255, 209, 102, .6); padding-bottom: 1px; }
a.xmas-bar:hover .xb-cta { color: #fff; border-color: #fff; }
.xmas-bar .xb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 640px) {
  .xmas-bar { font-size: .7rem; gap: 4px 10px; padding: 7px 10px 10px; }
  .xmas-bar .xb-cta { display: none; }
  .xmas-bar .xb-unit { min-width: 2.3em; padding: 2px 5px 1px; }
  .xmas-bar .xb-unit b { font-size: 1.15rem; }
}

/* ---------- string of lights hanging under the nav ---------- */
html.xmas .nav::before,
html.xmas .nav::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  height: 26px;
  z-index: -1;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 160px 26px;
}
/* wire + bulbs */
html.xmas .nav::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26'%3E%3Cpath d='M0 3 Q40 17 80 3 Q120 17 160 3' fill='none' stroke='%232d3745' stroke-width='1.6'/%3E%3Cg fill='%231b222b'%3E%3Crect x='18.5' y='8' width='3' height='3.5'/%3E%3Crect x='58.5' y='8' width='3' height='3.5'/%3E%3Crect x='98.5' y='8' width='3' height='3.5'/%3E%3Crect x='138.5' y='8' width='3' height='3.5'/%3E%3C/g%3E%3Cellipse cx='20' cy='16.5' rx='3.8' ry='5.4' fill='%23ff4040'/%3E%3Cellipse cx='60' cy='16.5' rx='3.8' ry='5.4' fill='%23ffc93c'/%3E%3Cellipse cx='100' cy='16.5' rx='3.8' ry='5.4' fill='%2333e07a'/%3E%3Cellipse cx='140' cy='16.5' rx='3.8' ry='5.4' fill='%233d9fff'/%3E%3C/svg%3E");
}
/* soft glow behind the bulbs, pulsing */
html.xmas .nav::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='26'%3E%3Ccircle cx='20' cy='16.5' r='8' fill='%23ff4040'/%3E%3Ccircle cx='60' cy='16.5' r='8' fill='%23ffc93c'/%3E%3Ccircle cx='100' cy='16.5' r='8' fill='%2333e07a'/%3E%3Ccircle cx='140' cy='16.5' r='8' fill='%233d9fff'/%3E%3C/svg%3E");
  filter: blur(5px);
  opacity: .75;
  animation: xmas-twinkle 2.4s ease-in-out infinite alternate;
}
@keyframes xmas-twinkle {
  from { opacity: .25; }
  to   { opacity: .95; }
}

/* ---------- snow resting along the top edge of the footer ---------- */
html.xmas .footer::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 22px;
  pointer-events: none;
  background-repeat: repeat-x;
  background-size: 240px 22px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='22' preserveAspectRatio='none'%3E%3Cpath d='M0 0h240v9c-14 9-27 9-40 2s-22-5-34 3-27 8-40 0-24-7-36 1-26 9-40 1-30-9-50 0V0z' fill='%23eef4fb'/%3E%3C/svg%3E");
  opacity: .95;
}

@media (prefers-reduced-motion: reduce) {
  html.xmas .nav::before { animation: none; opacity: .6; }
}

/* ============================================================
   BLACK FRIDAY STRIP — black with gold type (not date-driven)
   ============================================================ */
body .deal-strip.deal-strip { background: #000; color: #f5a417; border-bottom: 1px solid rgba(245, 164, 23, .35); }
body .deal-strip.deal-strip strong { color: #fff; }
body .deal-strip.deal-strip.is-ticker::before { background: linear-gradient(90deg, #000, rgba(0, 0, 0, 0)); }
body .deal-strip.deal-strip.is-ticker::after  { background: linear-gradient(270deg, #000, rgba(0, 0, 0, 0)); }
