/* ============================================================================
 * evm-site.css — site-wide fixes that replace dead Space Auto behavior.
 * Loaded on every page. Pairs with evm-site.js.
 * ========================================================================== */

/* ---- Deterministic content visibility (no race with the dead SPA) --------
 * Pages carry a static `srp-v5` body class; a mirrored rule then hides
 * `#fl-main-content > div` (our content) while exempting the dead Space Auto
 * SPA wrapper. Force OUR content visible and hide the dead SPA outright, so it
 * never depends on JS timing. */
.evm-vdp,
.evm-srp { display: block !important; }
.srp-v5-wrapper,
.vdp-v5-flex,
.srp-v5-flex { display: none !important; }

/* ---- Working mobile menu (replaces the dead Space Auto off-canvas) -------- */
.evm-mnav {
	position: fixed;
	inset: 0;
	z-index: 2147483647; /* above the sticky header wrapper (.fl-builder-content z=9999999) */
	visibility: hidden;
}
.evm-mnav.is-open { visibility: visible; }
.evm-mnav-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .25s ease;
}
.evm-mnav.is-open .evm-mnav-backdrop { opacity: 1; }
.evm-mnav-inner {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 84%;
	max-width: 340px;
	background: #fff;
	box-shadow: -4px 0 24px rgba(0, 0, 0, .22);
	transform: translateX(100%);
	transition: transform .28s ease;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}
.evm-mnav.is-open .evm-mnav-inner { transform: translateX(0); }
.evm-mnav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 18px;
	border-bottom: 1px solid #eee;
}
.evm-mnav-header span { font-weight: 700; font-size: 15px; color: #c3002f; letter-spacing: .5px; }
.evm-mnav-close {
	background: none;
	border: 0;
	font-size: 30px;
	line-height: 1;
	color: #272727;
	cursor: pointer;
	padding: 0 4px;
}
.evm-mnav ul { list-style: none; margin: 0; padding: 0; }
.evm-mnav li { border-bottom: 1px solid #f0f0f0; }
.evm-mnav a {
	display: block;
	padding: 15px 22px;
	color: #272727;
	text-decoration: none;
	font-size: 17px;
	font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
}
.evm-mnav a:active, .evm-mnav a:hover { background: #f6f6f6; }

/* ---- Google Translate: hide its injected banner/gadget chrome ------------- */
.goog-te-banner-frame, .goog-te-gadget-simple, .skiptranslate iframe { display: none !important; }
body { top: 0 !important; }
#evm-gt { display: none !important; }

/* ---- inventory search result note ---------------------------------------- */
.evm-search-note {
	max-width: 1280px;
	margin: 0 auto 18px;
	padding: 10px 16px;
	font-size: 15px;
	color: #3c434a;
}
.evm-search-note a { color: #c3002f; font-weight: 600; }

/* ---- Language switcher: hide GTranslate's broken flag PNGs (keep EN/ES text) */
a.glink img { display: none !important; }
a.glink { font-weight: 600; font-size: 14px; padding: 0 6px; color: #fff; text-decoration: none; }
a.glink.gt-current-lang { text-decoration: underline; }

/* ---- Neutralize the dead Space Auto scroll-lock -------------------------- *
 * The cookie-consent modal adds `body.noscroll` (overflow:hidden) to freeze
 * background scroll, but its Space Auto dismiss JS is gone, so the class is
 * never removed and vehicle pages become unscrollable. Force vertical scroll. */
body.noscroll { overflow-y: auto !important; }
/* Belt-and-suspenders: vehicle/inventory pages must always scroll, regardless
 * of any leftover Space Auto lock or the GTranslate inline height:100%. */
body.single-vehicle,
body.single,
body.vehicle-template-default { overflow-y: auto !important; }
