/* Rent Vehicles hub — rebuilt to match
   design_handoff_cbm_marketplace/pages/CBM Rent Vehicles.dc.html exactly
   (see page-templates/template-rent-vehicles.php's header comment for the
   full rationale). Depot/Services share this same page structure.
   The old .cbm-rv-sponsor-row__flex/__wraptext hack has been replaced by
   the shared .cbm-textwrap component (components.css) — see
   inc/template-tags.php's cbm_render_intro_textwrap(). */

.cbm-rv-grid { display: grid; grid-template-columns: 1fr minmax(260px, 320px); gap: 32px; padding-block: 20px 56px; align-items: start; }
.cbm-rv-main { min-width: 0; }

.cbm-rv-cat-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 32px; }
.cbm-rv-cat-btn {
	display: block; background: var(--cbm-red); color: #fff; font-weight: 700; font-size: 14px;
	letter-spacing: 0.03em; text-transform: uppercase; text-align: center; padding: 18px; border-radius: 2px;
}
.cbm-rv-cat-btn:hover { filter: brightness(1.1); }

.cbm-rv-section-heading { font-family: var(--cbm-font-heading); font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: 0.02em; margin: 0 0 14px; }

/* Auto-scrolling right-to-left ticker: .cbm-rv-dealers holds the tile list
   rendered TWICE back to back (see template-used-vehicles.php) so the
   animation can loop from translateX(0) to translateX(-50%) — exactly one
   full copy's width — and jump back to 0% unnoticed, reading as a
   continuous drift rather than a visible reset. Pauses on hover so a
   visitor can actually click a tile without it sliding out from under
   them; falls back to the original manual scroll for anyone who prefers
   reduced motion. */
.cbm-rv-dealers-viewport { overflow: hidden; margin-bottom: 40px; }
.cbm-rv-dealers { display: flex; gap: 14px; width: max-content; padding-bottom: 10px; animation: cbm-dealers-scroll 32s linear infinite; }
.cbm-rv-dealers-viewport:hover .cbm-rv-dealers { animation-play-state: paused; }
@keyframes cbm-dealers-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.cbm-rv-dealers { animation: none; overflow-x: auto; scroll-snap-type: x mandatory; }
	.cbm-rv-dealers-viewport { overflow: visible; }
}
.cbm-rv-dealer-tile {
	flex: 0 0 200px; aspect-ratio: 16/9; border-radius: 4px; display: flex;
	align-items: center; justify-content: center; padding: 12px; text-align: center; transition: filter 0.15s;
}
.cbm-rv-dealer-tile:hover { filter: brightness(1.2); }
.cbm-rv-dealer-tile span { font-family: var(--cbm-font-heading); font-weight: 700; font-size: 14px; }
.cbm-rv-dealer-tile--logo { background: #fff; padding: 0; }
.cbm-rv-dealer-tile--logo img { width: 100%; height: 100%; object-fit: fill; }
/* Parnell's logo is a very wide/flat banner shape (500x64) — stretching it
   to fill the tile's full height like the others would badly distort it,
   so it fills the width only and keeps its own natural proportions. */
.cbm-rv-dealer-tile--parnell-coaches img { height: auto; object-fit: contain; }

.cbm-rv-offers { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cbm-gap); margin-bottom: 20px; }
.cbm-rv-offer { display: flex; flex-direction: column; border: 1px solid var(--cbm-hairline); border-radius: var(--cbm-radius); overflow: hidden; background: #fff; color: var(--cbm-near-black-alt); }

.cbm-vphoto { position: relative; display: block; aspect-ratio: 16/10; overflow: hidden; background: linear-gradient(135deg,#dcdcdc,#c2c2c2); }
.cbm-vphoto-zoom { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.cbm-vphoto:hover .cbm-vphoto-zoom { transform: scale(1.08); }

/* "Featured Ad" — magazine_checked on the listing (the seller paid extra
   to also appear in the print magazine, unrelated to the standard/bronze/
   silver/gold package tier). Diagonal green ribbon, top-left corner. */
.cbm-rv-offer__featured {
	position: absolute; top: 10px; left: -32px; z-index: 1; width: 130px;
	background: var(--cbm-green); color: #fff; font-size: 10px; font-weight: 700;
	letter-spacing: 0.04em; text-transform: uppercase; text-align: center; padding: 3px 0;
	transform: rotate(-45deg); box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cbm-rv-offer__price {
	position: absolute; top: 10px; right: 10px; background: var(--cbm-red); color: #fff; font-weight: 700;
	font-size: 13px; padding: 4px 10px; border-radius: 2px;
}
.cbm-rv-offer__body { padding: 14px 16px 16px; }
.cbm-rv-offer__title { display: block; font-family: var(--cbm-font-heading); font-weight: 600; font-size: 16px; }
.cbm-rv-offer__divider { border: none; border-top: 1px dashed var(--cbm-hairline); margin: 10px 0; }
.cbm-rv-offer__row { display: flex; justify-content: space-between; font-size: 12px; color: var(--cbm-muted-grey); margin-bottom: 4px; }
.cbm-rv-offer__row span:last-child { color: var(--cbm-near-black-alt); font-weight: 500; }
.cbm-rv-offer__seller { display: block; font-weight: 700; font-size: 13px; color: var(--cbm-red); }

.cbm-rv-more-btn {
	display: block; width: 100%; box-sizing: border-box; text-align: center; background: #fff; color: #333;
	border: 1px solid var(--cbm-hairline); font-weight: 700; font-size: 13px; text-transform: uppercase;
	letter-spacing: 0.02em; padding: 14px; border-radius: 2px;
}
.cbm-rv-more-btn:hover { background: var(--cbm-fill-light); }

.cbm-rv-sidebar { display: flex; flex-direction: column; gap: 16px; }
.cbm-rv-sidebar__billboard { width: 100%; max-width: 300px; min-height: 426px; }
.cbm-rv-sidebar__billboard .cbm-ad-empty-slot { background: var(--cbm-fill-light); border: 1px dashed #757880; border-radius: 2px; min-height: 426px; }
.cbm-rv-sidebar__facebook {
	display: block; text-align: center; border: 1px solid var(--cbm-hairline); border-radius: 2px; padding: 18px;
	font-family: var(--cbm-font-heading); font-weight: 700; font-size: 15px; color: #333;
}
.cbm-rv-sidebar__facebook:hover { background: var(--cbm-fill-light); }

@media (max-width: 1024px) {
	.cbm-rv-grid { grid-template-columns: 1fr; }
	.cbm-rv-sidebar { flex-direction: row; }
	.cbm-rv-sidebar__billboard { max-width: none; flex: 1; }
	.cbm-rv-sidebar__facebook { flex: 1; }
}
@media (max-width: 640px) {
	.cbm-rv-cat-buttons { grid-template-columns: 1fr; }
	.cbm-rv-offers { grid-template-columns: 1fr; }
	.cbm-rv-sidebar { flex-direction: column; }
}
