/* r8 (2026-11-24): + 13b Santa-hat MM head on the logo, 7b chat badge. */
/* nxxmas r2 (2026-11-23, Rich: "a 3, I want a 7-8": site snow, header snow cap + garland + logo hat, lit cards at rest,
 *   candy-cane titles, pine dividers, footer tree line, candy-cane buttons). r1 (2026-11-23) - Christmas dressing. Loaded only while the module switch is on (see nxxmas.php).
 * Colours: theme tokens (--nx-*) with fallbacks; festive red is the theme's sale-flag red. Selectors carry `body` +
 * the theme's own classes so they beat the theme's (0,2,0)-(0,3,1) card rules (memory: css-id-specificity-trap).
 * Sections: 1 tokens, 2 hero snow canvas, 3 exhale page change, 4 fairy lights, 5 bauble, 6 wreath spinner,
 *           7 Santa hat, 8 Elite star, 9 wrapped category images, 10 tap puff, 11 reduced motion. */

/* 1. tokens */
:root {
  --nxx-green: var(--nx-catpill-neon, #9BE15D);
  --nxx-amber: var(--nx-amber, #F5B800);
  --nxx-red: var(--nx-flag-sale, #e0525c);
  --nxx-deep: var(--nx-brand-deep, #4E7D2E);
  --nxx-snow: #EAF4EA;
  /* snow cap tile (sits on top of an edge) and snow fringe tile (hangs from an edge), 120px wide, ends meet */
  --nxx-cap: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V8C12 2 26 1 40 6C52 10 64 2 80 3C94 4 106 10 120 8V14Z' fill='%23F4FAF4'/%3E%3C/svg%3E");
  --nxx-fringe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 9' preserveAspectRatio='none'%3E%3Cpath d='M0 0H120V4C112 7 104 5 96 8C88 9 82 5 74 6C64 8 58 4 48 6C40 9 32 5 24 7C16 9 8 5 0 4Z' fill='%23F4FAF4' fill-opacity='.92'/%3E%3C/svg%3E");
}

/* 2. hero snow: canvas added by JS inside section.nx-hero, above nxhero's WebGL smoke (z 2), under nothing clickable */
.nx-hero .nxx-snow { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; }

/* 3. exhale page change (cross-document View Transitions; browsers without it ignore the at-rule) */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root) { animation: nxx-exhale-out .42s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: nxx-exhale-in .5s cubic-bezier(0, 0, .2, 1) both; }
@keyframes nxx-exhale-out { to { opacity: 0; filter: blur(8px); transform: translateY(-12px) scale(1.02); } }
@keyframes nxx-exhale-in { from { opacity: 0; filter: blur(8px); transform: translateY(8px) scale(.99); } }

/* 4. fairy lights: bulb string (JS adds .nxx-bulbs) + green/amber/red glow cycle on hover/focus */
.nxx-bulbs {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6; height: 24px; padding: 0 8px;
  display: flex; justify-content: space-between; pointer-events: none;
  background: var(--nxx-fringe) top left / 120px 9px repeat-x;
}
.nxx-bulbs::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 1px; height: 8px;
  border-bottom: 1.5px solid rgba(242, 242, 242, .28); border-radius: 0 0 50% 50%;
}
.nxx-bulbs i {
  position: relative; width: 7px; height: 10px; margin-top: 8px; border-radius: 50% 50% 45% 45%;
  background: var(--c); box-shadow: 0 0 7px var(--c); animation: nxx-tw 2.8s ease-in-out infinite alternate;
}
.nxx-bulbs i:nth-child(odd) { animation-duration: 2.1s; }
.nxx-bulbs i:nth-child(3n+1) { --c: var(--nxx-green); }
.nxx-bulbs i:nth-child(3n+2) { --c: var(--nxx-amber); }
.nxx-bulbs i:nth-child(3n) { --c: var(--nxx-red); }
.nxx-lit:hover .nxx-bulbs i, .nxx-lit:focus-within .nxx-bulbs i {
  opacity: 1; box-shadow: 0 0 10px var(--c), 0 0 3px #fff; animation: nxx-chase 1s ease-in-out infinite;
}
@keyframes nxx-tw { from { opacity: 1; } to { opacity: .45; box-shadow: 0 0 2px var(--c); } }
.nxx-bulbs i:nth-child(2) { animation-delay: .1s; } .nxx-bulbs i:nth-child(3) { animation-delay: .2s; }
.nxx-bulbs i:nth-child(4) { animation-delay: .3s; } .nxx-bulbs i:nth-child(5) { animation-delay: .4s; }
.nxx-bulbs i:nth-child(6) { animation-delay: .5s; } .nxx-bulbs i:nth-child(7) { animation-delay: .6s; }
.nxx-bulbs i:nth-child(8) { animation-delay: .7s; } .nxx-bulbs i:nth-child(9) { animation-delay: .8s; }
@keyframes nxx-chase { 50% { opacity: .3; box-shadow: none; } }

body .product-miniature.nx-card--mm420.nxx-lit:hover,
body .product-miniature.nx-card--mm420.nxx-lit:focus-within { animation: nxx-glow-box 3.6s ease-in-out infinite; }
body .nx-rev .nx-rev__card.nxx-lit:hover { animation: nxx-glow-box 3.6s ease-in-out infinite; }
@keyframes nxx-glow-box {
  0%, 100% { box-shadow: 0 18px 40px rgba(0, 0, 0, .75), 0 0 22px rgba(155, 225, 93, .5); border-color: var(--nxx-green); }
  33% { box-shadow: 0 18px 40px rgba(0, 0, 0, .75), 0 0 22px rgba(245, 184, 0, .45); border-color: var(--nxx-amber); }
  66% { box-shadow: 0 18px 40px rgba(0, 0, 0, .75), 0 0 22px rgba(224, 82, 92, .45); border-color: var(--nxx-red); }
}
/* category images glow through filter (theme §15b), so cycle the drop-shadow colour */
body .elementor-widget-category-grid.nx-catpills a.nx-catpill:hover .nx-catpill__img { animation: nxx-glow-img 3.6s ease-in-out infinite; }
@keyframes nxx-glow-img {
  0%, 100% { filter: drop-shadow(0 0 3px var(--nxx-green)) drop-shadow(0 0 12px rgba(155, 225, 93, .55)); }
  33% { filter: drop-shadow(0 0 3px var(--nxx-amber)) drop-shadow(0 0 12px rgba(245, 184, 0, .5)); }
  66% { filter: drop-shadow(0 0 3px var(--nxx-red)) drop-shadow(0 0 12px rgba(224, 82, 92, .5)); }
}

/* 5. bauble add-to-cart (element lives on <body>: theme panels with backdrop-filter trap fixed children) */
.nxx-bauble {
  position: fixed; left: 0; top: 0; z-index: 100000; width: 22px; height: 22px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), transparent 32%), var(--nxx-red);
  box-shadow: 0 0 12px rgba(224, 82, 92, .65);
}
.nxx-bauble::before { content: ""; position: absolute; left: 7px; top: -5px; width: 8px; height: 5px; border-radius: 2px; background: var(--nxx-amber); }
.nxx-bump { animation: nxx-bump .5s ease; }
@keyframes nxx-bump { 30% { transform: scale(1.18) rotate(-6deg); } 60% { transform: scale(.95) rotate(3deg); } }

/* 6. wreath spinner: replaces the theme's ring on .nx-btn.is-loading (custom.css §buttons) */
body .nx-btn.is-loading::after {
  width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 9%, var(--nxx-red) 0 2.6px, transparent 3px),
    repeating-conic-gradient(var(--nxx-green) 0 18deg, var(--nxx-deep) 18deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 0 5.5px, #000 6px); mask: radial-gradient(circle, transparent 0 5.5px, #000 6px);
  animation: nx-spin 1.6s linear infinite;
}

/* 7. Santa hat on the mm420 card line-art head (.nx-card__headmark, 12cqw x 16cqw) */
body .product-miniature.nx-card--mm420 .nx-card__headmark::after {
  content: ""; position: absolute; left: 4%; top: -30%; width: 92%; height: 62%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cpath d='M10 52 C 22 20, 52 2, 80 12 C 88 15, 92 26, 90 40 C 82 30, 72 28, 66 30 C 60 36, 56 44, 54 52 Z' fill='%23e0525c'/%3E%3Crect x='4' y='48' width='62' height='14' rx='7' fill='%23EAF4EA'/%3E%3Ccircle cx='90' cy='44' r='8' fill='%23EAF4EA'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-10deg); filter: drop-shadow(0 0 4px rgba(224, 82, 92, .45));
}

/* 8. Elite star: a twinkling gold topper */
body .nx-elite-star { text-shadow: 0 0 6px var(--nxx-amber), 0 0 14px rgba(245, 184, 0, .5); animation: nxx-twinkle 2.4s ease-in-out infinite; display: inline-block; }
@keyframes nxx-twinkle { 50% { opacity: .55; transform: scale(.85) rotate(18deg); } }

/* 9. wrapped category images: a ribbon cross + bow that slides away when the image scrolls in (desktop only) */
body .elementor-widget-category-grid.nx-catpills a.nx-catpill.nxx-wrap { position: relative; }
.nxx-ribbon { position: absolute; inset: 0 0 auto 0; aspect-ratio: 4 / 3; z-index: 4; pointer-events: none; }
.nxx-ribbon::before, .nxx-ribbon::after {
  content: ""; position: absolute; background: var(--nxx-red); box-shadow: 0 0 8px rgba(224, 82, 92, .5);
  transition: transform .7s cubic-bezier(.6, 0, .3, 1), opacity .7s ease;
}
.nxx-ribbon::before { left: 0; right: 0; top: 50%; height: 9px; margin-top: -4.5px; }
.nxx-ribbon::after { top: 0; bottom: 0; left: 50%; width: 9px; margin-left: -4.5px; }
.nxx-ribbon b {
  position: absolute; left: 50%; top: 50%; width: 26px; height: 14px; margin: -7px 0 0 -13px;
  background: radial-gradient(ellipse at 25% 50%, var(--nxx-red) 0 45%, transparent 47%), radial-gradient(ellipse at 75% 50%, var(--nxx-red) 0 45%, transparent 47%);
  transition: transform .5s ease, opacity .5s ease;
}
.nxx-wrap.nxx-open .nxx-ribbon::before { transform: translateX(105%); opacity: 0; }
.nxx-wrap.nxx-open .nxx-ribbon::after { transform: translateY(-105%); opacity: 0; }
.nxx-wrap.nxx-open .nxx-ribbon b { transform: scale(0) rotate(90deg); opacity: 0; }
@media (max-width: 767px) { .nxx-ribbon { display: none; } }

/* 10. puff where you tapped, shown on the next page (JS) */
.nxx-puff {
  position: fixed; z-index: 100000; width: 140px; height: 140px; margin: -70px 0 0 -70px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(204, 214, 199, .38), transparent 65%); filter: blur(6px);
  animation: nxx-puff 1.3s ease-out forwards;
}
@keyframes nxx-puff { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-80px) scale(2.3); } }

/* 12. site snow: one fixed canvas over every page (JS), never clickable */
.nxx-sitesnow { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; pointer-events: none; }

/* 13. header: snow cap on the CE glass bar, fairy-light garland under it (SVG by JS), end baubles, logo hat */
.nxx-pill { position: relative; }
.nxx-pill::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: -8px; height: 13px; z-index: 3; pointer-events: none;
  background: var(--nxx-cap) bottom left / 120px 13px repeat-x; filter: drop-shadow(0 -1px 3px rgba(234, 244, 234, .35));
}
.nxx-garland { position: absolute; left: 10px; right: 10px; top: 100%; height: 30px; margin-top: -6px; z-index: 3; pointer-events: none; overflow: visible; }
.nxx-garland svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 3px rgba(155, 225, 93, .35)); }
.nxx-garland .b { animation: nxx-tw 2.4s ease-in-out infinite alternate; }
.nxx-garland .b:nth-of-type(3n) { animation-duration: 1.7s; }
.nxx-garland .b:nth-of-type(4n+1) { animation-duration: 3.1s; }
.nxx-hang { position: absolute; top: 100%; width: 2px; height: 34px; background: rgba(242, 242, 242, .35); transform-origin: top center; animation: nxx-swing 3.2s ease-in-out infinite alternate; z-index: 3; pointer-events: none; }
.nxx-hang::after {
  content: ""; position: absolute; left: -10px; bottom: -20px; width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .6), transparent 32%), var(--c, var(--nxx-red)); box-shadow: 0 0 12px var(--c, var(--nxx-red));
}
.nxx-hang--l { left: 18px; } .nxx-hang--r { right: 18px; animation-delay: -1.6s; --c: var(--nxx-amber); }
@keyframes nxx-swing { from { transform: rotate(7deg); } to { transform: rotate(-7deg); } }
@media (max-width: 767px) { .nxx-hang { display: none; } .nxx-garland { height: 22px; } }
.nxx-loghost { position: relative; display: inline-block; }
.nxx-loghat {
  position: absolute; left: var(--hx, 2px); top: var(--hy, -13px); width: var(--hw, 32px); height: calc(var(--hw, 32px) * .7); pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 70'%3E%3Cpath d='M10 52 C 22 20, 52 2, 80 12 C 88 15, 92 26, 90 40 C 82 30, 72 28, 66 30 C 60 36, 56 44, 54 52 Z' fill='%23e0525c'/%3E%3Crect x='4' y='48' width='62' height='14' rx='7' fill='%23F4FAF4'/%3E%3Ccircle cx='90' cy='44' r='8' fill='%23F4FAF4'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-14deg); filter: drop-shadow(0 0 4px rgba(224, 82, 92, .5));
}

/* 13b (r8). official Santa-hat MM head over the logo's own head (JS sets --sx/--sy/--sw/--sh from the logo height) */
.nxx-loghost.nxx-santa > img { clip-path: inset(-4px -4px -4px 17.2%); }
.nxx-santahead {
  position: absolute; left: var(--sx, -4px); top: var(--sy, -12px); width: var(--sw, 43px); height: var(--sh, 60px); pointer-events: none; z-index: 2;
  background: url(../img/mm-santa.r8.png) center / contain no-repeat; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .55));
}
/* 7b (r8). chat badge: the Santa head instead of the round MM badge (taller box, pulled up so the pill keeps its height) */
#mmhelpchat-root .nx-chat-badge { background-image: url(../img/mm-santa.r8.png) !important; height: 64px; margin: -12px 0 0; }

/* 14. section title pills ("NEW STRAINS", "TESTIMONIALS"): candy-cane border + holly sprig */
body .elementor-widget-heading .elementor-widget-container:has(> .ce-display-small) {
  position: relative; border: 3px solid transparent !important;
  background: linear-gradient(#F4FAF4, #F4FAF4) padding-box, repeating-linear-gradient(45deg, var(--nxx-red) 0 6px, #F4FAF4 6px 12px) border-box !important;
  background-size: auto, 34px 34px !important; animation: nxx-cane 2.5s linear infinite;
}
body .elementor-widget-heading .elementor-widget-container:has(> .ce-display-small)::before {
  content: ""; position: absolute; left: -16px; top: -14px; width: 34px; height: 26px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath d='M17 14C11 4 4 4 1 7C5 8 5 12 3 14C7 13 9 17 8 20C12 17 15 18 17 14Z' fill='%234E7D2E'/%3E%3Cpath d='M17 14C23 4 30 4 33 7C29 8 29 12 31 14C27 13 25 17 26 20C22 17 19 18 17 14Z' fill='%238EB364'/%3E%3Ccircle cx='14' cy='15' r='3.4' fill='%23e0525c'/%3E%3Ccircle cx='20' cy='15' r='3.4' fill='%23e0525c'/%3E%3Ccircle cx='17' cy='19' r='3.4' fill='%23c8404a'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: rotate(-18deg);
}
@keyframes nxx-cane { to { background-position: 0 0, 34px 0; } }

/* 15. CE dividers become a pine garland with baubles */
body .elementor-widget-divider .elementor-divider-separator {
  border-top-color: transparent !important; height: 22px; margin-top: -11px; display: block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 22'%3E%3Cg stroke-linecap='round' stroke-width='2'%3E%3Cpath d='M0 11H96' stroke='%234E7D2E' stroke-width='6'/%3E%3Cpath d='M4 11l6-6M10 11l6 6M16 11l6-6M22 11l6 6M28 11l6-6M34 11l6 6M40 11l6-6M46 11l6 6M52 11l6-6M58 11l6 6M64 11l6-6M70 11l6 6M76 11l6-6M82 11l6 6M88 11l6-6' stroke='%238EB364'/%3E%3Cpath d='M7 11l6 6M13 11l6-6M19 11l6 6M25 11l6-6M31 11l6 6M37 11l6-6M43 11l6 6M49 11l6-6M55 11l6 6M61 11l6-6M67 11l6 6M73 11l6-6M79 11l6 6M85 11l6-6' stroke='%23315a22'/%3E%3C/g%3E%3Ccircle cx='24' cy='15' r='4.5' fill='%23e0525c'/%3E%3Ccircle cx='72' cy='14' r='4.5' fill='%23F5B800'/%3E%3Ccircle cx='48' cy='9' r='2.4' fill='%23F4FAF4'/%3E%3C/svg%3E") center left / 96px 22px repeat-x;
  filter: drop-shadow(0 0 4px rgba(155, 225, 93, .25));
}

/* 16. footer: snowy pine tree line standing on the footer's top edge */
.nxx-trees {
  position: absolute; left: 0; right: 0; bottom: 100%; height: 78px; z-index: 1; pointer-events: none; opacity: .9;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 78'%3E%3Cg fill='%23163a20'%3E%3Cpath d='M30 10L52 50H42L60 76H0L18 50H8Z'/%3E%3Cpath d='M118 30L134 58H126L140 78H96L110 58H102Z'/%3E%3Cpath d='M210 0L236 44H224L246 78H174L196 44H184Z'/%3E%3Cpath d='M272 36L286 60H279L292 78H252L265 60H258Z'/%3E%3C/g%3E%3Cg fill='%23F4FAF4' fill-opacity='.85'%3E%3Cpath d='M30 10L40 28C35 25 33 30 30 27C27 30 25 25 20 28Z'/%3E%3Cpath d='M210 0L222 20C216 17 214 22 210 19C206 22 204 17 198 20Z'/%3E%3Cpath d='M118 30L126 44C122 42 121 45 118 43C115 45 114 42 110 44Z'/%3E%3Cpath d='M0 78C40 70 80 74 120 72C170 70 230 75 300 72V78Z'/%3E%3C/g%3E%3Ccircle cx='210' cy='4' r='3' fill='%23F5B800'/%3E%3C/svg%3E") bottom left / 300px 78px repeat-x;
}
@media (max-width: 767px) { .nxx-trees { height: 52px; background-size: 200px 52px; } }

/* 17. buttons: candy-cane sweep on hover for the shop's main actions */
body .btn-primary.add-to-cart:hover, body .elementor-button:hover {
  background-image: repeating-linear-gradient(45deg, rgba(224, 82, 92, .9) 0 10px, rgba(244, 250, 244, .9) 10px 20px) !important;
  background-size: 56px 56px !important; animation: nxx-cane-btn .9s linear infinite; color: #111 !important; text-shadow: 0 0 4px #fff;
}
@keyframes nxx-cane-btn { to { background-position: 56px 0; } }

/* 11. reduced motion: decoration stays still; no transitions, puffs, ribbons */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .nxx-bulbs i, .nxx-lit:hover, body .nx-elite-star, body .nx-btn.is-loading::after,
  body .product-miniature.nx-card--mm420.nxx-lit:hover, body .nx-rev .nx-rev__card.nxx-lit:hover,
  body .elementor-widget-category-grid.nx-catpills a.nx-catpill:hover .nx-catpill__img { animation: none !important; }
  .nxx-ribbon, .nxx-puff, .nxx-bauble, .nxx-sitesnow { display: none; }
  .nxx-garland .b, .nxx-hang, body .elementor-widget-heading .elementor-widget-container:has(> .ce-display-small),
  body .btn-primary.add-to-cart:hover, body .elementor-button:hover { animation: none !important; }
}

/* r3: the review row's "See all reviews" link sits where the footer tree line stands; keep it above and legible */
body .nx-rev .nx-rev__all { position: relative; z-index: 2; text-shadow: 0 0 6px #000, 0 0 2px #000; }
