/* ==========================================================================
   DIRT CHEAP CAR SALE — MAIN STYLESHEET (BUILT FILE)
   ==========================================================================
   This file is what the site actually loads (see includes/header.php).
   It's a concatenation of the source files below, combined into one
   file on purpose to avoid render-blocking @import chains and keep
   PageSpeed scores high (fewer HTTP requests = faster first paint).

   SOURCE FILES (edit these, then re-concatenate — do not hand-edit
   main.css directly, your changes will be overwritten on next build):
     1. tokens.css                    - colors, type, spacing variables
     2. base.css                      - reset & base element styles
     3. layout.css                    - containers, grid, section rhythm
     4. components/buttons.css
     5. components/cards.css
     6. components/header.css
     7. components/footer.css
     8. components/forms.css
     9. components/misc.css           - hero, badges, toast, etc.
     10. components/utilities.css     - helper classes

   To rebuild after editing a source file (run from assets/css/):
     cat tokens.css base.css layout.css components/buttons.css \
         components/cards.css components/header.css components/footer.css \
         components/forms.css components/misc.css components/utilities.css \
/* ==========================================================================
   DIRT CHEAP CAR SALE — DESIGN TOKENS
   The single source of truth for color, type, spacing, motion.
   Every other stylesheet reads from these variables — never hardcode
   a raw hex or px value in component files.
   ========================================================================== */

:root {
  /* ---------- COLOR: BRAND (from logo.png) ---------- */
  --color-ink:            #201F1F;   /* primary dark — near-black from logo, trust/stability */
  --color-ink-light:      #383636;   /* hover/lighter dark */
  --color-ink-dark:       #121111;   /* deepest dark, footer bg */
  --color-gold:           #C80000;   /* accent — brand red from logo, CTAs, price highlight */
  --color-gold-light:     #E51E1E;
  --color-gold-dark:      #9A0000;

  /* ---------- COLOR: NEUTRALS ---------- */
  --color-bg:             #FAFAFA;   /* page background, clean light */
  --color-surface:        #FFFFFF;   /* cards, elevated surfaces */
  --color-surface-alt:    #F3F1EC;   /* secondary section backgrounds */
  --color-border:         #E6E3DA;
  --color-border-strong:  #D3CFC2;
  --color-text:           #1A1A1A;
  --color-text-muted:     #5B5B58;
  --color-text-faint:     #8B8A84;
  --color-white:          #FFFFFF;

  /* ---------- COLOR: SEMANTIC ---------- */
  --color-success:        #4C7A5E;   /* muted sage — "available", "inspected" */
  --color-success-bg:     #E8F0EA;
  --color-warning:        #B8863B;   /* "pending" */
  --color-warning-bg:     #F5EAD6;
  --color-danger:         #A6432F;   /* "sold", errors */
  --color-danger-bg:      #F5E3DF;

  /* ---------- TYPOGRAPHY ---------- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Roboto Mono', Menlo, Consolas, monospace;

  --fs-xs:    0.75rem;    /* 12px */
  --fs-sm:    0.875rem;   /* 14px */
  --fs-base:  1rem;       /* 16px */
  --fs-md:    1.125rem;   /* 18px */
  --fs-lg:    1.375rem;   /* 22px */
  --fs-xl:    1.75rem;    /* 28px */
  --fs-2xl:   2.25rem;    /* 36px */
  --fs-3xl:   3rem;       /* 48px */
  --fs-4xl:   3.75rem;    /* 60px */

  --lh-tight:  1.15;
  --lh-snug:   1.35;
  --lh-normal: 1.6;
  --lh-relaxed: 1.75;

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;

  /* ---------- SPACING (8px base scale) ---------- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.5rem;
  --space-6:  2rem;
  --space-8:  3rem;
  --space-10: 4rem;
  --space-12: 5rem;
  --space-16: 6.5rem;
  --space-20: 8rem;

  /* ---------- LAYOUT ---------- */
  --container-max: 1280px;
  --container-narrow: 800px;
  --container-padding: clamp(1.25rem, 4vw, 3rem);

  /* ---------- RADIUS ---------- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* ---------- SHADOW ---------- */
  --shadow-sm: 0 1px 2px rgba(32, 31, 31, 0.06), 0 1px 3px rgba(32, 31, 31, 0.08);
  --shadow-md: 0 4px 12px rgba(32, 31, 31, 0.08), 0 2px 4px rgba(32, 31, 31, 0.06);
  --shadow-lg: 0 12px 32px rgba(32, 31, 31, 0.12), 0 4px 10px rgba(32, 31, 31, 0.06);
  --shadow-gold: 0 8px 20px rgba(200, 0, 0, 0.28);

  /* ---------- MOTION ---------- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 450ms;

  /* ---------- Z-INDEX SCALE ---------- */
  --z-header: 100;
  --z-dropdown: 200;
  --z-modal-backdrop: 300;
  --z-modal: 310;
  --z-toast: 400;
}

/* Respect users who've asked for reduced motion — accessibility non-negotiable */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
/* ==========================================================================
   BASE — reset, typography defaults, accessibility primitives
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* Prevent long unbroken strings (e.g. dense spec/feature text) from
     forcing a grid/flex column — and the whole page — wider than the
     viewport. This is the actual root cause of horizontal-scrollbar
     bugs that a fixed grid-template-columns fix alone doesn't cover. */
  overflow-wrap: break-word;
  word-break: break-word;
}

main { flex: 1 0 auto; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img { background: var(--color-surface-alt); }

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a {
  color: inherit;
  text-decoration: none;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--color-ink);
  text-wrap: balance;
}

h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { text-wrap: pretty; }

/* Visible keyboard focus — required for accessibility, never remove */
:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

:focus:not(:focus-visible) { outline: none; }

/* Skip-to-content link for screen reader / keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top var(--duration-base) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-4);
}

.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;
}

::selection {
  background: var(--color-gold-light);
  color: var(--color-ink);
}

/* Responsive media defaults */
iframe { border: 0; max-width: 100%; }

/* Scrollbar polish (progressive enhancement, WebKit only) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb {
  background: var(--color-border-strong);
  border-radius: var(--radius-pill);
  border: 3px solid var(--color-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); }
/* ==========================================================================
   LAYOUT — containers, section rhythm, grid utilities
   ========================================================================== */

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

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: var(--space-16);
}

.section--tight { padding-block: var(--space-10); }
.section--alt { background: var(--color-surface-alt); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-10);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
  margin-bottom: var(--space-3);
}

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--color-gold);
  display: inline-block;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: var(--fs-md);
  margin-top: var(--space-3);
}

/* Grid utilities */
.grid {
  display: grid;
  gap: var(--space-6);
}

/* Grid items default to min-width: auto, which means a child can refuse
   to shrink smaller than its content's natural width — a long spec/feature
   string can silently force a column (and the whole grid) wider than its
   container. This lets every direct grid child shrink properly instead. */
.grid > * {
  min-width: 0;
}

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

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

@media (max-width: 640px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.flex-wrap { flex-wrap: wrap; }

/* Two-column layouts common on this site (image + content) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: center;
}

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

@media (max-width: 900px) {
  .split--reverse { direction: ltr; }
}

/* Vehicle detail page: wide content column + narrower sticky sidebar.
   Collapses to a single column well before content gets squeezed,
   preventing the horizontal-scrollbar overflow that a fixed
   grid-template-columns causes on tablet/mobile widths. */
.vehicle-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--space-10);
  align-items: start;
}

.vehicle-layout > * {
  min-width: 0;
}

/* The min-width:0 fix above only reaches the grid's DIRECT child. The
   photo gallery's thumbnail strip is a flex-scroll container nested two
   levels deeper (grid column > .vehicle-gallery wrapper > thumbs strip),
   and a flex/scroll container's natural content width can still force
   its way back up through unconstrained wrapper divs. This closes that
   gap explicitly for the gallery structure specifically. */
.vehicle-layout .vehicle-gallery,
.vehicle-layout .vehicle-gallery > div {
  min-width: 0;
  max-width: 100%;
}

/* Collapsible vehicle description — some listings have very long raw
   spec/feature text pasted into this field, which was pushing the
   Specifications section far down the page and starving the sticky
   sidebar of balanced height. Capped by default with a fade-out;
   expands fully via the "Show more" button (see vehicle-detail.js). */
.description-block {
  position: relative;
  max-height: 220px;
  overflow: hidden;
}

.description-block.is-expanded {
  max-height: none;
}

.description-block:not(.is-expanded)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--color-bg));
  pointer-events: none;
}

@media (max-width: 1000px) {
  .vehicle-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* General content + form/sidebar two-column layout, used on lead-gen
   pages (Financing, Trade-In, Sell Your Car, Contact). Fixes the same
   unresponsive-grid overflow bug as .vehicle-layout above — these pages
   previously used a raw inline grid-template-columns with no breakpoint,
   which caused horizontal overflow on tablet/mobile widths. */
.content-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-10);
  align-items: start;
}

.content-form-layout > * {
  min-width: 0;
}

/* Filter sidebar + results layout (Inventory page). A fixed-width
   sidebar column that collapses to a single column on tablet/mobile —
   fixes the same unresponsive-grid overflow bug found and fixed
   elsewhere on the site, which this page had also been using. */
.filter-results-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-8);
  align-items: start;
}

.filter-results-layout > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .filter-results-layout {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.content-form-layout--wide-form {
  grid-template-columns: 1fr 1.2fr;
}

@media (max-width: 900px) {
  .content-form-layout,
  .content-form-layout--wide-form {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* Responsive text alignment helper */
.text-center { text-align: center; }

@media (max-width: 640px) {
  .section { padding-block: var(--space-10); }
  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }
}
/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  padding: 0.9rem 1.75rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              background-color var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
  white-space: nowrap;
  line-height: 1;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--color-ink);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-ink-light);
  box-shadow: var(--shadow-md);
}

.btn-gold {
  background: var(--color-gold);
  color: var(--color-white);
}
.btn-gold:hover {
  background: var(--color-gold-light);
  box-shadow: var(--shadow-gold);
}

.btn-outline {
  background: transparent;
  border-color: var(--color-ink);
  color: var(--color-ink);
}
.btn-outline:hover {
  background: var(--color-ink);
  color: var(--color-white);
}

.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: var(--color-white);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-ink);
  padding-inline: var(--space-3);
}
.btn-ghost:hover { background: var(--color-surface-alt); }

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}
.btn-whatsapp:hover { background: #20BD5A; box-shadow: 0 8px 20px rgba(37,211,102,0.3); }

.btn-telegram {
  background: #229ED9;
  color: #fff;
}
.btn-telegram:hover { background: #1E8CC2; box-shadow: 0 8px 20px rgba(34,158,217,0.3); }

.btn-sm { padding: 0.6rem 1.25rem; font-size: var(--fs-sm); }
.btn-lg { padding: 1.1rem 2.25rem; font-size: var(--fs-md); }
.btn-block { width: 100%; }

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* Loading spinner state for form submit buttons */
.btn.is-loading {
  color: transparent !important;
  pointer-events: none;
  position: relative;
}

.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--color-white);
  animation: btn-spin 0.7s linear infinite;
}

.btn-outline.is-loading::after { color: var(--color-ink); }
.btn-gold.is-loading::after { color: var(--color-white); }

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}
/* ==========================================================================
   CARDS — vehicle cards are the signature UI element of this site.
   Every card treats the price like a promise, not a shout: quiet
   confidence, consistent placement, badge system for trust signals.
   ========================================================================== */

.vcard {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: transform var(--duration-base) var(--ease-out),
              box-shadow var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.vcard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.vcard__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.vcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.vcard:hover .vcard__media img {
  transform: scale(1.06);
}

.vcard__badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  background: var(--color-ink);
  color: var(--color-white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}

.vcard__badge--sold {
  background: var(--color-danger);
}

.vcard__badge--pending {
  background: var(--color-warning);
}

.vcard__badge--repo {
  top: auto;
  bottom: var(--space-3);
  left: var(--space-3);
  background: var(--color-gold);
  color: var(--color-white);
}

.vcard__inspected {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.95);
  color: var(--color-success);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(4px);
}

.vcard__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.vcard__title {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  line-height: var(--lh-snug);
}

.vcard__trim {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin-top: -4px;
}

.vcard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding-block: var(--space-2);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-2);
}

.vcard__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.vcard__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-3);
}

.vcard__price {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
}

.vcard__price small {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
  color: var(--color-text-faint);
  display: block;
}

.vcard__price-original {
  font-size: var(--fs-sm);
  color: var(--color-text-faint);
  text-decoration: line-through;
  display: block;
  font-weight: var(--fw-regular);
}

.vcard__cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-ink);
  transition: gap var(--duration-fast) var(--ease-out);
}

.vcard:hover .vcard__cta { gap: 8px; color: var(--color-gold-dark); }

/* ---------- Feature / value-prop cards ("Why Choose Us") ---------- */
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

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

.feature-card__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  color: var(--color-gold-dark);
  margin-bottom: var(--space-4);
}

.feature-card__icon svg { width: 26px; height: 26px; }

.feature-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-2);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

/* ---------- Testimonial cards ---------- */
.testimonial-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  height: 100%;
  position: relative;
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

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

.testimonial-card--featured {
  border-color: var(--color-gold);
  background: linear-gradient(180deg, rgba(200,0,0,0.03) 0%, var(--color-surface) 100%);
}

.testimonial-card__ribbon {
  position: absolute;
  top: -11px;
  left: var(--space-5);
  background: var(--color-gold);
  color: var(--color-white);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Masonry-style review grid: cards flow in balanced columns rather than
   a rigid uniform grid, so featured/longer reviews get natural breathing
   room instead of forcing every card to match height. */
.review-masonry {
  columns: 3 320px;
  column-gap: var(--space-6);
}

.review-masonry .testimonial-card {
  break-inside: avoid;
  margin-bottom: var(--space-6);
}

@media (max-width: 900px) {
  .review-masonry { columns: 2 280px; }
}
@media (max-width: 640px) {
  .review-masonry { columns: 1; }
}

/* ---------- Review stats summary band ---------- */
.review-stats {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-10);
  align-items: center;
  padding-block: var(--space-6);
}

@media (max-width: 640px) {
  .review-stats { grid-template-columns: 1fr; gap: var(--space-6); text-align: center; }
}

.review-stats__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.review-stats__number {
  font-family: var(--font-display);
  font-size: var(--fs-4xl);
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1;
}

.review-stats__count {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.review-stats__bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.review-bar-row {
  display: grid;
  grid-template-columns: 52px 1fr 40px;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.review-bar-row__track {
  height: 8px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.review-bar-row__fill {
  height: 100%;
  background: var(--color-gold);
  border-radius: var(--radius-pill);
}

.review-bar-row__pct {
  text-align: right;
}

.testimonial-card__stars {
  color: var(--color-gold);
  display: flex;
  gap: 2px;
}

.testimonial-card__stars svg { width: 16px; height: 16px; }

.testimonial-card__quote {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--color-ink);
  flex: 1;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.testimonial-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  flex-shrink: 0;
}

.testimonial-card__name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  color: var(--color-ink);
}

.testimonial-card__location {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
}

/* ---------- Skeleton loading state for async-loaded cards ---------- */
.vcard.is-loading .vcard__media,
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-alt);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: skeleton-sweep 1.4s infinite;
}

@keyframes skeleton-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}
/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.top-bar {
  background: var(--color-ink);
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-xs);
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-2);
}

.top-bar__contacts {
  display: flex;
  gap: var(--space-5);
}

.top-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--duration-fast) var(--ease-out);
}

.top-bar a:hover { color: var(--color-gold-light); }

.top-bar__social {
  display: flex;
  gap: var(--space-3);
}

.top-bar__social a {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.top-bar__social a:hover { background: rgba(255,255,255,0.18); color: var(--color-white); }

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--duration-base) var(--ease-out);
  /* NOTE: backdrop-filter was removed here on purpose. It created a new
     CSS "containing block" for this element, which silently broke every
     position:fixed descendant (specifically .main-nav, the mobile menu
     panel) — instead of sizing itself against the full viewport, the
     panel was sizing itself against this header's own small height,
     which is exactly why the mobile menu kept rendering as a tiny box
     no matter how many times .main-nav itself was "fixed." Do not
     re-add backdrop-filter (or transform/filter/perspective) to this
     element, or any ancestor of .main-nav, without re-testing the
     mobile menu specifically — this is a well-documented CSS behavior,
     not a one-off fluke. */
}

.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.brand__mark {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
}

.brand__mark-plate {
  display: inline-flex;
  background: var(--color-white);
  border-radius: 10px;
  padding: 3px;
  flex-shrink: 0;
}

.brand__text {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-lg);
  color: var(--color-ink);
  line-height: 1.1;
}

.brand__text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: var(--fw-medium);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gold-dark);
}

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

.main-nav__list {
  display: flex;
  gap: var(--space-5);
}

.main-nav__list a {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  position: relative;
  padding-block: 4px;
}

.main-nav__list a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-gold);
  transition: width var(--duration-base) var(--ease-out);
}

.main-nav__list a:hover::after,
.main-nav__list a.is-active::after { width: 100%; }

.main-nav__list a.is-active { color: var(--color-ink); font-weight: var(--fw-semibold); }

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-ink);
  position: relative;
  transition: transform var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out);
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

.nav-toggle.is-open span { background: transparent; }
.nav-toggle.is-open span::before { transform: rotate(45deg); top: 0; }
.nav-toggle.is-open span::after { transform: rotate(-45deg); top: 0; }

@media (max-width: 960px) {
  .top-bar__contacts span:last-child { display: none; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 85%;
    max-width: 360px;
    background-color: #FFFFFF;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
    z-index: var(--z-header);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

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

  .main-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: var(--space-6) var(--space-6) 0;
  }

  .main-nav__list li {
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav__list a {
    display: block;
    padding-block: var(--space-4);
    font-size: var(--fs-lg);
  }

  .header-actions.show-mobile {
    display: block;
    width: 100%;
    padding: var(--space-6);
  }

  .header-actions .btn-outline { display: none; }
}

@media (max-width: 560px) {
  .main-nav { width: 100%; max-width: none; }
  .brand__text { font-size: var(--fs-md); }
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(32,31,31,0.4);
  z-index: calc(var(--z-header) - 1);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--color-ink-dark);
  color: rgba(255,255,255,0.7);
  padding-top: var(--space-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: var(--space-8);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-6); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .brand__text { color: var(--color-white); }
.footer-brand .brand__text span { color: var(--color-gold-light); }

.footer-brand p {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  max-width: 320px;
  color: rgba(255,255,255,0.6);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-base) var(--ease-out);
  color: var(--color-white);
}

.footer-social a:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.footer-col h4 {
  font-family: var(--font-body);
  color: var(--color-white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.65);
  transition: color var(--duration-fast) var(--ease-out), padding-left var(--duration-fast) var(--ease-out);
}

.footer-col a:hover {
  color: var(--color-gold-light);
  padding-left: 4px;
}

.footer-col address {
  font-style: normal;
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
  color: rgba(255,255,255,0.65);
}

.footer-hours {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.footer-hours dt { color: var(--color-white); font-weight: var(--fw-medium); }
.footer-hours dd { color: rgba(255,255,255,0.6); margin-bottom: var(--space-2); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-6);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--color-gold-light); }

.footer-legal {
  display: flex;
  gap: var(--space-5);
}

/* Sticky mobile contact bar — appears on small screens for quick access */
.mobile-contact-bar {
  display: none;
}

@media (max-width: 720px) {
  .mobile-contact-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 16px rgba(32,31,31,0.1);
    z-index: var(--z-header);
  }

  .mobile-contact-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: var(--space-2) 0;
    font-size: 0.65rem;
    font-weight: var(--fw-medium);
    color: var(--color-ink);
  }

  .mobile-contact-bar svg { width: 20px; height: 20px; }

  body { padding-bottom: 62px; }
}
/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-5);
}

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

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

label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-ink);
  margin-bottom: var(--space-2);
}

label .required { color: var(--color-danger); margin-left: 2px; }

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.input:hover, .textarea:hover, .select:hover { border-color: var(--color-text-faint); }

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--color-ink);
  box-shadow: 0 0 0 4px rgba(32,31,31,0.08);
}

.textarea { resize: vertical; min-height: 120px; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B5B58' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.field-hint {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

.field-error {
  font-size: var(--fs-xs);
  color: var(--color-danger);
  margin-top: var(--space-2);
  display: none;
  align-items: center;
  gap: 4px;
}

.form-group.has-error .input,
.form-group.has-error .textarea,
.form-group.has-error .select {
  border-color: var(--color-danger);
}

.form-group.has-error .field-error { display: flex; }

/* Radio / checkbox pill groups (contact preference, credit range, etc) */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pill-group label {
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.pill-group input:checked + label {
  background: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-white);
}

.pill-group input:focus-visible + label {
  outline: 3px solid var(--color-gold);
  outline-offset: 2px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 2px;
  accent-color: var(--color-ink);
  flex-shrink: 0;
}

.checkbox-row label { margin: 0; font-weight: var(--fw-regular); font-size: var(--fs-sm); }

/* Form-level alert states */
.form-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-5);
}

.form-alert--success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(76,122,94,0.25);
}

.form-alert--error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
  border: 1px solid rgba(166,67,47,0.25);
}

.form-alert svg { flex-shrink: 0; margin-top: 2px; }

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

@media (max-width: 640px) {
  .form-card { padding: var(--space-5); }
}

/* Honeypot spam-trap field — visually and semantically hidden */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* ==========================================================================
   HERO, BADGES, BREADCRUMBS, PAGINATION, TOAST, MISC
   ========================================================================== */

/* ---------- HERO (Home) — signature search-first hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  background: var(--color-surface-alt);
  color: var(--color-text);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(200,0,0,0.06) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(200,0,0,0.05) 0%, transparent 45%);
  pointer-events: none;
  z-index: 1;
}

.hero__bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 1;
}

/* Light readability scrim behind the text column only — the photo itself
   stays fully visible on the right/lower portion of the hero, per brief:
   "make the hero image visible" while keeping headline text legible. */
.hero__bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250,250,250,0.97) 0%, rgba(250,250,250,0.88) 32%, rgba(250,250,250,0.45) 58%, rgba(250,250,250,0.08) 78%, transparent 100%);
}

@media (max-width: 900px) {
  /* On narrow screens the text column spans full width, so scrim the
     whole image a bit more evenly top-to-bottom instead of left-right */
  .hero__bg-image::after {
    background: linear-gradient(180deg, rgba(250,250,250,0.94) 0%, rgba(250,250,250,0.8) 45%, rgba(250,250,250,0.55) 100%);
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: var(--space-16) var(--space-10);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(200,0,0,0.08);
  border: 1px solid rgba(200,0,0,0.25);
  color: var(--color-gold-dark);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-5);
}

.hero h1 {
  color: var(--color-ink);
  font-size: clamp(2.5rem, 5vw, var(--fs-4xl));
  max-width: 780px;
  margin-bottom: var(--space-5);
}

.hero h1 em {
  font-style: normal;
  color: var(--color-gold);
}

.hero p.lead {
  font-size: var(--fs-lg);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: var(--space-8);
  line-height: var(--lh-relaxed);
}

.hero__stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-10);
  flex-wrap: wrap;
}

.hero__stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  color: var(--color-ink);
}
.hero__stat span {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

/* ---------- Search bar — the signature interactive element ---------- */
.search-panel {
  position: relative;
  z-index: 2;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-lg);
  margin-top: var(--space-8);
}

.search-panel__tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.search-panel__tabs button {
  background: transparent;
  border: none;
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
}

.search-panel__tabs button.is-active {
  background: var(--color-ink);
  color: var(--color-white);
}

.search-panel__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: var(--space-3);
  align-items: end;
}

@media (max-width: 900px) {
  .search-panel__row { grid-template-columns: 1fr 1fr; }
  .search-panel__row .btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .search-panel { padding: var(--space-4); }
  .search-panel__row { grid-template-columns: 1fr; }
}

.search-panel .select,
.search-panel .input { color: var(--color-text); }

/* ---------- Generic page hero (interior pages, shorter than homepage) ---------- */
.page-hero {
  background: var(--color-surface-alt);
  color: var(--color-text);
  padding-block: var(--space-10);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% 10%, rgba(200,0,0,0.06) 0%, transparent 50%);
}

.page-hero h1 { color: var(--color-ink); font-size: var(--fs-3xl); position: relative; }
.page-hero p { color: var(--color-text-muted); margin-top: var(--space-3); max-width: 620px; position: relative; font-size: var(--fs-md); }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
  position: relative;
}

.breadcrumbs a { color: var(--color-text-muted); }
.breadcrumbs a:hover { color: var(--color-gold); }
.breadcrumbs .sep { opacity: 0.5; }

/* Dark variant, for use on navy/black backgrounds (e.g. final CTA sections) */
.breadcrumbs--dark { color: rgba(255,255,255,0.55); }
.breadcrumbs--dark a { color: rgba(255,255,255,0.75); }
.breadcrumbs--dark a:hover { color: var(--color-gold-light); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
}

.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge--danger { background: var(--color-danger-bg); color: var(--color-danger); }
.badge--gold { background: rgba(200,0,0,0.15); color: var(--color-gold-dark); }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.pagination a:hover { border-color: var(--color-ink); }
.pagination .is-current { background: var(--color-ink); color: var(--color-white); border-color: var(--color-ink); }
.pagination .is-disabled { opacity: 0.4; pointer-events: none; }

/* ---------- Toast notification (used by JS after form submit, etc.) ---------- */
.toast {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  background: var(--color-ink);
  color: var(--color-white);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  transform: translateY(120%);
  transition: transform var(--duration-slow) var(--ease-out);
  max-width: 360px;
}

.toast.is-visible { transform: translateY(0); }
.toast--success { background: var(--color-success); }
.toast--error { background: var(--color-danger); }

@media (max-width: 560px) {
  .toast { left: var(--space-4); right: var(--space-4); bottom: 78px; max-width: none; }
}

/* ---------- Trust bar / brand strip (legacy text-only variant, kept for reuse) ---------- */
.trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-10);
  flex-wrap: wrap;
  padding-block: var(--space-8);
  opacity: 0.7;
}

.trust-strip img { max-height: 32px; width: auto; filter: grayscale(1); transition: filter var(--duration-base) var(--ease-out), opacity var(--duration-base) var(--ease-out); opacity: 0.6; }
.trust-strip img:hover { filter: grayscale(0); opacity: 1; }

/* ---------- Popular Makes logo tiles ---------- */
.make-tiles {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) {
  .make-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 500px) {
  .make-tiles { grid-template-columns: repeat(3, 1fr); }
}

.make-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
  text-align: center;
}

.make-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-gold);
}

.make-tile img {
  height: 36px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.make-tile__text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--color-ink);
  height: 36px;
  display: flex;
  align-items: center;
}

.make-tile__label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
}

/* ---------- Scroll reveal (JS toggles .is-visible via IntersectionObserver) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--duration-slow) var(--ease-out), transform var(--duration-slow) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Back-to-top button ---------- */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--color-ink);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--duration-base) var(--ease-out);
  z-index: 90;
}

.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { background: var(--color-ink-light); transform: translateY(-3px); }

@media (max-width: 720px) {
  .back-to-top { bottom: 78px; }
}

/* ---------- Floating chat/contact cluster (WhatsApp/Telegram) ---------- */
.float-contacts {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  z-index: 90;
}

.float-contacts a {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration-fast) var(--ease-out);
}

.float-contacts a:hover { transform: scale(1.08); }

@media (max-width: 720px) {
  .float-contacts { bottom: 78px; }
}
/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-gold { color: var(--color-gold-dark); }
.text-white { color: var(--color-white); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.w-full { width: 100%; }

.rounded-lg { border-radius: var(--radius-lg); }
.shadow-md { box-shadow: var(--shadow-md); }

.hide-mobile { }
.show-mobile { display: none; }

@media (max-width: 720px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block; }
}

/* Empty-state block (no inventory results, no leads, etc.) */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--color-text-muted);
}

.empty-state svg {
  width: 64px; height: 64px;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  color: var(--color-border-strong);
}

.empty-state h3 { color: var(--color-ink); margin-bottom: var(--space-2); }

/* Sticky sidebar helper (used on vehicle detail + inventory filters) */
.sticky-side {
  position: sticky;
  top: calc(var(--space-6) + 72px);
  align-self: start;
}

/* Blog article body typography — scoped to .blog-content only, so this
   never affects H2 usage elsewhere on the site (homepage section titles,
   etc. stay at their normal larger size). Article content repeats H2 as
   a plain in-article subheading every few paragraphs, so it needs to sit
   much closer to body-copy scale than a page section title does. */
.blog-content h2 {
  font-size: var(--fs-xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
}

.blog-content h3 {
  font-size: var(--fs-lg);
  margin-top: var(--space-8);
  margin-bottom: var(--space-2);
}

.blog-content p {
  margin-bottom: var(--space-4);
}

.blog-content ul,
.blog-content ol {
  margin: var(--space-4) 0 var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.blog-content li {
  list-style: disc;
}

.blog-content ol li {
  list-style: decimal;
}

.blog-content a {
  color: var(--color-gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-content a:hover {
  color: var(--color-gold);
}

.blog-content h2:first-child,
.blog-content h3:first-child {
  margin-top: 0;
}

/* Print styles for vehicle brochure */
@media print {
  .site-header, .site-footer, .float-contacts, .mobile-contact-bar,
  .back-to-top, .no-print { display: none !important; }
  body { background: white; }
  .container { max-width: 100%; padding: 0; }
}
