/* Festival – Christmas */
.swf-xmas-root { position: fixed; inset: 0; pointer-events: none; z-index: 99990; overflow: hidden; }
.swf-page-root { position: absolute; top: 0; left: 0; width: 100%; height: 0; pointer-events: none; z-index: 99989; }
.swf-snow, .swf-fw { position: absolute; top: 0; left: 0; }
.swf-bit { position: absolute; pointer-events: none; line-height: 1; will-change: transform, opacity; }

/* Elements that must receive clicks */
.swf-gift, .swf-music, .swf-dock > *, .swf-toast, .swf-modal, .swf-santa.swf-clickable { pointer-events: auto; }

/* ---------- Ambient ---------- */
.swf-pile {
	position: absolute; left: 0; right: 0; bottom: 0; height: 3px; transition: height 1s;
	background: linear-gradient(#fff, #e8f1ff); border-radius: 60% 60% 0 0 / 100% 100% 0 0;
	box-shadow: 0 -4px 10px rgba(255, 255, 255, .75);
}
.swf-aurora {
	position: absolute; top: 0; left: 0; right: 0; height: 45vh; opacity: .3; filter: blur(30px);
	background:
		radial-gradient(ellipse 50% 60% at 20% 20%, rgba(80, 255, 170, .9), transparent 70%),
		radial-gradient(ellipse 45% 55% at 55% 10%, rgba(90, 160, 255, .8), transparent 70%),
		radial-gradient(ellipse 40% 60% at 85% 25%, rgba(200, 100, 255, .7), transparent 70%);
	animation: swf-aurora 12s ease-in-out infinite alternate;
}
@keyframes swf-aurora { from { transform: translateX(-4%) scaleY(.9); } to { transform: translateX(4%) scaleY(1.1); } }
.swf-frost {
	position: absolute; inset: 0;
	box-shadow: inset 0 0 90px 30px rgba(190, 225, 255, .35), inset 0 0 220px 60px rgba(190, 225, 255, .15);
}

/* ---------- Decorations ---------- */
.swf-border {
	position: absolute; inset: 0; border: 8px solid transparent; opacity: .92;
	border-image: repeating-linear-gradient(45deg, #d32f2f 0 10px, #fff 10px 20px) 8;
}
.swf-icicles {
	position: absolute; top: 0; left: 0; right: 0; height: 30px; opacity: .9;
	filter: drop-shadow(0 1px 1px rgba(80, 120, 160, .35));
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='30'%3E%3Cpolygon points='0,0 14,0 7,16' fill='%23cfeaff'/%3E%3Cpolygon points='18,0 36,0 27,30' fill='%23e3f4ff'/%3E%3Cpolygon points='40,0 52,0 46,12' fill='%23cfeaff'/%3E%3Cpolygon points='56,0 70,0 63,22' fill='%23e3f4ff'/%3E%3C/svg%3E") repeat-x top left;
}
body.swf-has-lights .swf-icicles { top: 30px; }

/* Lights */
.swf-lights {
	position: absolute; top: 0; left: 0; right: 0; height: 34px;
	display: flex; justify-content: space-between; padding: 0 6px; overflow: hidden;
}
.swf-lights::before {
	content: ""; position: absolute; top: 4px; left: -2%; width: 104%; height: 14px;
	border-bottom: 2px solid #1d3b2a; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.swf-bulb {
	position: relative; display: block; width: 12px; height: 18px; margin-top: 10px;
	border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
	animation: swf-twinkle 1.8s ease-in-out infinite;
}
.swf-bulb::before { content: ""; position: absolute; top: -5px; left: 3px; width: 6px; height: 6px; background: #333; border-radius: 1px; }
.swf-bulb:nth-child(odd) { margin-top: 14px; }
.swf-red   { background: #ff3b3b; color: #ff3b3b; }
.swf-gold  { background: #ffc83d; color: #ffc83d; }
.swf-green { background: #3ddc84; color: #3ddc84; }
.swf-blue  { background: #4aa8ff; color: #4aa8ff; }
@keyframes swf-twinkle {
	0%, 100% { opacity: 1; box-shadow: 0 0 10px 3px currentColor; }
	50%      { opacity: .35; box-shadow: 0 0 3px 1px currentColor; }
}

/* Baubles */
.swf-baubles { position: absolute; top: 0; left: 0; right: 0; height: 0; }
.swf-bauble { position: absolute; top: 0; width: 0; height: 0; transform-origin: 50% 0; animation: swf-swing 3s ease-in-out infinite alternate; }
.swf-str { position: absolute; left: 0; top: 0; width: 1px; height: var(--len); background: rgba(0, 0, 0, .35); }
.swf-cap { position: absolute; left: -4px; top: calc(var(--len) - 4px); width: 8px; height: 6px; background: #d4af37; border-radius: 2px; }
.swf-ball {
	position: absolute; left: calc(var(--s) / -2); top: var(--len); width: var(--s); height: var(--s); border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .85), var(--c) 45%, rgba(0, 0, 0, .35) 120%);
	box-shadow: 0 3px 6px rgba(0, 0, 0, .25);
}
/* Stars reuse the bauble hanger */
.swf-stars .swf-bauble { filter: drop-shadow(0 0 5px rgba(255, 255, 255, .7)); }
.swf-stars .swf-ball {
	border-radius: 0; box-shadow: none;
	/* blink every 1.2s; colour jumps to the next hue while the star is dim */
	animation: swf-starblink var(--bp, 1.2s) ease-in-out infinite, swf-huestep calc(var(--bp, 1.2s) * 6) steps(6, jump-end) infinite;
	animation-delay: var(--hd, 0s), calc(var(--hd, 0s) - var(--bp, 1.2s) / 2);
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
	background: radial-gradient(circle at 50% 40%, #fff, var(--c) 60%);
}
@keyframes swf-starblink { 0%, 35% { opacity: 1; } 50% { opacity: .1; } 65%, 100% { opacity: 1; } }
@keyframes swf-huestep { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
@keyframes swf-swing { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }

/* Tree */
.swf-tree { position: absolute; left: 12px; bottom: 0; width: 120px; height: 196px; }
.swf-tl { animation: swf-blink 1.6s ease-in-out infinite; }
.swf-tl.r { fill: #ff5252; } .swf-tl.y { fill: #ffd740; } .swf-tl.b { fill: #40c4ff; } .swf-tl.p { fill: #ff80ab; }
/* Blink every 1.2s; fill jumps to the next colour while the star is dim */
.swf-tstar3d { animation: swf-tblink 1.2s ease-in-out infinite; }
.swf-tstar { animation: swf-starflash 7.2s steps(1, end) infinite; animation-delay: -.6s; }
@keyframes swf-tblink { 0%, 35% { opacity: 1; } 50% { opacity: .25; } 65%, 100% { opacity: 1; } }
@keyframes swf-starflash {
	0%   { fill: #ff1744; }
	16%  { fill: #ffd600; }
	33%  { fill: #00e676; }
	50%  { fill: #29b6f6; }
	66%  { fill: #d500f9; }
	83%  { fill: #ff80ab; }
}
@keyframes swf-blink { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }

/* Snowman + reindeer */
.swf-snowman { position: absolute; left: 142px; bottom: 6px; font-size: 46px; line-height: 1; animation: swf-wobble 3s ease-in-out infinite alternate; transform-origin: 20% 100%; }
@keyframes swf-wobble { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }

/* Wreath */
.swf-wreath { position: absolute; top: 80px; right: 14px; width: 84px; height: 100px; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); }

/* Santa hat on logo */
.swf-hat { position: absolute; pointer-events: none; z-index: 2; display: block; transform: rotate(-12deg); }
.swf-hat svg { width: 100%; height: 100%; display: block; }

/* Gift box */
.swf-gift {
	position: absolute; right: 16px; bottom: 16px; width: 56px; height: 56px; padding: 0; font-size: 34px; line-height: 1;
	border: 0; border-radius: 50%; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); cursor: pointer;
	animation: swf-bounce 2.2s ease-in-out infinite;
}
@keyframes swf-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-9px); } 55% { transform: translateY(0); } 70% { transform: translateY(-4px); } }

/* ---------- Santa & reindeer ---------- */
.swf-santa {
	position: absolute; bottom: 4%; top: auto; left: 0; font-size: 44px; white-space: nowrap;
	transform: translateX(-250px); opacity: 0; letter-spacing: 4px;
}
.swf-santa.swf-clickable { cursor: pointer; }
.swf-santa.swf-fly { animation: swf-fly 16s linear 1; }
@keyframes swf-fly {
	0%   { transform: translate(-250px, 0); opacity: 1; }
	50%  { transform: translate(50vw, -30px); }
	100% { transform: translate(calc(100vw + 50px), 10px); opacity: 1; }
}

.swf-reindeer { position: absolute; bottom: 1%; left: 0; font-size: 34px; white-space: nowrap; opacity: 0; transform: translateX(100vw); }
.swf-reindeer.swf-run { animation: swf-run 14s linear 1; }
.swf-reindeer span { display: inline-block; margin-right: 8px; animation: swf-hop .5s ease-in-out infinite alternate; }
.swf-reindeer span:nth-child(2) { animation-delay: .15s; }
.swf-reindeer span:nth-child(3) { animation-delay: .3s; }
@keyframes swf-run { from { transform: translateX(100vw); opacity: 1; } to { transform: translateX(-300px); opacity: 1; } }
@keyframes swf-hop { from { transform: translateY(0); } to { transform: translateY(-10px); } }

/* 3D Santa (model-viewer) */
.swf-santa3d { position: absolute; bottom: 0; pointer-events: none; line-height: 1; }
.swf-s3d-left { left: 190px; }
.swf-s3d-right { right: 90px; }
.swf-s3d-fallback { display: flex; align-items: flex-end; justify-content: center; transform-origin: 50% 90%; animation: swf-wave 1.6s ease-in-out infinite; }
@keyframes swf-wave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) translateY(-6px); } }

/* ---------- Content & UI ---------- */
.swf-dock {
	position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
	display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100vw - 180px);
}
.swf-pill {
	background: rgba(22, 48, 34, .93); color: #fff; font: 600 14px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
	padding: 8px 14px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
	display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.swf-coderow { display: inline-flex; align-items: center; gap: 6px; }
.swf-coderow code { background: rgba(255, 255, 255, .18); padding: 2px 8px; border-radius: 6px; font-size: 13px; letter-spacing: .5px; color: inherit; }
.swf-btn {
	border: 0; border-radius: 999px; background: #c62828; color: #fff; cursor: pointer;
	font: 600 14px/1 system-ui, sans-serif; padding: 10px 18px;
}
.swf-btn-sm { padding: 5px 10px; font-size: 12px; background: #2e7d32; }
.swf-x { border: 0; background: none; color: inherit; font-size: 20px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .8; }

.swf-toast {
	position: absolute; top: 56px; left: 50%; transform: translate(-50%, -20px); opacity: 0; transition: .35s;
	max-width: calc(100vw - 32px); display: flex; gap: 10px; align-items: center;
	background: #c62828; color: #fff; font: 600 15px/1.35 system-ui, sans-serif;
	padding: 10px 16px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}
.swf-toast.swf-in { transform: translate(-50%, 0); opacity: 1; }

.swf-modal { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.swf-modalbox {
	background: #fff; color: #222; border-radius: 16px; padding: 24px 28px; max-width: 380px; width: 100%; text-align: center;
	font: 15px/1.5 system-ui, sans-serif; box-shadow: 0 12px 40px rgba(0, 0, 0, .4); border-top: 6px solid #c62828;
}
.swf-modalbox h3 { margin: 0 0 8px; font-size: 22px; color: #c62828; }
.swf-modalbox p { margin: 0 0 14px; }
.swf-modalbox .swf-coderow { display: flex; justify-content: center; margin-bottom: 16px; }
.swf-modalbox .swf-coderow code { background: #f1f1f1; color: #222; font-size: 16px; padding: 6px 12px; }

.swf-music {
	position: absolute; left: 50px; bottom: 16px; width: 44px; height: 44px; padding: 0; font-size: 20px; line-height: 1;
	border: 0; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .25); cursor: pointer;
}

body.swf-has-tree .swf-music { bottom: 206px; } /* sits just above the tree (196px tall) */
.swf-music.swf-music-on { box-shadow: 0 0 0 3px rgba(46, 125, 50, .55), 0 3px 10px rgba(0, 0, 0, .25); }

/* Festive colours (opt-in via setting) */
body.swf-theme ::selection { background: #c62828; color: #fff; }
body.swf-theme .elementor-button,
body.swf-theme .woocommerce a.button,
body.swf-theme .woocommerce button.button,
body.swf-theme .single_add_to_cart_button,
body.swf-theme input[type="submit"] {
	background-color: #c62828 !important; border-color: #c62828 !important; color: #fff !important;
}
body.swf-theme .elementor-button:hover,
body.swf-theme .woocommerce a.button:hover,
body.swf-theme .woocommerce button.button:hover,
body.swf-theme .single_add_to_cart_button:hover,
body.swf-theme input[type="submit"]:hover {
	background-color: #2e7d32 !important; border-color: #2e7d32 !important;
}
body.swf-theme .entry-content a:hover,
body.swf-theme .elementor-widget-text-editor a:hover { color: #2e7d32; }

/* ---------- Small screens ---------- */
@media (max-width: 767px) {
	.swf-santa { font-size: 30px; }
	.swf-bulb { width: 10px; height: 15px; }
	.swf-tree, .swf-wreath, .swf-snowman { display: none; }
	.swf-s3d-left { left: 6px; }
	.swf-s3d-right { right: 70px; }
	.swf-border { border-width: 5px; border-image-slice: 5; }
	.swf-gift { right: 10px; bottom: 10px; width: 48px; height: 48px; font-size: 28px; }
	.swf-music, body.swf-has-tree .swf-music { left: 12px; bottom: 12px; } /* tree is hidden on phones */
	.swf-dock { left: 64px; right: 70px; transform: none; max-width: none; align-items: flex-start; }
	.swf-pill { font-size: 13px; border-radius: 16px; justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	.swf-xmas-root, .swf-page-root { display: none; }
}

/* Walking Santa (water reminder) – own canvas, click-through except over its buttons */
.swf-walking-santa { position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; display: block; margin: 0; padding: 0; border: 0; z-index: 99995; pointer-events: none; }
@media print { .swf-walking-santa { display: none !important; } }

/* Music notice: bottom-centre, above the countdown / coupon bar, slides up into view */
.swf-toast.swf-toast-bottom { top: auto; bottom: 90px; transform: translate(-50%, 20px); }
.swf-toast.swf-toast-bottom.swf-in { transform: translate(-50%, 0); }
@media (max-width: 767px) { .swf-toast.swf-toast-bottom { bottom: 70px; font-size: 14px; } }

/* Music mute button: left edge, vertically centred, on every screen size – above other site buttons/widgets */
.swf-music, body.swf-has-tree .swf-music {
	position: fixed; left: 12px; top: 50%; bottom: auto; transform: translateY(-50%);
	z-index: 2147483600; pointer-events: auto; touch-action: manipulation;
}
@media (max-width: 767px) {
	.swf-music, body.swf-has-tree .swf-music { left: 8px; bottom: auto; width: 44px; height: 44px; }
}
@media print { .swf-music { display: none !important; } }
