/*
Theme Name: Missouri City Motor Cars
Description: Lightweight custom theme for Missouri City Motor Cars. Works with the MCMC Inventory plugin for vehicle listings.
Author: Missouri City Motor Cars
Version: 1.1.3
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mcmc-theme
*/

/* ---------- Tokens (from the original design) ---------- */
:root {
	--bg: #f4f2f2;
	--card: #fff;
	--ink: #1b1b1d;
	--mute: #675f62;
	--line: #e0d9db;
	--line-strong: #c9bcc0;
	--maroon: #6b1422;       /* backgrounds, borders */
	--maroon-hover: #561019;
	--accent: #6b1422;       /* maroon text and icons on page/card backgrounds */
	--tint: rgba(107, 20, 34, .07);
	--dark: #1d1517;
	--ok: #2b8a4e;
	--warn: #c98a00;
	--display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
	--ease: .15s ease;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #151113;
		--card: #211a1d;
		--ink: #f1eaec;
		--mute: #a99ea2;
		--line: #392e32;
		--line-strong: #57484d;
		--maroon: #b3293f;
		--maroon-hover: #c63a51;
		--accent: #ef8b9c; /* readable maroon tint on dark backgrounds */
		--tint: rgba(239, 139, 156, .1);
		--ok: #4cc07a;
		--warn: #e8b23a;
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; -webkit-text-size-adjust: 100%; }
html:has(dialog[open]) { overflow: hidden; } /* No page scrolling behind the contact sheet or photo viewer. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font: 400 16px/1.6 Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
	padding-bottom: env(safe-area-inset-bottom, 0px);
}
img { max-width: 100%; height: auto; }
svg { flex: none; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; }
[hidden] { display: none !important; }
main:focus, [tabindex="-1"]:focus { outline: none; }
:focus-visible { outline: 3px solid var(--maroon); outline-offset: 2px; }
.sr-only {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
	position: absolute; left: 12px; top: -80px; z-index: 100;
	background: #fff; color: #6b1422; padding: 10px 16px; border-radius: 4px;
	font-weight: 600; text-decoration: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.skip-link:focus { top: 12px; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 18px; }

/* ---------- Top bar ---------- */
.top { background: var(--dark); color: #e9dfe2; font-size: 14px; }
.top .wrap { display: flex; justify-content: space-between; align-items: center; gap: 0 12px; padding-top: 4px; padding-bottom: 4px; flex-wrap: wrap; }
.top a { display: inline-block; padding: 4px 0; color: #fff; text-decoration: none; }
.top a:hover { text-decoration: underline; }
.top :focus-visible { outline-color: #fff; }
.top-contact { display: flex; align-items: center; gap: 0 10px; flex-wrap: wrap; }
.top .top-address { display: inline-flex; align-items: center; gap: 6px; }
.top-address svg { color: #d99aa6; }
.top-contact .sep { color: #8d7d82; }

/* ---------- Navigation ---------- */
nav.bar { background: #fff; border-bottom: 4px solid var(--maroon); position: sticky; top: 0; z-index: 50; }
.admin-bar nav.bar { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar nav.bar { top: 46px; } }
@media screen and (max-width: 600px) { .admin-bar nav.bar { top: 0; } }
nav.bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: block; flex: none; border-radius: 3px; }
.brand .logo { display: block; height: 54px; width: auto; }
.nav-group { display: flex; align-items: center; gap: 22px; }
nav.bar ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0; }
nav.bar ul a {
	display: inline-flex; align-items: center; min-height: 44px;
	font: 600 18px var(--display); letter-spacing: .05em; text-transform: uppercase;
	color: #1b1b1d; text-decoration: none;
	box-shadow: inset 0 -2px 0 transparent; transition: color var(--ease), box-shadow var(--ease);
}
nav.bar ul a:hover { color: #6b1422; box-shadow: inset 0 -2px 0 #6b1422; }
nav.bar :focus-visible { outline-color: #6b1422; }
.nav-phone {
	display: none; align-items: center; gap: 8px; min-height: 44px;
	padding-left: 22px; border-left: 1px solid #e0d9db;
	font: 700 21px var(--display); letter-spacing: .02em; color: #6b1422; text-decoration: none;
}
.nav-phone svg { color: #6b1422; }
.nav-phone:hover span { text-decoration: underline; text-decoration-thickness: 2px; }
@media (min-width: 900px) {
	.nav-phone { display: inline-flex; }
	.top .top-phone { display: none; } /* The phone number moves into the header. */
}

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	min-height: 50px; padding: 12px 24px;
	font: 700 18px/1.1 var(--display); letter-spacing: .05em; text-transform: uppercase;
	border: 2px solid transparent; border-radius: 4px; cursor: pointer; text-decoration: none;
	background: #fff; color: #6b1422;
	transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}
.btn:hover { background: #f3e4e7; }
.btn.solid { background: var(--maroon); color: #fff; }
.btn.solid:hover { background: var(--maroon-hover); }
.btn.outline { background: transparent; color: var(--accent); border-color: var(--maroon); }
.btn.outline:hover { background: var(--tint); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.contact-fallback { display: none; margin: 14px 0 0; padding: 0; list-style: none; }
.contact-fallback li { padding: 4px 0; }
.no-js [data-contact-open], .no-dialog [data-contact-open] { display: none; }
.no-js .contact-fallback, .no-dialog .contact-fallback { display: block; }

/* ---------- Hero ---------- */
.hero {
	position: relative; isolation: isolate; overflow: hidden;
	display: flex; align-items: center;
	min-height: clamp(470px, 62vh, 600px);
	padding: 64px 0 72px;
	background: #2a0a10; color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media picture { display: contents; }
.hero-img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 62% 62%; }
/* Built-in garage photo: start it a little in from the left so the car sits further right.
   Its left edge fades into the maroon background, which the gradient covers anyway. */
@media (min-width: 761px) {
	.hero-img:not(.hero-img--custom) {
		width: 88%; margin-left: 12%;
		-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%);
		mask-image: linear-gradient(90deg, transparent 0, #000 24%);
	}
}
.hero--focus-left .hero-img--custom { object-position: 20% 50%; }
.hero--focus-center .hero-img--custom { object-position: 50% 50%; }
.hero--focus-right .hero-img--custom { object-position: 80% 50%; }
.hero::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background:
		linear-gradient(95deg, rgba(42, 7, 14, .96) 0%, rgba(74, 13, 25, .9) 30%, rgba(107, 20, 34, .55) 55%, rgba(59, 11, 20, .12) 78%, rgba(20, 8, 11, 0) 100%),
		linear-gradient(0deg, rgba(20, 8, 11, .5) 0%, rgba(20, 8, 11, 0) 35%);
}
.hero-content { width: 100%; }
.hero h1 {
	font: 700 clamp(40px, 6.6vw, 72px)/.98 var(--display);
	margin: 0 0 16px; max-width: min(620px, 52vw); /* Wraps before reaching the car on narrower screens. */
	text-shadow: 0 2px 24px rgba(20, 4, 8, .45);
}
.hero p { font-size: 19px; max-width: min(520px, 48vw); margin: 0 0 26px; color: #f3e3e7; text-shadow: 0 1px 12px rgba(20, 4, 8, .5); }
.hero :focus-visible { outline-color: #fff; }

/* ---------- Sections ---------- */
section { padding: 56px 0; }
.section-title, h2 { font: 700 38px/1.05 var(--display); margin: 0 0 6px; }
h1.section-title { font-size: clamp(38px, 6vw, 52px); }
.sub { color: var(--mute); margin: 0 0 24px; }

/* ---------- Inventory ---------- */
.inv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 20px; }
.inv-total { margin: 0 0 6px; color: var(--mute); font-size: 17px; }
.inv-total strong { font: 700 24px var(--display); color: var(--accent); margin-right: 2px; }
.tools { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.no-js .tools { display: none; }
input, select, textarea {
	font: inherit; color: var(--ink); background: var(--card);
	border: 1px solid var(--line-strong); border-radius: 5px; padding: 10px 12px; min-height: 48px;
	transition: border-color var(--ease);
}
input:hover, select:hover { border-color: var(--mute); }
input:focus-visible, select:focus-visible { outline-offset: 0; border-color: var(--maroon); }
.tools input { flex: 1; min-width: 220px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.grid--empty { margin-top: 18px; }
.car {
	position: relative; display: flex; flex-direction: column;
	background: var(--card); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
	transition: border-color var(--ease), box-shadow var(--ease);
}
.car:hover { border-color: var(--line-strong); box-shadow: 0 10px 26px -16px rgba(29, 21, 23, .55); }
.car:focus-within { outline: 3px solid var(--maroon); outline-offset: 2px; }
@supports selector(:has(*)) {
	/* Ring only for keyboard focus (not after a mouse click). */
	.car:focus-within { outline: none; }
	.car:has(:focus-visible) { outline: 3px solid var(--maroon); outline-offset: 2px; }
}
.js .is-collapsed > .car--more { display: none; } /* Until site.js takes over: no flash of the full list. */
.inv-more { display: flex; justify-content: center; margin-top: 28px; }
.inv-more .btn { min-width: 280px; }
.no-js .inv-more { display: none; } /* Without JavaScript every vehicle is already listed. */
.card-link { color: inherit; text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* Whole card is the link's click area. */
.card-link:focus-visible { outline: none; } /* The card shows the focus ring instead. */
.ph { position: relative; display: block; aspect-ratio: 4 / 3; background: rgba(0, 0, 0, .13); overflow: hidden; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ph-none, .gallery-empty span {
	display: flex; align-items: center; justify-content: center; height: 100%;
	color: var(--mute); font: 600 18px var(--display); letter-spacing: .05em; text-transform: uppercase;
}
.tag {
	position: absolute; left: 0; bottom: 10px;
	background: var(--maroon); color: #fff;
	font: 700 22px var(--display); padding: 3px 14px 3px 12px;
}
.cnt { position: absolute; right: 8px; top: 8px; background: rgba(0, 0, 0, .72); color: #fff; font-size: 13px; padding: 1px 9px; border-radius: 99px; }
.body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 14px 16px 16px; }
.name { font: 700 23px/1.15 var(--display); margin: 0; }
.meta { color: var(--mute); font-size: 15px; margin: 2px 0 12px; }
.sm {
	margin-top: auto;
	font: 600 15px var(--display); letter-spacing: .05em; text-transform: uppercase;
	padding: 9px 16px; border-radius: 4px; border: 1px solid var(--maroon);
	background: var(--maroon); color: #fff;
	transition: background-color var(--ease);
}
.car:hover .sm { background: var(--maroon-hover); }
.empty { grid-column: 1 / -1; text-align: center; color: var(--mute); padding: 40px 16px; border: 1px dashed var(--line-strong); border-radius: 6px; margin: 0; }

/* ---------- Why us ---------- */
.band { background: var(--card); border-block: 1px solid var(--line); padding: 88px 0 96px; }
.band .sub { margin-bottom: 48px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; }
.why-icon { display: block; color: var(--accent); margin-bottom: 18px; }
.why-icon svg { display: block; width: 40px; height: 40px; }
.three h3 { font: 700 24px/1.15 var(--display); margin: 0 0 8px; color: var(--accent); }
.three p { margin: 0; color: var(--mute); max-width: 34ch; line-height: 1.65; }

/* ---------- Contact ---------- */
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; }
.contact .actions { margin-top: 4px; }
.info { margin: 0; border-top: 1px solid var(--line); }
.info div { position: relative; padding: 14px 0 14px 42px; border-bottom: 1px solid var(--line); }
.info dt { font: 700 18px/1.3 var(--display); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.info dt svg { position: absolute; left: 0; top: 15px; color: var(--accent); }
.info dd { margin: 0; }
.info a { color: var(--ink); text-decoration-color: var(--line-strong); }
.info a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #bfb2b6; padding: 28px 0; font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: #e9dfe2; }
.site-footer :focus-visible { outline-color: #fff; }

/* ---------- Contact sheet (modal on desktop, bottom sheet on phones) ---------- */
.contact-dialog {
	width: min(460px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px);
	padding: 0; border: 0; border-radius: 8px;
	background: var(--card); color: var(--ink);
	box-shadow: 0 28px 70px -20px rgba(0, 0, 0, .55);
}
.contact-dialog::backdrop { background: rgba(29, 21, 23, .62); }
.contact-dialog[open] { animation: cd-in .18s ease-out; }
@keyframes cd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cd { padding: 22px 22px 18px; border-top: 4px solid var(--maroon); }
.cd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cd-title { font: 700 30px/1.05 var(--display); margin: 4px 0 0; }
.cd-close {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px; margin: -6px -8px 0 0; flex: none;
	border: 0; border-radius: 50%; background: transparent; color: var(--mute); cursor: pointer;
	transition: background-color var(--ease), color var(--ease);
}
.cd-close:hover { background: var(--tint); color: var(--ink); }
.cd-intro { color: var(--mute); margin: 6px 0 16px; }
.cd-intro p { margin: 0; }
.cd-intro .cd-vehicle { color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.cd-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cd-row { display: flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; transition: border-color var(--ease); }
.cd-row:hover { border-color: var(--maroon); }
.cd-link {
	flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px;
	padding: 12px 14px; min-height: 66px;
	color: var(--ink); text-decoration: none;
	transition: background-color var(--ease);
}
.cd-link:hover { background: var(--tint); }
.cd-link:focus-visible, .cd-copy:focus-visible { outline-offset: -3px; }
.cd-icon {
	display: inline-flex; align-items: center; justify-content: center; flex: none;
	width: 42px; height: 42px; border-radius: 50%; background: var(--tint); color: var(--accent);
}
.cd-text { display: flex; flex-direction: column; min-width: 0; }
.cd-label { font: 700 20px/1.1 var(--display); letter-spacing: .02em; }
.cd-value { color: var(--mute); overflow-wrap: anywhere; }
.cd-copy {
	display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	width: 76px; flex: none; padding: 8px 6px;
	border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--mute);
	font-size: 13px; font-weight: 600; cursor: pointer;
	transition: background-color var(--ease), color var(--ease);
}
.cd-copy:hover { background: var(--tint); color: var(--accent); }
.cd-copy-done { display: none; }
.cd-copy.is-copied { color: var(--ok); }
.cd-copy.is-copied .cd-copy-icon { display: none; }
.cd-copy.is-copied .cd-copy-done { display: inline; }
.cd-hours { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; color: var(--mute); font-size: 15px; }
.cd-hours svg { margin-top: 3px; color: var(--accent); }
@media (max-width: 640px) {
	.contact-dialog {
		width: 100%; max-height: calc(100dvh - 24px);
		margin: auto 0 0; border-radius: 14px 14px 0 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.contact-dialog[open] { animation: cd-up .24s cubic-bezier(.2, .8, .2, 1); }
	.cd { padding: 18px 18px 20px; }
	.cd-link { gap: 12px; padding: 12px; }
	.cd-icon { width: 38px; height: 38px; }
	.cd-value { font-size: 15px; }
	.cd-copy { width: 62px; }
}
@keyframes cd-up { from { transform: translateY(100%); } to { transform: none; } }

/* ---------- Vehicle page ---------- */
.vehicle-page { padding: 24px 0 64px; }
.crumbs { margin: 0 0 16px; font-weight: 500; }
.crumbs a { display: inline-block; padding: 6px 0; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.notice {
	display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline;
	margin: 0 0 20px; padding: 12px 16px;
	background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--maroon); border-radius: 4px;
}
.vehicle { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.stage { position: relative; border-radius: 6px; overflow: hidden; background: #0e0a0b; }
.gallery-main {
	position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0;
	background: transparent; border: 0; cursor: zoom-in;
}
.gallery-main img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stage :focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .45); }
.stage-chip {
	position: absolute; display: inline-flex; align-items: center; gap: 6px;
	background: rgba(0, 0, 0, .66); color: #fff; font-size: 13px; line-height: 1; padding: 6px 10px; border-radius: 99px;
	pointer-events: none;
}
.stage-full { right: 10px; top: 10px; opacity: .9; transition: opacity var(--ease); }
.gallery-main:hover .stage-full { opacity: 1; }
.gallery-count { left: 10px; bottom: 10px; }
.stage-nav {
	position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
	background: rgba(14, 10, 11, .6); color: #fff; cursor: pointer;
	transition: background-color var(--ease);
}
.stage-nav:hover { background: rgba(14, 10, 11, .88); }
.stage-prev { left: 10px; }
.stage-next { right: 10px; }
.stage .stage-nav:focus-visible { outline-offset: 2px; box-shadow: 0 0 0 6px rgba(0, 0, 0, .45); }
.gallery-empty { aspect-ratio: 4 / 3; background: var(--card); border: 1px dashed var(--line-strong); border-radius: 6px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; list-style: none; margin: 10px 0 0; padding: 0; }
.thumbs a { display: block; aspect-ratio: 4 / 3; border: 2px solid transparent; border-radius: 4px; overflow: hidden; opacity: .7; transition: opacity var(--ease), border-color var(--ease); }
.thumbs a:hover { opacity: 1; border-color: var(--line-strong); }
.thumbs a[aria-current="true"] { border-color: var(--maroon); opacity: 1; }
.thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vehicle-info {
	position: sticky; top: 100px;
	background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--maroon); border-radius: 6px; padding: 22px;
}
.admin-bar .vehicle-info { top: 132px; }
.availability { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; font-size: 15px; }
.availability-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.availability--pending .availability-dot { background: var(--warn); box-shadow: 0 0 0 4px color-mix(in srgb, var(--warn) 22%, transparent); }
.availability--sold .availability-dot { background: var(--mute); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mute) 22%, transparent); }
.vehicle-info h1 { font: 700 clamp(30px, 4vw, 42px)/1.02 var(--display); margin: 0 0 14px; }
.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.price { background: var(--maroon); color: #fff; font: 700 30px/1 var(--display); padding: 8px 16px 8px 14px; border-radius: 3px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; list-style: none; margin: 0 0 20px; padding: 0; }
.facts li { border-top: 1px solid var(--line); padding-top: 8px; }
.facts b { display: block; font: 700 15px var(--display); letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.ask { font: 700 22px var(--display); margin: 0 0 10px; }
.vehicle-info .actions { display: grid; gap: 10px; }
.vehicle-info .actions .btn { width: 100%; }
.vehicle-info .actions .btn.solid { min-height: 56px; font-size: 20px; }
.visit-hours { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0 0; color: var(--mute); font-size: 15px; }
.visit-hours svg { margin-top: 3px; color: var(--accent); }
.vehicle-more { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; margin-top: 44px; }
.vehicle-more h2 { font-size: 30px; margin-bottom: 10px; }
.vehicle-more > :only-child { grid-column: 1 / -1; max-width: 760px; }
.specs dl { margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--mute); }
.specs dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.entry > :first-child { margin-top: 0; }
.entry img { border-radius: 6px; }

/* ---------- Full-screen photo viewer ---------- */
.lightbox {
	position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
	margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden;
}
.lightbox::backdrop { background: #000; }
.lb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 64px 76px 56px; }
.lb img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb button {
	position: absolute; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	min-width: 48px; min-height: 48px; padding: 0 12px;
	background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 99px; cursor: pointer;
	transition: background-color var(--ease);
}
.lb button:hover { background: rgba(255, 255, 255, .22); }
.lb :focus-visible { outline-color: #fff; }
.lb-close { right: 12px; top: 12px; font-weight: 600; padding: 0 16px 0 12px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 56px; height: 56px; padding: 0; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-count { position: absolute; left: 0; right: 0; bottom: 14px; margin: 0; text-align: center; font-size: 15px; color: #ddd; pointer-events: none; } /* Never blocks the arrow buttons. */

/* ---------- Generic pages ---------- */
.page-content { padding: 40px 0 64px; }
.page-content .entry { max-width: 760px; margin-bottom: 32px; }
.page-title { font: 700 clamp(36px, 6vw, 52px)/1.02 var(--display); margin: 0 0 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.vehicle, .vehicle-more { grid-template-columns: 1fr; }
	.vehicle-info { position: static; }
	.three { gap: 36px; }
}
@media (max-width: 760px) {
	html { scroll-padding-top: 72px; }
	.wrap { padding: 0 20px; }
	.brand .logo { height: 40px; }
	nav.bar ul { gap: 16px; }
	nav.bar ul a { font-size: 16px; }
	.two { grid-template-columns: 1fr; gap: 28px; }
	section { padding: 44px 0; }
	.section-title, h2 { font-size: 34px; }
	.sub { margin-bottom: 20px; }

	/* Phones: text on top, the car photo anchored to the bottom of the banner. */
	.hero { min-height: 0; align-items: flex-start; padding: 40px 0 min(64vw, 300px); }
	.hero-media { top: auto; height: min(100vw, 520px); }
	.hero-img { object-position: 50% 85%; }
	.hero-img--custom { object-position: 50% 50%; }
	.hero::before {
		background: linear-gradient(180deg, #2a0a10 0%, rgba(58, 10, 19, .97) 34%, rgba(74, 13, 25, .82) 52%, rgba(74, 13, 25, .2) 78%, rgba(20, 8, 11, .1) 100%);
	}
	.hero h1, .hero p { max-width: 620px; } /* Text sits above the car on phones, so use the full width. */
	.hero p { font-size: 17px; margin-bottom: 22px; }

	.band { padding: 64px 0 68px; }
	.band .sub { margin-bottom: 36px; }
	.three { grid-template-columns: 1fr; gap: 32px; }
	.why-item { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
	.why-icon { grid-row: span 2; margin: 2px 0 0; }
	.why-icon svg { width: 36px; height: 36px; }

	.actions .btn, .inv-more .btn { flex: 1 1 100%; min-width: 0; }
	.inv-more { margin-top: 24px; }
	.tools select { flex: 1 1 100%; }
	.tools input { min-width: 0; flex-basis: 100%; }
	.vehicle-page { padding-top: 12px; }
	.vehicle-info { padding: 18px; }
	.stage, .gallery-empty { margin: 0 -20px; border-radius: 0; }
	.stage-nav { width: 44px; height: 44px; }

	.lb { padding: 64px 0 76px; }
	.lb-prev, .lb-next { top: auto; bottom: 10px; transform: none; }
	.lb-count { bottom: 26px; }
}
@media (max-width: 400px) {
	nav.bar .wrap { gap: 10px; }
	.brand .logo { height: 36px; }
	nav.bar ul { gap: 12px; }
	nav.bar ul a { font-size: 15px; letter-spacing: .03em; }
}
@media (max-width: 350px) {
	nav.bar .nav-why { display: none; }
}
