/*
 * Chevpac Festive Animations
 * Everything here only activates once cfx.js adds .cfx-on to <html>,
 * so if JavaScript is blocked the site looks exactly as normal.
 */

:root {
	--cfx-accent: #c9a24b;
	--cfx-accent-rgb: 201, 162, 75;
}

/* ------------------------------------------------------------------
 * 1. Falling snow / rising sparkles (canvas)
 * ---------------------------------------------------------------- */
.cfx-canvas {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 998;
	opacity: 0;
	transition: opacity 2.5s ease;
}
.cfx-canvas.cfx-show { opacity: 1; }
.cfx-off .cfx-canvas { opacity: 0; transition-duration: .4s; }

/* ------------------------------------------------------------------
 * 2. String lights across the top of the page
 * ---------------------------------------------------------------- */
.cfx-lights {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 16px;
	overflow: hidden;
	pointer-events: none;
	z-index: 999;
}
.admin-bar .cfx-lights { top: 32px; }
@media (max-width: 782px) { .admin-bar .cfx-lights { top: 46px; } }
.cfx-lights svg { display: block; }
.cfx-wire {
	fill: none;
	stroke: rgba(var(--cfx-accent-rgb), .5);
	stroke-width: 1;
}
.cfx-glow {
	opacity: .15;
	animation: cfx-twinkle 5s ease-in-out infinite;
}
@keyframes cfx-twinkle {
	0%, 100% { opacity: .12; }
	50%      { opacity: .6; }
}
.cfx-off .cfx-lights { display: none; }

/* ------------------------------------------------------------------
 * 3. Soft reveal on scroll
 * ---------------------------------------------------------------- */
.cfx-on .cfx-reveal {
	opacity: 0;
	transform: translate3d(0, 14px, 0);
	transition: opacity .85s cubic-bezier(.22, .61, .36, 1), transform .85s cubic-bezier(.22, .61, .36, 1);
	transition-delay: var(--cfx-d, 0ms);
	will-change: opacity, transform;
}
.cfx-on .cfx-reveal.cfx-in {
	opacity: 1;
	transform: none;
}
.cfx-off .cfx-reveal {
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
}

/* ------------------------------------------------------------------
 * 4. Light sweep on hover (product images, banners)
 * ---------------------------------------------------------------- */
.cfx-has-sheen { position: relative; }
.cfx-sheen {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
	z-index: 1;
}
.cfx-sheen::before {
	content: "";
	position: absolute;
	top: -10%;
	left: 0;
	width: 40%;
	height: 120%;
	opacity: 0;
	background: linear-gradient(100deg, transparent 0%, rgba(255, 255, 255, .30) 45%, rgba(var(--cfx-accent-rgb), .14) 60%, transparent 100%);
	transform: translateX(-150%) skewX(-18deg);
}
.cfx-has-sheen:hover > .cfx-sheen::before {
	animation: cfx-sheen 1.15s ease-out 1;
}
@keyframes cfx-sheen {
	0%   { transform: translateX(-150%) skewX(-18deg); opacity: 0; }
	15%  { opacity: 1; }
	100% { transform: translateX(420%) skewX(-18deg); opacity: 0; }
}
.cfx-off .cfx-sheen { display: none; }

/* ------------------------------------------------------------------
 * 5. Logo glints
 * ---------------------------------------------------------------- */
.cfx-glint {
	position: absolute;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	pointer-events: none;
	z-index: 3;
	opacity: 0;
	transform: scale(.2);
	animation: cfx-glint 7s ease-in-out infinite;
}
.cfx-glint::before,
.cfx-glint::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 6px 1px rgba(var(--cfx-accent-rgb), .85);
}
.cfx-glint::before {
	width: 16px;
	height: 1.5px;
	background: linear-gradient(90deg, transparent, #fff 35%, #fff 65%, transparent);
}
.cfx-glint::after {
	width: 1.5px;
	height: 16px;
	background: linear-gradient(180deg, transparent, #fff 35%, #fff 65%, transparent);
}
@keyframes cfx-glint {
	0%, 62%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
	72%           { opacity: 1; transform: scale(1)  rotate(45deg); }
	86%           { opacity: 0; transform: scale(.4) rotate(90deg); }
}
.cfx-off .cfx-glint { display: none; }

/* ------------------------------------------------------------------
 * 6. Footer shimmer line
 * ---------------------------------------------------------------- */
.cfx-footer-line {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	pointer-events: none;
	z-index: 2;
	opacity: .85;
	background: linear-gradient(90deg,
		transparent 0%,
		rgba(var(--cfx-accent-rgb), 0) 12%,
		rgba(var(--cfx-accent-rgb), .9) 36%,
		#fff 50%,
		rgba(var(--cfx-accent-rgb), .9) 64%,
		rgba(var(--cfx-accent-rgb), 0) 88%,
		transparent 100%);
	background-size: 200% 100%;
	animation: cfx-line 10s linear infinite;
}
@keyframes cfx-line {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
.cfx-off .cfx-footer-line { display: none; }

/* ------------------------------------------------------------------
 * 7. Greeting + visitor toggle
 * ---------------------------------------------------------------- */
.cfx-toggle,
.cfx-greeting {
	position: fixed;
	bottom: calc(18px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	font-family: inherit;
}
.cfx-toggle {
	left: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid rgba(var(--cfx-accent-rgb), .5);
	background: rgba(255, 255, 255, .94);
	color: var(--cfx-accent);
	cursor: pointer;
	opacity: .8;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
	transition: opacity .25s ease, transform .25s ease;
}
.cfx-toggle:hover,
.cfx-toggle:focus-visible { opacity: 1; transform: translateY(-2px); }
.cfx-toggle svg { width: 18px; height: 18px; fill: currentColor; transition: opacity .25s ease; }
.cfx-off .cfx-toggle svg { opacity: .35; }

.cfx-greeting {
	left: 66px;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: min(380px, calc(100vw - 150px));
	padding: 9px 10px 9px 14px;
	border-radius: 22px;
	border: 1px solid rgba(var(--cfx-accent-rgb), .45);
	background: rgba(255, 255, 255, .97);
	color: #2b2b2b;
	font-size: 13px;
	line-height: 1.4;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
	opacity: 0;
	transform: translateY(10px);
	pointer-events: none;
	transition: opacity .7s ease, transform .7s ease;
}
.cfx-greeting.cfx-no-toggle { left: 18px; max-width: min(380px, calc(100vw - 36px)); }
.cfx-greeting.cfx-g-in { opacity: 1; transform: none; pointer-events: auto; }
.cfx-greeting svg { flex: 0 0 auto; width: 15px; height: 15px; fill: var(--cfx-accent); }
.cfx-gclose {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #888;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.cfx-gclose:hover { background: rgba(0, 0, 0, .06); color: #333; }

.cfx-pos-right .cfx-toggle { left: auto; right: 18px; }
.cfx-pos-right .cfx-greeting { left: auto; right: 66px; }
.cfx-pos-right .cfx-greeting.cfx-no-toggle { right: 18px; }

/* Lift above the theme's mobile bottom toolbar, if it exists */
@media (max-width: 1024px) {
	.cfx-lift .cfx-toggle,
	.cfx-lift .cfx-greeting { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------------
 * Accessibility & print
 * ---------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.cfx-glow, .cfx-glint, .cfx-footer-line { animation: none !important; }
	.cfx-glint, .cfx-sheen { display: none !important; }
	.cfx-glow { opacity: .35; }
	.cfx-greeting { transition: none; }
}
@media print {
	.cfx-canvas, .cfx-lights, .cfx-toggle, .cfx-greeting,
	.cfx-glint, .cfx-sheen, .cfx-footer-line { display: none !important; }
}
