/* ==========================================================================
   Bessie & Best 優雅美學 — 節慶主題風格擴充樣式 (themes.css)
   Quiet Luxury Brand Guardrail: 歐洲溫馨聖誕市集・手作木飾與璀璨暖金散景
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. 萬聖節主題 (Halloween: Autumn Amber & Midnight Noir)
   美學概念：深秋微醺・大人感復古南瓜琥珀與午夜焙黑
   排程檔期：10/20 ~ 11/01
   -------------------------------------------------------------------------- */
:root[data-theme="halloween"] {
  --brand: #b35422;        /* 沉靜復古南瓜琥珀橘 */
  --brand-dark: #8c3b12;   /* 焦糖深焙琥珀 */
  --accent: #d49344;       /* 燭光暖金 */
  --ink: #261f1d;          /* 午夜焙黑咖啡 */
  --muted: #73625e;        /* 暖調煙燻灰褐 */
  --bg: #eae2d5;           /* 復古羊皮紙米 */
  --bg-soft: #f2ece0;      /* 溫潤烤杏米 */
  --line: #d8cdbd;         /* 羊皮紙細邊線 */
  --shadow: 0 4px 20px rgba(38, 31, 29, 0.16);
}

:root[data-theme="halloween"] body {
  background-color: var(--bg);
  background-image: url('/assets/halloween-pattern.svg');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: 260px 260px;
}

:root[data-theme="halloween"] .site-header {
  border-bottom: 1px solid rgba(212, 147, 68, 0.35);
  background: rgba(234, 226, 213, 0.94);
}

:root[data-theme="halloween"] .hero {
  background: linear-gradient(135deg, #8c3b12 0%, #4a2110 50%, #261f1d 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

:root[data-theme="halloween"] .btn--primary {
  background: var(--brand);
  border-color: rgba(212, 147, 68, 0.45);
  box-shadow: 0 0 16px rgba(179, 84, 34, 0.38);
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
}

:root[data-theme="halloween"] .btn--primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 0 24px rgba(212, 147, 68, 0.6);
}

:root[data-theme="halloween"] .card {
  background: rgba(253, 250, 246, 0.94);
  border-color: rgba(212, 147, 68, 0.25);
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   2. 聖誕與跨年主題 (Christmas & New Year: European Market & Golden Bokeh)
   美學概念：歐洲溫暖聖誕市集・手作松木雕飾、璀璨暖金散景、熱紅酒漿果紅
   排程檔期：12/08 ~ 01/03
   參考影像：docs/fotolia_132621240_subscription_monthly_m-1-1200x800.jpg
   -------------------------------------------------------------------------- */
:root[data-theme="christmas"] {
  --brand: #a8382b;        /* 暖冬熱紅酒市集漿果紅 */
  --brand-dark: #782218;   /* 深醇肉桂暖紅 */
  --accent: #e5a93c;       /* 璀璨散景金芒 (Golden Bokeh) */
  --ink: #321e17;          /* 深木質暖黑焙可可 (Warm Cedar Espresso) */
  --muted: #7d6356;        /* 肉桂暖木灰 */
  --bg: #f7f3ec;           /* 溫潤天然亞麻米白 */
  --bg-soft: #fcf9f2;      /* 柔亮羊毛白 */
  --line: #e3d5c3;         /* 溫暖木紋細邊線 */
  --shadow: 0 4px 24px rgba(85, 40, 20, 0.16);
}

/* 全站背景：手作松木樹、天然松果、肉桂棒與暖金散景暗紋浮水印 */
:root[data-theme="christmas"] body {
  background-color: var(--bg);
  background-image: url('/assets/christmas-pattern.svg');
  background-repeat: repeat;
  background-attachment: fixed;
  background-size: 260px 260px;
}

/* 導覽列：暖金香檳緞帶邊框 */
:root[data-theme="christmas"] .site-header {
  background: rgba(247, 243, 236, 0.95);
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg, transparent 0%, #e5a93c 20%, #fde7b3 50%, #e5a93c 80%, transparent 100%) 1;
}

:root[data-theme="christmas"] .brand::after {
  content: " 🎄";
  font-size: 1.1rem;
  vertical-align: middle;
  margin-left: 2px;
}

/* Hero 主視覺：融合歐洲聖誕市集暖金光斑實景 */
:root[data-theme="christmas"] .hero {
  position: relative;
  overflow: hidden;
  background-color: #2b1410;
  background-image: 
    linear-gradient(90deg, rgba(38, 20, 16, 0.88) 0%, rgba(55, 26, 20, 0.78) 45%, rgba(35, 18, 14, 0.32) 75%, rgba(0, 0, 0, 0.10) 100%),
    url('/assets/christmas-market-hero.jpg');
  background-repeat: no-repeat;
  background-position: center center, right 0% center;
  background-size: cover, cover;
  color: #fff;
  min-height: 480px;
}

:root[data-theme="christmas"] .hero h1 {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.95);
}

:root[data-theme="christmas"] .hero p {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.95);
}

@media (max-width: 768px) {

  :root[data-theme="christmas"] .hero {
    background-image: 
      linear-gradient(180deg, rgba(18, 10, 8, 0.38) 0%, rgba(28, 14, 10, 0.52) 48%, rgba(15, 8, 6, 0.75) 100%),
      url('/assets/christmas-market-mobile.jpg');
    background-position: center top;
    background-size: cover;
    min-height: 520px;
    padding: 4.5rem 0 3.5rem;
  }

  :root[data-theme="christmas"] .hero .container {
    position: relative;
    z-index: 5;
  }

  :root[data-theme="christmas"] .hero h1 {
    font-size: 1.85rem;
    line-height: 1.35;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.95), 0 1px 4px #000;
  }

  :root[data-theme="christmas"] .hero p {
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 1px 3px #000;
    font-weight: 500;
  }

  :root[data-theme="christmas"] .festive-eyebrow {
    backdrop-filter: blur(8px);
    background: rgba(35, 18, 14, 0.78);
    border: 1px solid rgba(229, 169, 60, 0.85);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  }

  :root[data-theme="christmas"] .hero .btn--ghost {
    background: rgba(25, 12, 10, 0.55);
    backdrop-filter: blur(6px);
    border-color: rgba(255, 255, 255, 0.85);
  }
}

:root[data-theme="christmas"] .btn--primary {
  background: var(--brand);
  border: 1px solid rgba(229, 169, 60, 0.75);
  box-shadow: 0 0 18px rgba(229, 169, 60, 0.45);
  color: #fff;
  transition: transform .15s ease, background .15s ease, box-shadow .2s ease;
}

:root[data-theme="christmas"] .btn--primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 0 26px rgba(229, 169, 60, 0.75);
}

:root[data-theme="christmas"] .card {
  position: relative;
  background: rgba(255, 253, 248, 0.96);
  border-color: rgba(229, 169, 60, 0.35);
  backdrop-filter: blur(4px);
}

/* --------------------------------------------------------------------------
   3. 節慶橫額小標 (Festive Eyebrow Tag)
   -------------------------------------------------------------------------- */
.festive-eyebrow {
  display: none;
}

:root[data-theme="halloween"] .festive-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: #f7eed8;
  background: rgba(179, 84, 34, 0.35);
  border: 1px solid rgba(212, 147, 68, 0.6);
  padding: .35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(8px);
}
:root[data-theme="halloween"] .festive-eyebrow .eyebrow-halloween { display: inline; }
:root[data-theme="halloween"] .festive-eyebrow .eyebrow-christmas { display: none; }

:root[data-theme="christmas"] .festive-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: #fffaf0;
  background: rgba(45, 22, 18, 0.82);
  border: 1px solid rgba(229, 169, 60, 0.85);
  padding: .35rem 1.1rem;
  border-radius: 999px;
  margin-bottom: 1.2rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 18px rgba(229, 169, 60, 0.45);
}
:root[data-theme="christmas"] .festive-eyebrow .eyebrow-halloween { display: none; }
:root[data-theme="christmas"] .festive-eyebrow .eyebrow-christmas { display: inline; }

/* --------------------------------------------------------------------------
   4. 暖金散景光斑微浮動動效 (Golden Bokeh Light Motes)
   -------------------------------------------------------------------------- */
#bb-snowfall {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.bb-flake {
  position: absolute;
  top: -20px;
  background: radial-gradient(circle, rgba(255, 252, 240, 0.98) 0%, rgba(253, 212, 128, 0.85) 45%, rgba(229, 169, 60, 0.3) 75%, transparent 100%);
  border-radius: 50%;
  opacity: 0.88;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.65));
  animation-name: bb-snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* 16 顆暖金光斑粒子的位置、大小、速度與橫向飄移微差 */
.bb-flake:nth-child(1)  { left: 5%;  width: 7px;  height: 7px;  animation-duration: 14s; animation-delay: 0s; }
.bb-flake:nth-child(2)  { left: 12%; width: 5px;  height: 5px;  animation-duration: 18s; animation-delay: 2.5s; opacity: 0.75; }
.bb-flake:nth-child(3)  { left: 19%; width: 9px;  height: 9px;  animation-duration: 15s; animation-delay: 5s; }
.bb-flake:nth-child(4)  { left: 26%; width: 4px;  height: 4px;  animation-duration: 21s; animation-delay: 1s; opacity: 0.65; }
.bb-flake:nth-child(5)  { left: 33%; width: 8px;  height: 8px;  animation-duration: 16s; animation-delay: 7s; }
.bb-flake:nth-child(6)  { left: 40%; width: 5px;  height: 5px;  animation-duration: 19s; animation-delay: 3s; opacity: 0.7; }
.bb-flake:nth-child(7)  { left: 47%; width: 11px; height: 11px; animation-duration: 14s; animation-delay: 8s; opacity: 0.95; }
.bb-flake:nth-child(8)  { left: 54%; width: 4px;  height: 4px;  animation-duration: 22s; animation-delay: 4s; opacity: 0.65; }
.bb-flake:nth-child(9)  { left: 61%; width: 7px;  height: 7px;  animation-duration: 17s; animation-delay: 9s; }
.bb-flake:nth-child(10) { left: 68%; width: 6px;  height: 6px;  animation-duration: 18s; animation-delay: 1.5s; opacity: 0.7; }
.bb-flake:nth-child(11) { left: 75%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: 6s; }
.bb-flake:nth-child(12) { left: 82%; width: 5px;  height: 5px;  animation-duration: 20s; animation-delay: 3.5s; opacity: 0.75; }
.bb-flake:nth-child(13) { left: 89%; width: 8px;  height: 8px;  animation-duration: 16s; animation-delay: 7.5s; }
.bb-flake:nth-child(14) { left: 94%; width: 4px;  height: 4px;  animation-duration: 23s; animation-delay: 2s; opacity: 0.6; }
.bb-flake:nth-child(15) { left: 3%;  width: 9px;  height: 9px;  animation-duration: 16s; animation-delay: 10s; }
.bb-flake:nth-child(16) { left: 97%; width: 6px;  height: 6px;  animation-duration: 19s; animation-delay: 5.5s; opacity: 0.8; }

@keyframes bb-snow-fall {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(16px, 50vh, 0);
  }
  100% {
    transform: translate3d(-14px, 105vh, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  #bb-snowfall {
    display: none !important;
  }
}
