/* ==========================================================================
   Holiday Deals product pages (body.wwg-xmas-product): any product listed on
   /product-category/christmas/. Light festive dressing only; the buy box is untouched.
   Loaded by includes/functions/custom-wwg-holiday-cheer.php. Remove with the rest after the season.
   ========================================================================== */

@font-face {
	font-family: 'Mountains of Christmas';
	src: url('../../fonts/mountains-of-christmas-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

body.wwg-xmas-product {
	--xmas-red: #c8102e;
	--xmas-green: #1f5a3c;
	--xmas-green-dark: #133a27;
	--xmas-gold: var(--wwg-bone-xdark, #E8B15E);
	--xmas-cream: var(--wwg-bone-xlight, #FCF6ED);
	--xmas-candy: repeating-linear-gradient(-45deg, var(--xmas-red) 0 6px, #fff 6px 12px);
	--xmas-holly: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'><path fill='%231f6b45' d='M30 22c-6-1-10-6-12-12 2 1 4 0 5-2-3-1-4-4-4-6 4 3 9 4 12 9 1 4 0 8-1 11z'/><path fill='%23175237' d='M34 22c6-1 10-6 12-12-2 1-4 0-5-2 3-1 4-4 4-6-4 3-9 4-12 9-1 4 0 8 1 11z'/><circle cx='28' cy='26' r='5' fill='%23c8102e'/><circle cx='36' cy='26' r='5' fill='%23b00d27'/><circle cx='32' cy='31' r='5' fill='%23d6213b'/><circle cx='26.5' cy='24.5' r='1.4' fill='%23fff' fill-opacity='.6'/><circle cx='34.5' cy='24.5' r='1.4' fill='%23fff' fill-opacity='.6'/><circle cx='30.5' cy='29.5' r='1.4' fill='%23fff' fill-opacity='.6'/></svg>");
}

/* Snow: wwg-holiday-snow.js (same as the home page and the deals page) */

/* ---- Garland frame around the main product photo ----
   The JS draws the pine garland (SVG), lights and holly into .wwg-xmas-frame, an overlay
   inside the slider wrapper. Layout is untouched; the overlay just sits over the photo edge. */
body.wwg-xmas-product .woo-variation-gallery-slider-wrapper {
	position: relative;
	box-shadow: 0 8px 22px rgba(19, 58, 39, .18);
}
body.wwg-xmas-product .wwg-xmas-frame {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}
body.wwg-xmas-product .wwg-xmas-frame svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}
/* keep the zoom button and slide arrows clickable and clear of the garland */
body.wwg-xmas-product .woo-variation-gallery-slider-wrapper .woo-variation-gallery-trigger {
	z-index: 6;
	top: 26px !important;
	right: 26px !important;
}
body.wwg-xmas-product .woo-variation-gallery-slider-wrapper .slick-arrow {
	z-index: 6;
}

/* Lights strung along the garland (positioned by the JS) */
body.wwg-xmas-product .wwg-xmas-bulb {
	position: absolute;
	width: 8px;
	height: 12px;
	margin: -6px 0 0 -4px;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	background: var(--bulb, #ffd75e);
	box-shadow: 0 0 9px 2px var(--bulb, #ffd75e);
	animation: wwg-xmas-twinkle 2.4s ease-in-out infinite;
}
body.wwg-xmas-product .wwg-xmas-bulb::before { /* socket */
	content: '';
	position: absolute;
	top: -3px;
	left: 2px;
	width: 4px;
	height: 4px;
	border-radius: 1px;
	background: #0b2418;
}
body.wwg-xmas-product .wwg-xmas-bulb:nth-child(4n+1) { --bulb: #ff4d4d; }
body.wwg-xmas-product .wwg-xmas-bulb:nth-child(4n+2) { --bulb: #ffd75e; animation-delay: .6s; }
body.wwg-xmas-product .wwg-xmas-bulb:nth-child(4n+3) { --bulb: #5fe08a; animation-delay: 1.2s; }
body.wwg-xmas-product .wwg-xmas-bulb:nth-child(4n+4) { --bulb: #6ec3ff; animation-delay: 1.8s; }
body.wwg-xmas-product .wwg-xmas-bulb:nth-child(3n) { animation-duration: 3.1s; }
/* Opacity and filter only, so the GPU runs it (an animated box-shadow restyles the page every frame). */
@keyframes wwg-xmas-twinkle {
	0%, 100% { opacity: 1; filter: brightness(1.1); }
	50%      { opacity: .5; filter: brightness(.75); }
}

/* Holly + berries on two corners */
body.wwg-xmas-product .wwg-xmas-frame-holly {
	position: absolute;
	width: 74px;
	height: 46px;
	background: var(--xmas-holly) center / contain no-repeat;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
body.wwg-xmas-product .wwg-xmas-frame-holly--tl {
	top: -4px;
	left: -10px;
	transform: rotate(-38deg);
}
body.wwg-xmas-product .wwg-xmas-frame-holly--br {
	right: -10px;
	bottom: -4px;
	transform: rotate(142deg);
}

/* ---- Festive note under the product title ---- */
body.wwg-xmas-product .wwg-xmas-note {
	position: relative;
	margin: 6px 0 22px;
	padding: 14px 16px 14px 62px;
	border: 1px solid rgba(232, 177, 94, .65);
	border-left: 4px solid var(--xmas-red);
	border-radius: 8px;
	background: var(--xmas-cream);
}
body.wwg-xmas-product .wwg-xmas-note::before { /* holly sprig */
	content: '';
	position: absolute;
	left: 14px;
	top: 14px;
	width: 36px;
	height: 23px;
	background: var(--xmas-holly) center / contain no-repeat;
}
body.wwg-xmas-product .wwg-xmas-note p {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 15px;
	line-height: 1.45;
	color: var(--wwg-ink, #2B2929);
}
body.wwg-xmas-product .wwg-xmas-note-bio {
	font-style: italic;
}
body.wwg-xmas-product .wwg-xmas-note p + p,
body.wwg-xmas-product .wwg-xmas-note-tag + p {
	margin-top: 8px !important;
}
body.wwg-xmas-product .wwg-xmas-note-gift strong {
	color: var(--xmas-red);
}
body.wwg-xmas-product .wwg-xmas-note-tag {
	display: inline-block;
	padding: 4px 12px 5px;
	border-top: 2px solid var(--xmas-gold);
	border-radius: 4px;
	background: linear-gradient(180deg, #1f5a3c 0%, #133a27 100%);
	color: var(--xmas-cream);
	font-family: 'Mountains of Christmas', var(--wwg-font-display);
	font-weight: 700;
	font-size: 18px;
	line-height: 1;
	letter-spacing: .02em;
	white-space: nowrap;
}
body.wwg-xmas-product .wwg-xmas-note-tag::before,
body.wwg-xmas-product .wwg-xmas-note-tag::after {
	content: '\2726';
	margin: 0 .45em;
	font-size: .6em;
	vertical-align: .2em;
	color: var(--xmas-gold);
}

/* ---- SALE ornament hanging on the main gallery image (same as the deal cards) ---- */
body.wwg-xmas-product-sale .wwg-product-gallery .woo-variation-gallery-slider-wrapper {
	position: relative;
}
body.wwg-xmas-product-sale .wwg-product-gallery .woo-variation-gallery-slider-wrapper::after {
	content: 'SALE';
	position: absolute;
	z-index: 5;
	top: 0;
	left: 56px;
	width: 64px;
	height: 92px;
	padding-top: 30px;
	box-sizing: border-box;
	background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 104'><defs><radialGradient id='b' cx='.36' cy='.3' r='.75'><stop offset='0' stop-color='%23f0435c'/><stop offset='.55' stop-color='%23c8102e'/><stop offset='1' stop-color='%238a0a1f'/></radialGradient><linearGradient id='c' x1='0' x2='1'><stop offset='0' stop-color='%23b8862f'/><stop offset='.5' stop-color='%23f6d38a'/><stop offset='1' stop-color='%23b8862f'/></linearGradient></defs><path d='M36 0v20' stroke='%23d9a650' stroke-width='1.6'/><circle cx='36' cy='21' r='3.2' fill='none' stroke='%23d9a650' stroke-width='1.6'/><rect x='27' y='23' width='18' height='11' rx='2.5' fill='url(%23c)'/><path d='M31 24v9M36 24v9M41 24v9' stroke='%23000' stroke-opacity='.18' stroke-width='1.2'/><circle cx='36' cy='68' r='34' fill='url(%23b)'/><path d='M7 52q29 -10 58 0M7 84q29 10 58 0' fill='none' stroke='%23f6d38a' stroke-width='1.8' stroke-dasharray='.1 5' stroke-linecap='round'/><ellipse cx='22' cy='51' rx='6' ry='10' transform='rotate(35 22 51)' fill='%23fff' fill-opacity='.35'/><path fill='%231f6b45' d='M27 30c-5 0-9-3-11-7 2 1 4 0 4-2-2-1-3-3-3-5 4 2 8 4 10 8z'/><path fill='%23175237' d='M45 30c5 0 9-3 11-7-2 1-4 0-4-2 2-1 3-3 3-5-4 2-8 4-10 8z'/><circle cx='31' cy='33' r='3' fill='%23d6213b'/><circle cx='36' cy='35' r='3' fill='%23b00d27'/><circle cx='41' cy='33' r='3' fill='%23d6213b'/></svg>") center / contain no-repeat;
	color: #fff;
	font-family: 'Mountains of Christmas', var(--wwg-font-display);
	font-weight: 700;
	font-size: 20px;
	line-height: 60px;
	letter-spacing: .03em;
	text-align: center;
	text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 0 8px rgba(255, 215, 120, .45);
	filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .3));
	transform-origin: 50% 0;
	animation: wwg-xmas-sway 4s ease-in-out infinite;
	pointer-events: none;
}
@keyframes wwg-xmas-sway {
	0%, 100% { transform: rotate(-3deg); }
	50%      { transform: rotate(3deg); }
}

/* ---- Holly by the section titles ---- */
body.wwg-xmas-product .wwg-product-details .wwg-block-title::after {
	content: '';
	display: inline-block;
	width: 1.1em;
	height: .7em;
	margin-left: .35em;
	vertical-align: middle;
	background: var(--xmas-holly) center / contain no-repeat;
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
	body.wwg-xmas-product .woo-variation-gallery-slider-wrapper .woo-variation-gallery-trigger {
		top: 18px !important;
		right: 18px !important;
	}
	body.wwg-xmas-product .wwg-xmas-frame-holly {
		width: 52px;
		height: 32px;
	}
	body.wwg-xmas-product .wwg-xmas-note {
		padding: 12px 14px 12px 54px;
	}
	body.wwg-xmas-product .wwg-xmas-note::before {
		left: 11px;
		top: 13px;
		width: 32px;
		height: 20px;
	}
	body.wwg-xmas-product-sale .wwg-product-gallery .woo-variation-gallery-slider-wrapper::after {
		left: 40px;
		width: 50px;
		height: 72px;
		padding-top: 23px;
		font-size: 16px;
		line-height: 47px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.wwg-xmas-product .wwg-xmas-bulb,
	body.wwg-xmas-product-sale .wwg-product-gallery .woo-variation-gallery-slider-wrapper::after {
		animation: none;
	}
}
