/* 홈 화면 시즌 테마: 크리스마스 (shop/themes.py). 홈 본문을 감싼 .th-christmas 안에서 동작한다.
   어릴 적 크리스마스처럼 포근한 느낌을 낸다. 배치와 크기는 기본 홈 그대로이고, 대표 배너는 건드리지 않는다
   (배너는 운영자가 올리는 사진이 들어가는 자리다).
   - 바탕: 홈 화면 전체(머리 부분 포함)를 옅은 겨울 하늘색으로. 흰 눈이 잘 보이는 색이다
     (2026-10-14: 크림색으로 바꿔 봤다가 유저가 "바탕은 전의 색으로" 라고 해서 처음의 하늘색으로 되돌렸다)
   - 눈: 화면 전체에 깊이감 있게 내리고, 헤더 아래 줄과 배너, 라이브 순번 칸, 푸터 윗변에 얇게 쌓인다
     (static/js/themes/christmas.js 가 화면 위에 덮은 판에 그린다)
   - 머리 부분: 바탕색을 홈과 맞추고, 메뉴 줄 아래 변에 눈이 얇게 얹힌다. 메뉴 줄 양 끝에는 그 눈 위에 선
     트리와 눈사람. 눈송이는 머리 부분 앞으로도 내린다
   - 메뉴 아래에 화면 끝에서 끝까지 걸린 전나무 가랜드 (빨간 리본, 열매, 금빛 방울)
   - 구역 제목 옆에는 그림을 두지 않는다 (트리와 눈사람, 진저브레드 장면은 2026-12-01 유저가 별로라고 해서 뺐다)
   - 구역 제목은 둥근 글꼴(주아), 라이브 순번 칸 모서리에 산타 모자
   - 푸터 바로 위는 밤하늘(templates/shop/themes/christmas_night.html): 반짝이는 점이 금빛 선 하나로 큰 트리를 그려 나가고,
     지나간 자리에 작은 별, 하트, 점이 흩날린 뒤 꼭대기 별이 톡 나온다. 푸터도 같은 밤색이 된다
   그림은 static/img/themes/christmas/ 의 평평한 SVG 이고, 번지는 빛은 쓰지 않는다 */
@font-face {
  font-family: 'Jua';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('../../fonts/Jua-Regular.woff2') format('woff2');
}
/* 색은 body 에 둔다. 본문 밖에 있는 머리 부분도 같은 색을 쓰기 때문이다. 바탕색을 바꾸려면 --xm-bg 한 곳만 고치면 된다 */
body:has(.th-christmas) { --xm-green: #2A7F58; --xm-red: #D8394A; --xm-bg: #F1F6FC; --xm-soft: #E6EEF8; --xm-line: #D6E1EE;
  background: var(--xm-bg); }
.th-christmas { display: flow-root; }   /* flow-root: 첫 구역의 위 여백이 밖으로 빠져나가지 않게 (가랜드가 메뉴 바로 아래에 걸리도록) */

/* ── 머리 부분 ──
   로그인 줄, 로고 줄, 메뉴 줄, 검색창 덮개의 흰 바탕을 홈 바탕색으로 맞춘다. 메뉴 아래의 선은 지우고 그 자리에 눈이 얹힌다 (눈은 스크립트가 그린다) */
body:has(.th-christmas) .util, body:has(.th-christmas) .stick, body:has(.th-christmas) .search-layer { background: var(--xm-bg); }
body:has(.th-christmas) .gnb { position: relative; border-bottom-color: transparent; }
/* 메뉴 줄 양 끝, 눈 위에 서 있는 작은 장면: 왼쪽은 트리 두 그루와 선물, 오른쪽은 선물과 눈사람과 트리. 메뉴가 가운데에 모이는 넓은 화면에서만 보인다 */
@media (min-width: 1100px) {
  body:has(.th-christmas) .gnb::before, body:has(.th-christmas) .gnb::after { content: ''; position: absolute; bottom: 0; width: 122px; height: 64px; background: left bottom / contain no-repeat; pointer-events: none; }
  body:has(.th-christmas) .gnb::before { left: max(28px, calc(50% - 612px)); background-image: url('../../img/themes/christmas/head-left.svg'); }
  body:has(.th-christmas) .gnb::after { right: max(28px, calc(50% - 612px)); background-image: url('../../img/themes/christmas/head-right.svg'); background-position: right bottom; }
}

/* 눈을 그리는 판 두 장 (스크립트가 body 끝에 만든다).
   아래 판(.xm-snow): 본문에 쌓인 눈. 머리 부분보다 아래라서, 스크롤하면 쌓인 눈이 머리 부분 뒤로 들어간다
   위 판(.is-front): 내리는 눈송이와 머리 부분에 얹힌 눈. 머리 부분보다 위, 오른쪽 바로가기와 팝업보다는 아래 */
.xm-snow { position: fixed; inset: 0; z-index: 6; width: 100%; height: 100%; pointer-events: none; }
.xm-snow.is-front { z-index: 36; }

/* ── 가랜드: 메뉴 바로 아래, 화면 왼쪽 끝에서 오른쪽 끝까지 ──
   감싼 상자가 위치 기준이 아니어서 left/right 0 이 화면 전체 너비가 된다. 세로 위치는 원래 자리(본문 맨 위) 그대로다.
   2026-11-25 유저: 줄 전구가 밋밋해서, 전구가 아니어도 되니 따뜻한 크리스마스 느낌으로 → 전나무 가랜드로 바꿈
   (늘어진 초록 잎 줄, 걸린 자리마다 빨간 리본, 사이사이 빨간 열매와 금빛 방울. 방울은 번지지 않고 짙은 금색으로 천천히 바뀐다).
   예전 줄 전구 그림(lights.svg)은 남겨 두었다. 그림을 바꾸면 주소 끝의 v 값을 올린다 (브라우저에 남은 예전 그림이 나오지 않게) */
.th-christmas::before { content: ''; position: absolute; left: 0; right: 0; height: 54px; background: url('../../img/themes/christmas/garland.svg?v=1') center 0 / 675px 54px repeat-x; pointer-events: none; }
.th-christmas .hero { margin-top: 62px; }

/* ── 구역 제목: 둥근 글꼴 ── */
.th-christmas .sec-title, .th-christmas .board-head h2, .th-christmas .qbox-head, .th-christmas .strip-title { font-family: 'Jua', 'Pretendard', sans-serif; font-weight: 400; letter-spacing: 0; }
.th-christmas .sec-title { font-size: 31px; }
.th-christmas .board-head h2 { font-size: 23px; }
.th-christmas .qbox-head { font-size: 19px; }
.th-christmas .sec-eyebrow { color: var(--xm-green); }
.th-christmas .sec ~ .sec .sec-eyebrow { color: var(--xm-red); }

/* ── 라이브 순번 칸: 오른쪽 위 모서리에 걸친 산타 모자 ── */
.th-christmas .qbox { position: relative; }
.th-christmas .qbox::after { content: ''; position: absolute; right: -16px; top: -30px; width: 66px; height: 51px; background: url('../../img/themes/christmas/hat.svg') center / contain no-repeat; transform: rotate(16deg); z-index: 7; }
.th-christmas .qbox-cur { background: var(--xm-soft); }
.th-christmas .qbox-foot { border-top-color: var(--xm-line); }

/* ── 이벤트 띠: 흰 바탕에 지팡이 사탕 ── */
.th-christmas .strip { background: #fff; }
.th-christmas .strip-date { margin-left: auto; color: var(--xm-red); }
.th-christmas .strip::after { content: ''; flex: none; width: 34px; height: 36px; margin-left: -6px; background: url('../../img/themes/christmas/cane.svg') center / contain no-repeat; transform: rotate(12deg); }

/* 하늘색 바탕에 맞춘 게시판 선 */
.th-christmas .board li a { border-bottom-color: var(--xm-line); }

/* ── 푸터 위 밤하늘: 큰 트리가 금빛 선으로 그려진다 (모양은 night.css, 움직임은 night.js 공통. 여기서는 색만 정한다) ──
   (2026-10-14: 처음에는 작은 트리, 눈사람, 선물이 늘어선 풍경이었는데 유저가 "여럿보다 큰 트리 하나로, 감성 있게" 라고 해서 바꿨다) */
body:has(.th-christmas) { --tn-bg: #151B2D; --tn-msg: #E9BD73; }


@media (max-width: 1000px) {
  .th-christmas .qbox::after { right: -6px; }
}
@media (max-width: 640px) {
  .th-christmas::before { height: 38px; background-size: 475px 38px; }
  .th-christmas .hero { margin-top: 46px; }
  .th-christmas .sec-title { font-size: 25px; }
  .th-christmas .qbox::after { right: -4px; top: -24px; width: 54px; height: 42px; }
  .th-christmas .strip::after { display: none; }
}
