/* Apex Inventory — site chrome (header/footer) overrides.
   In a real (versioned) file so edits reliably bust the cache. */

/* Hide Blocksy's default footer (we render our own) */
#footer.ct-footer { display: none !important; }

/* Hide the main page scrollbar (scrolling still works via wheel / trackpad / keyboard) */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Pin (sticky) the header */
#header { position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(15, 36, 64, .08); }
.admin-bar #header { top: 32px; }
@media (max-width: 782px) { .admin-bar #header { top: 46px; } }

/* Constrain the header row to the same 1200px the content uses */
#header .ct-container { max-width: 1200px; }

/* Header logo: sensible size + vertically centered with the menu */
#header .site-logo-container { display: flex; align-items: center; }
#header .site-logo-container img,
#header .ct-logo-container img,
#header img.ct-logo { max-height: 75px; width: auto; }

/* Compact the header row (Blocksy was forcing a ~200px row height) */
#header [data-row="middle"],
#header [data-row="middle"] > .ct-container,
#header .site-branding,
#header .site-logo-container,
#header .header-menu-1,
#header .menu-container,
#header .menu,
#header .menu > li { height: auto !important; min-height: 0 !important; }
#header [data-row="middle"] > .ct-container { align-items: center !important; min-height: 97px !important; }
#header .ct-menu-link { height: auto !important; min-height: 0 !important; }

/* Header CTA button (appended into the menu) */
.apex-header-cta > a { background: #e5411f; color: #fff !important; border-radius: 999px !important; padding: .45em 1.1em !important; font-weight: 700; }
.apex-header-cta > a:hover { background: #ff6a3d; }

/* Top bar */
.apex-topbar-wrap { position: relative; z-index: 1; }

/* Homepage: remove Blocksy's top content spacing so the hero meets the header */
body.home .ct-container-full { padding-top: 0 !important; }

/* Inventory: make the (long) brand list its own compact scrollable box so every brand is reachable */
.apex-scope #makeChecks {
	max-height: 230px;
	overflow-y: auto;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 6px 10px;
}
.apex-scope #makeChecks::-webkit-scrollbar { width: 8px; }
.apex-scope #makeChecks::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }

/* Inventory filters sidebar: keep it in view and let it scroll internally when taller than the screen */
@media (min-width: 821px) {
	.apex-scope .filters {
		position: sticky;
		top: 110px;
		max-height: calc(100vh - 130px);
		overflow-y: auto;
	}
	.admin-bar .apex-scope .filters {
		top: 142px;
		max-height: calc(100vh - 162px);
	}
}

/* Footer bottom bar (copyright row) in brand orange */
.site-footer .footer-bottom { background: #e5411f !important; border-top: 0 !important; }
.site-footer .footer-bottom .footer-bottom-inner,
.site-footer .footer-bottom .footer-bottom-inner span { color: #fff !important; }
.site-footer .footer-bottom .footer-disclaimer { color: rgba(255,255,255,.8) !important; }

/* Form fields: stop Blocksy's fixed 40px height from clipping text descenders (e.g. the y in "Any") */
.apex-scope .field select,
.apex-scope .field input,
.apex-scope .form-field select,
.apex-scope .form-field textarea,
.apex-scope .form-field input:not([type="range"]),
.apex-scope .sort-wrap select,
.apex-scope .filters input[type="text"] {
	height: auto !important;
	min-height: 46px;
	line-height: 1.4 !important;
}

/* Homepage hero background photo with a navy overlay (darker on the left for text) */
.apex-home .hero {
	background-image:
		linear-gradient(100deg, rgba(15,36,64,.94) 0%, rgba(15,36,64,.80) 40%, rgba(15,36,64,.46) 70%, rgba(15,36,64,.22) 100%),
		url(hero.jpg) !important;
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}
@media (max-width: 700px) {
	.apex-home .hero {
		background-image:
			linear-gradient(180deg, rgba(15,36,64,.90) 0%, rgba(15,36,64,.78) 55%, rgba(15,36,64,.55) 100%),
			url(hero.jpg) !important;
	}
}

/* Brand logos in the homepage "Shop by brand" cards */
.apex-home .brand-card .brand-logo { display: flex; align-items: center; justify-content: center; height: 46px; }
.apex-home .brand-card .brand-logo img { height: 44px; width: auto; max-width: 110px; object-fit: contain; }

/* Shop-by-brand: 5 per row, wide rectangular cards (logo beside the name) */
.apex-home .type-strip:has(.brand-card) { grid-template-columns: repeat(5, 1fr); }
.apex-home .brand-card { flex-direction: row; align-items: center; justify-content: center; gap: 14px; min-height: 62px; padding-top: 10px; padding-bottom: 10px; }
@media (max-width: 900px) { .apex-home .type-strip:has(.brand-card) { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .apex-home .type-strip:has(.brand-card) { grid-template-columns: repeat(2, 1fr); } }

/* "Sold" / "Reserved" badge on vehicle cards and detail pages */
.badge-sold { background: #111827 !important; color: #fff !important; }

/* Vehicle photo magnifier: hover lens (desktop) + click-to-magnify lightbox (all devices) */
.vd-main-wrap { position: relative; overflow: hidden; border-radius: 10px; cursor: zoom-in; }
.vd-main-wrap .main { display: block; width: 100%; height: auto; }
.vd-lens {
	position: absolute;
	width: 160px;
	height: 160px;
	border-radius: 50%;
	border: 3px solid #fff;
	box-shadow: 0 2px 14px rgba(0,0,0,.35), inset 0 0 0 1px rgba(0,0,0,.15);
	pointer-events: none;
	opacity: 0;
	background-repeat: no-repeat;
	transition: opacity .12s ease;
}
@media (hover: none), (pointer: coarse) {
	.vd-lens { display: none; } /* touch devices: rely on the tap-to-magnify lightbox instead */
}
.vd-magnify-hint {
	position: absolute;
	right: 12px;
	bottom: 12px;
	background: rgba(15,36,64,.78);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 999px;
	pointer-events: none;
}
.vd-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(10,15,25,.92);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 30px;
	z-index: 10000;
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease;
	cursor: zoom-out;
}
.vd-lightbox.is-open { opacity: 1; visibility: visible; }
.vd-lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.vd-lightbox-close {
	position: absolute;
	top: 18px;
	right: 22px;
	background: rgba(255,255,255,.12);
	color: #fff;
	border: 0;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.vd-lightbox-close:hover { background: rgba(255,255,255,.22); }

/* Footer logo — transparent white+orange variant placed directly on the navy footer */
.site-footer .footer-logo { display: inline-block; line-height: 0; }
.site-footer .footer-logo img { height: 110px; width: auto; max-width: 100%; display: block; }
