/* =========================================================
   79FOOD – Trang trí Giáng sinh (noel.css)
   Chỉ có tác dụng khi body có class "noel" (bật bằng SHOP.noel trong data.js)
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@700&display=swap');

/* ---------- Tuyết rơi ---------- */
.noel-snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---------- Mũ Noel trên logo ---------- */
.noel .header .logo { position: relative; }
.noel-hat { position: absolute; left: 18px; top: -12px; width: 40px; transform: rotate(-14deg); pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }
.noel-hat svg { display: block; width: 100%; height: auto; }

/* ---------- Dây đèn dưới menu ---------- */
/* .header là sticky nên đã là khung định vị cho dây đèn */
.noel-garland { position: absolute; left: 0; right: 0; top: 100%; height: 18px; display: flex; justify-content: space-between; padding: 0 6px; overflow: hidden; pointer-events: none; z-index: 1; }
.noel-garland::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px;
  background: repeating-radial-gradient(circle at 50% -8px, transparent 0 15px, #2f6b3f 15px 16.5px, transparent 16.5px 40px);
  background-size: 40px 20px; opacity: .9; }
.noel-garland i { position: relative; flex: none; width: 8px; height: 12px; margin-top: 3px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--c);
  box-shadow: 0 0 6px var(--c), 0 0 12px var(--c); animation: noel-blink 1.6s ease-in-out infinite; animation-delay: var(--d); }
.noel-garland i::before { content: ""; position: absolute; left: 1.5px; top: -3px; width: 5px; height: 4px; border-radius: 1px; background: #3b4a3f; }
.noel-garland i:nth-child(2n) { margin-top: 5px; }
@keyframes noel-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; box-shadow: none; } }

/* ---------- Banner trang chủ ---------- */
.noel .slide-hero { position: relative; }
.noel-merry { display: block; font-family: 'Dancing Script', 'Brush Script MT', cursive; font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1; color: #ffe1cf; margin-bottom: 8px; text-shadow: 0 2px 10px rgba(23,80,122,.45); }
.noel-bells { position: absolute; top: 0; left: 46%; display: flex; gap: 4px; pointer-events: none; z-index: 1; }
.noel-bells .bell { display: block; width: 46px; transform-origin: 50% 0; animation: noel-swing 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 8px rgba(0,0,0,.25)); }
.noel-bells .bell.b2 { width: 38px; margin-top: 10px; animation-delay: -.8s; }
.noel-bells svg { display: block; width: 100%; height: auto; }
@keyframes noel-swing { 0%, 100% { transform: rotate(10deg); } 50% { transform: rotate(-10deg); } }

/* ---------- Cây thông góc trái ---------- */
.noel-tree { position: fixed; left: 14px; bottom: 10px; width: 92px; z-index: 70; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(23,80,122,.25)); }
.noel-tree svg { display: block; width: 100%; height: auto; }
.noel-tree .tw circle { animation: noel-blink 1.4s ease-in-out infinite; }
.noel-tree .tw circle:nth-child(2n) { animation-delay: .7s; }
.noel-tree .star { transform-origin: 60px 14px; animation: noel-star 2.2s ease-in-out infinite; }
@keyframes noel-star { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@media (max-width: 1100px) { .noel-tree { display: none; } }

/* ---------- Lời chào ---------- */
.noel-hi { position: fixed; left: 50%; bottom: 24px; z-index: 120; width: min(420px, calc(100vw - 32px)); display: flex; gap: 12px; align-items: flex-start;
  background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 40px 14px 14px; box-shadow: var(--shadow-lg); border-top: 4px solid #e23b3b;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.3,1.2), opacity .3s; }
.noel-hi.show { transform: translate(-50%, 0); opacity: 1; }
.noel-hi .ic { width: 44px; flex: none; animation: noel-swing 2.4s ease-in-out infinite; transform-origin: 50% 0; }
.noel-hi .ic svg { display: block; width: 100%; height: auto; }
.noel-hi b { display: block; font-size: 16px; color: var(--sea-900); }
.noel-hi span { display: block; font-size: 14px; color: var(--muted); margin: 2px 0 10px; }
.noel-hi .btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.noel-hi > button { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.noel-hi > button:hover { background: var(--sand); }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  .noel-hat { width: 30px; left: 12px; top: -9px; }
  .noel-bells { left: auto; right: 14px; }
  .noel-bells .bell { width: 34px; } .noel-bells .bell.b2 { width: 28px; }
  /* chừa cột nút Zalo/Gọi bên phải */
  .noel-hi { left: 16px; bottom: 20px; width: calc(100vw - 100px); transform: translateY(140%); padding-right: 34px; }
  .noel-hi.show { transform: translateY(0); }
  .noel-hi .ic { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .noel-garland i, .noel-bells .bell, .noel-tree *, .noel-hi .ic { animation: none !important; }
}
