/* ==========================================================================
   responsive.css — breakpoint overrides (mobile-first, min-width only)
   Breakpoints taken from the reference CSS: 650 / 768 / 1061 / 1200.
   Tested widths: 360, 768, 1024, 1440.
   ========================================================================== */

/* ---- >= 650px: desktop header (hamburger disappears) ------------------- */
@media (min-width: 650px) {
  /* Compact logo and no tagline until there is room for both (see >= 992px) */
  .site-header__logo-img {
    height: 56px;
  }

  .site-header__tagline {
    display: none;
    font-size: var(--fs-md);
  }

  .site-header__toggle {
    display: none;
  }

  /* Menu becomes a two-row block: utility links on top, main nav below */
  .site-header__menu {
    position: static;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: stretch;
    max-height: none;
    overflow: visible;
    background: none;
    border-top: 0;
    box-shadow: none;
  }

  .site-header__top {
    order: 0;
    display: flex;
    border-bottom: 1px solid var(--color-border-light);
  }

  .site-header__nav {
    order: 1;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: 14px;
  }

  .site-header__top .site-header__link {
    width: auto;
    padding: var(--space-1) var(--space-3);
    font-size: var(--fs-xs);
    border-bottom: 0;
    border-left: 1px solid var(--color-border-light);
  }

  .site-header__nav .site-header__link {
    width: auto;
    padding: 0;
    font-size: var(--fs-base);
    border-bottom: 0;
  }

  /* Dropdowns become real pop-overs */
  .dropdown__chevron {
    display: inline;
  }
  .dropdown__menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: var(--z-dropdown);
    display: none;
    min-width: 200px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-menu);
  }

  .dropdown.is-open .dropdown__menu {
    display: block;
  }

  .site-header__sublink {
    padding: var(--space-2) var(--space-3);
  }

  .site-header__sublink:last-child {
    border-bottom: 0;
  }
}

/* ---- >= 768px: filters become a static sidebar -------------------------- */
@media (min-width: 768px) {
  .results-bar__filters-btn,
  .filters__close,
  .filters__apply,
  .overlay {
    display: none;
  }

  .inventory__layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
  }

  .filters {
    position: static;
    z-index: auto;
    width: auto;
    overflow: visible;
    visibility: visible;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transform: none;
    transition: none;
  }

  .filters__form {
    min-height: 0;
  }

  /* List view: horizontal cards */
  .vehicle-grid--list .vehicle-card {
    flex-direction: row;
  }

  .vehicle-grid--list .vehicle-card__media {
    flex: 0 0 280px;
    aspect-ratio: auto;
    min-height: 100%;
  }
}

/* ---- >= 650px: home sections -------------------------------------------- */
@media (min-width: 650px) {
  .fact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero__stage {
    min-height: 330px;
  }

  .hero__title {
    font-size: 48px;
  }

  .hero__subtitle {
    font-size: 24px;
  }

  .hero-search__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .body-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .brands-box .brand-list {
    columns: 3;
  }
}

/* ---- >= 768px: about + contact two columns ------------------------------ */
@media (min-width: 768px) {
  .about-intro {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
  }

  .contact__layout {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  }
}

/* ---- >= 768px: home sections -------------------------------------------- */
@media (min-width: 768px) {
  .hero__band {
    padding-bottom: var(--space-4);
  }

  .hero-search {
    margin-top: -90px;
    padding: var(--space-4);
  }

  .hero__meta {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .hero__stat {
    grid-column: 2;
    grid-row: 1;
    font-size: var(--fs-lg);
  }

  .hero__advanced {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .tool-grid,
  .why-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cta-band__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---- >= 992px: home sections -------------------------------------------- */
@media (min-width: 992px) {
  .brands-box .brand-list {
    columns: 4;
  }
}

/* ---- >= 1061px: home sections ------------------------------------------- */
@media (min-width: 1061px) {
  .hero__stage {
    min-height: 457px;
  }

  .hero__title {
    font-size: var(--fs-hero);
  }

  .hero__subtitle {
    font-size: var(--fs-2xl);
  }

  .card-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---- >= 768px: vehicle page two columns ---------------------------------- */
@media (min-width: 768px) {
  .vehicle-header {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: center;
  }

  .vehicle-header__seller {
    padding: 0 var(--space-4);
    border-top: 0;
    border-left: 1px solid var(--color-divider);
  }

  .vehicle-header__fav {
    top: var(--space-2);
  }

  .vehicle-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: start;
  }

  .sticky-cta {
    display: none;
  }

  .has-sticky-cta .back-to-top {
    bottom: var(--space-3);
  }
}

/* ---- >= 992px: enquiry column stays in view while scrolling --------------- */
@media (min-width: 992px) {
  .vehicle-side {
    position: sticky;
    top: var(--space-3);
    max-height: calc(100vh - var(--space-4));
    padding: 2px;
    overflow-y: auto;
  }
}

/* ---- >= 768px: footer columns ------------------------------------------ */
@media (min-width: 768px) {
  .site-footer__heading {
    font-size: var(--fs-xl);
  }

  .site-footer__cols {
    grid-template-columns: repeat(4, 1fr);
  }

  .site-footer__tagline {
    font-size: var(--fs-lg);
  }
}

/* ---- >= 992px: full header with tagline and wider nav spacing ----------- */
@media (min-width: 992px) {
  .site-header__logo-img {
    height: 73px;
  }

  .site-header__tagline {
    display: flex;
  }

  .site-header__nav {
    gap: var(--space-4);
  }
}

/* ---- >= 1061px: wider sidebar -------------------------------------------- */
@media (min-width: 1061px) {
  .inventory__layout {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }
}

/* ---- >= 1200px: wide screens ------------------------------------------- */
@media (min-width: 1200px) {
  .site-footer__heading {
    font-size: 25px;
  }
}
