/*--------------------------------------------------------------
Collection sales page (template-collection-sales.php)

Uses the site tokens from custom.css (:root variables) with
fallbacks. All classes are prefixed csp- so the global
md-platform styles (p, h1-h6, a, ul, iframe) are overridden
only inside .csp.
--------------------------------------------------------------*/

.csp {
	--csp-ink: var(--color-dark, #170800);
	--csp-brown: var(--color-brown, #381300);
	--csp-sand: var(--color-sand, #C69C6D);
	--csp-wheat: var(--color-wheat, #F5DEB3);
	--csp-light: var(--color-light, #fdf9f0);
	--csp-cta: var(--color-green, #33c682);
	--csp-cta-dark: var(--color-green-dark, #20875d);
	--csp-line: #e8dcc6;
	--csp-head: var(--title-font, 'PT Serif', Georgia, serif);
	--csp-body: var(--body-font, 'Roboto', Arial, sans-serif);
	font-family: var(--csp-body);
	color: var(--csp-ink);
	line-height: 1.6;
}
.csp *,
.csp *::before,
.csp *::after { box-sizing: border-box; }

.csp h1, .csp h2, .csp h3 {
	font-family: var(--csp-head);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.2;
	color: inherit;
	margin: 0 0 16px;
}
.csp h1 { font-size: 2.1rem; }
.csp h2 { font-size: 1.75rem; }
.csp h3 { font-size: 1.2rem; }
.csp p { color: inherit; font-size: 1rem; line-height: 1.7; margin: 0 0 16px; }
.csp ul { list-style: none; margin: 0; padding: 0; }
.csp a { color: inherit; }

.csp-wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.csp-wrap--narrow { max-width: 780px; }
.csp-section { padding: 56px 0; background: #fff; }

/* Buttons */
.csp-btn {
	display: inline-block;
	padding: 15px 34px;
	background: var(--csp-cta);
	color: #000;
	font-weight: 700;
	font-size: 1.1rem;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	border: 2px solid var(--csp-cta);
	border-radius: 100px;
	transition: background .2s, color .2s, border-color .2s;
}
.csp-btn:hover,
.csp-btn:focus-visible {
	background: var(--csp-cta-dark);
	border-color: var(--csp-cta-dark);
	color: #fff;
	text-decoration: none;
}
.csp a:focus-visible,
.csp summary:focus-visible { outline: 3px solid var(--color-blue, #22ddf6); outline-offset: 3px; }
.csp-admin-note { padding: 10px 14px; background: #fef3ec; border-left: 4px solid #f80; color: #000; font-size: .9rem; }

/* Price */
.csp-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.csp-price__now { font-family: var(--csp-head); font-size: 2rem; font-weight: 700; line-height: 1; }
.csp-price__was { font-size: 1.1rem; opacity: .65; }
.csp-badge {
	padding: 3px 10px;
	background: var(--csp-wheat);
	color: var(--csp-brown);
	font-size: .85rem;
	font-weight: 700;
	border-radius: 100px;
}
.csp-note { margin: 10px 0 0; font-size: .9rem; opacity: .8; }
.csp .screen-reader-text {
	position: absolute !important; display: block;
	width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Hero */
.csp-hero {
	padding: 40px 0 56px;
	color: #fff;
	background:
		linear-gradient(180deg, rgba(23, 8, 0, .72), rgba(56, 19, 0, .86)),
		var(--csp-hero, none) center / cover no-repeat,
		var(--csp-brown);
}
.csp-hero__grid { display: grid; gap: 28px; align-items: center; }
.csp-hero__copy { max-width: 700px; }
.csp-hero .csp-tagline { font-family: var(--csp-head); font-size: 1.3rem; line-height: 1.4; color: var(--csp-wheat); }
.csp-intro p { color: rgba(255, 255, 255, .92); }
.csp-intro p:last-child { margin-bottom: 0; }
.csp-owned { display: inline-block; padding: 6px 14px; background: rgba(255, 255, 255, .12); border-radius: 100px; font-weight: 700; }
.csp-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 24px; }
.csp-video {
	position: relative;
	padding-top: 56.25%;
	overflow: hidden;
	background: #000;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .45);
}
/* The theme's FitVids script wraps iframes in its own padded box; neutralise it. */
.csp-video .fluid-width-video-wrapper {
	position: static !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
}
.csp-video br,
.csp-video p:empty { display: none; }
.csp-video iframe,
.csp-video video {
	position: absolute; top: 0; left: 0;
	width: 100%; height: 100%;
	margin: 0; border: 0;
}

/* Included + purchase card */
.csp-included__grid { display: grid; gap: 36px; align-items: start; }
.csp-checks li {
	position: relative;
	padding: 2px 0 2px 38px;
	margin: 0 0 16px;
	font-size: 1.05rem;
	line-height: 1.5;
}
.csp-checks li::before {
	content: "";
	position: absolute; top: 3px; left: 0;
	width: 24px; height: 24px;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat,
		var(--csp-cta);
	border-radius: 50%;
}
.csp-details { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--csp-line); }
.csp-details ul { list-style: disc; padding-left: 22px; margin: 0 0 16px; }
.csp-details img { max-width: 100%; height: auto; border-radius: 6px; }
.csp-card {
	padding: 28px;
	background: var(--csp-light);
	border: 2px solid var(--csp-sand);
	border-radius: 12px;
}
.csp-card h3 { font-size: 1.3rem; }
.csp-card .csp-price { margin: 0 0 20px; }
.csp-card .csp-btn { display: block; width: 100%; }
.csp-upsell { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid var(--csp-line); font-size: .9rem; }
.csp-upsell a { display: block; margin-top: 4px; font-weight: 700; }

/* Features */
.csp-features { background: var(--csp-light); }
.csp-features__grid { display: grid; gap: 28px; margin-top: 8px; }
.csp-feature i { display: block; margin-bottom: 12px; font-size: 1.9rem; line-height: 1; color: var(--csp-sand); }
.csp-feature p { margin: 0; }

/* FAQ (native details, works without JS) */
.csp-faq__item { border-bottom: 1px solid var(--csp-line); }
.csp-faq__item:first-of-type { border-top: 1px solid var(--csp-line); }
.csp-faq__item summary {
	position: relative;
	padding: 20px 40px 20px 0;
	font-weight: 700;
	font-size: 1.05rem;
	cursor: pointer;
	list-style: none;
}
.csp-faq__item summary::-webkit-details-marker { display: none; }
.csp-faq__item summary::after {
	content: "+";
	position: absolute; right: 4px; top: 50%;
	transform: translateY(-50%);
	font-size: 1.6rem; font-weight: 400; line-height: 1;
}
.csp-faq__item[open] summary::after { content: "\2212"; }
.csp-faq__answer { padding: 0 0 20px; }
.csp-faq__answer p:last-child { margin-bottom: 0; }

/* Closing CTA */
.csp-final { padding: 64px 0; background: var(--csp-brown); color: #fff; text-align: center; }
.csp-final .csp-tagline { color: var(--csp-wheat); font-family: var(--csp-head); font-size: 1.2rem; }
.csp-final__cta { justify-content: center; }
.csp-final .csp-price { justify-content: center; }

/* Sticky mobile purchase bar */
.csp-sticky {
	position: fixed; left: 0; right: 0; bottom: 0;
	z-index: 900;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid var(--csp-line);
	box-shadow: 0 -4px 18px rgba(0, 0, 0, .12);
	transform: translateY(110%);
	transition: transform .25s ease;
}
.csp-sticky.is-visible { transform: none; }
.csp-sticky .csp-price__now { font-size: 1.3rem; }
.csp-sticky .csp-price__was { font-size: .9rem; }
.csp-sticky .csp-badge { display: none; }
.csp-sticky .csp-btn { padding: 12px 24px; font-size: 1rem; white-space: nowrap; }
.csp.has-sticky { padding-bottom: 72px; }

/* Tablet and up */
@media (min-width: 768px) {
	.csp h1 { font-size: 2.8rem; }
	.csp h2 { font-size: 2.1rem; }
	.csp-section { padding: 80px 0; }
	.csp-hero { padding: 80px 0; }
	.csp-hero__grid.has-video { grid-template-columns: 1fr 1.05fr; gap: 48px; }
	.csp-hero__grid.has-video .csp-hero__media { order: 2; }
	.csp-included__grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 56px; }
	.csp-card { position: sticky; top: 120px; }
	.csp-features__grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
	.csp-sticky { display: none; }
	.csp.has-sticky { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.csp-sticky, .csp-btn { transition: none; }
}
