/* Auto Plus El Paso: colors taken from the AP logo (sky blue, royal blue, racing-stripe red).
   Layout: dark navy header and hero, light content sections, cards in a responsive grid. */
:root {
  --ink: #0f1830;
  --asphalt: #16244a;
  --asphalt-2: #203263;
  --paper: #f3f6fb;
  --white: #ffffff;
  --line: #dbe2ee;
  --muted: #56617a;
  --sun: #e3262b;       /* logo red: buttons, prices */
  --sun-dark: #bf1b20;
  --sun-soft: #fde6e6;
  --sky: #7aa0dc;       /* logo light blue */
  --royal: #4670c4;     /* logo dark blue */
  --sky-text: #a9c3ee;  /* light blue for small text on navy */
  --ok: #1d7a4e;
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.55; }
img { max-width: 100%; display: block; }
a { color: var(--sun-dark); }
a:hover { color: var(--sun); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: max(16px, 4vw); }
.sr, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; letter-spacing: .005em; text-wrap: balance; margin: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 8px; border: 2px solid transparent; font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--sun); color: var(--white); }
.btn-primary:hover { background: var(--sun-dark); color: var(--white); }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.btn-call { background: var(--sun); color: var(--white); }
.btn-call:hover { background: var(--sun-dark); color: var(--white); }

/* Header */
.topbar { background: var(--ink); color: #b7c3da; font-size: 13px; }
.topbar-in { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; padding-block: 6px; }
.site-head { background: var(--asphalt); color: var(--white); position: sticky; top: 0; z-index: 5; border-bottom: 3px solid var(--sun); }
.head-in { display: flex; align-items: center; gap: 16px 28px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; margin-right: auto; }
.brand:hover { color: var(--white); }
.brand-logo { width: 56px; height: 56px; object-fit: contain; margin: -6px 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong { font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.brand-text small { font: 600 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: .22em; color: var(--sky-text); }
.nav { display: flex; gap: 4px; }
.nav a { color: #dfe3e8; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--white); background: var(--asphalt-2); }

/* Hero */
.hero { background: linear-gradient(160deg, var(--asphalt) 0%, var(--asphalt) 55%, #24407f 100%); color: var(--white); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; padding-block: 56px 64px; align-items: center; }
.eyebrow { font: 600 13px/1 var(--body); text-transform: uppercase; letter-spacing: .18em; color: var(--sky-text); margin: 0 0 14px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; text-transform: uppercase; }
.lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 16px 0 0; }
.hero .lede { color: #c9cfd7; }
.search { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.search select { flex: 1 1 160px; min-height: 46px; border-radius: 8px; border: 0; padding: 0 12px; font: 500 15px var(--body); background: var(--white); color: var(--ink); }
.hero-card { background: var(--asphalt-2); border: 1px solid #2f437a; border-radius: var(--radius); padding: 24px; }
.hero-card-label { font: 600 12px/1 var(--body); text-transform: uppercase; letter-spacing: .18em; color: var(--sky-text); margin: 0 0 10px; }
.hero-card-addr { font: 700 26px/1.1 var(--display); margin: 0 0 14px; }
.hero-hours { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-top: 1px solid #2f437a; color: #c9cfd7; }
.hero-hours strong { color: var(--white); }
.hero-note { margin: 10px 0 0; font-size: 14px; color: var(--sky-text); }
.hero-note strong { color: var(--white); }
.about-in { max-width: 760px; }
.about h2 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; text-transform: uppercase; }
.about .eyebrow { color: var(--royal); }
.about-text { font-size: 19px; margin: 14px 0 22px; max-width: 62ch; }
.about-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.about-actions .btn-ghost { color: var(--asphalt); }
.topbar strong { color: var(--white); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Sections */
.section { padding-block: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.section-head h2, .page-title { font-size: clamp(32px, 4vw, 44px); font-weight: 800; text-transform: uppercase; }
.page-title { margin-bottom: 8px; }
.narrow { max-width: 720px; }
.band { background: var(--white); border-block: 1px solid var(--line); }
.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-block: 44px; }
.why h3 { font-size: 26px; text-transform: uppercase; margin-bottom: 6px; color: var(--royal); }
.why p { margin: 0; color: var(--muted); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 24, 48, .14); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: #e7e9ed; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--white); font: 600 11px/1 var(--body); text-transform: uppercase; letter-spacing: .1em; padding: 6px 8px; border-radius: 4px; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body h3 { font-size: 24px; font-weight: 700; }
.card-trim { margin: 0; color: var(--muted); font-size: 14px; }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: auto; padding-top: 10px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.price { font: 800 26px/1 var(--display); color: var(--sun-dark); }
.no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #9aa2ad; font-size: 13px; }
.no-photo svg { width: 46%; max-width: 160px; }

/* Inventory filters */
.filters { display: grid; grid-template-columns: 2fr repeat(3, 1fr) auto; gap: 12px; align-items: end; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.opt { font-weight: 400; }
input, select, textarea { width: 100%; min-height: 44px; border: 1px solid #c7ccd4; border-radius: 8px; padding: 8px 12px; font: 400 16px var(--body); background: var(--white); color: var(--ink); }
textarea { resize: vertical; }
.count { color: var(--muted); margin: 0 0 16px; }
.empty { background: var(--white); border: 1px dashed #c7ccd4; border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }

/* Vehicle page */
.crumbs { margin: 0 0 16px; }
.vdp-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.gallery-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: #e7e9ed; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.thumbs button { flex: 0 0 92px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--sun); }
.thumbs img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.vdp-side { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 96px; }
.vdp-side h1 { font-size: clamp(32px, 4vw, 42px); font-weight: 800; text-transform: uppercase; }
.vdp-trim { margin: 4px 0 0; color: var(--muted); }
.vdp-price { font: 800 44px/1 var(--display); color: var(--sun-dark); margin: 18px 0 4px; }
.vdp-miles { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.vdp-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.vdp-actions .btn-ghost { color: var(--asphalt); }
.notice { background: var(--sun-soft); color: #8a1216; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.vdp-details { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 32px; margin-top: 40px; }
.vdp-details h2 { font-size: 28px; text-transform: uppercase; margin: 28px 0 12px; }
.vdp-details h2:first-child { margin-top: 0; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.desc { white-space: pre-line; max-width: 70ch; }
.features { columns: 2; gap: 24px; padding-left: 18px; margin: 0; }
.features li { break-inside: avoid; padding: 3px 0; }

/* Panels & forms */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h2 { font-size: 28px; text-transform: uppercase; margin-bottom: 6px; }
.panel > p { color: var(--muted); margin: 0 0 16px; }
.lead { display: flex; flex-direction: column; gap: 14px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.steps { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.small { font-size: 14px; color: var(--muted); }
.contact-list { margin: 24px 0 0; display: flex; flex-direction: column; gap: 16px; }
.contact-list dt { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact-list dd { margin: 2px 0 0; font-size: 18px; }

/* Footer */
.site-foot { background: var(--ink); color: #b7c3da; margin-top: 24px; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 36px 20px; }
.site-foot p { margin: 0 0 8px; }
.site-foot a { color: var(--sky-text); }
.foot-name { font: 800 24px/1 var(--display); text-transform: uppercase; color: var(--white); }
.foot-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; color: #8c9ab6; }
.foot-legal { border-top: 1px solid #22305a; padding-block: 16px 24px; font-size: 13px; color: #8c9ab6; }

/* Admin (Manage cars) */
.admin-form { display: flex; flex-direction: column; gap: 16px; max-width: 900px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-actions .btn-ghost, .admin .btn-ghost { color: var(--asphalt); }
.admin-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-photos label { display: flex; flex-direction: column; gap: 4px; width: 120px; font-size: 13px; }
.admin-photos img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.admin-photos input { width: auto; min-height: 0; }
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.admin-row-actions { white-space: nowrap; }
.admin-row-actions a { margin-right: 10px; }
.inline { display: inline-flex; align-items: center; gap: 6px; }
.inline input[type="checkbox"] { width: auto; min-height: 0; }
.btn-link { background: none; border: 0; color: var(--sun-dark); font: 600 14px var(--body); cursor: pointer; text-decoration: underline; }
.msgs { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.msg h2 { font-size: 26px; margin: 4px 0; }
.msg p { margin: 4px 0; }
.notice.ok { background: #e3f4ea; color: var(--ok); }

/* Narrow screens */
@media (max-width: 900px) {
  .hero-in, .vdp-grid, .vdp-details, .two-col { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .why, .foot-grid { grid-template-columns: 1fr; }
  .vdp-side { position: static; }
  .btn-call { display: none; }
}
@media (max-width: 560px) {
  .nav { order: 3; width: 100%; justify-content: space-between; }
  .btn-call { display: none; }
  .filters { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .features { columns: 1; }
  .topbar-in span:last-child { display: none; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
