/* WGR Christmas Theme — every rule is scoped to body.wgr-xmas */
.wgr-xmas {
	--wgrx-pine: #17402F;
	--wgrx-pine-deep: #0F2E22;
	--wgrx-berry: #9B1C31;
	--wgrx-berry-deep: #7C1526;
	--wgrx-gold: #C9A55A;
	--wgrx-gold-soft: #E9D9AE;
	--wgrx-frost: #FBF8F2;
	--wgrx-evergreen: #1E6B45;
	--wgrx-evergreen-deep: #185A3A;
}

/* ---------- Top bar ---------- */
.wgr-xmas .wgr-xmas-bar {
	position: relative;
	z-index: 1000;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 14px;
	padding: 10px 16px 12px;
	background: radial-gradient(120% 140% at 50% 0%, #1F5540 0%, var(--wgrx-pine) 55%, var(--wgrx-pine-deep) 100%);
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	letter-spacing: .02em;
}
.wgr-xmas .wgr-xmas-bar::after { /* thin gold garland line */
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3px;
	background: repeating-linear-gradient(90deg, var(--wgrx-gold) 0 14px, var(--wgrx-berry) 14px 20px, var(--wgrx-gold-soft) 20px 34px, var(--wgrx-berry) 34px 40px);
}
.wgr-xmas .wgr-xmas-bar__link {
	color: var(--wgrx-gold-soft) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
}
.wgr-xmas .wgr-xmas-bar__link:hover,
.wgr-xmas .wgr-xmas-bar__link:focus-visible { color: #fff !important; }
.wgr-xmas .wgr-xmas-bar__link:focus-visible { outline: 2px solid var(--wgrx-gold); outline-offset: 2px; }

/* ---------- Buttons (Elementor + WooCommerce) ---------- */
.wgr-xmas .elementor-button,
.wgr-xmas .woocommerce a.button,
.wgr-xmas .woocommerce button.button,
.wgr-xmas .woocommerce input.button,
.wgr-xmas .woocommerce #respond input#submit,
.wgr-xmas a.add_to_cart_button,
.wgr-xmas .single_add_to_cart_button,
.wgr-xmas .wc-block-components-button:not(.is-link) {
	background-color: var(--wgrx-berry) !important;
	border-color: var(--wgrx-berry) !important;
	color: #fff !important;
	transition: background-color .2s ease, box-shadow .2s ease;
}
.wgr-xmas .elementor-button:hover,
.wgr-xmas .woocommerce a.button:hover,
.wgr-xmas .woocommerce button.button:hover,
.wgr-xmas .woocommerce input.button:hover,
.wgr-xmas a.add_to_cart_button:hover,
.wgr-xmas .single_add_to_cart_button:hover,
.wgr-xmas .wc-block-components-button:not(.is-link):hover {
	background-color: var(--wgrx-berry-deep) !important;
	border-color: var(--wgrx-berry-deep) !important;
	box-shadow: 0 0 0 3px rgba(201,165,90,.35);
}
.wgr-xmas .elementor-button:focus-visible,
.wgr-xmas .woocommerce .button:focus-visible,
.wgr-xmas .wc-block-components-button:focus-visible {
	outline: 2px solid var(--wgrx-gold);
	outline-offset: 2px;
}

/* ---------- Shop / product cards ---------- */
.wgr-xmas .woocommerce ul.products li.product,
.wgr-xmas ul.products li.product { position: relative; }

.wgr-xmas ul.products li.product .price,
.wgr-xmas .woocommerce div.product p.price,
.wgr-xmas .woocommerce div.product span.price {
	color: var(--wgrx-pine) !important;
}

/* Gift tag badge (text set from plugin settings) */
.wgr-xmas-badges ul.products li.product > a:first-child { position: relative; display: block; }
.wgr-xmas-badges ul.products li.product > a:first-child::after {
	position: absolute;
	top: 10px; right: 10px;
	padding: 4px 10px 4px 18px;
	background: var(--wgrx-frost);
	color: var(--wgrx-berry);
	border: 1px solid var(--wgrx-gold);
	border-radius: 2px 14px 14px 2px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	box-shadow: 0 2px 6px rgba(15,46,34,.15);
	background-image: radial-gradient(circle at 8px 50%, var(--wgrx-gold) 0 2.5px, transparent 3px);
	pointer-events: none;
	z-index: 2;
}

/* Sale badge in festive colours */
.wgr-xmas .woocommerce span.onsale {
	background-color: var(--wgrx-berry) !important;
	color: #fff !important;
}

/* ---------- Single product ---------- */
.wgr-xmas .woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	border-bottom-color: var(--wgrx-gold) !important;
}
.wgr-xmas .woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--wgrx-berry) !important; }

/* ---------- Cart & checkout: accents only ---------- */
.wgr-xmas .woocommerce-cart .cart_totals h2,
.wgr-xmas.woocommerce-cart .cart_totals h2,
.wgr-xmas.woocommerce-checkout #order_review_heading,
.wgr-xmas.woocommerce-checkout .woocommerce-billing-fields h3 {
	color: var(--wgrx-pine);
	border-bottom: 2px solid var(--wgrx-gold-soft);
	padding-bottom: 6px;
}
.wgr-xmas .woocommerce-message,
.wgr-xmas .woocommerce-info {
	border-top-color: var(--wgrx-gold) !important;
}
.wgr-xmas .woocommerce-message::before,
.wgr-xmas .woocommerce-info::before { color: var(--wgrx-berry) !important; }

/* ---------- Snow canvas ---------- */
#wgr-snow {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 9998;
}

/* ---------- Mobile ---------- */
@media (max-width: 600px) {
	.wgr-xmas .wgr-xmas-bar { font-size: 13px; padding: 8px 12px 10px; }
	.wgr-xmas-badges ul.products li.product > a:first-child::after { font-size: 11px; top: 6px; right: 6px; }
}

/* =====================================================================
   v2 — Homepage hero, garland, ornaments, snow caps, fireworks
   ===================================================================== */

/* Hero: first section of the homepage (or any element given the class wgr-hero) */
.wgr-xmas-hero.home [data-elementor-type="wp-page"] > .e-con:first-child,
.wgr-xmas-hero.home [data-elementor-type="wp-page"] > .elementor-section:first-child,
.wgr-xmas-hero.home [data-elementor-type="wp-page"] > .elementor-inner > .elementor-section-wrap > .elementor-section:first-child,
.wgr-xmas-hero .wgr-hero {
	position: relative;
	overflow: hidden;
	background-color: #0B2219 !important;
	background-image:
		radial-gradient(circle at 18% 22%, rgba(246,222,154,.55) 0, rgba(246,222,154,0) 10px),
		radial-gradient(circle at 34% 80%, rgba(246,222,154,.30) 0, rgba(246,222,154,0) 22px),
		radial-gradient(circle at 52% 12%, rgba(255,244,220,.50) 0, rgba(255,244,220,0) 7px),
		radial-gradient(circle at 66% 70%, rgba(233,201,120,.22) 0, rgba(233,201,120,0) 34px),
		radial-gradient(circle at 88% 26%, rgba(246,222,154,.40) 0, rgba(246,222,154,0) 14px),
		radial-gradient(circle at 93% 84%, rgba(255,244,220,.25) 0, rgba(255,244,220,0) 26px),
		radial-gradient(circle at 8% 60%, rgba(232,121,140,.30) 0, rgba(232,121,140,0) 16px),
		radial-gradient(60% 90% at 78% 40%, rgba(201,165,90,.20), transparent 70%),
		radial-gradient(70% 100% at 10% 100%, rgba(155,28,49,.22), transparent 65%),
		linear-gradient(160deg, #0F2E22 0%, #0B2219 45%, #0A1A24 100%) !important;
}
/* Keep hero content above the fireworks and ornaments */
/* Effects are inserted first and stay behind; content is painted after them. No z-index, so nothing gets isolated. */
.wgr-xmas .wgr-hero-on > :not(.wgr-fx):not(.wgr-ornaments):not(.wgr-lights):not(.elementor-absolute):not(.elementor-fixed) { position: relative; }

/* Fireworks canvas */
.wgr-xmas .wgr-fx {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

/* Hanging ornaments */
.wgr-xmas .wgr-ornaments {
	position: absolute;
	top: 0;
	left: 40%;
	width: 170px;
	height: 150px;
	pointer-events: none;
}
.wgr-xmas .wgr-ornaments .wgr-orn {
	transform-box: fill-box;
	transform-origin: 50% 0;
	animation: wgrx-sway 7s ease-in-out infinite;
}
.wgr-xmas .wgr-ornaments .wgr-orn:nth-child(2) { animation-duration: 8.5s; animation-delay: -2s; }
.wgr-xmas .wgr-ornaments .wgr-orn:nth-child(3) { animation-duration: 6.5s; animation-delay: -4s; }
@keyframes wgrx-sway { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

/* Fairy lights across the top of the homepage hero */
.wgr-xmas .wgr-lights {
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 70px;
	pointer-events: none;
}
.wgr-xmas .wgr-lights svg { display: block; width: 100%; height: 70px; overflow: visible; }
.wgr-xmas .wgr-bulb { animation: wgrx-twinkle 3.4s ease-in-out infinite; }
.wgr-xmas .wgr-bulb:nth-of-type(3n)   { animation-delay: -1.2s; }
.wgr-xmas .wgr-bulb:nth-of-type(3n+1) { animation-delay: -2.3s; animation-duration: 4.1s; }
@keyframes wgrx-twinkle { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* Hero product image: let its black background melt into the night sky */
.wgr-xmas .wgr-hero-on img,
.wgr-xmas .wgr-hero-on .elementor-widget-image { mix-blend-mode: lighten; }

/* Snow resting on the green panels and the footer */
.wgr-xmas .wgr-panel,
.wgr-xmas .elementor-location-footer,
.wgr-xmas #site-footer { position: relative; }
.wgr-xmas .wgr-panel::after,
.wgr-xmas .elementor-location-footer::after,
.wgr-xmas #site-footer::after {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 22px;
	border-radius: inherit;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='22' viewBox='0 0 200 22'%3E%3Cpath fill='%23ffffff' fill-opacity='.95' d='M0 0H200V9C188 15 176 7 160 12 146 17 136 20 124 13 112 7 98 18 84 15 70 12 62 6 48 11 36 16 28 21 18 14 10 9 5 10 0 10Z'/%3E%3C/svg%3E") repeat-x top left / 200px 22px;
	pointer-events: none;
	z-index: 3;
}
.wgr-xmas .elementor-location-footer #site-footer::after { display: none; }

/* Product page festive line */
.wgr-xmas .wgr-xmas-gift-line {
	flex-basis: 100%;
	width: 100%;
	margin: 12px 0 0;
	padding-left: 12px;
	border-left: 3px solid var(--wgrx-gold);
	color: var(--wgrx-pine);
	font-size: 14px;
	line-height: 1.5;
}

/* Cart & checkout thank-you note */
.wgr-xmas .wgr-xmas-note {
	padding: 12px 16px;
	background: var(--wgrx-frost);
	border: 1px solid var(--wgrx-gold-soft);
	border-left: 4px solid var(--wgrx-berry);
	border-radius: 6px;
	color: var(--wgrx-pine);
	font-size: 15px;
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 1050px;
	margin: 24px auto;
}

/* Product cards: soft gold frame */
.wgr-xmas ul.products li.product { border-color: var(--wgrx-gold) !important; }

@media (max-width: 900px) {
	.wgr-xmas .wgr-ornaments { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.wgr-xmas .wgr-orn, .wgr-xmas .wgr-bulb { animation: none !important; }
}


/* =====================================================================
   v2.4 — One burgundy for every button (incl. ShopEngine "Read more",
   variable/out-of-stock product buttons, forms, mini-cart, checkout)
   Extra specificity so plugin/theme button styles can't override it.
   ===================================================================== */
body.wgr-xmas.wgr-xmas :is(
	.elementor-button,
	a.button, button.button, input.button, .button,
	a.add_to_cart_button, a.added_to_cart,
	.product_type_simple, .product_type_variable, .product_type_grouped, .product_type_external,
	.single_add_to_cart_button, .checkout-button, #place_order,
	.wc-block-components-button:not(.is-link),
	.wc-block-cart__submit-button,
	.wc-block-components-checkout-place-order-button,
	[class*="shopengine"] a[class*="button"],
	[class*="shopengine"] button,
	form button[type="submit"], form input[type="submit"],
	.wpforms-submit
):not(.shipping-calculator-button):not(.elementor-menu-toggle):not(.mfp-close):not(.pswp__button):not([class*="quantity"]):not([class*="qty"]):not([class*="close"]):not([class*="remove"]):not([class*="wishlist"]):not([class*="compare"]):not([class*="quick-view"]):not([class*="quickview"]):not([class*="slick"]):not([class*="swiper"]) {
	background-color: var(--wgrx-berry) !important;
	background-image: none !important;
	border-color: var(--wgrx-berry) !important;
	color: #fff !important;
	transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
body.wgr-xmas.wgr-xmas :is(
	.elementor-button,
	a.button, button.button, input.button, .button,
	a.add_to_cart_button, a.added_to_cart,
	.product_type_simple, .product_type_variable, .product_type_grouped, .product_type_external,
	.single_add_to_cart_button, .checkout-button, #place_order,
	.wc-block-components-button:not(.is-link),
	.wc-block-cart__submit-button,
	.wc-block-components-checkout-place-order-button,
	[class*="shopengine"] a[class*="button"],
	[class*="shopengine"] button,
	form button[type="submit"], form input[type="submit"],
	.wpforms-submit
):not(.shipping-calculator-button):not(.elementor-menu-toggle):not(.mfp-close):not(.pswp__button):not([class*="quantity"]):not([class*="qty"]):not([class*="close"]):not([class*="remove"]):not([class*="wishlist"]):not([class*="compare"]):not([class*="quick-view"]):not([class*="quickview"]):not([class*="slick"]):not([class*="swiper"]):is(:hover, :focus-visible) {
	background-color: var(--wgrx-berry-deep) !important;
	border-color: var(--wgrx-berry-deep) !important;
	color: #fff !important;
	box-shadow: 0 0 0 3px rgba(201,165,90,.45), 0 6px 16px rgba(124,21,38,.25) !important;
	transform: translateY(-1px);
}
body.wgr-xmas.wgr-xmas :is(.elementor-button, .button, [class*="shopengine"] a[class*="button"]) :is(span, i, svg) { color: inherit !important; fill: currentColor; }
@media (prefers-reduced-motion: reduce) {
	body.wgr-xmas.wgr-xmas .button:hover, body.wgr-xmas.wgr-xmas .elementor-button:hover { transform: none; }
}


/* =====================================================================
   v2.5 — Evergreen harmony: large brand-green surfaces go a shade deeper
   (logo, menu accents and small details keep the original WGR green)
   ===================================================================== */
body.wgr-xmas .wgr-evergreen { background-color: var(--wgrx-evergreen) !important; }
body.wgr-xmas .wgr-evergreen-deep { background-color: var(--wgrx-evergreen-deep) !important; }


/* =====================================================================
   v2.6 — Cart shipping calculator: clean form fields + "Change address" as a link
   ===================================================================== */
body.wgr-xmas.wgr-xmas .shipping-calculator-button {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	color: var(--wgrx-berry) !important;
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 600;
	box-shadow: none !important;
	display: inline-block;
}
body.wgr-xmas.wgr-xmas .shipping-calculator-button:hover { color: var(--wgrx-berry-deep) !important; }

body.wgr-xmas.wgr-xmas :is(.shipping-calculator-form, .woocommerce-shipping-calculator) :is(input[type="text"], input[type="tel"], input:not([type]), select, textarea, .select2-selection, .select2-container .select2-selection--single) {
	background: #fff !important;
	background-image: none !important;
	color: #2B2B2B !important;
	border: 1px solid #E3D9C2 !important;
	border-radius: 8px !important;
	min-height: 44px;
	box-shadow: none !important;
}
body.wgr-xmas.wgr-xmas :is(.shipping-calculator-form, .woocommerce-shipping-calculator) .select2-selection__rendered {
	color: #2B2B2B !important;
	line-height: 42px !important;
	padding-left: 12px !important;
}
body.wgr-xmas.wgr-xmas :is(.shipping-calculator-form, .woocommerce-shipping-calculator) .select2-selection__arrow { height: 42px !important; }
body.wgr-xmas.wgr-xmas :is(.shipping-calculator-form, .woocommerce-shipping-calculator) :is(input, select, .select2-selection):focus {
	border-color: var(--wgrx-gold) !important;
	outline: 2px solid rgba(201,165,90,.35);
	outline-offset: 0;
}
/* Dropdown list that opens from those fields */
body.wgr-xmas.wgr-xmas .select2-dropdown { background: #fff !important; border-color: #E3D9C2 !important; }
body.wgr-xmas.wgr-xmas .select2-results__option { color: #2B2B2B !important; background: #fff !important; }
body.wgr-xmas.wgr-xmas .select2-results__option--highlighted,
body.wgr-xmas.wgr-xmas .select2-results__option[aria-selected="true"] { background: var(--wgrx-evergreen) !important; color: #fff !important; }

/* =====================================================================
   v2.7 — Mobile: hide the hero product image (black box) so the headline leads
   ===================================================================== */
@media (max-width: 767px) {
	body.wgr-xmas .wgr-hero-on :is(.elementor-widget-image, .elementor-widget-image-box, .elementor-widget-video),
	body.wgr-xmas .wgr-hero-on .elementor-widget:has(> .elementor-widget-container > img),
	body.wgr-xmas .wgr-hero-on .elementor-widget:has(> img) {
		display: none !important;
	}
}

/* =====================================================================
   v2.8 — Hero Christmas photo (set in Settings → WGR Christmas)
   ===================================================================== */
.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .e-con:first-child,
.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .elementor-section:first-child,
.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .elementor-inner > .elementor-section-wrap > .elementor-section:first-child,
.wgr-xmas-heroimg .wgr-hero {
	background-color: #0B2219 !important;
	background-image:
		linear-gradient(90deg, rgba(9,30,22,.94) 0%, rgba(9,30,22,.82) 30%, rgba(9,30,22,.35) 52%, rgba(9,30,22,0) 68%),
		var(--wgrx-hero-img) !important;
	background-size: cover, cover !important;
	background-position: center, right center !important;
	background-repeat: no-repeat !important;
	min-height: clamp(480px, 38vw, 660px);
}
/* The tree replaces the square product image */
body.wgr-xmas-heroimg .wgr-hero-on :is(.elementor-widget-image, .elementor-widget-image-box, .elementor-widget-video),
body.wgr-xmas-heroimg .wgr-hero-on .elementor-widget:has(> .elementor-widget-container > img),
body.wgr-xmas-heroimg .wgr-hero-on .elementor-widget:has(> img) {
	display: none !important;
}
@media (max-width: 767px) {
	.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .e-con:first-child,
	.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .elementor-section:first-child,
	.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > .elementor-inner > .elementor-section-wrap > .elementor-section:first-child,
	.wgr-xmas-heroimg .wgr-hero {
		background-image:
			linear-gradient(180deg, rgba(9,30,22,.55) 0%, rgba(9,30,22,.80) 45%, rgba(9,30,22,.92) 100%),
			var(--wgrx-hero-img) !important;
		background-position: center, 78% center !important;
		min-height: 560px;
	}
}
/* Hide the product image straight away (before scripts run) so it never flashes */
.wgr-xmas-heroimg.home [data-elementor-type="wp-page"] > :is(.e-con, .elementor-section):first-child :is(.elementor-widget-image, .elementor-widget-image-box, .elementor-widget-video) { display: none !important; }
@media (max-width: 767px) {
	.wgr-xmas-hero.home [data-elementor-type="wp-page"] > :is(.e-con, .elementor-section):first-child :is(.elementor-widget-image, .elementor-widget-image-box, .elementor-widget-video) { display: none !important; }
}
