/* Autohub — colors and type carried over from the original Wix site. */
:root {
  --blue: #224eca;
  --blue-dark: #1a3da1;
  --brand: #1258b6;
  --text: #2f2e2e;
  --muted: #6b6b6b;
  --line: #e4e6eb;
  --bg-soft: #f4f6fb;
  --footer: #1f1f1f;
  --error: #c62828;
  --heading: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Raleway", system-ui, sans-serif;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 {
  font-family: var(--heading);
  font-weight: 700;
  line-height: 1.15;
  color: #000;
  margin: 0 0 .5em;
}
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px; }
/* Two sections in a row share one gap instead of stacking two. */
.section + .section { padding-top: 0; }
@media (max-width: 700px) {
  .section { padding: 32px 20px; }
}
.narrow { max-width: 760px; }
.page-title { font-size: 2.6rem; text-transform: uppercase; }
.section-title { font-size: 2.2rem; text-transform: uppercase; }
.lead { font-size: 1.1rem; margin-top: -.5em; }
.empty { color: var(--muted); }

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 26px;
  font-family: var(--heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.button:hover { background: #fff; color: var(--blue); }
.button-outline { background: #fff; color: var(--blue); }
.button-outline:hover { background: var(--blue); color: #fff; }

/* Header */
.announce {
  background: var(--blue);
  color: #fff;
  text-align: center;
  font-size: .9rem;
  padding: 8px 16px;
}
.announce a { color: #fff; font-weight: 600; white-space: nowrap; }
.header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.logo img { width: 150px; height: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  font-family: var(--heading);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #000;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
}
.nav a:hover { color: var(--blue); }
.nav a.active { color: var(--blue); }
.nav a.nav-call { background: var(--blue); color: #fff; margin-left: 8px; }
.nav-group { position: relative; }
.nav-sub {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 160px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
  z-index: 10;
}
.nav-sub a { display: block; }
.nav-group:hover .nav-sub,
.nav-group:focus-within .nav-sub { display: block; }
.menu-toggle, .menu-button { display: none; }

@media (max-width: 900px) {
  .menu-button {
    display: block;
    width: 44px; height: 44px;
    position: relative;
    cursor: pointer;
  }
  .menu-button span,
  .menu-button span::before,
  .menu-button span::after {
    position: absolute;
    left: 10px; width: 24px; height: 2px;
    background: #000;
    content: "";
  }
  .menu-button span { top: 21px; }
  .menu-button span::before { left: 0; top: -7px; }
  .menu-button span::after { left: 0; top: 7px; }
  .nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
  }
  .menu-toggle:checked ~ .nav { display: flex; }
  .nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav-sub { display: block; position: static; padding: 0; border: 0; box-shadow: none; }
  .nav-sub a { padding-left: 24px; }
  .nav a.nav-call { margin: 12px 0 0; text-align: center; border: 0; }
}

/* Hero */
.hero {
  background: linear-gradient(rgba(10, 30, 70, .45), rgba(10, 30, 70, .45)), url("/img/hero.jpg") center / cover;
  color: #fff;
  text-align: center;
  padding: 140px 0;
}
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); text-transform: none; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps > div { display: flex; align-items: flex-start; gap: 16px; }
.step-icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--blue); background: #e8eefc; }
.step-icon svg { width: 30px; height: 30px; }
.steps h3 { font-size: 1.4rem; text-transform: uppercase; }
.steps p { margin: 0; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; gap: 20px; } }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-head a { font-weight: 600; white-space: nowrap; }

/* Vehicle cards */
.inventory-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: -8px 0 24px; }
.inventory-bar .count { margin: 0; color: var(--muted); font-weight: 600; }
.search { display: flex; gap: 8px; flex: 0 1 420px; }
.search input { flex: 1; min-width: 0; padding: 10px 14px; font: inherit; border: 1px solid var(--line); border-radius: 6px; }
.search input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-variant-numeric: lining-nums;
  transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0, 0, 0, .08); }
.card-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); }
.carousel-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track a { flex: 0 0 100%; scroll-snap-align: start; }
.carousel-track img { width: 100%; height: 100%; object-fit: cover; }
.carousel-prev, .carousel-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  font-size: 1.5rem; line-height: 1; padding-bottom: 3px;
  color: #111; background: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  opacity: 0; transition: opacity .15s;
}
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.card-photo:hover .carousel-prev, .card-photo:hover .carousel-next,
.carousel-prev:focus-visible, .carousel-next:focus-visible { opacity: 1; }
[hidden].carousel-prev, [hidden].carousel-next { display: none; }
@media (hover: none) { .carousel-prev, .carousel-next { display: none; } }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.carousel-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 2px rgba(0, 0, 0, .4); }
.carousel-dots span.active { background: var(--blue); }
.no-photo { display: grid; place-items: center; height: 100%; min-height: 200px; color: var(--muted); background: var(--bg-soft); text-decoration: none; }
.status-tag {
  position: absolute; left: 12px; top: 12px;
  background: #000; color: #fff;
  font-size: .85rem; font-weight: 700;
  padding: 3px 12px; border-radius: 999px;
}
.card-body { display: block; flex: 1; padding: 16px 18px 14px; color: var(--text); text-decoration: none; }
.card-body h3 { font-family: var(--body); font-size: 1.15rem; font-weight: 700; color: #111; margin: 0; }
.card-body:hover h3 { color: var(--blue); }
.card-sub { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.card-price { margin: 12px 0 0; font-family: var(--body); font-size: 1.6rem; font-weight: 800; color: #111; }
.card-foot { margin: 0 18px; padding: 12px 0 14px; border-top: 1px solid var(--line); font-size: .95rem; }
.card-foot a { color: var(--blue); font-weight: 600; text-decoration: none; }
.card-foot a:hover { text-decoration: underline; }

/* Vehicle detail */
.crumbs { margin: 0 0 16px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.vehicle-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 40px; align-items: start; }
.gallery { min-width: 0; }
.gallery-main { position: relative; aspect-ratio: 3 / 2; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-prev, .gallery-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  font-size: 1.8rem; line-height: 1; padding-bottom: 4px;
  color: #111; background: #fff;
  border: 0; border-radius: 50%; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-prev:hover, .gallery-next:hover { color: var(--blue); }
[hidden].gallery-prev, [hidden].gallery-next { display: none; }
.gallery-count {
  position: absolute; right: 14px; bottom: 14px;
  padding: 5px 14px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .9rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, .65);
  font-variant-numeric: lining-nums tabular-nums;
}
.gallery-count:hover { background: rgba(0, 0, 0, .85); }
[hidden].gallery-count { display: none; }
.gallery-open { display: block; height: 100%; cursor: zoom-in; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; padding-bottom: 4px; }
.gallery-thumbs a { flex: 0 0 calc((100% - 40px) / 5); aspect-ratio: 3 / 2; scroll-snap-align: start; border: 2px solid transparent; border-radius: 8px; overflow: hidden; opacity: .75; transition: opacity .15s, border-color .15s; }
.gallery-thumbs a:hover { opacity: 1; }
.gallery-thumbs a.active { border-color: var(--blue); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .gallery-thumbs a { flex-basis: calc((100% - 30px) / 4); } }
.vehicle-info { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; }
.vehicle-info h1 { font-size: 2.2rem; margin: 0; }
.vehicle-price { font-family: var(--heading); font-size: 2.2rem; font-weight: 700; color: var(--blue); margin: 0; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 4px 0 10px; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .95em; }
.description { margin: 0 0 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.description h2 { font-size: 1.3rem; text-transform: uppercase; margin: 0 0 6px; }
.description p { margin: 0; white-space: pre-line; }
@media (max-width: 860px) {
  .vehicle-grid { grid-template-columns: 1fr; gap: 24px; }
  .vehicle-info { position: static; }
}

/* Visit block */
.visit { background: var(--bg-soft); padding: 56px 0; }
.visit-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 40px; }
.map { display: block; width: 100%; height: 380px; margin-top: 40px; border: 0; border-radius: 8px; }
.visit h3 { font-size: 1.4rem; text-transform: uppercase; }
@media (max-width: 700px) {
  .visit { padding: 36px 0; }
  .visit-grid { grid-template-columns: 1fr; gap: 24px; }
  .map { margin-top: 24px; }
}

/* Content pages */
.prose p, .prose li { max-width: 70ch; }
.callout {
  display: flex; gap: 24px; align-items: flex-start;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
}
.callout h2 { font-size: 1.6rem; }
@media (max-width: 600px) { .callout { flex-direction: column; } }
.logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px; align-items: center; margin: 24px 0 32px; }
.logos a { display: grid; place-items: center; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); height: 110px; }
.logos img { max-height: 76px; width: auto; object-fit: contain; }
.note { font-size: .92rem; color: var(--muted); }

/* Credit application */
.applying-for { background: var(--bg-soft); padding: 10px 14px; border-radius: var(--radius); }
.form-alert { background: #fdecea; color: var(--error); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-weight: 600; }
.apply-form h2 { font-size: 1.6rem; text-transform: uppercase; margin: 32px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.apply-form h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 8px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.row.three { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 600px) {
  .row { grid-template-columns: 1fr; }
  .row.three { grid-template-columns: 1fr 1fr; }
  .row.three > :first-child { grid-column: 1 / -1; }
}
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; border: 0; padding: 0; min-width: 0; }
.field > span, .field legend { font-weight: 600; font-size: .95rem; }
.field b { color: var(--error); }
.field small { color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid #c9ccd3;
  border-radius: 6px;
  background: #fff;
  width: 100%;
}
.field input:not([type="radio"]), .field select { height: 46px; }
.field select {
  /* Own chevron, so it sits 14px in from the edge like the text does. */
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23555b66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; }
.radios { flex-direction: row; flex-wrap: nowrap; gap: 6px; }
.radios legend { width: 100%; margin-bottom: 6px; padding: 0; }
.radios label {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; font-size: .92rem;
  border: 1px solid #c9ccd3; border-radius: 999px;
  background: #fff; cursor: pointer; white-space: nowrap;
}
.radios label:has(input:checked) { border-color: var(--blue); background: var(--bg-soft); color: var(--blue); font-weight: 600; }
.field.radios input { width: 16px; height: 16px; margin: 0; padding: 0; flex: none; accent-color: var(--blue); }
@media (max-width: 600px) {
  .radios { display: grid; grid-template-columns: 1fr 1fr; }
  .radios legend { grid-column: 1 / -1; }
  .radios .field-error { grid-column: 1 / -1; }
}
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 24px 0 8px; font-size: .92rem; }
.consent input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.apply-form .button { width: 100%; margin-top: 16px; font-size: 1.3rem; }
.secure-note { font-size: .85rem; color: var(--muted); text-align: center; }

/* Footer */
.footer { background: var(--footer); color: #f2f2f2; padding: 48px 0 24px; margin-top: 24px; }
.footer a { color: #f2f2f2; }
.footer h2 { color: #fff; font-size: 2.2rem; text-transform: uppercase; text-align: center; margin: 0 0 28px; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 20px 56px; }
.footer-contact li { display: flex; align-items: center; gap: 14px; font-size: 1.05rem; line-height: 1.5; }
.footer-contact svg { flex: none; width: 24px; height: 24px; color: #9a9a9a; }
.footer-contact a { text-decoration: none; }
.footer-contact a[href^="tel:"] { text-decoration: underline; }
.footer p { margin: 0 0 8px; }
.footer .copyright { text-align: center; color: #c2c2c2; font-size: .85rem; margin: 32px 0 0; }
@media (max-width: 600px) { .footer-contact { flex-direction: column; align-items: flex-start; width: fit-content; margin: 0 auto; } }

/* Financing requirement callout */
.requirement { margin: 12px 0 20px; padding: 10px 14px; border-left: 4px solid var(--blue); background: var(--bg-soft); border-radius: 0 6px 6px 0; }
.requirement p { margin: 0; }
.requirement p + p { margin-top: 4px; }
.requirement strong { color: var(--blue); }

/* Full-screen photo viewer */
.viewer-open { overflow: hidden; }
.viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff;
  display: none; flex-direction: column;
}
.viewer[open] { display: flex; }
.viewer::backdrop { background: rgba(12, 12, 14, .88); backdrop-filter: blur(10px); }
.viewer-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 64px 88px 12px; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; user-select: none; }
.viewer-close, .viewer-prev, .viewer-next {
  display: grid; place-items: center;
  width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  color: #111; background: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
  font-size: 2rem; line-height: 1; padding-bottom: 4px;
}
.viewer-close { position: absolute; top: 16px; right: 16px; z-index: 1; font-size: 1.8rem; }
.viewer-prev, .viewer-next { position: absolute; top: 50%; transform: translateY(-50%); }
.viewer-prev { left: 20px; }
.viewer-next { right: 20px; }
.viewer-prev:hover, .viewer-next:hover, .viewer-close:hover { color: var(--blue); }
.viewer-count { position: absolute; left: 0; right: 0; bottom: 20px; margin: 0; text-align: center; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, .8); font-variant-numeric: lining-nums; }
.viewer-thumbs { display: flex; gap: 10px; padding: 12px 20px 20px; overflow-x: auto; scrollbar-width: thin; }
.viewer-thumbs button { flex: 0 0 120px; aspect-ratio: 3 / 2; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .6; background: #222; }
.viewer-thumbs button.active { border-color: #fff; opacity: 1; }
.viewer-thumbs button:hover { opacity: 1; }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.viewer.single .viewer-prev, .viewer.single .viewer-next, .viewer.single .viewer-thumbs { display: none; }
@media (max-width: 700px) {
  .viewer-stage { padding: 64px 0 8px; }
  .viewer-img { border-radius: 0; }
  .viewer-prev, .viewer-next { width: 40px; height: 40px; font-size: 1.6rem; }
  .viewer-prev { left: 8px; }
  .viewer-next { right: 8px; }
  .viewer-thumbs button { flex-basis: 84px; }
}

/* Co-signer section on the credit application (shown when "Yes" is picked) */
.field-note { margin: -6px 0 14px; color: var(--muted); font-size: .92rem; }
.cosigner-fields { margin: 4px 0 8px; padding: 18px 18px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); }
.apply-form:not(:has(input[name="has_cosigner"][value="yes"]:checked)) .cosigner-fields { display: none; }
.cosigner-fields .consent { margin: 8px 0 14px; }

/* Carfax button on car pages: the Carfax logo in a white button */
.carfax-button { display: flex; align-items: center; justify-content: center; min-height: 55px; background: #fff; border-color: #c9ccd3; }
.carfax-button:hover { background: var(--bg-soft); border-color: #111; }
.carfax-button img { height: 20px; width: auto; }

/* Fast taps on the photo arrows must not trigger the phone's double-tap zoom.
   Pinch-zoom and swiping still work. */
.viewer, .viewer button, .viewer-img,
.gallery-main, .gallery-prev, .gallery-next,
.carousel-prev, .carousel-next { touch-action: manipulation; }

/* Turnstile only shows itself when a visitor has to do something; give it room then. */
.cf-turnstile:not(:empty) { margin: 16px 0; }
