/* =============================================================
   EzyTire AI — main stylesheet
   Architecture: cascade layers → tokens → base → layout →
                 components → utilities
   Mobile-first; desktop breakpoint: 64rem (1024px)
   ============================================================= */

@layer reset, tokens, base, layout, components, utilities;

/* ------------------------------------------------------------------ */
/* RESET                                                               */
/* ------------------------------------------------------------------ */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; }
  body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
  img, picture, svg { display: block; max-width: 100%; }
  input, button, textarea, select { font: inherit; }
  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
  ul, ol { list-style: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; background: none; border: none; padding: 0; }
  [hidden] { display: none !important; }
}

/* ------------------------------------------------------------------ */
/* TOKENS                                                              */
/* ------------------------------------------------------------------ */
@layer tokens {
  :root {
    /* Brand colours */
    --color-brand-primary:       #10312b;   /* dark green — nav, footer */
    --color-brand-accent:        #c41e3a;   /* red — CTAs, highlights   */
    --color-brand-accent-light:  #cfdecc;   /* light green tint          */

    /* Surfaces */
    --color-surface:             #ffffff;
    --color-surface-muted:       #f4f6f4;
    --color-surface-dark:        #10312b;

    /* Text */
    --color-text:                #1a1a1a;
    --color-text-muted:          #6b7280;
    --color-text-inverse:        #ffffff;
    --color-text-inverse-muted:  rgba(255 255 255 / 0.70);

    /* Border */
    --color-border:              #e5e7eb;
    --color-border-strong:       #9ca3af;
    --color-border-light:        rgba(255 255 255 / 0.10);

    /* Typography */
    --font-sans:           "Inter", system-ui, sans-serif;
    --font-weight-regular: 400;
    --font-weight-semi:    600;
    --font-weight-bold:    700;
    --font-weight-black:   900;

    --font-size-2xs: 0.625rem;   /*  10px */
    --font-size-xs:  0.6875rem;  /*  11px */
    --font-size-sm:  0.8125rem;  /*  13px */
    --font-size-md:  1rem;       /*  16px */
    --font-size-lg:  1.125rem;   /*  18px */
    --font-size-xl:  1.25rem;    /*  20px */
    --font-size-2xl: 1.5rem;     /*  24px */
    --font-size-3xl: 1.875rem;   /*  30px */
    --font-size-4xl: 2.25rem;    /*  36px */

    /* Spacing scale */
    --sp-1:  0.25rem;
    --sp-2:  0.5rem;
    --sp-3:  0.75rem;
    --sp-4:  1rem;
    --sp-5:  1.25rem;
    --sp-6:  1.5rem;
    --sp-8:  2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;

    /* Border radius */
    --radius-sm:   0.25rem;
    --radius-md:   0.5rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 0.10);
    --shadow-md: 0 4px 12px rgb(0 0 0 / 0.10);
    --shadow-lg: 0 8px 24px rgb(0 0 0 / 0.15);

    /* Layout */
    --container-max: 74rem;    /* 1184px */
    --container-pad: var(--sp-4);

    /* Height tokens */
    --header-top-h-mobile:  3.5rem;   /* 56px  — mobile white header  */
    --header-top-h-desktop: 4.25rem;  /* 68px  — desktop white section */
    --header-nav-h:         2.875rem; /* 46px  — desktop dark nav bar  */

    /* Z-index */
    --z-header:   50;
    --z-dropdown: 60;
    --z-overlay:  70;
    --z-drawer:   80;

    /* Transitions */
    --t-fast: 150ms ease;
    --t-base: 250ms ease;
  }
}

/* ------------------------------------------------------------------ */
/* BASE                                                                */
/* ------------------------------------------------------------------ */
@layer base {
  html {
    scroll-behavior: smooth;
  }

  body {
    font-family: var(--font-sans);
    font-size: var(--font-size-md);
    color: var(--color-text);
    background: var(--color-surface);
  }

  :focus-visible {
    outline: 2px solid var(--color-brand-accent);
    outline-offset: 2px;
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0ms !important;
      transition-duration: 0ms !important;
    }
  }
}

/* ------------------------------------------------------------------ */
/* LAYOUT                                                              */
/* ------------------------------------------------------------------ */
@layer layout {
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
  }
}

/* ------------------------------------------------------------------ */
/* COMPONENTS                                                          */
/* ------------------------------------------------------------------ */
@layer components {

  /* ── SITE HEADER ───────────────────────────────────────────────── */

  .site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
  }

  /* ── TOP WHITE SECTION ─────────────────────────────────────────── */

  .site-header__top {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.06);
  }

  /* Mobile: 3-col grid so logo is perfectly centered */
  .site-header__top-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: var(--header-top-h-mobile);
  }

  /* ── DARK GREEN NAV BAR — desktop only (hidden on mobile) ──────── */

  .site-header__nav-bar {
    display: none;
    background: var(--color-brand-primary);
  }

  .site-header__main-nav {
    display: flex;
    height: var(--header-nav-h);
    align-items: stretch;
  }

  /* ── SITE LOGO ─────────────────────────────────────────────────── */

  .site-logo {
    display: flex;
    align-items: center;
    justify-content: center;   /* centered in middle grid column on mobile */
  }

  .site-logo__img {
    height: 2.5rem;
    width: auto;
    object-fit: contain;
  }

  /* ── UTILITY NAV — desktop only ────────────────────────────────── */

  .utility-nav {
    display: none;
  }

  .utility-nav__list {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
  }

  .utility-nav__link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text);
    transition: color var(--t-fast);
  }

  .utility-nav__link:hover {
    color: var(--color-brand-accent);
  }

  .utility-nav__link--location .utility-nav__icon {
    color: var(--color-brand-accent);
  }

  /* ── MAIN NAV LIST ─────────────────────────────────────────────── */

  .main-nav__list {
    display: flex;
    align-items: stretch;
  }

  .main-nav__item {
    position: relative;
    display: flex;
    align-items: center;
  }

  .main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 0 var(--sp-3);
    height: 100%;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    white-space: nowrap;
    border: none;
    background: none;
    cursor: pointer;
    transition: background var(--t-fast);
  }

  .main-nav__link:hover,
  .main-nav__toggle[aria-expanded="true"] {
    background: rgba(255 255 255 / 0.12);
  }

  /* Active nav item: red bottom border */
  .main-nav__item--active > .main-nav__link {
    box-shadow: inset 0 -3px 0 var(--color-brand-accent);
  }

  .main-nav__chevron {
    flex-shrink: 0;
    transition: transform var(--t-fast);
  }

  .main-nav__toggle[aria-expanded="true"] .main-nav__chevron {
    transform: rotate(180deg);
  }

  /* Dropdown */
  .main-nav__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 14rem;
    background: var(--color-surface);
    border-top: 3px solid var(--color-brand-accent);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    padding-block: var(--sp-2);
  }

  .main-nav__item--has-dropdown:hover .main-nav__dropdown,
  .main-nav__toggle[aria-expanded="true"] + .main-nav__dropdown {
    display: block;
  }

  .main-nav__dropdown-link {
    display: block;
    padding: var(--sp-3) var(--sp-5);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-text);
    transition: background var(--t-fast), color var(--t-fast);
  }

  .main-nav__dropdown-link:hover {
    background: var(--color-surface-muted);
    color: var(--color-brand-accent);
  }

  /* ── MOBILE CONTROLS ───────────────────────────────────────────── */

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    padding: var(--sp-2);
    color: var(--color-brand-primary);   /* dark green icon on white bg */
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
  }

  .mobile-menu-btn:hover {
    background: var(--color-surface-muted);
  }

  .mobile-location-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-self: end;
    gap: 2px;
    padding: var(--sp-2);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
  }

  .mobile-location-btn svg {
    color: var(--color-brand-accent);
  }

  .mobile-location-btn:hover {
    color: var(--color-text);
  }

  .mobile-location-btn__label {
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
  }

  /* ── MOBILE NAV OVERLAY ────────────────────────────────────────── */

  .mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 0.50);
    z-index: var(--z-overlay);
  }

  .mobile-nav-overlay.is-open {
    display: block;
  }

  /* ── MOBILE NAV DRAWER ─────────────────────────────────────────── */

  .mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: min(20rem, 85vw);
    height: 100dvh;
    background: var(--color-surface);
    z-index: var(--z-drawer);
    transform: translateX(-100%);
    transition: transform var(--t-base);
    overflow-y: auto;
  }

  .mobile-nav.is-open {
    transform: translateX(0);
  }

  .mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    border-bottom: 1px solid rgba(255 255 255 / 0.10);
  }

  .mobile-nav__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .mobile-nav__close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-1);
    color: var(--color-text-inverse);
    border-radius: var(--radius-sm);
    transition: background var(--t-fast);
  }

  .mobile-nav__close-btn:hover {
    background: rgba(255 255 255 / 0.12);
  }

  .mobile-nav__list {
    flex: 1;
  }

  .mobile-nav__item {
    border-bottom: 1px solid var(--color-border);
  }

  .mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--sp-4) var(--sp-5);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text);
    transition: background var(--t-fast), color var(--t-fast);
  }

  .mobile-nav__link:hover {
    background: var(--color-surface-muted);
    color: var(--color-brand-accent);
  }

  .mobile-nav__chevron {
    flex-shrink: 0;
    transition: transform var(--t-fast);
  }

  .mobile-nav__toggle[aria-expanded="true"] .mobile-nav__chevron {
    transform: rotate(180deg);
  }

  .mobile-nav__submenu {
    background: var(--color-surface-muted);
    border-top: 1px solid var(--color-border);
  }

  .mobile-nav__submenu-link {
    display: block;
    padding: var(--sp-3) var(--sp-8);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
  }

  .mobile-nav__submenu-link:hover {
    color: var(--color-brand-accent);
  }

  .mobile-nav__footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    padding: var(--sp-5);
    border-top: 1px solid var(--color-border);
  }

  .mobile-nav__util-link {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
  }

  .mobile-nav__util-link:hover {
    color: var(--color-brand-accent);
  }

  /* ── SITE FOOTER ───────────────────────────────────────────────── */

  .site-footer {
    background: var(--color-surface-dark);
    color: var(--color-text-inverse);
    border-top: 4px solid var(--color-brand-accent);
    padding-top: var(--sp-12);
  }

  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding-bottom: var(--sp-10);
  }

  /* Brand column */
  .site-footer__brand {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  .site-footer__logo {
    height: 2.25rem;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
  }

  .site-footer__tagline {
    font-size: var(--font-size-sm);
    color: var(--color-text-inverse-muted);
    line-height: 1.6;
    max-width: 22rem;
  }

  /* Social links */
  .social-links {
    display: flex;
    gap: var(--sp-5);
  }

  .social-links__link {
    color: var(--color-text-inverse-muted);
    transition: color var(--t-fast);
  }

  .social-links__link:hover {
    color: var(--color-text-inverse);
  }

  /* Footer columns */
  .site-footer__col-heading {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    margin-bottom: var(--sp-4);
  }

  .site-footer__link-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .site-footer__link {
    font-size: var(--font-size-sm);
    color: var(--color-text-inverse-muted);
    transition: color var(--t-fast);
  }

  .site-footer__link:hover {
    color: var(--color-text-inverse);
  }

  /* Footer bottom bar */
  .site-footer__bottom {
    border-top: 1px solid var(--color-border-light);
    padding-block: var(--sp-4);
  }

  .site-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    text-align: center;
  }

  .site-footer__copyright {
    font-size: var(--font-size-xs);
    color: var(--color-text-inverse-muted);
  }

  .site-footer__legal-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-4);
    justify-content: center;
  }

  .site-footer__legal-link {
    font-size: var(--font-size-xs);
    color: var(--color-text-inverse-muted);
    transition: color var(--t-fast);
  }

  .site-footer__legal-link:hover {
    color: var(--color-text-inverse);
  }

  /* ── BUTTONS ───────────────────────────────────────────────────── */

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding-inline: var(--sp-6);
    height: 2.75rem;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.02em;
    border-radius: var(--radius-xl);
    border: 2px solid transparent;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: opacity var(--t-fast), background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
  }

  .btn:hover { opacity: 0.9; }

  .btn--primary {
    background: var(--color-brand-accent);
    color: var(--color-text-inverse);
  }

  .btn--secondary {
    background: transparent;
    border-color: var(--color-brand-accent);
    color: var(--color-brand-accent);
  }

  .btn--secondary:hover {
    background: var(--color-brand-accent);
    color: var(--color-text-inverse);
    opacity: 1;
  }

  .btn--outline-white {
    background: transparent;
    border-color: rgba(255 255 255 / 0.50);
    color: var(--color-text-inverse);
  }

  .btn--outline-white:hover {
    background: rgba(255 255 255 / 0.10);
    opacity: 1;
  }

  .btn--lg {
    height: 3.25rem;
    padding-inline: var(--sp-8);
    font-size: var(--font-size-md);
  }

  .btn--full { width: 100%; }

  /* ── PAGE HERO ─────────────────────────────────────────────────── */

  .page-hero {
    display: flex;
    align-items: center;
    min-height: 28rem;
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    position: relative;
    overflow: hidden;
  }

  /* Background image support: add via inline style or modifier */
  .page-hero--has-bg {
    background-size: cover;
    background-position: center;
  }

  .page-hero--has-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.45);
  }

  .page-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-6);
    padding-block: var(--sp-16);
  }

  .page-hero__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .page-hero__subtitle {
    font-size: var(--font-size-lg);
    color: var(--color-text-inverse-muted);
    max-width: 40rem;
    line-height: 1.6;
  }

  .page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
  }

  /* ── ERROR PAGE ────────────────────────────────────────────────── */

  .error-page {
    display: flex;
    align-items: center;
    min-height: 60vh;
  }

  .error-page__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    padding-block: var(--sp-16);
    text-align: center;
  }

  .error-page__code {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    color: var(--color-brand-accent);
    line-height: 1;
  }

  .error-page__message {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
  }
}

/* ------------------------------------------------------------------ */
/* TIRES PAGE COMPONENTS                                               */
/* ------------------------------------------------------------------ */
@layer components {

  /* ── TIRES HERO (form=1) ───────────────────────────────────────── */

  .tires-hero {
    position: relative;
    background-image: url('/static/images/commercial-road-service.jpg');
    background-size: cover;
    background-position: center 40%;
    padding-block: var(--sp-10) var(--sp-8);
  }

  .tires-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.55);
  }

  .tires-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    text-align: center;
  }

  .tires-hero__title {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    line-height: 1;
  }

  /* Red outlined button on dark background */
  .btn--accent-outline {
    background: transparent;
    color: var(--color-text-inverse);
    border-color: var(--color-brand-accent);
    background: var(--color-brand-accent);
  }

  .btn--accent-outline:hover {
    opacity: 0.9;
  }

  .tires-hero__desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-inverse-muted);
    line-height: 1.6;
  }

  /* ── TIRE SEARCH CARD ──────────────────────────────────────────── */

  .tire-search-card {
    width: 100%;
    max-width: 30rem;
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 40px rgb(0 0 0 / 0.35);
    overflow: hidden;
  }

  .tire-search-card .search-tabs {
    border-radius: 0;
    border-bottom: 1px solid var(--color-border);
  }

  /* ── SEARCH PANEL (shared by home + tires search widgets) ────── */

  .search-panel {
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  /* Inside .search-card the outer card already provides padding */
  .search-card .search-panel {
    padding: 0;
  }

  .search-panel__hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
  }

  .search-panel__selects {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .search-panel__selects--row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-3);
  }

  .search-panel__cta {
    margin-top: var(--sp-1);
  }

  /* ── BRANDS SECTION (form=1) ───────────────────────────────────── */

  .tires-brands {
    padding-block: var(--sp-10);
    border-bottom: 4px solid var(--color-brand-accent);
  }

  .tires-brands__heading {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
    text-align: center;
    margin-bottom: var(--sp-6);
  }

  .tires-brands__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-6) var(--sp-8);
    align-items: center;
    justify-items: center;
    margin-bottom: var(--sp-6);
  }

  .tires-brands__img {
    max-width: 100%;
    height: 1.5rem;
    object-fit: contain;
  }

  .tires-brands__img--tall {
    height: 2.5rem;
  }

  .tires-brands__more {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    color: var(--color-text);
  }

  /* ── VEHICLE BANNER (form=2) ───────────────────────────────────── */

  .vehicle-banner {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    padding-block: var(--sp-4);
  }

  .vehicle-banner__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .vehicle-banner__label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brand-accent-light);
    opacity: 0.8;
  }

  .vehicle-banner__vehicle {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .vehicle-banner__size {
    font-size: var(--font-size-sm);
    color: var(--color-brand-accent-light);
  }

  .vehicle-banner__location {
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--font-size-sm);
    color: var(--color-text-inverse-muted);
  }

  .vehicle-banner__change-link {
    color: var(--color-brand-accent-light);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    margin-left: var(--sp-2);
  }

  .btn--outline-inverse {
    background: transparent;
    color: var(--color-text-inverse);
    border-color: var(--color-text-inverse);
  }

  .btn--outline-inverse:hover {
    background: rgb(255 255 255 / 0.1);
    opacity: 1;
  }

  .vehicle-banner__btn {
    align-self: flex-start;
  }

  /* ── RECOMMENDED OPTIONS ───────────────────────────────────────── */

  .recommended {
    background: var(--color-surface-muted);
    padding-block: var(--sp-8);
  }

  .recommended__header {
    margin-bottom: var(--sp-6);
  }

  .recommended__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text);
  }

  .recommended__subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--sp-1);
  }

  .recommended__grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  /* Recommended card */
  .rec-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-4);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  /* Top-right corner badge (TOP PICK / BEST VALUE) */
  .tire-badge {
    position: absolute;
    top: var(--sp-3);
    right: var(--sp-3);
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.06em;
    padding: 2px var(--sp-2);
    border-radius: var(--radius-full);
  }

  .tire-badge--top-pick {
    background: var(--color-brand-accent);
    color: var(--color-text-inverse);
  }

  .tire-badge--best-value {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border-strong);
  }

  /* Good / Better / Best pill on rec card */
  .rec-card__tier-badge {
    display: inline-flex;
    align-self: flex-start;
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px var(--sp-3);
    border-radius: var(--radius-full);
    border: 1.5px solid var(--color-border);
    color: var(--color-text-muted);
  }

  .tier-badge--best {
    background: var(--color-brand-primary);
    border-color: var(--color-brand-primary);
    color: var(--color-text-inverse);
  }

  .rec-card__img-wrap {
    display: flex;
    justify-content: center;
    padding-block: var(--sp-2);
  }

  .rec-card__img {
    height: 9rem;
    width: auto;
    object-fit: contain;
  }

  .rec-card__brand {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .rec-card__name {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.2;
  }

  .rec-card__tagline {
    font-size: var(--font-size-xs);
    color: var(--color-brand-accent);
    line-height: 1.4;
  }

  .rec-card__price {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
  }

  .rec-card__price strong {
    color: var(--color-text);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-black);
  }

  /* ── RESULTS SECTION LAYOUT ────────────────────────────────────── */

  .results-section {
    padding-block: var(--sp-8);
  }

  .results-section__layout {
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
  }

  /* ── FILTER SIDEBAR ────────────────────────────────────────────── */

  .filter-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-4);
  }

  .filter-sidebar__title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    margin-bottom: var(--sp-3);
    padding-bottom: var(--sp-3);
    border-bottom: 1px solid var(--color-border);
  }

  .filter-group {
    border-bottom: 1px solid var(--color-border);
    padding-block: var(--sp-3);
  }

  .filter-group:last-child {
    border-bottom: none;
  }

  .filter-group__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    padding: 0;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
  }

  .filter-group__chevron {
    flex-shrink: 0;
    transition: transform var(--t-fast);
    transform: rotate(0deg); /* default: pointing down = closed */
  }

  /* Chevron points up when the group is expanded */
  .filter-group__toggle[aria-expanded="true"] .filter-group__chevron {
    transform: rotate(180deg);
  }

  .filter-group__options {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
    padding: 0;
    border: none;
  }

  .filter-checkbox {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    cursor: pointer;
  }

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

  /* ── RESULTS AREA ──────────────────────────────────────────────── */

  .results-area__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-3);
    margin-bottom: var(--sp-5);
  }

  .results-area__count {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.2;
  }

  .results-area__for {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--sp-1);
  }

  .results-area__sort {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    flex-shrink: 0;
  }

  .results-area__sort-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
  }

  .select-wrap--inline {
    min-width: 10rem;
  }

  .select-wrap--inline .select-wrap__input {
    background: var(--color-surface);
    padding-block: var(--sp-2);
  }

  /* ── TIRE RESULTS GRID ─────────────────────────────────────────── */

  .tire-results-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  /* Tire card */
  .tire-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
  }

  .tire-card__banner {
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.1em;
    text-align: center;
    padding: var(--sp-2);
  }

  .tire-card__banner--top-pick {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
  }

  .tire-card__banner--most-popular {
    background: var(--color-brand-accent);
    color: var(--color-text-inverse);
  }

  .tire-card__banner--best-value {
    background: transparent;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    border: 1.5px solid var(--color-border-strong);
    border-radius: var(--radius-md);
    margin: var(--sp-2);
    margin-bottom: 0;
  }

  .tire-card__img-wrap {
    display: flex;
    justify-content: center;
    padding: var(--sp-4) var(--sp-4) var(--sp-2);
  }

  .tire-card__img {
    height: 10rem;
    width: auto;
    object-fit: contain;
  }

  .tire-card__body {
    padding-inline: var(--sp-4);
    padding-bottom: var(--sp-3);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .tire-card__brand {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .tire-card__name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.2;
  }

  .tire-card__rebate {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-1);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-brand-accent);
    background: rgb(196 30 58 / 0.08);
    padding: 2px var(--sp-2);
    border-radius: var(--radius-full);
    align-self: flex-start;
  }

  .tire-card__features {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    margin-top: var(--sp-1);
  }

  .tire-card__feature {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-2);
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.4;
  }

  .tire-card__feature-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--color-brand-primary);
  }

  .tire-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
  }

  .tire-card__price {
    display: flex;
    flex-direction: column;
  }

  .tire-card__price-from {
    font-size: var(--font-size-2xs);
    color: var(--color-text-muted);
  }

  .tire-card__price-amount {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.1;
  }

  .btn--sm {
    height: 2.25rem;
    padding-inline: var(--sp-4);
    font-size: var(--font-size-xs);
  }

}

/* ------------------------------------------------------------------ */
/* HOME PAGE COMPONENTS                                                */
/* ------------------------------------------------------------------ */
@layer components {

  /* ── HOME HERO ─────────────────────────────────────────────────── */

  .home-hero {
    position: relative;
    background-image: url('/static/images/commercial-road-service.jpg');
    background-size: cover;
    background-position: 30% 58%;
    padding-block: var(--sp-6);
  }

  /* Subtle dark overlay so cards pop on the photo */
  .home-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 0.35);
  }

  .home-hero__grid {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  /* ── SEARCH CARD ───────────────────────────────────────────────── */

  .search-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    border-top: 4px solid var(--color-brand-primary);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  .search-card__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .search-card__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: calc(-1 * var(--sp-2));
  }

  /* Tabs */
  .search-tabs {
    display: flex;
    border-bottom: 1px solid var(--color-border);
  }

  .search-tab {
    flex: 1;
    padding-block: var(--sp-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast);
  }

  .search-tab:hover {
    color: var(--color-text);
  }

  .search-tab.is-active {
    color: var(--color-brand-accent);
    border-bottom-color: var(--color-brand-accent);
  }

  /* Select form — mapped to .search-panel__selects in shared panel */

  .select-wrap {
    position: relative;
  }

  .select-wrap__input {
    width: 100%;
    appearance: none;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--sp-3) var(--sp-10) var(--sp-3) var(--sp-4);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
  }

  .select-wrap__input:focus {
    outline: none;
    border-color: var(--color-brand-accent);
    box-shadow: 0 0 0 3px rgba(196 30 58 / 0.15);
  }

  .select-wrap__input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  .select-wrap__icon {
    position: absolute;
    right: var(--sp-3);
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
  }

  .search-card__cta {
    margin-top: var(--sp-2);
  }

  .road-service-card {
    background: rgba(16 49 43 / 0.88);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    color: var(--color-text-inverse);
  }

  .road-service-card__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .road-service-card__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-inverse-muted);
  }

  .road-service-card__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text-inverse);
    transition: opacity var(--t-fast);
  }

  .road-service-card__phone svg {
    color: var(--color-brand-accent-light);
    flex-shrink: 0;
  }

  .road-service-card__phone:hover {
    opacity: 0.85;
  }

  /* ── SPECIALS CARD ─────────────────────────────────────────────── */

  .specials-card {
    background: rgba(255 255 255 / 0.96);
    border-radius: var(--radius-xl);
    border-top: 4px solid var(--color-brand-accent);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  .specials-card__title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.1;
    letter-spacing: -0.02em;
  }

  .specials-card__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: calc(-1 * var(--sp-2));
  }

  .specials-card__actions {
    display: flex;
    gap: var(--sp-2);
  }

  .specials-card__actions .btn {
    flex: 1;
  }

  /* Brand logos */
  .brand-logos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-2);
    align-items: center;
  }

  .brand-logos li {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .brand-logos__img {
    max-width: 100%;
    height: 1.25rem;
    object-fit: contain;
    mix-blend-mode: multiply;
  }

  .brand-logos__img--tall {
    height: 2rem;
  }

  .brand-logos__more span {
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    text-align: center;
    line-height: 1.3;
  }

  /* ── QUICK LINKS ───────────────────────────────────────────────── */

  .quick-links {
    background: var(--color-surface-muted);
    padding-block: var(--sp-6);
  }

  .quick-links__grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .quick-link-card {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-3) var(--sp-4);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: box-shadow var(--t-fast), background var(--t-fast), transform var(--t-fast);
  }

  .quick-link-card:hover {
    box-shadow: var(--shadow-md);
    background: #fafafa;
    transform: translateY(-1px);
  }

  .quick-link-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--color-brand-primary);
    color: var(--color-brand-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .quick-link-card__body {
    flex: 1;
    min-width: 0;
  }

  .quick-link-card__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-brand-primary);
    line-height: 1.3;
  }

  .quick-link-card__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    line-height: 1.4;
    margin-top: 2px;
  }

  .quick-link-card__chevron {
    color: var(--color-border);
    flex-shrink: 0;
  }

}


@layer utilities {
  .u-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  .u-hidden      { display: none; }
  .u-text-center { text-align: center; }
}

/* ------------------------------------------------------------------ */
/* RESPONSIVE — desktop (≥ 1024px)                                    */
/* ------------------------------------------------------------------ */
@media (min-width: 64rem) {
  :root {
    --container-pad: var(--sp-8);
  }

  /* Top white section: flex row, logo left + utility links right */
  .site-header__top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-top-h-desktop);
  }

  /* Logo: left-aligned, larger */
  .site-logo {
    justify-content: flex-start;
  }

  .site-logo__img {
    height: 3rem;
  }

  /* Show utility nav */
  .utility-nav {
    display: flex;
  }

  /* Show dark green nav bar */
  .site-header__nav-bar {
    display: block;
  }

  /* Hide mobile-only controls */
  .mobile-menu-btn,
  .mobile-location-btn {
    display: none;
  }

  /* Footer: 4-column grid */
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: var(--sp-8);
  }

  /* Footer bottom: horizontal */
  .site-footer__bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }

  .site-footer__legal-nav ul {
    justify-content: flex-end;
  }

  /* Hero title scales up */
  .page-hero__title {
    font-size: var(--font-size-4xl);
  }

  /* ── HOME PAGE DESKTOP ─────────────────────────────────────────── */

  .home-hero {
    padding-block: var(--sp-10);
    min-height: 34rem;
    display: flex;
    align-items: center;
  }

  /* 2-column grid: search card left (spans 2 rows), right column */
  .home-hero__grid {
    display: grid;
    grid-template-columns: 26rem 1fr;
    grid-template-rows: auto auto;
    gap: var(--sp-5);
    align-items: start;
    width: 100%;
  }

  .search-card {
    grid-row: 1 / 3;   /* spans both right rows */
  }

  .road-service-card,
  .specials-card {
    grid-column: 2;
  }

  /* Road service card: horizontal layout on desktop */
  .road-service-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    column-gap: var(--sp-6);
    align-items: center;
  }

  .road-service-card__title {
    grid-column: 1 / 3;
    font-size: var(--font-size-3xl);
  }

  .road-service-card__desc {
    grid-column: 1 / 3;
  }

  .road-service-card__phone {
    font-size: var(--font-size-2xl);
    grid-column: 1;
    align-self: center;
  }

  .road-service-card .btn {
    grid-column: 2;
    white-space: nowrap;
  }

  /* Quick links: 4-column row on desktop */
  .quick-links__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
  }

  /* ── TIRES PAGE DESKTOP ─────────────────────────────────────────── */

  /* Larger centered search card on desktop */
  .tire-search-card {
    max-width: 36rem;
  }

  .tires-brands__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4) var(--sp-10);
  }

  .tires-brands__img {
    height: 2rem;
  }

  .tires-brands__img--tall {
    height: 3.5rem;
  }

  /* Vehicle banner: single row on desktop */
  .vehicle-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .vehicle-banner__info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
  }

  /* Recommended: 3-column on desktop */
  .recommended__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
  }

  /* Results: sidebar left + results right */
  .results-section__layout {
    display: grid;
    grid-template-columns: 15rem 1fr;
    align-items: start;
    gap: var(--sp-8);
  }

  /* Results grid: 2-column tile layout */
  .tire-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-4);
    align-items: start;
  }

  .rec-card__img {
    height: 11rem;
  }
}


/* ================================================================== */
/* ROAD SERVICE PAGE                                                   */
/* ================================================================== */
@layer components {

  /* ── RS HERO ───────────────────────────────────────────────────── */

  .rs-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 22rem;
    overflow: hidden;
    text-align: center;
    color: var(--color-text-inverse);
  }

  .rs-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  .rs-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0 0 0 / 0.55) 0%,
      rgba(16 49 43 / 0.75) 100%
    );
    z-index: 1;
  }

  .rs-hero__content {
    position: relative;
    z-index: 2;
    padding-block: var(--sp-16);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-5);
  }

  .rs-hero__heading {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    line-height: 1.15;
    max-width: 22rem;
  }

  .rs-hero__sub {
    font-size: var(--font-size-lg);
    color: rgba(255 255 255 / 0.88);
    max-width: 34rem;
  }

  .rs-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
  }

  /* ── STATS BAR ─────────────────────────────────────────────────── */

  .stats-bar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
  }

  .stats-bar__inner {
    display: flex;
    justify-content: center;
    gap: var(--sp-12);
    padding-block: var(--sp-10);
    flex-wrap: wrap;
  }

  .stats-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2);
    min-width: 6rem;
    text-align: center;
  }

  .stats-bar__icon {
    color: var(--color-brand-primary);
    flex-shrink: 0;
  }

  .stats-bar__value {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    color: var(--color-brand-primary);
    line-height: 1;
  }

  .stats-bar__label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  /* ── SERVICE SECTION ───────────────────────────────────────────── */

  .service-section {
    padding-block: var(--sp-16);
    background: var(--color-surface);
  }

  .service-section--alt {
    background: var(--color-surface-muted);
  }

  .service-section__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-10);
  }

  /* ── SERVICE BLOCK (text content) ─────────────────────────────── */

  .service-block {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
  }

  .service-block__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brand-accent);
  }

  .service-block__heading {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text);
    line-height: 1.2;
  }

  .service-block__body {
    font-size: var(--font-size-md);
    color: var(--color-text-muted);
    line-height: 1.7;
    max-width: 52ch;
  }

  .service-block__link {
    color: var(--color-brand-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* ── HELP CARD ─────────────────────────────────────────────────── */

  .help-card {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-lg);
    padding: var(--sp-8);
    align-self: flex-start;
  }

  .help-card__label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-inverse-muted);
  }

  .help-card__phone {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text-inverse);
    line-height: 1;
    letter-spacing: -0.01em;
  }

  .help-card__phone:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  /* ── FEATURE LIST ──────────────────────────────────────────────── */

  .feature-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-6);
    align-self: flex-start;
    width: 100%;
  }

  .service-section--alt .feature-list {
    background: var(--color-surface);
  }

  .feature-list__item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding-block: var(--sp-4);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semi);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
  }

  .feature-list__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .feature-list__item:first-child {
    padding-top: 0;
  }

  .feature-list__check {
    color: var(--color-brand-primary);
    flex-shrink: 0;
  }

  /* ── SERVICE SECTION IMAGE ─────────────────────────────────────── */

  .service-section__figure {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    align-self: center;
  }

  .service-section__img {
    width: 100%;
    height: 16rem;
    object-fit: cover;
  }

  /* ── CTA BAND ──────────────────────────────────────────────────── */

  .cta-band {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    padding-block: var(--sp-16);
  }

  .cta-band__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    text-align: center;
  }

  .cta-band__heading {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    line-height: 1.2;
  }

  .cta-band__sub {
    font-size: var(--font-size-lg);
    color: var(--color-text-inverse-muted);
  }

  .cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin-top: var(--sp-2);
  }

}

/* Road service — desktop layout ─────────────────────────────────── */
@media (min-width: 64rem) {

  .rs-hero__heading {
    font-size: var(--font-size-4xl);
    max-width: none;
  }

  .rs-hero__content {
    padding-block: var(--sp-16);
  }

  .service-section__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--sp-16);
  }

  .service-block {
    flex: 1 1 0;
    min-width: 0;
  }

  .help-card {
    flex: 0 0 22rem;
  }

  .feature-list {
    flex: 0 0 20rem;
    width: auto;
  }

  .service-section__figure {
    flex: 0 0 22rem;
  }

  .service-section__img {
    height: 20rem;
  }

  .cta-band__heading {
    font-size: var(--font-size-3xl);
  }

}


/* ================================================================== */
/* TIRE REBATES PAGE                                                   */
/* ================================================================== */
@layer components {

  /* ── REBATES HERO ──────────────────────────────────────────────── */

  .rebates-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
    overflow: hidden;
    text-align: center;
    color: var(--color-text-inverse);
  }

  .rebates-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  .rebates-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(16 49 43 / 0.70) 0%,
      rgba(0 0 0 / 0.75) 100%
    );
    z-index: 1;
  }

  .rebates-hero__content {
    position: relative;
    z-index: 2;
    padding-block: var(--sp-12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
  }

  .rebates-hero__eyebrow {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255 255 255 / 0.75);
  }

  .rebates-hero__heading {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.01em;
    line-height: 1;
    text-transform: uppercase;
  }

  .rebates-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin-top: var(--sp-2);
  }

  /* ── REBATES SECTION ───────────────────────────────────────────── */

  .rebates-section {
    padding-block: var(--sp-12);
    background: var(--color-surface);
  }

  /* ── REBATES GRID ──────────────────────────────────────────────── */

  .rebates-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  /* ── REBATE CARD ───────────────────────────────────────────────── */

  .rebate-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--color-surface);
    transition: box-shadow var(--t-base);
  }

  .rebate-card:hover {
    box-shadow: var(--shadow-md);
  }

  .rebate-card__img-link {
    display: block;
    overflow: hidden;
    background: var(--color-surface-muted);
  }

  .rebate-card__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--t-base);
  }

  .rebate-card__img-link:hover .rebate-card__img {
    transform: scale(1.02);
  }

  .rebate-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-top: 1px solid var(--color-border);
    gap: var(--sp-4);
    flex-wrap: wrap;
  }

  .rebate-card__view-link {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .rebate-card__view-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .rebate-card__share {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    color: var(--color-text-muted);
  }

  .rebate-card__share-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
  }

  .rebate-card__share-link:hover {
    color: var(--color-brand-accent);
  }

  /* ── BOTTOM CTAS & DISCLAIMER ──────────────────────────────────── */

  .rebates-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin-top: var(--sp-10);
  }

  .rebates-disclaimer {
    margin-top: var(--sp-6);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-align: center;
    max-width: 60ch;
    margin-inline: auto;
    line-height: 1.6;
  }

}

/* Rebates — tablet+ (2 columns) ─────────────────────────────────── */
@media (min-width: 40rem) {
  .rebates-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ================================================================== */
/* SERVICE COUPONS PAGE                                                */
/* ================================================================== */
@layer components {

  /* ── COUPONS HERO ──────────────────────────────────────────────── */

  .coupons-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 14rem;
    overflow: hidden;
    text-align: center;
    color: var(--color-text-inverse);
  }

  .coupons-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    z-index: 0;
  }

  .coupons-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0 0 0 / 0.55);
    z-index: 1;
  }

  .coupons-hero__content {
    position: relative;
    z-index: 2;
    padding-block: var(--sp-12);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
  }

  .coupons-hero__eyebrow {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255 255 255 / 0.75);
  }

  .coupons-hero__heading {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.01em;
    line-height: 1;
    text-transform: uppercase;
  }

  .coupons-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin-top: var(--sp-2);
  }

  /* ── COUPONS SECTION ───────────────────────────────────────────── */

  .coupons-section {
    padding-block: var(--sp-12);
    background: var(--color-surface);
  }

  /* ── COUPONS GRID ──────────────────────────────────────────────── */

  .coupons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-5);
  }

  /* ── COUPON CARD ───────────────────────────────────────────────── */

  .coupon-card {
    display: flex;
    flex-direction: column;
    border: 2px dashed var(--color-border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    transition: box-shadow var(--t-base);
  }

  .coupon-card:hover {
    box-shadow: var(--shadow-md);
  }

  .coupon-card__img-link {
    display: block;
    overflow: hidden;
  }

  .coupon-card__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--t-base);
  }

  .coupon-card__img-link:hover .coupon-card__img {
    transform: scale(1.02);
  }

  .coupon-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-2) var(--sp-3);
    border-top: 1px dashed var(--color-border);
    gap: var(--sp-3);
    flex-wrap: wrap;
    background: var(--color-surface-muted);
  }

  .coupon-card__action {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: opacity var(--t-fast);
  }

  .coupon-card__action:hover {
    opacity: 0.8;
  }

  .coupon-card__print {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
  }

  .coupon-card__print:hover {
    color: var(--color-brand-primary);
  }

  /* ── BOTTOM CTAS ───────────────────────────────────────────────── */

  .coupons-section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
    justify-content: center;
    margin-top: var(--sp-10);
  }

}

/* Coupons — desktop (4 columns) ─────────────────────────────────── */
@media (min-width: 64rem) {
  .coupons-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ================================================================== */
/* LOCATIONS PAGE                                                      */
/* ================================================================== */
@layer components {

  /* ── btn--outline (dark green outline, light bg) ───────────────── */

  .btn--outline {
    background: transparent;
    border-color: var(--color-brand-primary);
    color: var(--color-brand-primary);
  }

  .btn--outline:hover {
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
  }

  /* ── u-sr-only ──────────────────────────────────────────────────── */

  .u-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ── LOCATIONS HERO ─────────────────────────────────────────────── */

  .locs-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 20rem;
    overflow: hidden;
    color: var(--color-text-inverse);
  }

  .locs-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    z-index: 0;
  }

  .locs-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to bottom,
      rgba(0 0 0 / 0.45) 0%,
      rgba(16 49 43 / 0.75) 100%
    );
    z-index: 1;
  }

  .locs-hero__body {
    position: relative;
    z-index: 2;
    padding-block: var(--sp-16);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .locs-hero__eyebrow {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255 255 255 / 0.75);
  }

  .locs-hero__title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.01em;
    line-height: 1;
    text-transform: uppercase;
  }

  .locs-hero__sub {
    font-size: var(--font-size-lg);
    color: rgba(255 255 255 / 0.85);
  }

  /* ── LOCATION FINDER SECTION ───────────────────────────────────── */

  .locs-finder {
    background: var(--color-surface);
    padding-top: var(--sp-8);
    padding-bottom: var(--sp-6);
  }

  /* ── SEARCH FORM ────────────────────────────────────────────────── */

  .loc-search {
    display: flex;
    gap: var(--sp-3);
    flex-wrap: wrap;
    margin-bottom: var(--sp-6);
  }

  .loc-search__field {
    position: relative;
    flex: 1 1 16rem;
  }

  .loc-search__icon {
    position: absolute;
    top: 50%;
    left: var(--sp-4);
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
  }

  .loc-search__input {
    width: 100%;
    height: 2.875rem;
    padding-left: calc(var(--sp-4) + 18px + var(--sp-3));
    padding-right: var(--sp-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    color: var(--color-text);
    background: var(--color-surface);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
  }

  .loc-search__input:focus {
    outline: none;
    border-color: var(--color-brand-primary);
    box-shadow: 0 0 0 3px rgba(16 49 43 / 0.15);
  }

  .loc-search__input::placeholder {
    color: var(--color-text-muted);
  }

  .loc-search__geo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
  }

  /* ── MAP ────────────────────────────────────────────────────────── */

  .locs-map-wrap {
    width: 100%;
  }

  .locs-map {
    width: 100%;
    height: 22rem;
    background: var(--color-surface-muted);
  }

  /* Custom Leaflet marker */
  .map-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    font-family: var(--font-sans);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.35);
    border: 2px solid var(--color-surface);
    line-height: 1;
    cursor: pointer;
  }

  /* ── META BAR ───────────────────────────────────────────────────── */

  .locs-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: var(--sp-4);
    font-size: var(--font-size-sm);
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .locs-meta__hint {
    color: var(--color-text-muted);
  }

  .locs-meta__count {
    color: var(--color-text);
  }

  /* ── RESULTS SECTION ────────────────────────────────────────────── */

  .locs-results {
    background: var(--color-surface-muted);
    padding-block: var(--sp-8);
  }

  /* ── LOCATION GRID ──────────────────────────────────────────────── */

  .location-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-5);
  }

  /* ── LOCATION CARD ──────────────────────────────────────────────── */

  .location-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--t-base);
  }

  .location-card:hover {
    box-shadow: var(--shadow-md);
  }

  .location-card.is-highlighted {
    outline: 3px solid var(--color-brand-accent);
    outline-offset: 2px;
  }

  /* ── CARD HEADER ────────────────────────────────────────────────── */

  .location-card__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--sp-3);
    cursor: pointer;
  }

  .location-card__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--color-brand-primary);
    color: var(--color-text-inverse);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
    line-height: 1;
  }

  .location-card__name {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    line-height: 1.3;
  }

  .location-card__status {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semi);
    white-space: nowrap;
  }

  .location-card__status--open {
    background: #d1fae5;
    color: #065f46;
  }

  .location-card__status--closed {
    background: var(--color-surface-muted);
    color: var(--color-text-muted);
  }

  /* ── CARD BODY FIELDS ───────────────────────────────────────────── */

  .location-card__address {
    font-style: normal;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    line-height: 1.5;
  }

  .location-card__hours {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
  }

  .location-card__phone {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semi);
    color: var(--color-brand-primary);
    transition: color var(--t-fast);
  }

  .location-card__phone:hover {
    color: var(--color-brand-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* ── SERVICES ───────────────────────────────────────────────────── */

  .location-card__services {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
  }

  .location-card__services-label {
    font-size: var(--font-size-2xs);
    font-weight: var(--font-weight-semi);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

  .location-card__services ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
  }

  .location-card__services li {
    font-size: var(--font-size-sm);
    color: var(--color-text);
  }

  .location-card__services li::before {
    content: "• ";
    color: var(--color-brand-accent);
  }

  /* ── CARD ACTIONS ───────────────────────────────────────────────── */

  .location-card__actions {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: var(--sp-2);
    border-top: 1px solid var(--color-border);
  }

  .location-card__actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

}

/* Locations — tablet (2 columns) ────────────────────────────────── */
@media (min-width: 40rem) {
  .location-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .locs-map {
    height: 28rem;
  }
}

/* Locations — desktop (3 columns) ──────────────────────────────── */
@media (min-width: 64rem) {
  .locs-hero__title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
  }

  .location-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .locs-map {
    height: 34rem;
  }
}
