@import url('reset.css');

@font-face {
  font-family: 'Nissan Brand';
  src: url('/fonts/NissanBrand-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nissan Brand';
  src: url('/fonts/NissanBrand-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nissan Brand';
  src: url('/fonts/NissanBrand-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Nissan Brand';
  src: url('/fonts/NissanBrand-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Haydes';
  src: url('/fonts/Haydes.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colors — extracted from www.haasnissan.com / design-system.md */
  --color-primary: #c32032;
  --color-primary-dark: #a01928;
  --color-secondary: #8b8a8a;
  --color-secondary-dark: #6e6e6e;
  --color-accent: #f5f5f5;
  --color-background: #ffffff;
  --color-background-alt: #f5f5f5;
  --color-text: #1a1a1a;
  --color-text-light: #ffffff;
  --color-border: #e2e2e2;
  --color-dark: #000000;

  /* Typography */
  --font-primary: 'Nissan Brand', 'Helvetica Neue', Arial, sans-serif;
  --font-secondary: 'Haydes', Georgia, serif;

  /* Spacing scale */
  --spacing-unit: 1rem;
  --space-xs: calc(var(--spacing-unit) * 0.25);
  --space-sm: calc(var(--spacing-unit) * 0.5);
  --space-md: var(--spacing-unit);
  --space-lg: calc(var(--spacing-unit) * 1.5);
  --space-xl: calc(var(--spacing-unit) * 2);
  --space-xxl: calc(var(--spacing-unit) * 3);

  /* Layout */
  --container-max-width: 1200px;
  --header-height: 4.5rem;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Z-index scale */
  --z-base: 1;
  --z-header: 100;
  --z-menu: 200;
}

/* Base layout */
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

/* Ensure form controls and footer/card links are easy to tap on mobile. */
input,
select,
textarea {
  font: inherit;
  min-height: 48px;
  box-sizing: border-box;
}

input[type="range"] {
  min-height: 24px;
}

.vehicle-card__title a {
  display: inline-block;
  min-height: 48px;
}

.site-footer a,
.site-footer__brand a,
.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.35rem 0;
}

.site-footer__legal a {
  min-height: 48px;
  display: inline-flex;
  padding: 0.2rem 0;
}

.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography helpers */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

p {
  margin-bottom: var(--space-md);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.2s ease, transform 0.1s ease;
  border: none;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-primary-dark);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-light);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--color-secondary-dark);
}

/* ===== Header ===== */
.top-bar {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-size: 0.8rem;
  padding: 0.3rem 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: nowrap;
  max-width: none;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.top-bar a {
  color: var(--color-text-light);
  font-weight: 600;
  text-decoration: none;
}

.top-bar a:hover,
.top-bar a:focus {
  text-decoration: underline;
}

.top-bar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}

.top-bar__tagline {
  font-family: 'Nissan Brand', Arial, sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.top-bar__address {
  font-style: normal;
  opacity: 0.95;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.top-bar__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: nowrap;
}

.top-bar__contact {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.25;
}

.top-bar__phone,
.top-bar__text {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  min-height: 0;
}

.top-bar__phone {
  font-size: 0.95rem;
}

.top-bar__phone--service {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
}

.top-bar__label {
  font-weight: 400;
  opacity: 0.85;
  text-transform: uppercase;
  font-size: 0.75em;
  margin-right: 0.15rem;
}

.top-bar__text {
  font-weight: 600;
  font-size: 0.75rem;
}

.top-bar__icon {
  flex-shrink: 0;
}

.top-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 0;
}

.top-bar__cta--red {
  background-color: var(--color-primary-dark);
  color: var(--color-text-light);
}

.top-bar__cta--red:hover,
.top-bar__cta--red:focus {
  background-color: var(--color-secondary);
  text-decoration: none;
}

.top-bar__cta--dark {
  background-color: var(--color-secondary);
  color: var(--color-text-light);
}

.top-bar__cta--dark:hover,
.top-bar__cta--dark:focus {
  background-color: var(--color-secondary-dark);
  text-decoration: none;
}

/* Ensure all header/top-bar interactive elements have a minimum 48×48px tap
   target on touch devices. The visual height stays compact because padding
   expands the clickable area without increasing text size. */
.top-bar__phone,
.top-bar__text,
.top-bar__cta,
.logo,
.menu-toggle,
.main-nav__link {
  min-height: 48px;
  min-width: 48px;
}

.top-bar__phone,
.top-bar__text,
.top-bar__cta {
  align-items: center;
}

.top-bar__phone {
  padding: 0.2rem 0.4rem;
}

.top-bar__text {
  padding: 0.1rem 0.4rem;
}

.top-bar__cta {
  padding: 0.35rem 0.75rem;
}

/* On desktop the bar should stay compact like the live WordPress header,
   so the tap-target minimum is only enforced for touch/mobile viewports. */
@media (min-width: 769px) {
  .top-bar__phone,
  .top-bar__text,
  .top-bar__cta,
  .logo {
    min-height: auto;
    min-width: auto;
  }
}

/* Mid-desktop: keep the top bar on one row without the right-side CTAs
   being pushed to the viewport edge. */
@media (max-width: 1400px) {
  .top-bar .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .top-bar__address {
    display: none;
  }

  .top-bar__phone {
    font-size: 0.85rem;
  }

  .top-bar__text {
    font-size: 0.7rem;
  }

  .top-bar__cta {
    padding: 0.3rem 0.55rem;
    font-size: 0.65rem;
  }
}

/* Let the top bar wrap gracefully on narrower desktop/tablet widths
   without the items overflowing the viewport. */
@media (max-width: 1100px) {
  .top-bar .container {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
  }

  .top-bar__left,
  .top-bar__right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .top-bar__address {
    display: inline-flex;
  }
}

.logo {
  padding: 0.25rem;
}

.menu-toggle {
  width: 3rem;
  height: 3rem;
}

@media (min-width: 1024px) {
  .main-nav__link {
    padding: var(--space-sm) 0.6rem;
  }
}

.main-header {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  gap: var(--space-md);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.logo__img {
  display: block;
  width: 220px;
  height: auto;
  max-width: 220px;
  max-height: 50px;
}

.logo:hover .logo__img,
.logo:focus .logo__img {
  opacity: 0.9;
}

.main-nav {
  display: none;
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.main-nav__item {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

.main-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  padding: var(--space-sm) 0.35rem;
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.main-nav__link span[aria-hidden="true"] {
  font-size: 0.55rem;
  margin-top: 0.1rem;
}

.main-nav__link:hover,
.main-nav__link:focus {
  color: var(--color-primary);
  background-color: var(--color-accent);
}

.main-nav__link[aria-current="page"] {
  color: var(--color-primary);
  background-color: var(--color-accent);
  font-weight: 700;
}

/* Mobile menu button */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-left: auto;
}

.menu-toggle__icon {
  display: block;
  width: 1.5rem;
  height: 1.25rem;
  position: relative;
}

.menu-toggle__icon-bar {
  display: block;
  position: absolute;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.menu-toggle__icon-bar:nth-child(1) { top: 0; }
.menu-toggle__icon-bar:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle__icon-bar:nth-child(3) { bottom: 0; }

.menu-toggle[aria-expanded="true"] .menu-toggle__icon-bar:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon-bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon-bar:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.menu-toggle:hover,
.menu-toggle:focus {
  border-color: var(--color-primary);
}

.menu-toggle:hover .menu-toggle__icon-bar,
.menu-toggle:focus .menu-toggle__icon-bar {
  background-color: var(--color-primary);
}

/* Mobile nav panel */
.main-header__drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
  box-shadow: var(--shadow-md);
  z-index: var(--z-menu);
}

.main-header__drawer[hidden] {
  display: none;
}

.main-header__drawer .main-nav__list {
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
}

.main-header__drawer .main-nav__link {
  padding: var(--space-md);
  width: 100%;
  justify-content: center;
}

/* ===== Page header ===== */
.page-header {
  background-color: var(--color-dark);
  color: var(--color-text-light);
  padding: var(--space-xxl) 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-header--service {
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.65)
    ),
    url('/images/archive-service-hero.jpg');
}

.page-header--parts {
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.65)
    ),
    url('/images/archive-parts-hero.jpg');
}

.page-header--finance {
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.65),
      rgba(0, 0, 0, 0.65)
    ),
    url('/images/archive-finance-hero.jpg');
}

.page-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.page-header p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.9;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Inventory filters ===== */
.inventory-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-group label {
  font-weight: 600;
  font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background-color: var(--color-background);
  width: 100%;
  min-height: 48px;
}

.filter-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.inventory-meta {
  text-align: center;
  color: var(--color-secondary-dark);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.inventory-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  grid-column: 1 / -1;
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Inventory left-sidebar filter layout (used page) ===== */
.inventory-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-xl);
  align-items: start;
}

/* Stretch the used inventory section to full monitor width */
.inventory-section__wrap {
  width: 95%;
  margin: 0 auto;
}

/* Override the global container max-width on the inventory pages */
.inventory-section .container,
section:has(> .container > form#inventory-filters[data-condition="new"]) > .container {
  max-width: 95%;
  padding: 0;
}

.inventory-sidebar {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
}

.inventory-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: var(--space-sm);
}

.inventory-sidebar__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}

.inventory-sidebar__reset {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text);
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.inventory-sidebar__reset:hover,
.inventory-sidebar__reset:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-accent);
}

.inventory-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.inventory-sidebar__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-secondary-dark);
  margin: 0 0 var(--space-xs);
}

.inventory-sidebar__sort {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-background);
  font-size: 0.95rem;
  cursor: pointer;
}

.inventory-sidebar__sort:focus {
  border-color: var(--color-primary);
  outline: none;
}

.inventory-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 46vh;
  overflow-y: auto;
}

.inventory-sidebar__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s;
}

.inventory-sidebar__item:hover {
  background-color: var(--color-accent);
}

.inventory-sidebar__item input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--color-primary);
  flex-shrink: 0;
  cursor: pointer;
}

.inventory-sidebar__item-label {
  flex: 1 1 auto;
  font-size: 0.95rem;
}

.inventory-sidebar__item-count {
  color: var(--color-secondary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.inventory-sidebar__item:has(input:checked) {
  background-color: #fdeef0;
}

.inventory-results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.inventory-results .inventory-meta {
  margin-bottom: 0;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.active-filters__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--color-accent);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.active-filters__pill button {
  background: none;
  border: none;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text);
  padding: 0;
}

.active-filters__pill button:hover,
.active-filters__pill button:focus {
  color: var(--color-primary);
}

/* ===== Responsive: collapse sidebar above the grid on mobile ===== */
@media (max-width: 900px) {
  .inventory-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .inventory-sidebar {
    position: static;
    max-height: none;
  }
  .inventory-sidebar__list {
    max-height: none;
  }
  .inventory-results__bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Staff / team section ===== */
.staff-section {
  padding: var(--space-xl) 0;
}

.staff-section__eyebrow {
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
}

.staff-section__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.staff-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-lg);
}

@media (min-width: 480px) {
  .staff-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .staff-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .staff-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.staff-card {
  text-align: center;
}

.staff-card__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-md);
  background: var(--color-background-alt);
  max-width: 160px;
}

.staff-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.staff-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 2.5rem;
  color: var(--color-primary);
  background: var(--color-background-alt);
  text-transform: uppercase;
}

.staff-card__name {
  color: var(--color-primary);
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.staff-card__title {
  font-size: 0.85rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.staff-card__contact {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.staff-card__contact a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.staff-card__contact a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.staff-card__contact-icon {
  width: 14px;
  height: 14px;
  vertical-align: -0.15em;
  margin-right: var(--space-xs);
}

.staff-section__heading {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: center;
  margin: var(--space-xl) 0 var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.staff-section__heading:first-of-type {
  margin-top: 0;
}

/* ===== Team page (matches live WordPress layout) ===== */
.page-header--team {
  text-align: left;
  background-image: linear-gradient(
      rgba(0, 0, 0, 0.55),
      rgba(0, 0, 0, 0.55)
    ),
    url('/images/team-hero.webp');
  background-position: center center;
  background-size: cover;
}

.page-header--team .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page-header__breadcrumb {
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.page-header__breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--space-xs);
}

.page-header__breadcrumb li + li::before {
  content: '›';
  margin-right: var(--space-xs);
  color: var(--color-text-light);
  opacity: 0.8;
}

.page-header__breadcrumb a {
  color: var(--color-text-light);
  text-decoration: none;
}

.page-header__breadcrumb a:hover {
  text-decoration: underline;
}

.page-header .page-header__eyebrow {
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-xs);
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  font-weight: 700;
}

.page-header--team h1 {
  text-transform: none;
  margin-bottom: 0;
}

.team-directory {
  padding-top: var(--space-xl);
}

.team-department {
  margin-bottom: var(--space-xxl);
}

.team-department__bar {
  width: 170px;
  height: 4px;
  background-color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.team-department__heading {
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.04em;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-xl);
}

@media (min-width: 600px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.team-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.team-card__photo {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-background-alt);
  border: 1px solid var(--color-border);
}

.team-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-text-light);
  background: var(--color-secondary);
  text-transform: uppercase;
}

.team-card__body {
  flex: 1;
}

.team-card__name {
  color: var(--color-primary);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.team-card__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.team-card__contact {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.team-card__contact > div {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.team-card__contact a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.team-card__contact a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.team-card__contact-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-primary);
}

/* ===== Contact page ===== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-content: start;
}

.contact-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.contact-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.contact-card address,
.contact-card p {
  font-style: normal;
  margin-bottom: var(--space-sm);
}

.hours-table-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: fixed;
}

.hours-table th,
.hours-table td {
  padding: var(--space-sm);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.hours-table thead th {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-bottom: none;
  font-size: 0.8rem;
}

.hours-table tbody tr:nth-child(even) {
  background-color: var(--color-background-alt);
}

.hours-table tbody th {
  font-weight: 600;
}

.hours-table tbody td {
  color: var(--color-text);
}

.map-card {
  text-align: center;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-secondary-dark);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.map-placeholder:hover,
.map-placeholder:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.map-placeholder__pin {
  font-size: 2.5rem;
  line-height: 1;
}

.contact-form-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.contact-form {
  display: grid;
  gap: var(--space-md);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 480px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-group--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

/* Radio / checkbox groups inside forms */
.form-radio-group,
.form-checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
}

.form-radio-label,
.form-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
}

.form-radio-label input,
.form-checkbox-label input {
  width: auto;
  margin: 0;
}

/* Contact cards - service page */
.contact-card--clickable {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card--clickable:hover,
.contact-card--clickable:focus {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  flex-shrink: 0;
  color: var(--color-primary);
}

.contact-card__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0;
}

.contact-card__subtitle {
  font-size: 1rem;
  font-weight: 700;
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--color-dark);
}

/* Two-column action cards */
.action-cards--two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Service page promo cards (smaller than homepage promo-cta) */
.page-header--specials {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%),
    url('/images/service-hero.jpg');
  background-size: cover;
  background-position: center;
}

.page-header__subhead {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: var(--space-sm);
  color: var(--color-text-light);
}

/* Service page promo cards */
.promo-cta--service-card {
  min-height: 220px;
}

.page-header--service {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%),
    url('/images/service-hero.jpg');
  background-size: cover;
  background-position: center;
}

/* Centered text utility */
.text-center {
  text-align: center;
}

.form-actions {
  margin-top: var(--space-sm);
}

.form-feedback {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  font-weight: 600;
}

.form-feedback--success {
  background-color: #eaf6ec;
  color: #1e6d31;
  border: 1px solid #b6e4c0;
}

.form-feedback--error {
  background-color: #fbeae9;
  color: #8b1a16;
  border: 1px solid #f0bbb8;
}

/* ===== Promotions ===== */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.promo-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.promo-card p:last-of-type {
  margin-top: auto;
  margin-bottom: 0;
  width: 100%;
}

.promo-card .btn {
  width: 100%;
  justify-content: center;
}

.promo-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.promo-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.promo-card p {
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-lg);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  min-height: min(65vh, 560px);
  padding: var(--space-xxl) 0;
  color: var(--color-text-light);
  background-color: var(--color-dark);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.45) 50%,
      rgba(0, 0, 0, 0.15) 100%
    ),
    url('/images/archive-hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: var(--z-base);
}

.hero__content {
  position: relative;
  z-index: calc(var(--z-base) + 1);
  max-width: 720px;
}

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  line-height: 1.05;
}

.hero__lead {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  margin-bottom: var(--space-xl);
  opacity: 0.95;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-actions .btn {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* ===== Featured vehicles ===== */
.section {
  padding: var(--space-xxl) 0;
}

.section--alt {
  background-color: var(--color-accent);
}

.section__title {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 5px;
  background-color: var(--color-primary);
  margin: var(--space-md) auto 0;
}

.section__subtitle {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-secondary-dark);
  margin-top: calc(-1 * var(--space-md));
  margin-bottom: var(--space-xl);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-text-light);
}

.section--dark .section__eyebrow {
  color: var(--color-text-light);
  opacity: 0.9;
}

.section--dark a {
  color: var(--color-primary);
}

.section__lead {
  font-size: 1.1rem;
  font-weight: 500;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* Quick actions */
.quick-actions {
  padding: var(--space-lg) 0;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  padding: var(--space-md);
  color: var(--color-text-light);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  transition: color 0.2s ease;
}

.action-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.action-card:hover,
.action-card:focus {
  color: var(--color-primary);
}

.action-card:hover .action-card__icon,
.action-card:focus .action-card__icon {
  background-color: var(--color-text-light);
  color: var(--color-primary);
}

.action-card span {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  opacity: 0.9;
}

/* Tool cards */
.tool-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.tool-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.tool-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.tool-card p {
  margin-bottom: var(--space-lg);
  color: var(--color-secondary-dark);
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-md);
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: var(--space-md);
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-card:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* About snippet */
.about-snippet {
  display: flex;
  justify-content: center;
}

.about-snippet__text {
  max-width: 820px;
  text-align: center;
}

.about-snippet__text h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
}

.about-snippet__text p {
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  color: var(--color-dark);
}

/* Section eyebrow */
.section__eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-xs);
}

/* Search inventory section */
.search-section {
  background-color: var(--color-dark);
  color: var(--color-text-light);
}

.search-section__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.search-section h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.search-section__icon {
  color: var(--color-primary);
  flex-shrink: 0;
}

.search-section__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.search-section__eyebrow {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.search-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-md);
  align-items: end;
}

.search-form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.search-form__group label {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.search-form__group select,
.search-form__group input[type="range"] {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  background-color: var(--color-background);
  color: var(--color-text);
  width: 100%;
  min-height: 48px;
}

.search-form__group select {
  line-height: 1.2;
}

.search-form__group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  padding: 0;
  background: var(--color-border);
  border: none;
  cursor: pointer;
}

.search-form__group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
}

.search-form__group input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-primary);
  border: none;
}

.search-form__submit {
  width: 100%;
  text-transform: uppercase;
}

/* Promo cards */
.promo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.promo-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.promo-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: var(--space-sm);
}

.promo-card p {
  margin-bottom: var(--space-lg);
  color: var(--color-secondary-dark);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.vehicle-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.vehicle-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.vehicle-card__thumb {
  aspect-ratio: 4 / 3;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.vehicle-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vehicle-card__title {
  flex: 1 0 auto;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vehicle-card__title a {
  display: inline;
}

.vehicle-card__price {
  color: var(--color-primary);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.vehicle-card__meta {
  color: var(--color-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-text-light);
  padding: var(--space-xxl) 0 var(--space-xl);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

.site-footer__brand {
  font-style: normal;
}

.site-footer__brand address {
  font-style: normal;
  margin-bottom: var(--space-sm);
  opacity: 0.9;
}

.site-footer__nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
}

.site-footer__nav a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0.25rem 0;
}

.site-footer__nav a:hover,
.site-footer__nav a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}

.site-footer a {
  color: var(--color-text-light);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--color-primary);
}

.site-footer__legal {
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.75;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-lg);
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr;
  }

  .site-footer__nav ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Vehicle detail page ===== */
.vehicle-detail {
  display: block;
}

.vehicle-detail__breadcrumb {
  font-size: 0.85rem;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.vehicle-detail__breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.vehicle-detail__breadcrumb a:hover {
  text-decoration: underline;
}

.vehicle-detail__breadcrumb span[aria-current] {
  color: var(--color-text);
  font-weight: 600;
}

/* Hero image */
.vehicle-detail__hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f0f0f0;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: var(--shadow-md);
}

.vehicle-detail__hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vehicle-detail__hero-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  z-index: 2;
}

/* Page thumbnails strip */
.vehicle-detail__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: var(--space-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.detail-thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 54px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background-color: #f0f0f0;
  padding: 0;
  transition: border-color 0.15s;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-thumb[aria-selected="true"],
.detail-thumb:hover,
.detail-thumb:focus {
  border-color: var(--color-primary);
}

/* Info section */
.vehicle-detail__info {
  padding: var(--space-lg) 0;
}

@media (min-width: 768px) {
  .vehicle-detail__info {
    padding: var(--space-xl) 0;
  }
}

.vehicle-detail__header {
  margin-bottom: var(--space-lg);
}

.vehicle-detail__condition {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: var(--space-sm);
}

.vehicle-detail__info h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 4px;
  line-height: 1.2;
}

.vehicle-detail__stock {
  font-size: 0.9rem;
  color: var(--color-secondary-dark);
  font-weight: 500;
}

.vehicle-detail__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.vehicle-detail__price {
  color: var(--color-primary);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
}

.vehicle-detail__price-note {
  font-size: 0.8rem;
  color: var(--color-secondary-dark);
}

.vehicle-detail__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

/* Full specs */
.vehicle-detail__full-specs {
  margin-bottom: var(--space-lg);
}

.vehicle-detail__full-specs h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.vehicle-detail__specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-row {
  background: var(--color-background);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec-row__label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary-dark);
}

.spec-row__value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
}

/* Options */
.vehicle-options {
  margin-bottom: var(--space-lg);
}

.vehicle-options h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 var(--space-md);
}

.vehicle-options__group + .vehicle-options__group {
  margin-top: var(--space-md);
}

.vehicle-options__group h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary-dark);
  margin: 0 0 var(--space-xs);
}

.vehicle-options__group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.vehicle-options__group ul li {
  position: relative;
  padding-left: 18px;
  font-size: 0.9rem;
}

.vehicle-options__group ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* Sticky CTA */
.vehicle-detail__sticky-cta {
  position: sticky;
  bottom: 0;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  padding: 12px var(--space-lg);
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
}

.vehicle-detail__sticky-cta-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.vehicle-detail__sticky-cta-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.vehicle-detail__sticky-cta-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.lightbox__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 3;
  transition: background 0.15s;
}

.lightbox__close:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox__stage {
  position: relative;
  max-width: 100%;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100vh - 200px);
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  z-index: 2;
  transition: background 0.15s;
}

.lightbox__nav:hover {
  background: rgba(255,255,255,0.3);
}

.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

.lightbox__counter {
  position: absolute;
  bottom: 8px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  z-index: 2;
}

.lightbox__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 16px 0;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.lightbox-thumb {
  flex: 0 0 auto;
  width: 120px;
  height: 80px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background-color: rgba(255,255,255,0.1);
  padding: 0;
  transition: border-color 0.15s;
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lightbox-thumb[aria-selected="true"],
.lightbox-thumb:hover,
.lightbox-thumb:focus {
  border-color: #fff;
}

/* Mobile lightbox adjustments */
@media (max-width: 767px) {
  .lightbox__nav {
    width: 40px;
    height: 40px;
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
  .lightbox-thumb {
    width: 100px;
    height: 67px;
  }
  .lightbox__stage img {
    max-height: calc(100vh - 160px);
  }
}

.vehicle-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 0.875rem;
  color: var(--color-secondary-dark);
}

.vehicle-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

.vehicle-card__features li::before {
  content: '✓';
  color: var(--color-primary);
  font-weight: 700;
}

.vehicle-card__thumb img,
.vehicle-card__thumb picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Promotions ===== */
.promo-card__price {
  display: block;
  color: var(--color-primary);
  font-size: 1.75rem;
  font-weight: 800;
  margin: var(--space-md) 0;
}

.promo-card__terms {
  font-size: 0.85rem;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-md);
}

.promo-card__expiry {
  display: inline-block;
  background-color: var(--color-accent);
  color: var(--color-secondary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-md);
}

/* ===== Map ===== */
.map-iframe {
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: var(--radius-md);
}

/* ===== Contact phones ===== */
.contact-phones {
  display: grid;
  gap: var(--space-sm);
}

.contact-phones dt {
  font-weight: 600;
}

.contact-phones dd {
  margin: 0;
}

/* ===== Utility ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (min-width: 1024px) {
  .main-nav {
    display: block;
  }

  .menu-toggle {
    display: none;
  }

  .main-header__drawer {
    display: none !important;
  }

  .vehicle-detail {
    grid-template-columns: 1.25fr 1fr;
  }

  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .contact-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar .container {
    justify-content: center;
    text-align: center;
    gap: var(--space-sm);
  }

  .top-bar__left,
  .top-bar__right {
    justify-content: center;
    width: 100%;
  }

  .top-bar__address {
    display: none;
  }

  .top-bar__cta {
    display: none;
  }

  .top-bar__tagline {
    font-size: 1rem;
  }

  .logo__img {
    max-width: 200px;
    max-height: 44px;
  }

  .main-header {
    --header-height: 4rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo__mark {
    width: 2.25rem;
    height: 2.25rem;
  }

  .hero {
    min-height: auto;
    padding: var(--space-xl) 0;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  .hero__lead {
    font-size: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  .inventory-filters {
    grid-template-columns: 1fr;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  .hours-table th,
  .hours-table td {
    padding: var(--space-xs);
    font-size: 0.8rem;
    white-space: normal;
  }

  .hours-table thead th {
    font-size: 0.75rem;
  }

  .site-footer__nav ul {
    grid-template-columns: 1fr;
  }
}

.main-nav__item--dropdown {
  position: relative;
}

.main-nav__submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--color-background);
  border-top: 3px solid var(--color-primary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  z-index: 1000;
}

.main-nav__submenu a {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav__submenu a:hover,
.main-nav__submenu a:focus {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Desktop: show submenu on hover/focus */
@media (min-width: 1024px) {
  .main-nav__item--dropdown:hover .main-nav__submenu,
  .main-nav__item--dropdown:focus-within .main-nav__submenu {
    display: block;
  }

  .main-nav__subtoggle {
    display: none;
  }
}

/* Mobile: submenu toggle */
.main-nav__subtoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-left: 0;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: inherit;
  cursor: pointer;
}

.main-nav__subtoggle:hover,
.main-nav__subtoggle:focus {
  background: var(--color-accent);
  border-color: var(--color-secondary);
}

.main-nav__subtoggle[aria-expanded="true"] span {
  display: inline-block;
  transform: rotate(180deg);
}

@media (max-width: 1023px) {
  .main-nav__submenu {
    position: static;
    display: none;
    box-shadow: none;
    border-top: none;
    border-left: 3px solid var(--color-primary);
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 0.25rem 0 0.25rem 0.5rem;
  }

  .main-nav__item.is-open > .main-nav__submenu {
    display: block;
  }

  .main-nav__subtoggle {
    display: inline-flex;
  }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}


/* Promo CTAs section (apply for credit / book service) */
.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.promo-ctas__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.promo-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  padding: var(--space-xl);
  min-height: 280px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-background);
  background-color: var(--color-secondary-dark);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.promo-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
}

.promo-cta > * {
  position: relative;
  z-index: 2;
}

.promo-cta--finance {
  background-image: url('/images/promo-finance.jpg');
}

.promo-cta--service {
  background-image: url('/images/promo-service.jpg');
}

.promo-cta:hover,
.promo-cta:focus {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.promo-cta__label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-background);
}

.promo-cta__label::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin-bottom: var(--space-sm);
  background-color: var(--color-primary);
}

.promo-cta__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-background);
  line-height: 1.1;
}

.promo-cta__btn {
  margin-top: auto;
}

.promo-cta__btn svg {
  width: 12px;
  height: 12px;
  margin-left: var(--space-xs);
  fill: currentColor;
}

/* Full-width promo banner */
.promo-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-xl) var(--space-md);
  background-color: var(--color-primary);
  color: var(--color-background);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.promo-banner:hover,
.promo-banner:focus {
  background-color: var(--color-primary-dark);
}

.promo-banner__eyebrow {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.promo-banner__title {
  font-size: 1.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Hours grid on homepage */
.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
}

.hours-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.hours-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* ===== Quick-view modal (listing pages) ===== */
#quick-view-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.qv-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.85);
}

.qv-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px 20px;
  box-sizing: border-box;
}

.qv-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(255,255,255,0.9);
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
  z-index: 10;
  transition: background 0.15s, transform 0.15s;
}

.qv-close:hover {
  background: var(--color-primary);
  color: #fff;
  transform: scale(1.05);
}

/* Side-by-side body: photo left, info right */
.qv-body {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 20px;
  align-items: stretch;
  overflow: hidden;
}

.qv-photo-area {
  position: relative;
  flex: 1 1 60%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qv-photo-main {
  position: relative;
  flex: 1;
  min-height: 0;
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qv-photo-main img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.qv-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  z-index: 2;
}

.qv-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  flex-shrink: 0;
}

.qv-thumb {
  flex: 0 0 auto;
  width: 90px;
  height: 60px;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  padding: 0;
  transition: border-color 0.15s;
}

.qv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qv-thumb[aria-selected="true"],
.qv-thumb:hover,
.qv-thumb:focus {
  border-color: #fff;
}

/* Right info panel */
.qv-details {
  flex: 1 1 40%;
  min-width: 0;
  background: var(--color-background);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.qv-header {
  margin-bottom: var(--space-md);
}

.qv-condition {
  display: inline-block;
  background-color: var(--color-primary);
  color: var(--color-text-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 8px;
}

.qv-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 4px;
  line-height: 1.2;
}

.qv-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
}

.qv-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.qv-spec-row {
  background: var(--color-background);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.qv-spec-row__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary-dark);
}

.qv-spec-row__value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qv-features-wrap h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-secondary-dark);
  margin: 0 0 8px;
}

.qv-features-wrap ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
  flex: 1;
}

.qv-features-wrap ul li {
  position: relative;
  padding-left: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.qv-features-wrap ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.qv-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.qv-actions .btn {
  flex: 1 1 auto;
  text-align: center;
}

/* Mobile quick-view: stack vertically */
@media (max-width: 767px) {
  .qv-content {
    padding: 60px 12px 12px;
  }
  .qv-body {
    flex-direction: column;
    overflow-y: auto;
    gap: 14px;
  }
  .qv-photo-area {
    flex: none;
  }
  .qv-photo-main {
    min-height: 38vh;
  }
  .qv-details {
    flex: none;
  }
  .qv-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .qv-actions .btn {
    width: 100%;
    min-width: unset;
  }
  .qv-thumb {
    width: 80px;
    height: 54px;
  }
}
/* Vehicle card thumb as button */
.vehicle-card__thumb {
  display: block;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f0f0f0;
  cursor: pointer;
  transition: opacity 0.15s;
}

.vehicle-card__thumb:hover,
.vehicle-card__thumb:focus {
  opacity: 0.92;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.vehicle-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile quick-view */
@media (max-width: 767px) {
  .qv-content {
    padding: 12px;
  }
  .qv-photo-area {
    min-height: 40vh;
  }
  .qv-details {
    padding: var(--space-md);
  }
  .qv-thumb {
    width: 80px;
    height: 54px;
  }
}

/* Max price input in sidebar */
.inventory-sidebar__price-input input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--color-background);
  color: var(--color-text);
  box-sizing: border-box;
}

.inventory-sidebar__price-input input::placeholder {
  color: var(--color-text-muted, #8a8a8a);
  opacity: 1;
}

.inventory-sidebar__price-input input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* ===== Vehicle card action row ===== */
.vehicle-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.vehicle-card__actions .btn {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
}
.btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-ghost:hover,
.btn-ghost:focus {
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

/* ===== Payment Estimator popup (customer-facing, minimal) ===== */
#estimate-modal[hidden] { display: none; }
#estimate-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.est-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}
.est-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 460px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  animation: est-pop 0.18s ease;
}
@keyframes est-pop {
  from { transform: translateY(12px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.est-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #374151;
}
.est-close:hover { background: #e5e7eb; }
.est-body { padding: 24px; }
.est-header h2 {
  margin: 0 0 4px;
  font-size: 1.35rem;
  color: var(--color-text);
}
.est-vehicle {
  margin: 0 0 18px;
  color: #6b7280;
  font-size: 0.95rem;
}
.est-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.est-field { display: flex; flex-direction: column; }
.est-field label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.est-input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.est-input-wrap:focus-within { border-color: var(--color-primary); }
.est-prefix {
  padding: 0 0 0 10px;
  color: #6b7280;
  font-weight: 600;
}
.est-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 10px 10px 4px;
  font-size: 1rem;
  width: 100%;
  min-width: 0;
}
#est-term {
  border: 2px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  background: #fff;
}
#est-term:focus { outline: none; border-color: var(--color-primary); }
.est-hint {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: #6b7280;
}
.est-result {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.est-result__label {
  font-size: 0.9rem;
  color: #374151;
}
.est-result__savings {
  display: block;
  text-align: right;
  margin: 2px 0 4px;
  min-height: 0;
  font-size: 0;
}
.est-result__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--color-primary);
}
#est-payment {
  font-size: 2rem;
  font-weight: 800;
}
.est-result__per {
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
}
.est-disclaimer {
  margin: 14px 0 18px;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.5;
}
.est-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.est-actions .btn { flex: 1; padding: 0.7rem 1rem; font-size: 0.9rem; }
@media (max-width: 480px) {
  .est-fields { grid-template-columns: 1fr; }
  #est-payment { font-size: 1.6rem; }
}

/* Estimate popup: finance/lease toggle + rate line */
.est-toggle {
  display: flex;
  background: #f3f4f6;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
@media (min-width: 480px) {
  .est-fields { grid-template-columns: 1fr 1fr; }
}
.est-toggle__btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 12px;
  border-radius: 7px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.est-toggle__btn.is-active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.est-field--msd { grid-column: 1 / -1; }
.est-field--full { grid-column: 1 / -1; }

/* Estimate popup: add-on options checkboxes — 2 rows × 3 cols, price on its own line */
.est-options {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px 8px;
  padding: 12px 14px;
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  margin-top: 4px;
}
.est-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  user-select: none;
  line-height: 1.3;
}
.est-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary, #dc2626);
  cursor: pointer;
  flex-shrink: 0;
}
.est-option span {
  display: flex;
  flex-direction: column;
}
.est-option .opt-price {
  font-weight: 400;
  color: #6b7280;
  font-size: 0.78rem;
  margin-top: 1px;
}
.est-suffix {
  padding: 0 10px;
  color: #6b7280;
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}
.estimate-popup [hidden] { display: none !important; }
[hidden] { display: none !important; }
.est-rate {
  margin: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  text-align: right;
}

/* Estimate popup: cash savings badge */
.est-cash-savings-badge {
  display: inline-block;
  background: #dc2626; /* red */
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 3px 10px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.est-discount-field--cash {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}
.est-discount-field--cash .est-discount-amount {
  font-weight: 700;
  color: #dc2626;
  font-size: 1.05rem;
  margin: 0;
}
/* Estimate popup: cash savings callout */
.est-cash-savings {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}
.est-cash-savings-badge {
  display: inline-block;
  background: #dc2626; /* red */
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 3px 10px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.est-discount-field--cash {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}
.est-discount-field--cash .est-discount-amount {
  font-weight: 700;
  color: #dc2626;
  font-size: 1.05rem;
  margin: 0;
}
/* Estimate popup: cash savings callout */
.est-cash-savings {
  margin: 10px 0 12px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  line-height: 1.5;
}
.est-cash-savings-badge {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 3px 10px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.est-discount-field--cash {
  background: #fef2f2;
  border: 2px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 8px 0;
}
.est-discount-field--cash .est-discount-amount {
  font-weight: 700;
  color: #dc2626;
  font-size: 1.05rem;
  margin: 0;
}
/* Estimate popup: best-option highlight */
.est-best {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
}
.est-best.is-best {
  color: #15803d;
  background: #dcfce7;
  border-color: #86efac;
}

/* Quick-view Estimate Payment button */
.qv-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.qv-actions .btn { flex: 1 1 auto; min-width: 120px; }

/* ──────────────────────────────────────────────────────────────
 * Finance Application Form
 * ────────────────────────────────────────────────────────────── */
.finance-app-section {
  margin: 2rem 0;
  padding: 1.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fafbfc;
}
.finance-app-section legend {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  padding: 0 0.5rem;
}
.finance-app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) {
  .finance-app-grid { grid-template-columns: 1fr; }
}
.finance-app-field--full {
  grid-column: 1 / -1;
}
.finance-app-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}
.finance-app-field input,
.finance-app-field select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
  box-sizing: border-box;
}
.finance-app-field input:focus,
.finance-app-field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(200,16,46,0.1);
}
.finance-app-radio-group {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.finance-app-radio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
}
.finance-app-radio input[type="radio"] {
  width: auto;
  margin: 0;
}
.finance-app-consent {
  margin: 1.5rem 0;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.finance-app-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}
.finance-app-checkbox input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.finance-app-legal {
  margin: 0.8rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}
.finance-app-legal a {
  color: var(--color-primary);
}
.finance-app-submit {
  margin-top: 1.5rem;
  text-align: center;
}
.finance-app-submit .btn-lg {
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 700;
}
