/* ==========================================================================
   WASSILA — SEASONAL CHRISTMAS & NEW YEAR THEME (Single Switch: body.xmas)
   Controlled by `const CHRISTMAS_ENABLED = true` in app.js.
   Scoped strictly to `body.xmas` so disabling CHRISTMAS_ENABLED removes all
   seasonal accents cleanly while keeping the core brand palette untouched.
   ========================================================================== */

body.xmas {
  --xmas-red: #C62828;
  --xmas-red-dark: #9E1F1F;
  --xmas-red-soft: #FDF2F2;
  --xmas-pine: #1B5E3A;
  --xmas-pine-soft: #EBF6EF;
  --xmas-gold: #E0B04A;
  --xmas-gold-dark: #8B5E10;
  --xmas-gold-soft: #FFF8E6;
  --xmas-snow: #FFFFFF;
}

/* 1. Lightweight Full-Screen Falling Snow Canvas
   Strictly below sticky header (z-index: 1000) & modals (z-index: 2000),
   pointer-events: none so it never intercepts clicks or causes scrollbars. */
body.xmas #xmas-snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 900;
  display: block;
}

/* 2. Refined Santa Hat on Logo (100% unclipped inside viewport, balanced above corner) */
body.xmas .navbar-shell {
  padding-top: 10px;
}

body.xmas .xmas-santa-hat {
  position: absolute;
  top: -11px;
  inset-inline-start: -8px;
  width: 34px;
  height: 27px;
  pointer-events: none;
  z-index: 6;
  transform: rotate(-16deg);
  filter: drop-shadow(0 3px 5px rgba(36, 25, 44, 0.2));
}

html[dir="rtl"] body.xmas .xmas-santa-hat {
  transform: scaleX(-1) rotate(-16deg);
}

@media (max-width: 767px) {
  body.xmas .navbar-shell {
    padding-top: 8px;
  }

  body.xmas .xmas-santa-hat {
    top: -10px;
    inset-inline-start: -7px;
    width: 30px;
    height: 24px;
  }
}

/* 3. Hero Top Garland & Ornaments SVG */
body.xmas .hero-section {
  padding-top: calc(var(--space-700) + 18px);
}

body.xmas .xmas-hero-garland {
  position: absolute;
  top: 0;
  inset-inline: 0;
  width: 100%;
  height: 54px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

body.xmas .xmas-hero-garland svg {
  width: 100%;
  min-width: 900px;
  max-width: 1600px;
  height: 54px;
  display: block;
}

@media (max-width: 767px) {
  body.xmas .hero-section {
    padding-top: calc(var(--space-500) + 22px);
  }

  body.xmas .xmas-hero-garland,
  body.xmas .xmas-hero-garland svg {
    height: 40px;
  }
}

/* 4. Festive Bilingual Hero Headline Banner */
body.xmas .xmas-hero-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-150);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), var(--xmas-gold-soft));
  border: 1px solid rgba(224, 176, 74, 0.55);
  box-shadow: 0 6px 18px rgba(198, 40, 40, 0.08);
  max-width: 100%;
  flex-wrap: wrap;
}

body.xmas .xmas-banner-ornament {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--xmas-red);
}

body.xmas .xmas-banner-copy {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
}

body.xmas .xmas-banner-primary {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--xmas-red);
  line-height: 1.3;
}

body.xmas .xmas-banner-sep {
  color: var(--xmas-gold-dark);
  font-size: 0.78rem;
  opacity: 0.75;
}

body.xmas .xmas-banner-secondary {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--xmas-pine);
  line-height: 1.3;
}

body.xmas .xmas-banner-mobile-studio {
  display: none;
}

@media (max-width: 768px) {
  body.xmas .hero-kicker {
    display: none;
  }

  body.xmas .xmas-hero-banner {
    display: flex;
    width: fit-content;
    max-width: 100%;
    flex-wrap: nowrap;
    border-radius: 14px;
    padding: 8px 12px;
    gap: 8px;
    margin-bottom: var(--space-150);
    text-align: start;
  }

  body.xmas .xmas-banner-copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  body.xmas .xmas-banner-sep,
  body.xmas .xmas-banner-secondary {
    display: none;
  }

  body.xmas .xmas-banner-mobile-studio {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--xmas-pine);
    line-height: 1.35;
  }
}

/* 5. Festive Accents on Section Dividers ONLY (Never Product Photos or Regular Product Discounts) */
body.xmas .section-block {
  position: relative;
}

body.xmas .section-block::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(27, 94, 58, 0.24) 22%,
    rgba(224, 176, 74, 0.45) 50%,
    rgba(198, 40, 40, 0.24) 78%,
    transparent 100%
  );
  pointer-events: none;
}

/* 6. Christmas Gift Offers Section */
body.xmas .xmas-offers-section {
  background: linear-gradient(180deg, #FFFBF8 0%, #FDF3F2 52%, #FFF9F3 100%);
}

body.xmas .xmas-offers-eyebrow {
  color: var(--xmas-red);
}

body.xmas .xmas-offers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-300);
  margin-top: var(--space-400);
}

@media (max-width: 767px) {
  body.xmas .xmas-offers-grid {
    grid-template-columns: 1fr;
    gap: var(--space-200);
  }
}

body.xmas .xmas-offer-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-200);
  padding: var(--space-300);
  border-radius: 20px;
  background-color: var(--xmas-snow);
  border: 1px solid rgba(198, 40, 40, 0.16);
  box-shadow: 0 12px 30px rgba(36, 25, 44, 0.06), 0 2px 8px rgba(198, 40, 40, 0.05);
  overflow: hidden;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

body.xmas .xmas-offer-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--xmas-red), var(--xmas-gold), var(--xmas-pine));
}

body.xmas .xmas-offer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(36, 25, 44, 0.09), 0 4px 12px rgba(198, 40, 40, 0.09);
  border-color: rgba(198, 40, 40, 0.3);
}

body.xmas .xmas-offer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-100);
  flex-wrap: wrap;
}

body.xmas .xmas-offer-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--xmas-red);
  color: var(--xmas-snow);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

body.xmas .xmas-offer-ribbon svg {
  width: 13px;
  height: 13px;
  color: var(--xmas-gold);
  flex-shrink: 0;
}

body.xmas .xmas-offer-expiry {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--xmas-pine);
  background-color: var(--xmas-pine-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

body.xmas .xmas-offer-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-100);
}

body.xmas .xmas-offer-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.4;
}

body.xmas .xmas-offer-includes {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-secondary);
  line-height: 1.65;
}

body.xmas .xmas-offer-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-150);
  padding-top: var(--space-150);
  border-top: 1px dashed rgba(198, 40, 40, 0.18);
}

body.xmas .xmas-offer-price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

body.xmas .xmas-offer-price {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--xmas-red);
}

body.xmas .xmas-offer-price.is-free {
  font-size: 1.02rem;
  color: var(--xmas-pine);
}

body.xmas .xmas-offer-old-price {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

body.xmas .xmas-offer-save-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--xmas-pine-soft);
  color: var(--xmas-pine);
  border: 1px solid rgba(27, 94, 58, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
}

body.xmas .xmas-offer-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

body.xmas .xmas-offer-price.is-tbd {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--xmas-gold-soft);
  border: 1px dashed var(--xmas-gold-dark);
  color: var(--xmas-gold-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

body.xmas .xmas-offer-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background-color: var(--whatsapp-green);
  color: var(--whatsapp-text);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--whatsapp-shadow);
  transition: transform 180ms var(--ease-out), background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

body.xmas .xmas-offer-wa-btn:hover {
  background-color: var(--whatsapp-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.32);
}

body.xmas .xmas-offer-wa-btn:focus-visible {
  outline: 2px solid var(--xmas-pine);
  outline-offset: 2px;
}

/* 7. Festive Footer Trim */
body.xmas .site-footer {
  position: relative;
  border-top: 4px solid transparent;
  background-image:
    linear-gradient(#211629, #211629),
    linear-gradient(90deg, var(--xmas-red) 0%, var(--xmas-gold) 35%, var(--xmas-pine) 68%, var(--xmas-red) 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

/* 8. Respect prefers-reduced-motion: stop snow & festive card motion */
@media (prefers-reduced-motion: reduce) {
  body.xmas #xmas-snow-canvas {
    display: none !important;
  }

  body.xmas .xmas-offer-card,
  body.xmas .xmas-offer-wa-btn {
    transition: none !important;
  }

  body.xmas .xmas-offer-card:hover,
  body.xmas .xmas-offer-wa-btn:hover {
    transform: none !important;
  }
}

/* ==========================================================================
   9. SNOW THAT SETTLES ON THE PAGE (cards, offers, footer)
   Drifts are tiled SVG backgrounds on pseudo-elements: no extra DOM, no JS,
   pointer-events: none, and removed with body.xmas.
   ========================================================================== */
body.xmas {
  --snow-cap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='30' viewBox='0 0 220 30'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23fff'/%3E%3Cstop offset='.7' stop-color='%23fff'/%3E%3Cstop offset='1' stop-color='%23E3ECFA'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath transform='translate%280%2C3%29' d='M0%2C0H220V12C214%2C13 208%2C13 202%2C17C195%2C22 186%2C22 180%2C15C172%2C8 164%2C10 158%2C16C150%2C24 138%2C24 132%2C16C125%2C9 117%2C10 110%2C14C102%2C19 94%2C26 84%2C20C77%2C15 70%2C9 62%2C13C54%2C18 48%2C24 38%2C19C30%2C14 24%2C9 16%2C13C10%2C16 5%2C16 0%2C12Z' fill='%239DB4E0' fill-opacity='.45'/%3E%3Cpath d='M0%2C0H220V12C214%2C13 208%2C13 202%2C17C195%2C22 186%2C22 180%2C15C172%2C8 164%2C10 158%2C16C150%2C24 138%2C24 132%2C16C125%2C9 117%2C10 110%2C14C102%2C19 94%2C26 84%2C20C77%2C15 70%2C9 62%2C13C54%2C18 48%2C24 38%2C19C30%2C14 24%2C9 16%2C13C10%2C16 5%2C16 0%2C12Z' fill='url%28%23g%29'/%3E%3C/svg%3E");
  --snow-pile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='30' viewBox='0 0 220 30'%3E%3Cpath d='M0%2C30V16C8%2C15 12%2C6 22%2C7C32%2C8 36%2C15 46%2C13C58%2C11 62%2C2 74%2C3C86%2C4 90%2C13 102%2C14C112%2C15 118%2C8 128%2C8C140%2C8 144%2C16 156%2C15C166%2C14 170%2C6 182%2C6C194%2C6 200%2C13 210%2C14C214%2C14 217%2C15 220%2C16V30Z' fill='%23fff'/%3E%3Cpath d='M0%2C30V22C20%2C20 40%2C24 70%2C21C100%2C18 130%2C24 160%2C21C190%2C19 205%2C22 220%2C22V30Z' fill='%23DCE7F8' fill-opacity='.8'/%3E%3C/svg%3E");
}

/* 9a. Snow resting on the top edge of every catalog product photo */
body.xmas .product-media-box::before,
body.xmas .product-media-box::after {
  content: '';
  position: absolute;
  top: -2px;
  inset-inline: 0;
  pointer-events: none;
  background-repeat: repeat-x;
  background-position: top left;
  transform-origin: top center;
}

/* back layer: wider, lower, a touch transparent => depth */
body.xmas .product-media-box::before {
  height: 30px;
  z-index: 3;
  background-image: var(--snow-cap);
  background-size: 260px 35px;
  background-position: -70px top;
  opacity: 0.85;
  filter: drop-shadow(0 2px 3px rgba(40, 55, 110, 0.28));
  animation: xmasSnowSettle 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* front layer: tighter lumps + a few sparkles catching the light */
body.xmas .product-media-box::after {
  height: 24px;
  z-index: 4;
  background-image: var(--snow-cap);
  background-size: 170px 23px;
  filter: drop-shadow(0 2px 2px rgba(40, 55, 110, 0.25));
  animation: xmasSnowSettle 1.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 9b. Offer cards: a snow blanket over the red/gold/green ribbon */
body.xmas .xmas-offer-card::after {
  content: '';
  position: absolute;
  top: 1px;
  inset-inline: 0;
  height: 26px;
  z-index: 2;
  pointer-events: none;
  background-image: var(--snow-cap);
  background-repeat: repeat-x;
  background-size: 190px 26px;
  filter: drop-shadow(0 2px 2px rgba(40, 55, 110, 0.22));
  transform-origin: top center;
  animation: xmasSnowSettle 1.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* 9c. A snowbank piled along the top of the footer */
body.xmas .site-footer::before {
  content: '';
  position: absolute;
  top: -32px;
  inset-inline: 0;
  height: 36px;
  z-index: 3;
  pointer-events: none;
  background-image: var(--snow-pile);
  background-repeat: repeat-x;
  background-size: 264px 36px;
  background-position: bottom left;
}

@keyframes xmasSnowSettle {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: scaleY(1); }
}

@media (max-width: 767px) {
  body.xmas .product-media-box::before { background-size: 220px 30px; }
  body.xmas .product-media-box::after  { background-size: 140px 19px; height: 20px; }
  body.xmas .site-footer::before { background-size: 176px 24px; top: -20px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  body.xmas .product-media-box::before,
  body.xmas .product-media-box::after,
  body.xmas .xmas-offer-card::after {
    animation: none !important;
  }
}
