/**
 * Camper van listing page.
 * Scoped to .cv-* so it cannot leak into the block theme's own styles,
 * apart from a few deliberate site-header / footer improvements at the end.
 */

/* Design tokens live on :root so the single-van page can reuse the card
   styles below without sitting inside a .cv-page wrapper. */
:root {
	--cv-navy: #0f385c;
	--cv-navy-700: #0b2b47;
	--cv-navy-100: #e7eef4;
	--cv-accent: #d8613c;
	--cv-accent-700: #b94c2b;
	--cv-ink: #16212b;
	--cv-muted: #5d6b78;
	--cv-line: #dfe5ea;
	--cv-bg: #f4f6f8;
	--cv-card: #ffffff;
	--cv-radius: 14px;
	--cv-shadow: 0 1px 2px rgba(16, 33, 48, .06), 0 8px 24px rgba(16, 33, 48, .07);
	--cv-shadow-lg: 0 2px 4px rgba(16, 33, 48, .07), 0 18px 40px rgba(16, 33, 48, .13);
}

.cv-page {
	background: var(--cv-bg);
	color: var(--cv-ink);
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	padding-bottom: 0;
}

.cv-page *,
.cv-page *::before,
.cv-page *::after {
	box-sizing: border-box;
}

.cv-shell {
	max-width: 1300px;
	margin-inline: auto;
	padding-inline: clamp(16px, 4vw, 32px);
}

/* Headings on this page use the UI face, not the theme's serif. */
.cv-page h1,
.cv-page h2,
.cv-page h3 {
	font-family: inherit;
	color: var(--cv-ink);
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0;
}

/* ---------------------------------------------------------------- intro -- */

.cv-intro {
	background: linear-gradient(180deg, #ffffff 0%, var(--cv-bg) 100%);
	border-bottom: 1px solid var(--cv-line);
	padding: clamp(32px, 5vw, 56px) 0 clamp(24px, 3.5vw, 36px);
}

.cv-eyebrow {
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--cv-accent-700);
}

.cv-intro__title {
	font-size: clamp(30px, 4.4vw, 46px);
	font-weight: 700;
}

.cv-intro__lead {
	margin: 14px 0 0;
	max-width: 62ch;
	font-size: clamp(15px, 1.3vw, 17px);
	color: var(--cv-muted);
}

.cv-stats {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(20px, 4vw, 44px);
	margin: 26px 0 0;
	padding: 0;
	list-style: none;
}

.cv-stats li {
	display: flex;
	flex-direction: column;
	padding-left: 14px;
	border-left: 3px solid var(--cv-accent);
}

.cv-stats__num {
	font-size: clamp(18px, 2vw, 22px);
	font-weight: 700;
	color: var(--cv-navy);
	white-space: nowrap;
}

.cv-stats__label {
	font-size: 13px;
	color: var(--cv-muted);
}

/* ------------------------------------------------------------ dealer bar -- */

.cv-dealerbar {
	background: var(--cv-navy);
	color: #fff;
	font-size: 14px;
	padding: 10px 0;
}

.cv-dealerbar a {
	color: #fff;
	text-decoration: underline;
	margin-left: 10px;
}

/* --------------------------------------------------------------- toolbar -- */

.cv-toolbar {
	position: sticky;
	/* Sits directly under the sticky site header. */
	top: var(--ac-header-h, 0px);
	z-index: 30;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(1.6) blur(10px);
	border-bottom: 1px solid var(--cv-line);
	padding: 14px 0 0;
}

.cv-toolbar__inner {
	display: grid;
	grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(130px, 1fr));
	gap: 12px;
}

/* On wide screens the wrapper is transparent, so the four selects sit
   directly in the toolbar grid; on narrow screens it becomes the collapsible
   panel toggled by .cv-filtertoggle. */
.cv-filterfields {
	display: contents;
}

.cv-filtertoggle {
	display: none;
	width: 100%;
	height: 42px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--cv-navy);
	background: #fff;
	border: 1px solid var(--cv-line);
	border-radius: 9px;
	cursor: pointer;
}

.cv-filtertoggle::after {
	content: "";
	display: inline-block;
	margin-left: 8px;
	border: 5px solid transparent;
	border-top-color: currentColor;
	transform: translateY(3px);
}

.cv-filtertoggle[aria-expanded="true"]::after {
	transform: translateY(-2px) rotate(180deg);
}

.cv-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.cv-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--cv-muted);
}

.cv-input {
	width: 100%;
	height: 42px;
	padding: 0 12px;
	font: inherit;
	font-size: 14px;
	color: var(--cv-ink);
	background: #fff;
	border: 1px solid var(--cv-line);
	border-radius: 9px;
	appearance: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

select.cv-input {
	padding-right: 34px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235d6b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	cursor: pointer;
}

.cv-input:focus {
	outline: none;
	border-color: var(--cv-navy);
	box-shadow: 0 0 0 3px rgba(15, 56, 92, .15);
}

.cv-toolbar__status {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 12px;
}

.cv-count {
	margin: 0;
	font-size: 13px;
	color: var(--cv-muted);
}

.cv-count strong {
	color: var(--cv-ink);
}

.cv-reset,
.cv-linkbtn {
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--cv-navy);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cv-reset:hover,
.cv-linkbtn:hover {
	color: var(--cv-accent-700);
}

/* ------------------------------------------------------------------ grid -- */

.cv-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: clamp(18px, 2vw, 26px);
	padding-block: clamp(20px, 3vw, 30px) clamp(30px, 4vw, 48px);
}

.cv-card {
	display: flex;
	flex-direction: column;
	background: var(--cv-card);
	border: 1px solid var(--cv-line);
	border-radius: var(--cv-radius);
	overflow: hidden;
	box-shadow: var(--cv-shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cv-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--cv-shadow-lg);
	border-color: #cfd8e0;
}

.cv-card[hidden] {
	display: none;
}

/* Media -------------------------------------------------------------- */

.cv-card__media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--cv-navy-100);
	overflow: hidden;
	text-decoration: none;
}

.cv-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.cv-card:hover .cv-card__img {
	transform: scale(1.04);
}

.cv-card__img--empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #8fa3b5;
	background: repeating-linear-gradient(45deg, #eef2f6 0 12px, #e8edf2 12px 24px);
}

.cv-card__img--empty .cv-icon {
	width: 46px;
	height: 46px;
	stroke-width: 1.3;
}

.cv-card__imgtext {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .02em;
}

/* Chips over the photo */
.cv-chip {
	position: absolute;
	top: 12px;
	display: inline-block;
	padding: 5px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	border-radius: 999px;
	backdrop-filter: blur(4px);
}

.cv-chip--type {
	left: 12px;
	color: var(--cv-navy);
	background: rgba(255, 255, 255, .93);
	box-shadow: 0 1px 3px rgba(16, 33, 48, .18);
}

.cv-chip--status {
	right: 12px;
	color: #fff;
}

.cv-chip--sold {
	background: #b3261e;
}

.cv-chip--reserved {
	background: #b26a00;
}

.cv-chip--now {
	background: #17794b;
}

.cv-chip--note {
	background: var(--cv-navy);
}

/* Body --------------------------------------------------------------- */

.cv-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
	padding: 16px 18px 18px;
}

.cv-card__title {
	font-size: 18px;
	font-weight: 700;
}

.cv-card__title a {
	color: var(--cv-ink);
	text-decoration: none;
}

.cv-card__title a:hover {
	color: var(--cv-navy);
}

/* Make the whole card clickable via the title link. */
.cv-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cv-card {
	position: relative;
}

.cv-card__place {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: -4px 0 0;
	font-size: 13px;
	color: var(--cv-muted);
}

.cv-icon {
	width: 16px;
	height: 16px;
	flex: none;
}

/* Specs -------------------------------------------------------------- */

.cv-specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 12px;
	margin: 4px 0 0;
	padding: 14px 0 0;
	list-style: none;
	border-top: 1px solid var(--cv-line);
}

.cv-spec {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
	font-size: 13.5px;
	color: #3b4956;
}

.cv-spec .cv-icon {
	color: var(--cv-muted);
}

.cv-spec span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Footer of the card ------------------------------------------------- */

.cv-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--cv-line);
}

.cv-price {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cv-price__main {
	font-size: 21px;
	font-weight: 700;
	color: var(--cv-navy);
	white-space: nowrap;
	letter-spacing: -0.01em;
}

.cv-price__main--ask {
	font-size: 17px;
	color: var(--cv-muted);
}

.cv-price__note {
	font-size: 11.5px;
	color: var(--cv-muted);
}

.cv-price__dealer {
	margin-top: 3px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--cv-accent-700);
	white-space: nowrap;
}

.cv-btn {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--cv-navy);
	border-radius: 9px;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease;
}

.cv-btn:hover {
	background: var(--cv-navy-700);
	color: #fff;
}

.cv-btn--lg {
	padding: 14px 26px;
	font-size: 15px;
	background: var(--cv-accent);
}

.cv-btn--lg:hover {
	background: var(--cv-accent-700);
}

/* --------------------------------------------------------- empty states -- */

.cv-noresults,
.cv-empty {
	padding: 48px 0 60px;
	text-align: center;
	color: var(--cv-muted);
}

/* ------------------------------------------------------------------- CTA -- */

.cv-cta {
	background: var(--cv-navy);
	color: #fff;
}

.cv-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-block: clamp(30px, 4vw, 46px);
}

.cv-cta__title {
	font-size: clamp(21px, 2.6vw, 27px);
	font-weight: 700;
	color: #fff;
}

.cv-cta__text {
	margin: 8px 0 0;
	max-width: 56ch;
	font-size: 15px;
	color: rgba(255, 255, 255, .82);
}

.cv-dealerlink {
	margin: 0;
	padding: 18px 0;
	text-align: center;
	font-size: 12.5px;
}

.cv-dealerlink a {
	color: var(--cv-muted);
	text-decoration: none;
}

.cv-dealerlink a:hover {
	color: var(--cv-navy);
	text-decoration: underline;
}

/* ---------------------------------------------------------- breakpoints -- */

@media (max-width: 1000px) {
	.cv-toolbar__inner {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cv-field--search {
		grid-column: 1 / -1;
	}
}

@media (max-width: 560px) {
	.cv-toolbar {
		position: static;
	}

	.cv-toolbar__inner {
		grid-template-columns: minmax(0, 1fr);
	}

	.cv-filtertoggle {
		display: block;
	}

	.cv-filterfields {
		display: none;
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}

	.cv-filterfields.is-open {
		display: grid;
	}

	.cv-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.cv-card__foot {
		flex-direction: column;
		align-items: stretch;
	}

	.cv-btn {
		width: 100%;
	}

	.cv-cta__inner .cv-btn--lg {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cv-card,
	.cv-card__img {
		transition: none;
	}

	.cv-card:hover {
		transform: none;
	}

	.cv-card:hover .cv-card__img {
		transform: none;
	}
}


/* ------------------------------------------------------------------ sold -- */

.cv-card--sold .cv-card__img {
	filter: grayscale(1);
	opacity: .62;
}

.cv-card--sold:hover .cv-card__img {
	transform: none;
}

.cv-card--sold .cv-card__title a {
	color: var(--cv-muted);
}

.cv-price__main--sold {
	color: #b3261e;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-size: 19px;
}

.cv-price__was {
	font-size: 12.5px;
	color: var(--cv-muted);
	text-decoration: line-through;
}

.cv-card--sold .cv-btn {
	background: #5d6b78;
}

.cv-card--sold .cv-btn:hover {
	background: #47535e;
}

/* Hide-sold toggle in the toolbar */
.cv-soldtoggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--cv-muted);
	cursor: pointer;
	white-space: nowrap;
}

.cv-soldtoggle input {
	width: 16px;
	height: 16px;
	accent-color: var(--cv-navy);
	cursor: pointer;
}

.cv-toolbar__status {
	flex-wrap: wrap;
}

.cv-toolbar__actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

/* Trade prices on the card: one line each, with the euro equivalent. */
/* Trade prices sit on their own row under the price and button, so the
   labels and the euro figures are never squeezed by the button. */
.cv-price__dealer {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex-basis: 100%;
	margin-top: 2px;
	padding-top: 10px;
	border-top: 1px solid var(--cv-line-soft, #eef2f5);
	white-space: normal;
}

.cv-trade {
	display: flex;
	align-items: baseline;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--cv-accent-700);
	white-space: nowrap;
}

/* Fixed label column so the two figures line up under each other. */
.cv-trade__tag {
	flex: none;
	width: 88px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--cv-muted);
	text-transform: none;
}

.cv-trade em {
	font-style: normal;
	font-weight: 500;
	color: var(--cv-muted);
}

.cv-card--sold .cv-trade,
.cv-card--sold .cv-trade em {
	color: #98a3ad;
	text-decoration: line-through;
}
