/* ==========================================================================
   Vehicles cards 
   ========================================================================== */
.me-veh {
	--me-accent: #14a79d;
	--me-accent-dark: #0e8a82;
	--me-support: #a3d5f2;
	--me-support-dark: #86c5ea;
	--me-ink: #1b2a3a;
	--me-text: #52606d;
	--me-muted: #94a3b8;
	--me-line: #e2e8f0;
	--me-soft: #f4f7f9;
	--me-wa-bg: #ecfdf5;
	--me-wa-bg-hover: #d6f6e6;
	--me-wa-ink: #065f46;
	--me-wa-line: #a7e6c8;
	--me-per: 3;          /* cards per view */
	--me-gap: 26px;
	--me-arrow: 56px;

	position: relative;
	padding: 0 calc(var(--me-arrow) + 24px);
	overflow: hidden;     /* keeps the track's side bleed from causing sideways scroll */
	font-family: var(--wvh-font, "Poppins", Helvetica, Arial, sans-serif);
	color: var(--me-text);
}
.me-veh,
.me-veh *,
.me-veh *::before,
.me-veh *::after { box-sizing: border-box; }

/* ---- track: native scroll + snap (swipe works everywhere) -------------------- */
.me-veh .me-veh__track {
	display: flex;
	gap: var(--me-gap);
	margin: 0 -14px;
	padding: 12px 14px 30px;   /* room for the card shadow */
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 14px;
	scroll-behavior: smooth;
	scrollbar-width: none;
	outline: 0;
}
.me-veh__track::-webkit-scrollbar { display: none; }
.me-veh__track:focus-visible { box-shadow: inset 0 0 0 2px var(--me-accent); border-radius: 18px; }

.me-veh .me-veh__slide {
	display: flex;
	flex: 0 0 calc((100% - (var(--me-per) - 1) * var(--me-gap)) / var(--me-per));
	margin: 0;
	padding: 0;
	scroll-snap-align: start;
	list-style: none;
}
.me-veh .me-veh__slide::marker { content: ""; }

/* ---- card ------------------------------------------------------------------ */
.me-veh__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--me-line);
	border-radius: 18px;
	box-shadow: 0 6px 18px rgba(16, 42, 67, 0.07);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.me-veh__card:hover,
.me-veh__card:focus-within {
	box-shadow: 0 18px 36px -8px rgba(16, 42, 67, 0.22);
}

/* ---- media: photo + badge + from-price -------------------------------------- */
.me-veh__media {
	position: relative;
	aspect-ratio: 16 / 9;
	width: 100%;
	overflow: hidden;
	background: #e9eef2;
}
.me-veh .me-veh__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}
.me-veh__badge,
.me-veh__price {
	position: absolute;
	z-index: 2;
	max-width: calc(100% - 24px);
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.me-veh__badge {
	inset-block-start: 12px;
	inset-inline-start: 12px;
	padding: 5px 10px;
	font-size: 11px;
	color: #fff;
	background: rgba(16, 26, 38, .82);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	border-radius: 5px;
}
.me-veh__price {
	inset-block-end: 12px;
	inset-inline-end: 12px;
	padding: 5px 12px;
	font-size: 12.5px;
	font-weight: 700;
	color: #fff;
	background: var(--me-accent);
	border-radius: 5px;
	box-shadow: 0 3px 10px rgba(16, 42, 67, .25);
}

/* ---- body ------------------------------------------------------------------- */
.me-veh__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 24px;
}

.me-veh__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 12px;
	margin-bottom: 8px;
}
.me-veh .me-veh__title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--me-ink);
}
.me-veh__model {
	font-size: 12px;
	font-weight: 500;
	color: var(--me-muted);
}

.me-veh .me-veh__desc {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.65;
	color: var(--me-text);
}

/* ---- specs ------------------------------------------------------------------ */
.me-veh .me-veh__specs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 12px;
	margin: 0 0 16px;
	padding: 14px;
	background: var(--me-soft);
	border: 1px solid #eaf0f4;
	border-radius: 12px;
}
.me-veh .me-veh__spec { min-width: 0; }
.me-veh .me-veh__spec-label {
	display: block;
	margin: 0;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--me-muted);
}
.me-veh .me-veh__spec-label:empty { display: none; }
.me-veh .me-veh__spec-value {
	display: block;
	margin: 1px 0 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--me-ink);
}
.me-veh .me-veh__spec-value.is-hot { color: var(--me-accent); }

/* ---- pills ------------------------------------------------------------------ */
.me-veh .me-veh__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}
.me-veh .me-veh__pill {
	margin: 0;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.5;
	color: #475569;
	background: #eef2f6;
	border-radius: 999px;
	list-style: none;
}
.me-veh .me-veh__pill::marker { content: ""; }

/* ---- buttons (override Hello's pink link colours) ---------------------------- */
.me-veh__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: auto;          /* pins the buttons to the bottom of every card */
	padding-top: 16px;
	border-top: 1px solid #eef2f6;
}
.me-veh__actions:only-child { margin-top: 0; }

.me-veh .me-veh__btn,
.me-veh .me-veh__btn:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-width: 0;
	padding: 11px 12px;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
	border-radius: 9px;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.me-veh .me-veh__btn svg { flex: 0 0 auto; width: 16px; height: 16px; }

.me-veh .me-veh__btn--book,
.me-veh .me-veh__btn--book:visited {
	color: #fff;
	background: var(--me-accent);
	border: 1px solid var(--me-accent);
}
.me-veh .me-veh__btn--book:hover,
.me-veh .me-veh__btn--book:focus-visible {
	color: #fff;
	background: var(--me-accent-dark);
	border-color: var(--me-accent-dark);
}

.me-veh .me-veh__btn--support,
.me-veh .me-veh__btn--support:visited {
	color: var(--me-wa-ink);
	background: var(--me-wa-bg);
	border: 1px solid var(--me-wa-line);
}
.me-veh .me-veh__btn--support:hover,
.me-veh .me-veh__btn--support:focus-visible {
	color: var(--me-wa-ink);
	background: var(--me-wa-bg-hover);
	border-color: #7fd9b4;
}
.me-veh .me-veh__btn:focus-visible { outline: 2px solid var(--me-ink); outline-offset: 2px; }

/* ---- arrows ------------------------------------------------------------------ */
.me-veh .me-veh__arrow,
.me-veh .me-veh__arrow:hover,
.me-veh .me-veh__arrow:focus {
	position: absolute;
	top: calc(50% - 22px);   /* centre of the cards (dots row excluded) */
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--me-arrow);
	height: var(--me-arrow);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--me-accent);
	box-shadow: 0 8px 20px rgba(20, 167, 157, 0.3);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, opacity 0.2s ease;
}
.me-veh .me-veh__arrow:hover,
.me-veh .me-veh__arrow:focus-visible { background: var(--me-accent-dark); }
.me-veh .me-veh__arrow:focus-visible { outline: 2px solid var(--me-accent); outline-offset: 3px; }
/* 8px in from the edge: the root clips overflow, so the focus outline must stay inside it */
.me-veh .me-veh__arrow--prev { left: 8px; }
.me-veh .me-veh__arrow--next { right: 8px; }
.me-veh__arrow svg { width: 24px; height: 24px; }

/* ---- dots -------------------------------------------------------------------- */
.me-veh__dots {
	display: flex;
	justify-content: center;
	gap: 4px;
	min-height: 22px;
	margin-top: -8px;
}
.me-veh .me-veh__dot,
.me-veh .me-veh__dot:hover,
.me-veh .me-veh__dot:focus {
	position: relative;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}
.me-veh__dot::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 9px;
	border-radius: 9px;
	background: #c9d3db;
	transform: translate(-50%, -50%);
	transition: width 0.25s ease, background-color 0.25s ease;
}
.me-veh .me-veh__dot.is-active { width: 34px; border-radius: 11px; }
.me-veh__dot.is-active::before { width: 24px; background: var(--me-accent); }
.me-veh .me-veh__dot:focus-visible { outline: 2px solid var(--me-accent); outline-offset: 0; }

/* everything fits: no arrows / dots */
.me-veh.is-static .me-veh__arrow,
.me-veh.is-static .me-veh__dots { display: none; }

/* ---- static grid (layout="grid", the default): 3 across, no arrows / dots / scrolling ---- */
.me-veh.me-veh--grid { padding: 0; overflow: visible; }
.me-veh.me-veh--grid .me-veh__track {
	flex-wrap: wrap;
	justify-content: center;   /* a lone card on the last row sits in the middle */
	margin: 0;
	padding: 12px 0 30px;
	overflow: visible;
	scroll-snap-type: none;
}
.me-veh.me-veh--grid .me-veh__slide { scroll-snap-align: none; }

/* ---- breakpoints --------------------------------------------------------------- */
/* the section runs edge to edge below ~1360px: keep 20px from the screen sides
   (fades to 0 as the 1320px page container gets its own side margins) */
@media (min-width: 768px) {
	.me-veh.me-veh--grid { padding-inline: max(0px, calc(20px - max(0px, (100vw - 1320px) / 2))); }
}
@media (max-width: 1024px) {
	.me-veh { --me-per: 2; --me-gap: 22px; --me-arrow: 48px; padding: 0 calc(var(--me-arrow) + 16px); }
}
@media (max-width: 767px) {
	/* one card with the next one peeking; swipe + dots (arrows hidden) */
	.me-veh { --me-gap: 16px; padding: 0; }
	.me-veh .me-veh__slide { flex-basis: 84%; }
	.me-veh .me-veh__arrow { display: none; }
	.me-veh__body { padding: 20px; }
	.me-veh .me-veh__title { font-size: 19px; }
	.me-veh.me-veh--grid { --me-per: 1; }
	.me-veh.me-veh--grid .me-veh__slide { flex-basis: 100%; }
}
@media (max-width: 400px) {
	.me-veh__actions { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.me-veh .me-veh__track { scroll-behavior: auto; }
	.me-veh *, .me-veh *::before { transition: none !important; }
	.me-veh__card:hover,
	.me-veh__card:focus-within { transform: none; }
}
