/* Giao diện Giáng sinh. Chỉ được tải khi theme bật; mọi rule nằm trong .theme-christmas. */
@font-face {
  font-family: 'Playfair Display';
  src: url('playfair-vietnamese.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('playfair-latin.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

.theme-christmas {
  --xmas-night: #0f3226;
  --xmas-pine: #1c5640;
  --xmas-burgundy: #7d1a2b;
  --xmas-gold: #e3c98f;
  --xmas-gold-deep: #b08a45;
  --xmas-cream: #fbf6ea;
  --xmas-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --bs-success: #1c5640;
  --bs-success-rgb: 28, 86, 64;
  --bb-link-color: #1c5640;
  --bdl-success-soft: rgba(28, 86, 64, .08);
  --bdl-border: rgba(176, 138, 69, .28);

  background: var(--xmas-night);
}
/* isolation giữ các lớp trang trí z-index:-1 nằm trên nền kem nhưng dưới toàn bộ nội dung */
.theme-christmas body {
  isolation: isolate;
  min-height: 100vh;
  padding-bottom: 0;
  background: var(--xmas-cream);
}
.theme-christmas .btn-success {
  --bs-btn-bg: #1c5640;
  --bs-btn-border-color: #1c5640;
  --bs-btn-hover-bg: #123f2e;
  --bs-btn-hover-border-color: #123f2e;
  --bs-btn-active-bg: #123f2e;
  --bs-btn-active-border-color: #123f2e;
  --bs-btn-disabled-bg: #1c5640;
  --bs-btn-disabled-border-color: #1c5640;
}
.theme-christmas .btn-outline-success {
  --bs-btn-color: #1c5640;
  --bs-btn-border-color: #1c5640;
  --bs-btn-hover-bg: #1c5640;
  --bs-btn-hover-border-color: #1c5640;
  --bs-btn-active-bg: #1c5640;
  --bs-btn-active-border-color: #1c5640;
}
.theme-christmas .bdl-more-btn.btn-success {
  --bs-btn-bg: #7d1a2b;
  --bs-btn-border-color: #7d1a2b;
  --bs-btn-hover-bg: #611220;
  --bs-btn-hover-border-color: #611220;
  --bs-btn-active-bg: #611220;
  --bs-btn-active-border-color: #611220;
}

/* ── Màn hình chờ ── */
.theme-christmas #loading-overlay { background-color: var(--xmas-night); }
.theme-christmas .loading-icon { color: var(--xmas-gold); }

/* ── Header ── */
.theme-christmas .bdl-header {
  background: var(--xmas-night);
  border-bottom-color: rgba(227, 201, 143, .35);
  backdrop-filter: none;
}
.theme-christmas .bdl-logo {
  color: var(--xmas-cream);
  font-family: var(--xmas-serif);
  font-weight: 700;
  letter-spacing: .04em;
}
.theme-christmas .bdl-logo::before,
.theme-christmas .bdl-logo::after,
.theme-christmas .bdl-section-title::before {
  content: '';
  display: inline-block;
  width: .72em;
  height: .72em;
  background: var(--xmas-gold);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}
.theme-christmas .bdl-logo::before { margin-right: .5em; }
.theme-christmas .bdl-logo::after { margin-left: .5em; }
/* Khi có thêm nút "Bánh đã xem", bỏ ngôi sao và thu chữ để tên tiệm vẫn nằm một dòng */
@media (max-width: 480px) {
  .theme-christmas .js-viewed-history-link:not(.d-none) ~ .bdl-logo { font-size: clamp(.78rem, calc((100vw - 208px) / 11.6), 1rem); }
  .theme-christmas .js-viewed-history-link:not(.d-none) ~ .bdl-logo::before,
  .theme-christmas .js-viewed-history-link:not(.d-none) ~ .bdl-logo::after { display: none; }
}
.theme-christmas .bdl-header .bdl-icon-btn {
  border-color: rgba(227, 201, 143, .4);
  background: rgba(255, 255, 255, .07);
  color: var(--xmas-gold);
  box-shadow: none;
}

/* ── Khung cảnh đầu trang + dây lá thông ── */
.theme-christmas .xmas-scene {
  position: relative;
  z-index: -1;
  height: 0;
}
.theme-christmas .xmas-scene::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath fill='%23fbf6ea' d='M0 26C120 2 230 4 360 20S620 40 800 12V41H0Z'/%3E%3C/svg%3E") bottom / 100% 24px no-repeat,
    var(--xmas-night);
}
.theme-christmas .xmas-scene.is-home::before { height: 190px; }
.theme-christmas .xmas-garland {
  position: relative;
  z-index: -1;
  height: 78px;
  background: url('garland.webp') center top / 400px auto repeat-x;
}
.theme-christmas .xmas-garland::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80px 30px, rgba(255, 224, 150, .75), transparent 13px),
    radial-gradient(circle at 175px 42px, rgba(255, 224, 150, .75), transparent 13px),
    radial-gradient(circle at 272px 38px, rgba(255, 224, 150, .75), transparent 13px),
    radial-gradient(circle at 370px 20px, rgba(255, 224, 150, .75), transparent 13px);
  background-position: center top;
  background-size: 400px 78px;
  animation: xmasTwinkle 2.6s ease-in-out infinite alternate;
}
@keyframes xmasTwinkle {
  from { opacity: .1; }
  to { opacity: 1; }
}

/* ── Bộ sưu tập trang chủ ── */
.theme-christmas .xmas-collection {
  position: relative;
  margin: 0 -.5rem .5rem;
  padding: .9rem .75rem 3.6rem;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 40' preserveAspectRatio='none'%3E%3Cpath fill='%23fbf6ea' d='M0 26C120 2 230 4 360 20S620 40 800 12V41H0Z'/%3E%3C/svg%3E") bottom / 100% 34px no-repeat,
    radial-gradient(90% 42% at 50% 48%, #1d5641, transparent),
    var(--xmas-night);
}
.theme-christmas .xmas-collection-head {
  margin-bottom: 1rem;
  text-align: center;
}
.theme-christmas .xmas-eyebrow {
  color: var(--xmas-gold);
  font-size: .8rem;
  font-weight: 600;
}
.theme-christmas .xmas-collection-title {
  margin: .1rem 0 .3rem;
  color: var(--xmas-cream);
  font-family: var(--xmas-serif);
  font-size: clamp(1.9rem, 8.4vw, 2.9rem);
  font-weight: 700;
  line-height: 1.2;
}
.theme-christmas .xmas-collection-desc {
  margin: 0 auto;
  max-width: 34ch;
  color: rgba(251, 246, 234, .82);
  font-size: .95rem;
  line-height: 1.5;
}
.theme-christmas .xmas-showcase {
  display: flex;
  gap: .6rem;
  margin-inline: -.75rem;
  padding-inline: .75rem;
  overflow-x: auto;
  scroll-padding-inline: .75rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.theme-christmas .xmas-showcase::-webkit-scrollbar { display: none; }
.theme-christmas .xmas-showcase .bdl-album-item {
  flex: 0 0 72%;
  border: 2px solid rgba(227, 201, 143, .65);
  border-radius: 18px;
  background: var(--xmas-pine);
  scroll-snap-align: start;
}
.theme-christmas .xmas-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: 1rem;
}
.theme-christmas .xmas-topic {
  padding: .55rem .9rem;
  border: 1px solid rgba(227, 201, 143, .5);
  border-radius: 999px;
  color: var(--xmas-cream);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.2;
}
.theme-christmas .xmas-cta {
  display: inline-block;
  margin-top: 1rem;
  padding: .85rem 1.3rem;
  border-radius: 14px;
  background: var(--xmas-gold);
  color: #33210a;
  font-weight: 700;
}
@media (hover: hover) {
  .theme-christmas .xmas-topic:hover { background: rgba(227, 201, 143, .18); }
  .theme-christmas .xmas-cta:hover { background: #f0dbab; }
}
@media (min-width: 768px) {
  .theme-christmas .xmas-garland,
  .theme-christmas .xmas-garland::after { background-position: left top; }
  .theme-christmas .xmas-showcase {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow: visible;
  }
  .theme-christmas .xmas-showcase .bdl-album-item:first-child { grid-area: span 2 / span 2; }
}

/* ── Tiêu đề section ── */
.theme-christmas .bdl-section-title {
  color: var(--xmas-burgundy);
  font-family: var(--xmas-serif);
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: lining-nums;
}
.theme-christmas .bdl-section-title::before {
  margin-right: .4em;
  background: var(--xmas-gold-deep);
}

/* ── Footer ── */
.theme-christmas .bdl-footer {
  position: relative;
  margin: 130px -.5rem -1rem;
  padding: 1rem 1.25rem 4rem !important;
  border: 0;
  border-radius: 0;
  background: var(--xmas-night);
  box-shadow: none;
}
.theme-christmas .bdl-footer::before {
  content: '';
  position: absolute;
  inset: auto 0 calc(100% - 1px);
  height: 120px;
  background: url('trees.svg') center bottom / 800px 120px repeat-x;
  pointer-events: none;
}
.theme-christmas .bdl-footer-title {
  color: var(--xmas-gold);
  font-family: var(--xmas-serif);
}
.theme-christmas .bdl-footer .contact-line,
.theme-christmas .bdl-footer .contact-line a { color: var(--xmas-cream) !important; }
.theme-christmas .bdl-footer .contact-line i { color: var(--xmas-gold); }

/* ── Tuyết rơi ── */
.theme-christmas .xmas-snow {
  position: fixed;
  inset: 0;
  z-index: 1031;
  overflow: hidden;
  pointer-events: none;
}
.theme-christmas .xmas-flake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #dbe8ea;
  animation: xmasFall linear infinite;
}
.theme-christmas .xmas-flake.is-crystal {
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23cfe0e4' stroke-width='1.7' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M12 1v22M9 3.5l3 3 3-3M9 20.5l3-3 3 3'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60 12 12)'/%3E%3Cuse href='%23a' transform='rotate(120 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
}
.theme-christmas .xmas-snow.is-paused .xmas-flake { animation-play-state: paused; }
@keyframes xmasFall {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  6% { opacity: var(--o); }
  25% { transform: translate3d(var(--x), 25vh, 0); }
  50% { transform: translate3d(0, 50vh, 0); opacity: var(--o); }
  75% { transform: translate3d(calc(var(--x) * -1), 75vh, 0); opacity: 0; }
  100% { transform: translate3d(0, 100vh, 0); opacity: 0; }
}

/* ── Cành thông hai bên lề trên màn hình rộng ── */
@media (min-width: 1200px) {
  .theme-christmas::before,
  .theme-christmas::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: calc((100vw - 800px) / 2);
    height: 450px;
    background: url('branch.webp') left top / 380px auto no-repeat;
    pointer-events: none;
  }
  .theme-christmas::after {
    right: 0;
    left: auto;
    transform: scaleX(-1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .theme-christmas .xmas-snow { display: none; }
  .theme-christmas .xmas-garland::after { animation: none; }
}
