/* Used Vehicles hub/search + detail page. */

.cbm-vehicles-hero { padding-block: 8px 24px; }
.cbm-vehicles-hero h1 { font-family: var(--cbm-font-heading); font-size: 32px; margin: 0 0 6px; }
.cbm-vehicles-hero p { color: var(--cbm-body-grey); margin: 0; }

.cbm-vehicles-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.cbm-vehicles-filters input,
.cbm-vehicles-filters select {
	padding: 10px 12px; border: 1px solid var(--cbm-hairline); border-radius: 2px; font-size: 13px;
}
.cbm-vehicles-filters input[type="search"] { flex: 1 1 240px; }

.cbm-vehicle-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--cbm-gap);
	margin-top: 20px;
}
@media (max-width: 1024px) { .cbm-vehicle-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cbm-vehicle-grid { grid-template-columns: 1fr; } }

.cbm-vehicle-card {
	display: block; border: 1px solid var(--cbm-hairline); border-radius: var(--cbm-radius);
	overflow: hidden; color: var(--cbm-near-black-alt); background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.cbm-vehicle-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.12); transform: translateY(-2px); }
.cbm-vehicle-card__media { display: block; aspect-ratio: 16/10; background: var(--cbm-fill-light); overflow: hidden; }
.cbm-vehicle-card__media img { width: 100%; height: 100%; object-fit: cover; }
.cbm-vehicle-card__body { display: block; padding: 14px 16px 16px; }
.cbm-vehicle-card__manufacturer {
	display: block; font-family: var(--cbm-font-mono); font-size: 10px; letter-spacing: 0.08em;
	text-transform: uppercase; color: var(--cbm-muted-grey);
}
.cbm-vehicle-card__title { display: block; font-family: var(--cbm-font-heading); font-weight: 600; font-size: 16px; margin-top: 2px; }
.cbm-vehicle-card__meta { display: block; font-size: 12px; color: var(--cbm-muted-grey); margin-top: 8px; }
.cbm-vehicle-card__footer {
	display: flex; justify-content: space-between; align-items: center;
	margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--cbm-hairline);
}
.cbm-vehicle-card__price { font-family: var(--cbm-font-mono); font-weight: 600; font-size: 15px; }
.cbm-vehicle-card__location { font-size: 11px; color: var(--cbm-muted-grey); }

.cbm-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.cbm-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 32px; height: 32px; padding: 0 8px;
	border: 1px solid var(--cbm-hairline); border-radius: 2px; font-size: 13px; color: var(--cbm-near-black-alt);
}
.cbm-pagination .page-numbers.current { background: var(--cbm-red); color: #fff; border-color: var(--cbm-red); }

.cbm-vehicles-empty { padding: 40px 0; color: var(--cbm-muted-grey); text-align: center; }

/* Detail page */
.cbm-vehicle-detail { padding-block: 32px 56px; display: flex; flex-direction: column; gap: 16px; }
.cbm-vehicle-detail__main-photo { aspect-ratio: 16/9; background: var(--cbm-fill-light); border-radius: var(--cbm-radius); overflow: hidden; }
.cbm-vehicle-detail__main-photo img { width: 100%; height: 100%; object-fit: cover; }
.cbm-vehicle-detail__gallery-counter { font-size: 12px; color: var(--cbm-muted-grey); margin: 8px 0 0; }
.cbm-vehicle-detail__thumbs { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
/* Gallery now sits inside .cbm-vehicle-detail__main (left grid column,
   alongside specs/description) rather than full-width above the whole
   grid — explicit spacing below it since it's no longer a flex sibling
   relying on .cbm-vehicle-detail's own gap. */
.cbm-vehicle-detail__gallery { margin-bottom: 20px; }
/* Generous padding, not the image's own tight bounds — a user repeatedly
   found real clicks on these unresponsive despite everything else on the
   page (including a tab toggle right next to them, same delegated-click
   approach) working fine; a small zero-padding hit target (90x64px image
   + 2px border, nothing more) is the most likely explanation left once
   JS-blocked, caching and browser-specific causes were all ruled out —
   any minor rendering/DPI discrepancy leaves very little margin for a
   real mouse click to land within bounds. */
.cbm-vehicle-detail__thumb-btn { padding: 6px; margin: -6px; border: 2px solid transparent; border-radius: 4px; background: none; cursor: pointer; line-height: 0; }
.cbm-vehicle-detail__thumb-btn img { width: 90px; height: 64px; object-fit: cover; border-radius: 1px; display: block; pointer-events: none; }
.cbm-vehicle-detail__thumb-btn.is-active { border-color: var(--cbm-red); }

.cbm-vehicle-detail__header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.cbm-vehicle-detail__header h1 { font-family: var(--cbm-font-heading); font-size: 28px; margin: 0; }
/* No font-family override — matches .cbm-rv-offer__price (the hub/search
   card price, rent-vehicles.css), which also doesn't set one and just
   inherits the page's normal body font. The earlier var(--cbm-font-mono)
   here wasn't a loading bug, it was a real font-FAMILY mismatch: IBM Plex
   Mono is a genuinely different typeface with its own dotted-zero design,
   present regardless of which weight loads. */
.cbm-vehicle-detail__price { font-size: 22px; font-weight: 700; color: var(--cbm-red); }
.cbm-vehicle-detail__location { color: var(--cbm-muted-grey); margin: 0; }

.cbm-vehicle-detail__top-ad { margin-top: 14px; }
.cbm-vehicle-detail__top-ad .cbm-ad-empty-slot { display: flex; align-items: center; justify-content: center; height: 90px; background: var(--cbm-fill-light); border: 1px dashed #757880; border-radius: 2px; }

.cbm-vehicle-detail__grid { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin-top: 16px; }
@media (max-width: 1024px) { .cbm-vehicle-detail__grid { grid-template-columns: 1fr; } }

.cbm-vehicle-detail__related { margin-top: 40px; }
.cbm-vehicle-detail__related h2 { font-family: var(--cbm-font-heading); font-size: 22px; margin-bottom: 4px; }
.cbm-vehicle-detail__related-intro { color: var(--cbm-muted-grey); margin: 0 0 16px; }

/* Guest-facing teaser shown in place of full listing/directory details —
   see inc/template-tags.php's cbm_render_member_gate_teaser(). */
.cbm-member-gate {
	border: 1px solid var(--cbm-hairline); border-radius: var(--cbm-radius); background: var(--cbm-fill-lighter);
	padding: 28px 24px; text-align: center; margin-top: 20px; max-width: 480px;
}
.cbm-member-gate h2 { font-family: var(--cbm-font-heading); font-size: 20px; margin: 0 0 8px; }
.cbm-member-gate p { color: var(--cbm-body-grey); font-size: 14px; margin: 0 0 16px; }
.cbm-member-gate .cbm-btn { display: inline-block; }
.cbm-member-gate__login { margin-top: 14px !important; font-size: 13px !important; }

.cbm-spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; margin: 12px 0 20px; }
.cbm-spec-grid__row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--cbm-hairline); font-size: 13px; }
.cbm-spec-grid__row dt { color: var(--cbm-muted-grey); margin: 0; }
.cbm-spec-grid__row dd { margin: 0; font-weight: 600; }
@media (max-width: 640px) { .cbm-spec-grid { grid-template-columns: 1fr; } }

.cbm-feature-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.cbm-feature-chip {
	font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 2px;
	background: var(--cbm-fill-light); color: var(--cbm-near-black-alt);
}

.cbm-contact-card { border: 1px solid var(--cbm-hairline); border-radius: var(--cbm-radius); padding: 0; margin-bottom: 16px; overflow: hidden; }
.cbm-contact-card h2 { font-size: 15px; margin: 0 0 10px; }
.cbm-contact-card__name { font-weight: 700; margin: 0 0 4px; }
.cbm-contact-card__phone { font-family: var(--cbm-font-mono); color: var(--cbm-body-grey); margin: 0; }

.cbm-contact-card__tabs { display: flex; border-bottom: 1px solid var(--cbm-hairline); }
.cbm-contact-card__tab { flex: 1; padding: 12px 8px; border: none; background: var(--cbm-fill-lighter); font-family: var(--cbm-font-heading); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--cbm-muted-grey); cursor: pointer; }
.cbm-contact-card__tab.is-active { background: #fff; color: var(--cbm-near-black); box-shadow: inset 0 -2px 0 var(--cbm-red); }
.cbm-contact-card__panel { padding: 16px 20px; }
.cbm-contact-card__other { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--cbm-hairline); }
.cbm-contact-card__other h3 { font-size: 13px; margin: 0 0 8px; color: var(--cbm-muted-grey); }
.cbm-contact-card__other ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cbm-contact-card__other a { font-size: 14px; color: var(--cbm-near-black); text-decoration: none; }
.cbm-contact-card__other a:hover { color: var(--cbm-red); text-decoration: underline; }
.cbm-contact-card__mention { font-size: 13px; color: var(--cbm-muted-grey); margin: 10px 0 0; }

.cbm-vehicle-detail__mention { background: var(--cbm-fill-lighter); border: 1px solid var(--cbm-hairline); border-radius: var(--cbm-radius); padding: 14px 16px; margin-bottom: 16px; color: var(--cbm-red); font-weight: 700; text-align: center; font-size: 14px; }

.cbm-contact-card__call-btn { display: block; text-align: center; background: var(--cbm-green); color: #fff; font-family: var(--cbm-font-heading); font-weight: 700; font-size: 15px; padding: 12px; border-radius: 2px; text-decoration: none; margin-bottom: 14px; }
.cbm-contact-card__call-btn:hover { filter: brightness(1.1); }
.cbm-contact-card__inquiry-hint { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--cbm-body-grey); margin: 0 0 16px; }
.cbm-contact-card__inquiry-icon { flex: none; font-size: 16px; color: var(--cbm-muted-grey); line-height: 1.4; }
.cbm-contact-card__form { max-width: none; border: none; padding: 0; }
.cbm-contact-card__form button { align-self: stretch; }

.cbm-map-embed { border-radius: var(--cbm-radius); overflow: hidden; border: 1px solid var(--cbm-hairline); }
.cbm-map-embed iframe { width: 100%; height: 220px; border: 0; display: block; }
