/*
 * Lovelysmiles Black Friday sale page.
 * Look follows the Black Friday ad creatives (night navy, red accent) and
 * 21st.dev patterns: glass countdown tiles, framed deal cards with a struck
 * old price and savings badge, sticky mobile CTA.
 */

.ls-sale {
	--ls-night: #151933;
	--ls-navy: var(--wp--preset--color--contrast, #23294B);
	--ls-primary: var(--wp--preset--color--primary, #364079);
	--ls-cta: var(--wp--preset--color--cta, #355B95);
	--ls-red: #E41E2B;
	--ls-tint: var(--wp--preset--color--secondary-tint, #E7E8EF);
	--ls-surface: var(--wp--preset--color--surface, #F9FAFC);
	--ls-border: var(--wp--preset--color--border, #E5E5E9);
	--ls-muted: var(--wp--preset--color--muted, #6A6E84);
	--ls-success: var(--wp--preset--color--success, #2FA88A);
	--ls-radius: 24px;
}

/* Ended state: hide every offer, show the closed message. */
.ls-sale-over { display: none !important; }
.ls-sale-ended .ls-sale-live { display: none !important; }
.ls-sale-ended .ls-sale-over { display: block !important; }

.ls-sale main { padding-bottom: 0; }
.ls-sale .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top strip ---------- */
.ls-sale-strip {
	background: var(--ls-red); color: #fff; text-align: center;
	font-size: 0.9rem; font-weight: 700; padding: 10px 16px !important; line-height: 1.35;
	margin-top: 0 !important; margin-bottom: 0 !important;
}
.ls-sale-strip a { color: #fff; text-decoration: underline; text-underline-offset: 3px; margin-left: 6px; white-space: nowrap; }

/* ---------- Buttons ---------- */
.ls-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 52px; padding: 0 26px; border-radius: 999px;
	font-weight: 800; font-size: 1.02rem; text-decoration: none !important; line-height: 1.1;
	transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.ls-btn:hover { transform: translateY(-1px); }
.ls-btn:active { transform: translateY(0); }
.ls-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ls-btn--primary { background: var(--ls-cta); color: #fff !important; box-shadow: 0 10px 24px -10px rgba(53, 91, 149, 0.8); }
.ls-btn--primary:hover { background: var(--ls-primary); }
.ls-btn--primary:focus-visible { outline-color: var(--ls-cta); }
.ls-btn--light { background: #fff; color: var(--ls-navy) !important; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.5); }
.ls-btn--ghost { color: #fff !important; border: 1.5px solid rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.06); }
.ls-btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.ls-btn--block { width: 100%; box-sizing: border-box; }

/* ---------- Hero ---------- */
.ls-sale-hero {
	position: relative; overflow: hidden; color: #fff;
	padding: clamp(28px, 5vw, 48px) 20px clamp(48px, 8vw, 96px) !important;
	background:
		radial-gradient(60% 45% at 78% 22%, rgba(85, 101, 190, 0.55), transparent 70%),
		radial-gradient(50% 40% at 6% 85%, rgba(53, 91, 149, 0.35), transparent 70%),
		var(--ls-night);
	margin-top: 0 !important;
}
.ls-sale-hero::after {
	content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.25;
	background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px);
	background-size: 26px 26px;
	mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 75%);
}
.ls-sale-hero > * { position: relative; z-index: 1; }
.ls-sale-logo { margin-top: 0 !important; margin-bottom: clamp(28px, 6vw, 56px) !important; }
.ls-sale-pill {
	display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px;
	padding: 7px 14px; border-radius: 999px; font-size: 0.78rem; font-weight: 800;
	letter-spacing: 0.1em; text-transform: uppercase;
	background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
}
.ls-sale-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ls-red); box-shadow: 0 0 0 4px rgba(228, 30, 43, 0.25); animation: ls-pulse 1.8s ease-in-out infinite; }
@keyframes ls-pulse { 50% { box-shadow: 0 0 0 8px rgba(228, 30, 43, 0); } }

.ls-sale-title { color: #fff !important; font-size: clamp(2.6rem, 9vw, 5.6rem) !important; line-height: 0.98 !important; margin-top: 0 !important; margin-bottom: 0 !important; letter-spacing: -0.01em; }
.ls-sale-title span { color: #C9D0FF; }
.ls-sale-lead { font-size: clamp(1.1rem, 2.6vw, 1.4rem); max-width: 40ch; margin-top: 18px !important; margin-bottom: 28px !important; color: rgba(255, 255, 255, 0.9); }
.ls-sale-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ls-sale-trust { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.92rem; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.ls-sale-trust li { display: inline-flex; align-items: center; gap: 8px; }
.ls-sale-trust li::before {
	content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
	background: var(--ls-success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* ---------- Countdown (21st.dev "Animated Countdown", modern variant) ---------- */
.ls-countdown { display: inline-grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 10px; border-radius: 26px;
	background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
	backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.ls-countdown__unit {
	position: relative; overflow: hidden; min-width: 76px; padding: 16px 10px 12px; border-radius: 18px; text-align: center;
	background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12);
}
.ls-countdown__unit::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(201, 208, 255, 0.8), transparent); }
.ls-countdown__num { display: block; font-size: clamp(1.9rem, 6vw, 2.8rem); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; }
.ls-countdown__num.is-tick { animation: ls-tick 0.25s ease-out; }
@keyframes ls-tick { from { transform: translateY(6px); opacity: 0.45; } to { transform: none; opacity: 1; } }
.ls-countdown__label { display: block; margin-top: 8px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.ls-countdown--sm .ls-countdown__unit { min-width: 64px; padding: 12px 8px 10px; }
.ls-countdown--sm .ls-countdown__num { font-size: 1.8rem; }
.ls-countdown__fallback { display: none; font-weight: 800; }
.ls-countdown.is-off { display: none; }
.ls-countdown.is-off + .ls-countdown__fallback { display: block; }

/* ---------- Sections ---------- */
.ls-sale-section { padding: clamp(56px, 9vw, 104px) 20px !important; margin-top: 0 !important; }
.ls-sale-section:not(.ls-sale-over) + .ls-sale-section { padding-top: 0 !important; }
.ls-bf-eyebrow { font-size: 0.8rem !important; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ls-red); margin-top: 0 !important; margin-bottom: 10px !important; }
.ls-bf-eyebrow--light { color: #FFB4B9; }
.ls-sale-h2 { font-size: clamp(2rem, 5vw, 3rem) !important; line-height: 1.05 !important; margin-top: 0 !important; margin-bottom: 14px !important; }
.ls-sale-sub { color: var(--ls-muted); font-size: 1.1rem; max-width: 56ch; margin-top: 0 !important; margin-bottom: 36px !important; }
.ls-sale-book .ls-sale-sub { margin-left: auto !important; margin-right: auto !important; }

/* ---------- Deal cards (21st.dev "Lifetime Deal Pricing Card") ---------- */
.ls-deals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.ls-deal { border-radius: 32px; padding: 6px; background: var(--ls-tint); }
.ls-deal__inner { height: 100%; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; padding: clamp(22px, 4vw, 34px); border-radius: 26px; background: #fff; box-shadow: 0 1px 0 rgba(17, 22, 56, 0.04), 0 24px 48px -28px rgba(17, 22, 56, 0.35); }
.ls-deal--best { background: linear-gradient(140deg, var(--ls-primary), var(--ls-red)); }
.ls-deal__head { position: relative; }
.ls-deal__badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: rgba(228, 30, 43, 0.1); color: var(--ls-red); font-weight: 900; font-size: 0.85rem; letter-spacing: 0.04em; }
.ls-deal__flag { position: absolute; right: 0; top: 0; padding: 6px 12px; border-radius: 999px; background: var(--ls-navy); color: #fff; font-weight: 800; font-size: 0.78rem; }
.ls-deal__name { font-size: clamp(1.6rem, 3.4vw, 2rem) !important; margin-top: 14px !important; margin-bottom: 6px !important; line-height: 1.1 !important; }
.ls-deal__for { margin-top: 0 !important; margin-bottom: 0 !important; color: var(--ls-muted); }
.ls-deal__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.ls-deal__was { font-size: 1.5rem; color: var(--ls-muted); text-decoration: line-through; text-decoration-color: var(--ls-red); text-decoration-thickness: 2px; }
.ls-deal__now { font-size: clamp(3rem, 8vw, 4.2rem); font-weight: 900; line-height: 0.95; letter-spacing: -0.02em; color: var(--ls-navy); }
.ls-deal__save { margin: -6px 0 0 !important; font-weight: 800; color: var(--ls-success); }
.ls-deal__list { list-style: none; padding: 18px 0 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; border-top: 1px solid var(--ls-border); display: grid; gap: 10px; }
.ls-deal__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ls-muted); }
.ls-deal__list li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--ls-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 62% no-repeat; }

.ls-upgrade { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; padding: 18px 22px; border-radius: 20px; background: var(--ls-surface); border: 1px dashed var(--ls-tint-2, #C3C6D7); }
.ls-upgrade p { margin: 0; }
.ls-upgrade__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ls-red); color: #fff; font-weight: 900; font-size: 1.2rem; }

/* ---------- Bring a mate ---------- */
.ls-mate { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; padding: clamp(28px, 5vw, 56px); border-radius: 32px; color: #fff;
	background: radial-gradient(70% 90% at 100% 0%, rgba(228, 30, 43, 0.35), transparent 60%), var(--ls-primary); }
.ls-mate .ls-sale-h2 { color: #fff !important; }
.ls-mate .ls-bf-eyebrow { color: #FFB4B9; }
.ls-mate p { color: rgba(255, 255, 255, 0.9); }
.ls-mate__small { font-size: 0.92rem; color: rgba(255, 255, 255, 0.75) !important; margin-bottom: 24px !important; }
.ls-mate__maths { border-radius: 22px; padding: 22px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18); font-variant-numeric: tabular-nums; }
.ls-mate__row { display: flex; justify-content: space-between; padding: 10px 0; font-weight: 700; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.ls-mate__row--total { font-size: 1.5rem; font-weight: 900; border-bottom: 0; padding-top: 16px; }
.ls-mate__row--was { color: rgba(255, 255, 255, 0.6); text-decoration: line-through; border-bottom: 0; padding-top: 0; }

/* ---------- Steps ---------- */
.ls-bf-steps { list-style: none; padding: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; counter-reset: none; }
.ls-bf-steps li { padding: 24px; border-radius: 22px; background: var(--ls-surface); border: 1px solid var(--ls-border); }
.ls-bf-steps h3 { font-size: 1.2rem !important; margin-top: 14px !important; margin-bottom: 8px !important; }
.ls-bf-steps p { margin: 0; color: var(--ls-muted); }
.ls-bf-steps__num { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--ls-navy); color: #fff; font-weight: 900; }

/* ---------- Booking ---------- */
.ls-sale-book { scroll-margin-top: 12px; }

/* ---------- Giveaway ---------- */
.ls-sale-giveaway { color: #fff; padding: clamp(56px, 9vw, 104px) 20px !important; margin-top: 0 !important;
	background: radial-gradient(60% 70% at 0% 0%, rgba(228, 30, 43, 0.4), transparent 60%), radial-gradient(60% 70% at 100% 100%, rgba(85, 101, 190, 0.55), transparent 60%), var(--ls-night); }
.ls-give { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.ls-give .ls-sale-h2 { color: #fff !important; }
.ls-give__lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.9); margin-top: 0 !important; margin-bottom: 26px !important; }
.ls-give__steps { list-style: none; padding: 0 !important; margin-top: 0 !important; margin-bottom: 0 !important; display: grid; gap: 12px; }
.ls-give__steps li { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); }
.ls-give__steps li > span { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--ls-night); font-weight: 900; }
.ls-give__bonus { border-style: dashed !important; border-color: rgba(255, 180, 185, 0.6) !important; }
.ls-give__bonus > span { background: var(--ls-red) !important; color: #fff !important; }
.ls-give__terms { margin-top: 32px !important; padding: 16px 20px; border-radius: 18px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); }
.ls-give__terms summary { cursor: pointer; font-weight: 800; color: #fff; }
.ls-give__terms li { margin: 8px 0; }

/* ---------- Guarantee ---------- */
.ls-guarantee { display: flex; gap: 22px; align-items: center; padding: clamp(22px, 4vw, 34px); border-radius: 28px; background: var(--ls-surface); border: 1px solid var(--ls-border); }
.ls-guarantee img { flex: none; width: 88px; height: 88px; }
.ls-guarantee__title { font-size: clamp(1.4rem, 3vw, 1.8rem) !important; margin-top: 0 !important; margin-bottom: 6px !important; }
.ls-guarantee p { margin: 0; color: var(--ls-muted); }
.ls-guarantee a { color: var(--ls-primary); font-weight: 700; }

/* ---------- FAQ ---------- */
.ls-sale-faq .wp-block-details { border: 1px solid var(--ls-border); border-radius: 18px; padding: 0 20px; margin-top: 0 !important; margin-bottom: 10px !important; background: #fff; }
.ls-sale-faq summary { cursor: pointer; padding: 18px 0; font-weight: 800; }
.ls-sale-faq details p { margin: 0 0 18px; color: var(--ls-muted); }
.ls-sale-faq details a { color: var(--ls-primary); }

/* ---------- Final band ---------- */
.ls-sale-final { color: #fff; text-align: center; padding: clamp(56px, 9vw, 96px) 20px !important; margin-top: 0 !important; background: radial-gradient(60% 80% at 50% 0%, rgba(85, 101, 190, 0.5), transparent 70%), var(--ls-night); }
.ls-sale-final .ls-sale-h2 { color: #fff !important; }
.ls-sale-final .ls-countdown { margin: 10px auto 0; }
.ls-sale-final__ctas { margin-top: 26px; }
.ls-sale-terms { margin: 32px auto 0 !important; max-width: 62ch; font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- Sticky mobile bar ---------- */
.ls-mobile-bar { display: none; }
@media (max-width: 781px) {
	.ls-mobile-bar {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 9999;
		padding: 10px 10px 10px 18px; border-radius: 999px; color: #fff;
		background: rgba(21, 25, 51, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
		box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
		transform: translateY(140%); transition: transform 0.3s ease;
	}
	.ls-mobile-bar.is-shown { transform: none; }
	.ls-mobile-bar__text { display: grid; line-height: 1.2; font-size: 0.8rem; }
	.ls-mobile-bar__text strong { font-size: 1rem; }
	.ls-mobile-bar__text span { color: rgba(255, 255, 255, 0.7); }
	.ls-mobile-bar__btn { flex: none; padding: 12px 20px; border-radius: 999px; background: var(--ls-red); color: #fff !important; font-weight: 800; text-decoration: none !important; }
	.ls-sale-ended .ls-mobile-bar { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 781px) {
	.ls-deals, .ls-mate, .ls-give, .ls-bf-steps { grid-template-columns: 1fr; }
	.ls-countdown { gap: 6px; padding: 6px; border-radius: 20px; width: 100%; box-sizing: border-box; }
	.ls-countdown__unit { min-width: 0; padding: 14px 4px 10px; border-radius: 14px; }
	.ls-countdown__label { letter-spacing: 0.1em; font-size: 0.62rem; }
	.ls-sale-hero__ctas .ls-btn { flex: 1 1 100%; }
	.ls-btn { padding: 0 16px; font-size: 0.98rem; }
	.ls-sale-final { padding-bottom: 120px !important; }
	.ls-guarantee { flex-direction: column; align-items: flex-start; }
	.ls-deal__flag { position: static; display: inline-block; margin-left: 6px; }
}

@media (prefers-reduced-motion: reduce) {
	.ls-sale-pill__dot, .ls-countdown__num.is-tick { animation: none; }
	.ls-btn, .ls-mobile-bar { transition: none; }
}

/* ---------- Clinic buttons on each deal ---------- */
.ls-clinic-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ls-clinic-btns .ls-btn { padding: 0 12px; font-size: 0.95rem; text-align: center; }
.ls-clinic-btns__label { margin: 0 0 -8px !important; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ls-muted); }
.ls-mate .ls-clinic-btns__label { color: rgba(255, 255, 255, 0.75); margin: 0 0 10px !important; }
.ls-clinic-btns__hint { margin: -6px 0 0 !important; font-size: 0.85rem; color: var(--ls-muted); }
.ls-clinic-btns__hint--light { color: rgba(255, 255, 255, 0.75) !important; margin-top: 10px !important; }
.ls-mate .ls-clinic-btns { max-width: 460px; }
@media (max-width: 380px) { .ls-clinic-btns { grid-template-columns: 1fr; } }

/* ---------- Headings: crisp Avenir Black instead of Britannic ----------
 * Britannic Bold's flared strokes look wavy at these sizes on dark
 * backgrounds, so the sale page uses the theme's own Avenir Black (already
 * loaded). The theme still fades words in, but without its blur filter,
 * which leaves text on a separate layer and renders it rough in Chrome. */
.ls-sale .ls-sale-title,
.ls-sale .ls-sale-h2,
.ls-sale .ls-guarantee__title,
.ls-sale .ls-deal__name {
	font-family: var(--wp--preset--font-family--body, Avenir, -apple-system, "Segoe UI", Roboto, Arial, sans-serif) !important;
	font-weight: 900 !important;
	letter-spacing: -0.025em !important;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.ls-sale .ls-sale-title { letter-spacing: -0.035em !important; line-height: 0.95 !important; }
.ls-sale .ls-word { filter: none !important; }

/* Narrow text blocks stay left-aligned with the content column instead of
 * being centred by WordPress's constrained layout. */
.ls-sale-hero .ls-sale-lead { margin-left: max(0px, calc((100% - 1140px) / 2)) !important; margin-right: auto !important; }
.ls-sale-section .ls-sale-sub:not(.has-text-align-center) { margin-left: max(0px, calc((100% - 1080px) / 2)) !important; margin-right: auto !important; }
/* The pill is inline-flex, so WordPress's auto margins don't line it up with
 * the content column on wide screens. Make it a fit-content block on the same
 * left edge as the logo and heading. */
.ls-sale-hero .ls-sale-pill { display: flex; width: fit-content; margin-left: max(0px, calc((100% - 1140px) / 2)) !important; margin-right: auto !important; }
