/*
 * Showroom + vehicle card styles. Structure ported from a reference
 * dealership theme's style.css; colours/fonts below are We Buy Bakkies' real
 * brand values from "WBB Website Presentation_compressed.pdf" (2026-08-14)
 * — see CHANGELOG.md.
 *
 * Colour roles, per the brand doc:
 *   --primary   Dark Grey #2d2d2c — body text, card titles, dark bars/
 *               buttons ("View more details", quick filter bar background).
 *   --accent    Green #8bd409 — the "action" colour: price, active states,
 *               primary buttons (Apply/Search-equivalent), active pagination
 *               number, section headings on dark backgrounds.
 *   --orange    #f48222 — not used on the showroom; kept here for other
 *               pages built later.
 *
 * Font: Montserrat (brand doc specifies it site-wide). Heading sizes follow
 * the doc's ranges (H1 48-54px … Tiny 10-11px) — applied where this file
 * introduces its own headings; general page headings belong to Oxygen.
 *
 * Scope: only the selectors these ported pieces actually use —
 * .vehicle-grid/.vehicle-card (vehicle-card.php), the quick filter bar,
 * advanced filter panel, active-filter pills, the mmf- / cbf- prefixed
 * dropdown component that make-model-filter.js and checkbox-filters.js
 * render into, and (further down) the [vmg_vehicle] single-vehicle page
 * (render-vehicle.php) — its gallery viewer, specs grid, price card,
 * description and extras list. General site chrome (header, footer,
 * buttons elsewhere, etc.) is intentionally not included here — that
 * belongs to Oxygen's own styling.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --bg: #f3f3f3;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --border: #e2e2e1;
  --text: #2d2d2c;
  --muted: #666666;
  --primary: #2d2d2c;    /* Dark Grey */
  --primary-2: #1a1a1a;  /* darker, for hover on dark elements */
  --accent: #8bd409;     /* Green */
  --accent-2: #79bf00;   /* darker, for hover on green elements */
  --orange: #f48222;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, .08);
  --shadow-hover: 0 10px 36px rgba(0, 0, 0, .14);
  --container: 1240px;
}

.vmg-quick-bar, .vmg-advanced-filters, .vehicle-grid, .vmg-vehicle, .vmg-perks-row {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Hide number input spinner arrows on the mileage/price advanced filters */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: all .2s;
}
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); background: rgba(0, 0, 0, .04); }

/* ── Vehicle grid ────────────────────────────────────────────────── */
.vehicle-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* ── Vehicle card ────────────────────────────────────────────────── */
.vehicle-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: inherit;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.vehicle-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.vehicle-card .img-wrap { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #e2e8f0; z-index: 1; }
.vehicle-card .img-wrap img, .vmg-cg-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease-in-out; }
.vehicle-card:hover .img-wrap img, .vehicle-card:hover .vmg-cg-img { transform: scale(1.05); }
.no-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #b0bec5; font-size: 52px; }
.vehicle-card .badge {
  position: absolute; top: 12px; left: 12px;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: var(--text); letter-spacing: .5px; text-transform: uppercase;
}
.vehicle-card .badge.new { background: var(--accent); color: var(--primary); }
.vehicle-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
/* Stretch-link: makes the card title an invisible overlay covering the whole card */
.vehicle-card .card-title-link {
	display: block;
	color: inherit;
	text-decoration: none;
	min-height: 55px;
}
.vehicle-card .card-title-link::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.vehicle-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--primary); transition: color .2s; }
.vehicle-card .price {
	font-size: 16px;
	font-weight: 600;
	color: var(--accent-2);
	line-height: 1.1;
	margin-bottom: 2px;
}
.vehicle-card .meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	color: var(--primary);
	font-size: 16px;
	padding: 10px 0;
	border-top: 1px solid var(--border);
	border-bottom: 1px solid var(--border);
	margin-bottom: 14px;
	font-weight: 600;
}
.vehicle-card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.vehicle-card .meta i { color: var(--primary); font-size: 11px; width: 13px; text-align: center; }

/* Card action buttons sit above the stretch-link overlay */
.card-actions { display: flex; gap: 8px; margin-top: auto; position: relative; z-index: 1; }
.view-btn {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	border-radius: 50px;
	background: var(--primary);
	color: #fff;
	font-weight: 600;
	font-size: 13px;
	transition: background .2s;
}

/* Call / WhatsApp card buttons — disabled, markup is gated behind
   if (false) in vehicle-card.php. Kept here for an easy re-enable.
   See CHANGELOG.md.
.call-btn {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; white-space: nowrap;
  border: 1px solid var(--border); color: var(--primary); background: var(--surface-2);
  transition: background .2s, color .2s, border-color .2s; position: relative; z-index: 1;
}
.call-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.wa-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; flex-shrink: 0; border-radius: 7px;
  background: #25d366; color: #fff; font-size: 16px;
  transition: background .2s; position: relative; z-index: 1;
}
.wa-btn:hover { background: #1da851; }
*/

.no-results {
  grid-column: 1/-1; padding: 60px 20px; text-align: center;
  background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  color: var(--muted);
}

/* ── Card image mini-gallery (arrows/counter/zoom on hover) ────────── */
.vmg-card-gallery { position: relative; overflow: hidden; }
.vmg-cg-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; background: rgba(0, 0, 0, .45); border: none; color: #fff; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; padding: 0; transition: background .2s; opacity: 0; pointer-events: none; }
.vmg-card-gallery:hover .vmg-cg-arrow { opacity: 1; pointer-events: auto; }
.vmg-cg-arrow:hover { background: rgba(0, 0, 0, .78); }
.vmg-cg-prev { left: 8px; } .vmg-cg-next { right: 8px; }
/* Moved from right:8px to left:8px, 2026-08-20 — right corner now holds the
   new .vmg-fav-star favourites button (assets/js/favourites.js). Was:
.vmg-cg-zoom { position: absolute; top: 8px; right: 8px; z-index: 4; background: rgba(0, 0, 0, .45); border: none; color: #fff; width: 26px; height: 26px; border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; padding: 0; transition: background .2s; opacity: 0; pointer-events: none; }
*/
.vmg-cg-zoom { position: absolute; top: 8px; left: 8px; z-index: 4; background: rgba(0, 0, 0, .45); border: none; color: #fff; width: 26px; height: 26px; border-radius: 5px; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 11px; padding: 0; transition: background .2s; opacity: 0; pointer-events: none; }
.vmg-card-gallery:hover .vmg-cg-zoom { opacity: 1; pointer-events: auto; }
.vmg-cg-zoom:hover { background: rgba(0, 0, 0, .78); }
.vmg-cg-count { position: absolute; bottom: 8px; right: 8px; z-index: 4; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 10px; pointer-events: none; line-height: 1.4; }

/* ── Fullscreen lightbox (built on-demand by assets/js/gallery.js's card
   mini-gallery module — #vmg-card-lightbox — reuses this same .vmg-lightbox
   class the single-vehicle page's static lightbox markup will use later) ── */
.vmg-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .93); display: none; align-items: center; justify-content: center; }
.vmg-lightbox.open { display: flex; }
.vmg-lb-img-wrap { max-width: 90vw; max-height: 90vh; display: flex; align-items: center; justify-content: center; }
.vmg-lb-img-wrap img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 8px; display: block; }
.vmg-lb-close { position: absolute; top: 18px; right: 18px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: 16px; transition: background .2s; }
.vmg-lb-close:hover, .vmg-lb-arrow:hover { background: var(--primary); border-color: var(--primary); }
.vmg-lb-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; font-size: 18px; transition: background .2s; }
.vmg-lb-prev { left: 18px; } .vmg-lb-next { right: 18px; }
.vmg-lb-counter { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .65); font-size: 13px; pointer-events: none; }

/* ── Active filter pills ────────────────────────────────────────────── */
.vmg-active-filters { display: none; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 20px; }
.vaf-heading { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; white-space: nowrap; margin-right: 4px; }
.vaf-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--accent);
	border: 1px solid var(--accent);
	color: var(--text);
	font-size: 13px;
	cursor: pointer;
}

/* ── Make/Model + checkbox filter dropdown component ────────────────── */
.mmf-field-label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; pointer-events: none; cursor: default; }
.mmf-field-label .mmf-wrapper { pointer-events: auto; }
.mmf-wrapper { position: relative; font-size: 14px; text-transform: none; letter-spacing: normal; font-weight: 400; }
.mmf-filter-group { margin-bottom: 0; }
/* Field background was --surface-2 (light grey) — now that the panel
   itself is also light grey, fields need to be white to stay visible as
   distinct fields. Label text was Bold, now Regular per instruction
   (2026-08-14). Was:
.mmf-filter-header { cursor: pointer; padding: 10px 14px; background-color: var(--surface-2); border-radius: 8px; border: 1px solid var(--border); transition: border-color .3s; display: flex; align-items: center; justify-content: space-between; min-width: 200px; }
.mmf-filter-title { font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 10px; font-size: 16px; }
*/
.mmf-filter-header { cursor: pointer; padding: 10px 14px; background-color: var(--surface); border-radius: 8px; transition: border-color .3s; display: flex; align-items: center; justify-content: space-between; min-width: 200px; }
.mmf-filter-header:hover { border-color: var(--primary); }
.mmf-filter-header > .fa { color: var(--primary); font-size: 13px; font-weight: 700; }
.mmf-filter-title { font-weight: 400; color: var(--primary); display: flex; align-items: center; gap: 10px; font-size: 16px; }
/* Icons hidden per instruction (2026-08-14) — brand doc's dropdown fields
   don't show an icon. Was:
.mmf-select-icon { width: 22px; height: 22px; display: inline-block; flex-shrink: 0; opacity: .8; }
*/
.mmf-select-icon { display: none; }
.mmf-panel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 900; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-hover); max-height: 440px; overflow-y: auto; min-width: 280px; padding: 8px 4px; }
.mmf-filter-option { padding: 5px; border-bottom: 1px solid rgba(0, 0, 0, .06); transition: background-color .2s; display: block; }
.mmf-filter-option:last-child { border-bottom: none; }
.mmf-filter-option:hover { background-color: rgba(0, 0, 0, .04); }
.mmf-row-inner { display: flex; align-items: center; gap: 6px; padding: 2px 4px; }
.mmf-row-inner .form-check-input { flex-shrink: 0; width: 14px; height: 14px; padding: 0; margin: 0; cursor: pointer; accent-color: var(--accent-2); }
.mmf-car-label { cursor: pointer; margin: 0; font-weight: 400; font-size: 12px; display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 6px; }
.mmf-item-name { text-transform: capitalize; flex: 1; }
.mmf-right-side { display: flex; align-items: center; gap: 8px; font-size: .85em; flex-shrink: 0; }
.mmf-sub-label { color: var(--muted); font-style: italic; white-space: nowrap; }
.count-number { background-color: rgba(0, 0, 0, .08); color: var(--text); border-radius: 50px; font-size: 10px; font-weight: 500; height: 20px; width: 20px; min-width: 20px; display: flex; align-items: center; justify-content: center; }
.apply-filter-btn { background: var(--accent); color: var(--primary); border: none; border-radius: 50px; padding: 3px 10px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: filter .2s; line-height: 1.4; }
.apply-filter-btn:hover { filter: brightness(1.12); }
.mmf-chevron-indicator { font-size: 11px; color: var(--primary); flex-shrink: 0; margin-left: 2px; }
.mmf-nested-options { border-left: 1px solid var(--primary); margin-left: 15px; padding-left: 5px; }
.mmf-nested-options.mmf-nested-deep { border-left: 1px solid var(--primary); margin-left: 15px; }
.mmf-filter-subheader { padding: 4px 4px 2px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; cursor: default; font-size: 11px; }
.mmf-sub-heading-text { color: var(--primary); }
.mmf-variant-heading { color: var(--primary); }
.mmf-filter-subheader .fa { font-size: 10px; color: var(--muted); }
.mmf-empty { color: var(--muted); font-size: 12px; display: block; padding: 4px; }

/* ── Perk pills (above the filter bar) ───────────────────────────────── */
.vmg-perks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
    padding: 0 24px;
    justify-content: center;
}
.vmg-perk-pill {
  background: var(--surface); color: var(--primary); border: 1px solid var(--primary);
  border-radius: 6px; padding: 10px 18px; font-size: 23px; font-weight: 800; line-height: 1.2;
}

/* ── Showroom quick filter bar ───────────────────────────────────────── */
/* Quick bar + advanced filters read as one continuous rounded box —
   contained to .container width, per the brand doc's "Buy a Vehicle"
   panel. Whole section is Light Grey per instruction (2026-08-14) — was
   Dark Grey. Was:
.vmg-quick-bar {
	background: var(--primary);
	max-width: var(--container);
	margin: 24px auto 0;
	border-radius: 50px 50px 0 0;
}
*/
.vmg-quick-bar {
	background: var(--primary);
	max-width: var(--container);
	margin: 24px auto 0;
	border-radius: 50px 50px 0 0;
}
.vmg-quick-bar__heading {
	padding-top: 22px;
	text-align: center;
	padding-bottom: 22px;
}
/* Green heading on the new light background reads better as --accent-2
   (the darker green already used for card price/pagination) than the
   brighter --accent, which is too close in lightness to read clearly on
   light grey. Was:
.vmg-quick-bar__title { color: var(--accent); font-size: 39px; font-weight: 800; margin: 0; line-height: 1.15; }
.vmg-quick-bar__subtitle { color: var(--accent); font-size: 16px; font-weight: 400; margin: 4px 0 0; }
*/
.vmg-quick-bar__title { color: var(--accent-2); font-size: 39px; font-weight: 800; margin: 0; line-height: 1.15; }
.vmg-quick-bar__subtitle { color: var(--accent-2); font-size: 16px; font-weight: 400; margin: 4px 0 0; }
.vmg-quick-bar__inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
/* Label/search were styled white-on-dark; light-theme equivalents below. Was:
.vmg-quick-bar__label { color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.vmg-quick-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: rgba(255, 255, 255, .5); font-size: 13px; pointer-events: none; }
.vmg-quick-search input[type=text] {
  width: 100%; padding: 9px 12px 9px 34px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 14px;
  outline: none; transition: background .2s, border-color .2s;
}
.vmg-quick-search input[type=text]::placeholder { color: rgba(255, 255, 255, .45); }
.vmg-quick-search input[type=text]:focus { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .4); }
*/
.vmg-quick-bar__label { color: var(--primary); font-size: 13px; font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.vmg-quick-search { position: relative; flex: 1 1 200px; min-width: 0; }
.vmg-quick-search__icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.vmg-quick-search input[type=text] {
  width: 100%; padding: 9px 12px 9px 34px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--primary); font-size: 14px;
  outline: none; transition: border-color .2s;
}
.vmg-quick-search input[type=text]::placeholder { color: var(--muted); }
.vmg-quick-search input[type=text]:focus { border-color: var(--primary); }

/* Make/Model moved out of the quick bar into advanced-filters row 1
   (2026-08-14) — see .vmg-adv-row rules further down for its sizing/panel
   width now. Was, when it lived here:
.vmg-quick-bar #mmf-container .mmf-filter-group { flex-shrink: 0; }
.vmg-quick-bar #mmf-container .mmf-filter-header { white-space: nowrap; }
.vmg-quick-bar #mmf-container .mmf-panel { right: auto; width: 380px; max-width: calc(100vw - 48px); }
*/

.vmg-quick-bar__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
/* Vehicle count hidden per instruction (2026-08-14) — markup removed in
   render-showroom.php, rule kept here for an easy re-enable. Was:
.vmg-quick-count { color: rgba(255, 255, 255, .65); font-size: 13px; white-space: nowrap; }
.vmg-quick-count strong { color: #fff; font-weight: 700; }
*/
/* Light-theme sort dropdown — was white-on-dark. Was:
.vmg-quick-sort {
  padding: 9px 30px 9px 14px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 13px; cursor: pointer;
  transition: background-color .2s;
}
.vmg-quick-sort option { background: var(--primary); color: #fff; }
.vmg-quick-sort:focus { border-color: rgba(255, 255, 255, .5); }
*/
.vmg-quick-sort {
    padding: 10px 15px;
    border-radius: 999px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: var(--primary);
    font-size: 16px;
    cursor: pointer;
    transition: border-color .2s;
    font-weight: 600;
    height: 39px;
    display: flex;
    align-items: center;
}
.vmg-quick-sort option { background: var(--surface); color: var(--primary); }
.vmg-quick-sort:focus { border-color: var(--accent); }

/* Reverted (2026-08-14) — the closed select box itself must stay as the
   green pill above ("the actual select ... must stay as it was"). Native
   <select> only lets CSS touch the open panel's <option> background/text
   colour — it can't get rounded corners, shadow, or padding like the
   custom .mmf-filter-header dropdowns; that would need replacing the
   native <select> with a custom-built listbox, which wasn't asked for.
   The base .vmg-quick-sort rule above already has a white/dark-grey
   `option` style, which is as close as native <select> options can get.
   Was:
select.vmg-quick-sort {
  -webkit-appearance: none; appearance: none;
  padding: 10px 36px 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%232d2d2c' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  color: var(--primary);
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  min-width: 180px;
}
select.vmg-quick-sort:hover  { border-color: var(--primary); }
select.vmg-quick-sort:focus  { border-color: var(--primary); outline: none; }
select.vmg-quick-sort option { background: var(--surface); color: var(--primary); }
*/
/* Toggle button no longer needed — filters show permanently (see
   .vmg-advanced-filters below). Hidden rather than removed from the
   markup, so assets/js/render-showroom.php's click-listener JS still has
   an element to attach to; it just never gets clicked. */
.vmg-more-filters-btn { display: none; }

/* ── Advanced filters — now permanently visible, not a collapsible
   panel. Same dark background as .vmg-quick-bar so the two form one
   continuous rounded box (quick bar = top corners, this = bottom
   corners). The .open class assets/js/render-showroom.php's inline
   script still toggles is harmless since it's no longer gating
   visibility here. ───────────────────────────────────────────────── */
/* Was Dark Grey, matching .vmg-quick-bar above. Now Light Grey per
   instruction (2026-08-14) — whole filter section. Was:
.vmg-advanced-filters {
  position: relative; z-index: 40;
  background: var(--primary);
  max-width: var(--container); margin: 0 auto;
  border-radius: 0 0 16px 16px;
  max-height: none; overflow: visible;
}
*/
.vmg-advanced-filters {
  position: relative; z-index: 40;
  background: var(--surface-2);
  max-width: var(--container); margin: 0 auto;
  border-radius: 0 0 16px 16px;
  max-height: none; overflow: visible;
}
/* Replaced by the 2-row layout below (2026-08-14) — brand doc specifies
   Row 1: Make/Model, Years, Fuel Types, Reset / Row 2: Transmissions,
   Body Types, Price Ranges, Mileage Ranges. Was one row, all 6 fields:
.vmg-adv-inner {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 4px 24px 20px; max-width: var(--container); margin: 0 auto;
}
*/
/* True 4 equal-width columns per row (2026-08-14) — was a flex row where
   fields grew unevenly around the fixed-width Reset button. Now Reset
   sits in the grid as the 4th column, same width as the 3 dropdowns
   beside it. Was:
.vmg-adv-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; max-width: var(--container); margin: 0 auto;
}
.vmg-adv-row .mmf-wrapper { flex: 1 1 200px; }
*/
.vmg-adv-row {
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; gap: 16px;
  padding: 14px 24px; max-width: var(--container); margin: 0 auto;
}
.vmg-adv-row-1 { padding-top: 20px; }
.vmg-adv-row-2 { padding-bottom: 20px; }
.vmg-adv-row .mmf-filter-header { width: 100%; }
/* Make/Model's flyout panel needs more room than the other fields' */
#vmg-advanced-filters #mmf-container .mmf-panel { width: 380px; max-width: calc(100vw - 48px); }

/* Reset button was styled white-on-dark; now dark-on-light, with the
   requested green hover glow. Was:
.vmg-adv-reset {
  flex-shrink: 0; font-size: 13px; padding: 9px 18px;
  color: #fff; border-color: rgba(255, 255, 255, .4);
}
.vmg-adv-reset:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }
*/
.vmg-adv-reset {
	width: 100%;
	font-size: 16px;
	padding: 10px 14px;
	justify-content: center;
	color: var(--surface);
	border-color: var(--primary);
	background: var(--primary);
	transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.vmg-adv-reset:hover {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--primary);
	box-shadow: 0 0 10px 4px rgba(139, 212, 9, .35);
}

/* ── Results bar (count + sort + results-per-page) ───────────────────────
   Minimal functional layout only — flex row + spacing so it's usable;
   detailed styling left for you (2026-08-14). */
.vmg-results-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 0px;
}
.vmg-results-count { color: var(--primary); font-size: 14px; font-weight: 600; }
.vmg-results-bar__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Pagination (built by assets/js/filter.js's renderPagination()) ─────── */
.vmg-pag-inner { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 32px 0 8px; }
.vmg-pag-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 6px;
	border-radius: 50%;
	border: none;
	background: transparent;
	color: var(--accent);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background .2s, color .2s;
}
.vmg-pag-btn:not(.vmg-pag-num) { color: var(--primary); font-size: 14px; font-weight: 700; }
.vmg-pag-btn:hover:not([disabled]) { background: var(--surface-2); }
.vmg-pag-btn[disabled] { color: var(--border); cursor: default; }
.vmg-pag-num.active {
	color: var(--primary);
	font-size: 21px;
	background: none;
}
.vmg-pag-ellipsis { color: var(--muted); padding: 0 4px; }

/* Previous/Next — now distinct labelled pill buttons instead of blending
   in as plain icon-only circles alongside the page numbers (2026-08-14). */
.vmg-pag-prev, .vmg-pag-next {
  width: auto; min-width: auto; height: auto; border-radius: 999px;
  padding: 8px 16px; gap: 6px; font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); background: var(--surface); color: var(--primary);
}
.vmg-pag-prev:hover:not([disabled]), .vmg-pag-next:hover:not([disabled]) {
  background: var(--surface-2); border-color: var(--primary);
}
.vmg-pag-prev[disabled], .vmg-pag-next[disabled] {
  background: var(--surface-2); border-color: var(--border); color: var(--border);
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
  .vmg-quick-bar__label { display: none; }
  .vmg-quick-bar__right { margin-left: 0; flex: 1 1 100%; justify-content: space-between; }
  .vmg-adv-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .vehicle-grid { grid-template-columns: 1fr; }
  .mmf-panel { min-width: 0; }
  .mmf-sub-label { display: none; }
  .vmg-quick-bar__inner { gap: 8px; }
  .vmg-quick-search { flex: 1 1 100%; }
  .vmg-quick-bar #mmf-container .mmf-filter-group { flex: 1; }
  .vmg-quick-count { display: none; }
  .vmg-quick-sort { flex: 1; }
  .vmg-adv-row { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .vmg-perks-row { flex-direction: column; align-items: stretch; }
  .vmg-perk-pill { text-align: center; }
}
@media (max-width: 450px) {
  .vmg-perk-pill { font-size: 15px; padding: 8px 14px; }
}

/* ══════════════════════════════════════════════════════════════════════
   Single vehicle page — [vmg_vehicle] shortcode (render-vehicle.php)
   ══════════════════════════════════════════════════════════════════════ */

/* "Back to Vehicles" link + Make/Model+Variant title box — added
   2026-08-14 to match a supplied design. */
.vmg-back-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; margin-bottom: 20px;
  border-radius: 999px; border: 2px solid var(--accent);
  background: var(--surface); color: var(--primary);
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background .2s;
}
.vmg-back-link i { color: var(--accent); font-size: 13px; }
.vmg-back-link:hover { background: var(--surface-2); }

.vmg-title-box { background: var(--primary); border-radius: 20px; padding: 22px 28px; margin-bottom: 24px; }
.vmg-title-make { color: var(--accent); font-size: 31px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }
.vmg-title-model { color: #fff; font-size: 31px; font-weight: 800; line-height: 1.2; text-transform: uppercase; }

/* "Quick specs" strip below the gallery — added 2026-08-14 to match a
   supplied design. Separate from .specs (the full Specifications grid
   further down the page). */
.vmg-quick-specs {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  border: 2px solid var(--accent); border-radius: 16px;
  padding: 20px 24px; margin: 20px 0 8px;
}
.vmg-qs-item { flex: 1 1 100px; min-width: 100px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.vmg-qs-label { width: 100%; font-size: 13px; color: var(--muted); padding-bottom: 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.vmg-qs-icon { color: var(--primary); font-size: 22px; margin-bottom: 10px; }
.vmg-qs-value { font-size: 15px; font-weight: 700; color: var(--primary); }

.vmg-vehicle .sub { color: var(--muted); margin-bottom: 18px; }
/* Sidebar is back (2026-08-14) — enquiry form + call/price/share, matching
   a supplied design. Was single-column (see CHANGELOG.md for the brief
   removed-then-restored history):
.vmg-vehicle .layout { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 24px; }
*/
.vmg-vehicle .layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; margin-top: 24px; }
.vmg-vehicle .layout > div, .vmg-vehicle .layout > aside { min-width: 0; }
.vmg-vehicle aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; align-self: start; }

/* ── Price box ─────────────────────────────────────────────────────── */
.vmg-vehicle .price-card {
  background: var(--surface); border: 2px solid var(--primary); border-radius: 14px;
  padding: 22px; text-align: center;
}
.vmg-vehicle .price-card .price { font-size: 30px; font-weight: 800; color: var(--primary); }

/* ── Enquiry form ──────────────────────────────────────────────────── */
/* Standard visually-hidden pattern — keeps each field's <label> available
   to screen readers/autofill/testing tools without showing it (the design
   uses placeholder text in its place). */
.vmg-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.vmg-enquiry-card { background: var(--surface-2); border-radius: 16px; padding: 26px; }
.vmg-enquiry-title { margin: 0 0 20px; font-size: 22px; font-weight: 800; color: var(--primary); text-align: center; }
.vmg-field { margin-bottom: 18px; }
.vmg-field input {
  width: 100%; border: none; border-bottom: 1px solid var(--border);
  background: transparent; padding: 6px 2px; font-size: 15px; color: var(--primary);
  font-family: inherit; outline: none; transition: border-color .2s;
}
.vmg-field input::placeholder { color: var(--muted); }
.vmg-field input:focus { border-color: var(--primary); }
.vmg-radio-row { display: flex; gap: 24px; margin-bottom: 10px; font-size: 14px; color: var(--primary); }
.vmg-radio-row label, .vmg-checkbox-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.vmg-checkbox-row { font-size: 14px; color: var(--primary); margin-bottom: 8px; }
.vmg-radio-row input, .vmg-checkbox-row input { accent-color: var(--primary); cursor: pointer; }
.vmg-enquiry-submit {
  width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background .2s;
}
.vmg-enquiry-submit:hover { background: var(--primary-2); }

/* ── Call / Share buttons ──────────────────────────────────────────── */
.vmg-call-btn {
  display: block; text-align: center; padding: 16px; border-radius: 14px;
  background: var(--accent); color: var(--primary); font-size: 17px; font-weight: 800;
  text-decoration: none; transition: background .2s;
}
.vmg-call-btn:hover { background: var(--accent-2); }
.vmg-share-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--primary); font-size: 15px; font-weight: 700; text-decoration: none;
  transition: border-color .2s;
}
.vmg-share-btn:hover { border-color: var(--primary); }
.vmg-share-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; background: #25d366; color: #fff; font-size: 16px;
}

/* ── Enquiry form's bootbox thank-you dialog ──────────────────────────
   Bootstrap CSS (enqueue.php) gives the modal its basic shell/backdrop;
   this brands it instead of leaving Bootstrap's default blue/grey look. */
.bootbox .modal-content { border-radius: 18px; border: none; box-shadow: var(--shadow-hover); }
.bootbox .modal-header { border-bottom: none; padding: 26px 26px 0; }
.bootbox .modal-title { font-size: 20px; font-weight: 800; color: var(--primary); }
.bootbox .modal-body { padding: 12px 26px 4px; color: var(--text); font-size: 15px; }
.bootbox .modal-body p { margin: 0; }
.bootbox .modal-footer { border-top: none; padding: 20px 26px 26px; gap: 10px; }
.bootbox .modal-footer .btn {
  border-radius: 999px; padding: 11px 24px; font-weight: 700; font-size: 14px;
  border: none; transition: background .2s, color .2s;
}
.bootbox .modal-footer .btn-success { background: var(--accent); color: var(--primary); }
.bootbox .modal-footer .btn-success:hover { background: var(--accent-2); color: var(--primary); }

/* ── Submit spinner/overlay ────────────────────────────────────────── */
.spinner-page-overlay { display: none; position: fixed; inset: 0; z-index: 9998; background: rgba(0, 0, 0, .55); }
.spinner-page { display: none; position: fixed; z-index: 9999; top: 50%; left: 50%; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; color: var(--accent); }

.vmg-vehicle .vmg-section { margin-top: 28px; }
.vmg-vehicle .vmg-section-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--border); color: var(--primary); }

.vmg-vehicle .vmg-video-embed { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.vmg-vehicle .vmg-video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Plain 2-column label/value list (2026-08-14), matching a supplied
   design — was a card grid (boxed background/border per item). CSS
   multi-column fills top-to-bottom per column, which is why $spec_keys'
   order in render-vehicle.php now matters (see comment there). Was:
.vmg-vehicle .specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 20px; }
.vmg-vehicle .specs .spec { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.vmg-vehicle .specs .spec .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.vmg-vehicle .specs .spec .v { font-weight: 600; margin-top: 2px; color: var(--primary); }
.vmg-vehicle .specs .spec--wide { grid-column: span 2; }
.vmg-vehicle .specs .spec--wide .v { font-family: monospace; font-size: .9rem; letter-spacing: .04em; }
*/
.vmg-vehicle .specs { columns: 2; column-gap: 48px; margin-top: 20px; }
.vmg-vehicle .specs .spec { display: flex; gap: 8px; padding: 7px 0; break-inside: avoid; }
.vmg-vehicle .specs .spec .k { color: var(--primary); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; flex-shrink: 0; min-width: 150px; }
.vmg-vehicle .specs .spec .k::after { content: ':'; }
.vmg-vehicle .specs .spec .v { color: var(--text); font-size: 14px; }
.vmg-vehicle .specs .spec--wide { column-span: all; }
.vmg-vehicle .specs .spec--wide .v { font-family: monospace; font-size: .9rem; letter-spacing: .04em; }

.vmg-vehicle .vmg-desc-body { color: var(--text); line-height: 1.75; font-size: 15px; }
.vmg-vehicle .vmg-desc-body p { margin: 0 0 12px; }

.vmg-vehicle .vmg-extras-list { display: flex; flex-wrap: wrap; gap: 10px; }
.vmg-vehicle .vmg-extra-item { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 14px; font-size: 13px; }
.vmg-vehicle .vmg-extra-item i { color: var(--primary); font-size: 11px; }

/* Main gallery viewer — distinct from .vmg-card-gallery (the small carousel
   on each showroom card, styled further up this file). */
.vmg-gallery { margin-bottom: 24px; min-width: 0; }
.vmg-gal-main { position: relative; border-radius: 16px;; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.vmg-gal-main img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; transition: opacity .2s; }
.vmg-gal-arrow, .vmg-gal-zoom { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, .45); border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transition: background .2s; font-size: 14px; touch-action: manipulation; }
.vmg-gal-arrow:hover, .vmg-gal-zoom:hover { background: var(--primary); }
.vmg-gal-prev { left: 12px; } .vmg-gal-next { right: 12px; }
/* Moved from right:12px to left:12px, 2026-08-20 — right corner now holds
   the favourites star (.vmg-fav-star--lg, assets/css/favourites.css). Was:
.vmg-gal-zoom { top: 12px; right: 12px; transform: none; }
*/
.vmg-gal-zoom { top: 12px; left: 12px; transform: none; }
.vmg-gal-counter { position: absolute; bottom: 10px; right: 12px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 20px; pointer-events: none; }
.vmg-thumbs-wrap { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.vmg-ts-arrow { flex-shrink: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; font-size: 12px; transition: background .2s, border-color .2s; }
.vmg-ts-arrow:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.vmg-thumbs-track { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; flex: 1; min-width: 0; }
.vmg-thumbs-track::-webkit-scrollbar { display: none; }
.vmg-thumb { flex-shrink: 0; width: 90px; height: 64px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s; }
.vmg-thumb:hover { opacity: .85; }
.vmg-thumb.active { border-color: var(--primary); opacity: 1; }

@media (max-width: 900px) {
  .vmg-vehicle .layout { grid-template-columns: 1fr; }
  /* Was grid-template-columns/grid-column (leftover from the old card-grid
     .specs layout) — now multi-column, so single-column here means
     `columns: 1`, and .spec--wide has nothing left to span. Was:
  .vmg-vehicle .specs { grid-template-columns: 1fr; }
  .vmg-vehicle .specs .spec--wide { grid-column: span 1; }
  */
  .vmg-vehicle .specs { columns: 1; }
}
