@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --brand-primary: #5e7feb;
  --brand-primary-foreground: #0F172A;
  --brand-primary-soft: rgba(94, 127, 235, 0.13);
  --brand-accent: #1fdb6a;
  --brand-accent-foreground: #0F172A;
  --brand-dark: #252222;
  --brand-dark-foreground: #FFFFFF;
  --surface-page: #ffffff;
  --surface-card: #fcfcfc;
  --surface-secondary: #fcfcfc;
  --surface-elevated: #FFFFFF;
  --surface-footer: #252222;
  --surface-inverse: #252222;
  --surface-hover: rgba(15, 23, 42, 0.04);
  --surface-selected: rgba(94, 127, 235, 0.12);
  --text-strong: #0F172A;
  --text-default: #1F2937;
  --text-muted: #6B7280;
  --text-inverse: #FFFFFF;
  --text-link: #5e7feb;
  --text-link-hover: #3a62e6;
  --text-on-brand: #0F172A;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255,255,255,0.6);
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --state-hover: #3a62e6;
  --state-active: #1e4de3;
  --state-focus-ring: rgba(94, 127, 235, 0.35);
  --state-disabled-background: rgba(15, 23, 42, 0.08);
  --state-disabled-foreground: rgba(15, 23, 42, 0.42);
  --feedback-error: #e74c3c;
  --feedback-success: #27ae60;
  --feedback-error-foreground: #0F172A;
  --feedback-success-foreground: #0F172A;
  --feedback-error-surface: rgba(231, 76, 60, 0.1);
  --feedback-success-surface: rgba(39, 174, 96, 0.1);
  --brand-light: #fcfcfc;
  --brand-error: #e74c3c;
  --brand-success: #27ae60;
  --primary: var(--brand-primary);
  --primary-90: var(--state-hover);
  --primary-soft: rgba(94, 127, 235, 0.13);
  --accent: var(--brand-accent);
  --accent-dark: var(--state-hover);
  --orange: var(--brand-accent);
  --blue: var(--brand-primary);
  --blue-dark: var(--state-hover);
  --red: var(--brand-primary);
  --red-dark: var(--state-hover);
  --gold: var(--brand-primary);
  --gold-dark: var(--brand-primary);
  --ink: var(--text-strong);
  --muted: var(--text-muted);
  --subtle: var(--text-muted);
  --paper: var(--surface-page);
  --page: var(--surface-page);
  --card: var(--surface-card);
  --surface: var(--surface-card);
  --soft: var(--surface-elevated);
  --content: var(--surface-elevated);
  --cream: var(--surface-card);
  --black: var(--surface-footer);
  --line: var(--border-subtle);
  --border: var(--border-subtle);
  --ring: var(--state-focus-ring);
  --success: var(--feedback-success);
  --warning: var(--brand-accent);
  --bg: var(--surface-page);
  --text: var(--text-default);
  --surface-2: var(--surface-elevated);
  --surface-muted: var(--surface-elevated);
  --brand: var(--brand-primary);
  --brand-deep: var(--state-hover);
  --brand-soft: var(--brand-primary-soft);
  --teal: var(--brand-primary);
  --teal-dark: var(--state-hover);
  --yellow: var(--brand-accent);
  --orange-dark: var(--state-hover);
  --navy: var(--surface-footer);
  --navy-soft: var(--surface-footer);
  --blue-deep: var(--surface-footer);
  --font-primary: 'Roboto', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
  --font-primary-weight: 400;
  --font-heading-weight: 700;
  --font-body-size: 16px;
  --font-body-line-height: 1.6;
  --font-heading-line-height: 1.12;
  --font-body-letter-spacing: 0;
  --font-heading-letter-spacing: 0;
}

[data-theme="dark"] {
  --brand-primary: #94aaf2;
  --brand-primary-foreground: #0F172A;
  --brand-primary-soft: rgba(148, 170, 242, 0.13);
  --brand-accent: #51e68c;
  --brand-accent-foreground: #0F172A;
  --brand-dark: #0a0a0a;
  --brand-dark-foreground: #F5F7FA;
  --surface-page: #141414;
  --surface-card: #1f1f1f;
  --surface-secondary: #1f1f1f;
  --surface-elevated: #292929;
  --surface-footer: #0a0a0a;
  --surface-inverse: #0a0a0a;
  --surface-hover: rgba(245, 247, 250, 0.1);
  --surface-selected: rgba(148, 170, 242, 0.24);
  --text-strong: #F5F7FA;
  --text-default: #F5F7FA;
  --text-muted: #AEB7C5;
  --text-inverse: #F5F7FA;
  --text-link: #94aaf2;
  --text-link-hover: #b8c7f6;
  --text-on-brand: #0F172A;
  --text-on-dark: #F5F7FA;
  --text-on-dark-muted: #AEB7C5;
  --border-subtle: rgba(245, 247, 250, 0.1);
  --border-strong: rgba(245, 247, 250, 0.2);
  --state-hover: #b8c7f6;
  --state-active: #d4ddfa;
  --state-focus-ring: rgba(148, 170, 242, 0.35);
  --state-disabled-background: rgba(245, 247, 250, 0.14);
  --state-disabled-foreground: rgba(245, 247, 250, 0.42);
  --feedback-error: #ed7669;
  --feedback-success: #36d278;
  --feedback-error-foreground: #0F172A;
  --feedback-success-foreground: #0F172A;
  --feedback-error-surface: rgba(237, 118, 105, 0.18);
  --feedback-success-surface: rgba(54, 210, 120, 0.18);
  --brand-light: #1f1f1f;
  --brand-error: #ed7669;
  --brand-success: #36d278;
  --primary: var(--brand-primary);
  --primary-90: var(--state-hover);
  --primary-soft: rgba(148, 170, 242, 0.13);
  --accent: var(--brand-accent);
  --accent-dark: var(--state-hover);
  --orange: var(--brand-accent);
  --blue: var(--brand-primary);
  --blue-dark: var(--state-hover);
  --red: var(--brand-primary);
  --red-dark: var(--state-hover);
  --gold: var(--brand-primary);
  --gold-dark: var(--brand-primary);
  --ink: var(--text-strong);
  --muted: var(--text-muted);
  --subtle: var(--text-muted);
  --paper: var(--surface-page);
  --page: var(--surface-page);
  --card: var(--surface-card);
  --surface: var(--surface-card);
  --soft: var(--surface-elevated);
  --content: var(--surface-elevated);
  --cream: var(--surface-card);
  --black: var(--surface-footer);
  --line: var(--border-subtle);
  --border: var(--border-subtle);
  --ring: var(--state-focus-ring);
  --success: var(--feedback-success);
  --warning: var(--brand-accent);
  --bg: var(--surface-page);
  --text: var(--text-default);
  --surface-2: var(--surface-elevated);
  --surface-muted: var(--surface-elevated);
  --brand: var(--brand-primary);
  --brand-deep: var(--state-hover);
  --brand-soft: var(--brand-primary-soft);
  --teal: var(--brand-primary);
  --teal-dark: var(--state-hover);
  --yellow: var(--brand-accent);
  --orange-dark: var(--state-hover);
  --navy: var(--surface-footer);
  --navy-soft: var(--surface-footer);
  --blue-deep: var(--surface-footer);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --brand-primary: #94aaf2;
    --brand-primary-foreground: #0F172A;
    --brand-primary-soft: rgba(148, 170, 242, 0.13);
    --brand-accent: #51e68c;
    --brand-accent-foreground: #0F172A;
    --brand-dark: #0a0a0a;
    --brand-dark-foreground: #F5F7FA;
    --surface-page: #141414;
    --surface-card: #1f1f1f;
    --surface-secondary: #1f1f1f;
    --surface-elevated: #292929;
    --surface-footer: #0a0a0a;
    --surface-inverse: #0a0a0a;
    --surface-hover: rgba(245, 247, 250, 0.1);
    --surface-selected: rgba(148, 170, 242, 0.24);
    --text-strong: #F5F7FA;
    --text-default: #F5F7FA;
    --text-muted: #AEB7C5;
    --text-inverse: #F5F7FA;
    --text-link: #94aaf2;
    --text-link-hover: #b8c7f6;
    --text-on-brand: #0F172A;
    --text-on-dark: #F5F7FA;
    --text-on-dark-muted: #AEB7C5;
    --border-subtle: rgba(245, 247, 250, 0.1);
    --border-strong: rgba(245, 247, 250, 0.2);
    --state-hover: #b8c7f6;
    --state-active: #d4ddfa;
    --state-focus-ring: rgba(148, 170, 242, 0.35);
    --state-disabled-background: rgba(245, 247, 250, 0.14);
    --state-disabled-foreground: rgba(245, 247, 250, 0.42);
    --feedback-error: #ed7669;
    --feedback-success: #36d278;
    --feedback-error-foreground: #0F172A;
    --feedback-success-foreground: #0F172A;
    --feedback-error-surface: rgba(237, 118, 105, 0.18);
    --feedback-success-surface: rgba(54, 210, 120, 0.18);
    --brand-light: #1f1f1f;
    --brand-error: #ed7669;
    --brand-success: #36d278;
    --primary: var(--brand-primary);
    --primary-90: var(--state-hover);
    --primary-soft: rgba(148, 170, 242, 0.13);
    --accent: var(--brand-accent);
    --accent-dark: var(--state-hover);
    --orange: var(--brand-accent);
    --blue: var(--brand-primary);
    --blue-dark: var(--state-hover);
    --red: var(--brand-primary);
    --red-dark: var(--state-hover);
    --gold: var(--brand-primary);
    --gold-dark: var(--brand-primary);
    --ink: var(--text-strong);
    --muted: var(--text-muted);
    --subtle: var(--text-muted);
    --paper: var(--surface-page);
    --page: var(--surface-page);
    --card: var(--surface-card);
    --surface: var(--surface-card);
    --soft: var(--surface-elevated);
    --content: var(--surface-elevated);
    --cream: var(--surface-card);
    --black: var(--surface-footer);
    --line: var(--border-subtle);
    --border: var(--border-subtle);
    --ring: var(--state-focus-ring);
    --success: var(--feedback-success);
    --warning: var(--brand-accent);
    --bg: var(--surface-page);
    --text: var(--text-default);
    --surface-2: var(--surface-elevated);
    --surface-muted: var(--surface-elevated);
    --brand: var(--brand-primary);
    --brand-deep: var(--state-hover);
    --brand-soft: var(--brand-primary-soft);
    --teal: var(--brand-primary);
    --teal-dark: var(--state-hover);
    --yellow: var(--brand-accent);
    --orange-dark: var(--state-hover);
    --navy: var(--surface-footer);
    --navy-soft: var(--surface-footer);
    --blue-deep: var(--surface-footer);
  }
}


/* ── Theme-aware rules (drive landing page chrome) ── */
html, body { background-color: var(--surface-page); color: var(--text-default); }
/* Legacy templates scope their variables on body.dark/body.light. Rebind
 * those variables to Studio tokens as well, otherwise a template-local
 * declaration can silently win over the selected light/dark palette. */
body.dark, [data-theme="dark"] body {
  --ink: var(--text-strong); --muted: var(--text-muted); --subtle: var(--text-muted);
  --paper: var(--surface-page); --page: var(--surface-page);
  --card: var(--surface-card); --surface: var(--surface-card);
  --soft: var(--surface-elevated); --content: var(--surface-elevated);
  --cream: var(--surface-card); --black: var(--surface-footer);
  --line: var(--border-subtle); --border: var(--border-subtle);
  --primary: var(--brand-primary); --primary-90: var(--state-hover);
  --accent: var(--brand-accent); --accent-dark: var(--state-hover);
  --orange: var(--brand-accent); --blue: var(--brand-primary); --blue-dark: var(--state-hover);
  --primary-soft: var(--brand-primary-soft); --red: var(--brand-primary);
  --red-dark: var(--state-hover); --gold: var(--brand-primary);
  --gold-dark: var(--state-hover); --ring: var(--state-focus-ring);
  --bg: var(--surface-page); --text: var(--text-default);
  --surface-2: var(--surface-elevated); --surface-muted: var(--surface-elevated);
  --brand: var(--brand-primary); --brand-deep: var(--state-hover); --brand-soft: var(--brand-primary-soft);
  --teal: var(--brand-primary); --teal-dark: var(--state-hover); --yellow: var(--brand-accent);
  --orange-dark: var(--state-hover);
  --navy: var(--surface-footer); --navy-soft: var(--surface-footer); --blue-deep: var(--surface-footer);
}
body.light, [data-theme="light"] body {
  --ink: var(--text-strong); --muted: var(--text-muted); --subtle: var(--text-muted);
  --paper: var(--surface-page); --page: var(--surface-page);
  --card: var(--surface-card); --surface: var(--surface-card);
  --soft: var(--surface-elevated); --content: var(--surface-elevated);
  --cream: var(--surface-card); --black: var(--surface-footer);
  --line: var(--border-subtle); --border: var(--border-subtle);
  --primary: var(--brand-primary); --primary-90: var(--state-hover);
  --accent: var(--brand-accent); --accent-dark: var(--state-hover);
  --orange: var(--brand-accent); --blue: var(--brand-primary); --blue-dark: var(--state-hover);
  --primary-soft: var(--brand-primary-soft); --red: var(--brand-primary);
  --red-dark: var(--state-hover); --gold: var(--brand-primary);
  --gold-dark: var(--state-hover); --ring: var(--state-focus-ring);
  --bg: var(--surface-page); --text: var(--text-default);
  --surface-2: var(--surface-elevated); --surface-muted: var(--surface-elevated);
  --brand: var(--brand-primary); --brand-deep: var(--state-hover); --brand-soft: var(--brand-primary-soft);
  --teal: var(--brand-primary); --teal-dark: var(--state-hover); --yellow: var(--brand-accent);
  --orange-dark: var(--state-hover);
  --navy: var(--surface-footer); --navy-soft: var(--surface-footer); --blue-deep: var(--surface-footer);
}
/* Typography is a site-wide Studio setting. Marketplace templates define
 * their own body, heading, navigation and footer rules, often with shorthand
 * font declarations. Keep the configured family authoritative on every
 * public page while preserving code/preformatted content. */
body { font-family: var(--font-primary), sans-serif !important; font-size: var(--font-body-size); font-weight: var(--font-primary-weight); line-height: var(--font-body-line-height); letter-spacing: var(--font-body-letter-spacing); }
body *:not(script):not(style):not(pre):not(code):not(kbd):not(samp) { font-family: var(--font-primary), sans-serif !important; }
body p, body li, body dt, body dd, body label, body input, body textarea,
body select, body option, body button, body a, body small, body .eyebrow,
body .button, body .brand, body .nav, body .footer-links {
  font-size: var(--font-body-size) !important;
  font-weight: var(--font-primary-weight) !important;
  line-height: var(--font-body-line-height) !important;
  letter-spacing: var(--font-body-letter-spacing) !important;
}
h1, h2, h3, h4, h5, h6,
.primary-heading, .secondry-heading, .tertiary-heading,
.section-title, .heading, .heading-1, .heading-2, .heading-3, .heading-4,
.display-heading, .page-title, .footer-title,
/* Marketplace templates also use display values instead of H tags for
 * prices, metrics and feature counters. They are title-level typography,
 * and several templates set their own family with the font shorthand. */
.stat strong, .event-inner strong, .ribbon-inner strong,
.vehicle-price, .detail-price, .collection-box strong, .heritage-box strong,
.error-code, .metric strong {
  font-family: var(--font-heading), sans-serif !important;
  font-weight: var(--font-heading-weight) !important;
  line-height: var(--font-heading-line-height) !important;
  letter-spacing: var(--font-heading-letter-spacing) !important;
}
.section { background-color: var(--surface-page); color: var(--text-default); }
.section.dark, .section.dark-footer { background-color: var(--surface-footer); color: var(--text-on-dark); }
.section.tint { background-color: var(--surface-card); color: var(--text-default); }

/* Marketplace templates (09–12) use their own class names and often
 * hardcode backgrounds. These rules keep every shared visual surface on the
 * Studio palette without touching image/video backgrounds. */
.site-header,
.navbar-new,
.navbar-container { background-color: var(--surface-page) !important; color: var(--text-default) !important; border-color: var(--border-subtle) !important; }
.site-header .brand,
.site-header .theme-button,
.site-header .menu-button { color: var(--text-strong) !important; }
.site-header .brand-copy small,
.site-header .nav a,
.site-header .theme-button,
.site-header .menu-button { color: var(--text-muted) !important; }
.site-header .nav a:hover,
.site-header .nav a.active,
.site-header .nav a[aria-current="page"] { color: var(--brand-primary) !important; }
.theme-button,
.menu-button { background-color: var(--surface-card) !important; border-color: var(--border-subtle) !important; }

.vehicle-card, .part-card, .service, .workflow-card, .metric, .info-panel,
.panel, .filters, .detail-media, .detail-data div, .split-card,
.cta, .collection-box, .heritage-box {
  background-color: var(--surface-card) !important;
  color: var(--text-default) !important;
  border-color: var(--border-subtle) !important;
}
/* Hero event bands (templates 09/10) overlay the hero image with light copy:
 * they are dark surfaces, not cards. */
.event-inner, .hero-ribbon {
  background-color: color-mix(in srgb, var(--surface-footer) 93%, transparent) !important;
  color: var(--text-on-dark) !important;
  border-color: transparent !important;
}
.event-inner p, .hero-ribbon p { color: var(--text-on-dark-muted) !important; }
.event-inner strong, .hero-ribbon strong { color: var(--text-on-dark) !important; }
/* Studio hides disabled modules/nav targets with [hidden][aria-hidden]; template
 * display rules such as .button { display:inline-flex } must not bring them back. */
[hidden][aria-hidden="true"] { display: none !important; }
.featured-wrap, .vehicle-image, .detail-thumbs div { background-color: var(--surface-elevated) !important; }
.search-wrap, .search-card, .search-inner, .search-panel,
.stat-grid, .benefit, .benefits, .toolbar, .empty,
.detail-thumbs, .info-list, .form-wrapper, .content-grid,
.vehicle-grid, .parts-grid, .services-grid, .workflow-grid {
  background-color: var(--surface-page);
  color: var(--text-default);
  border-color: var(--border-subtle);
}
.search-inner, .search-panel, .filters { background-color: var(--surface-card) !important; }
.search-field, .filter, .field input, .field select, .field textarea,
.contact-field input, .contact-field textarea, .w-input {
  background-color: var(--surface-elevated) !important;
  color: var(--text-default) !important;
  border-color: var(--border-subtle) !important;
}
.stat-grid, .detail-data { background-color: var(--border-subtle) !important; }
.stat, .benefit, .service, .workflow-card { background-color: var(--surface-card) !important; }
.collection-band { background-color: var(--surface-footer); }
/* Template 11's home showcase (pitch) is a regular content section: page
 * background (light in light mode, dark in dark mode) with normal text. */
.showcase, .section.showcase { background-color: var(--surface-elevated) !important; background-image: none !important; color: var(--text-default) !important; }
.showcase h1, .showcase h2, .showcase h3 { color: var(--text-strong) !important; }
.showcase p:not(.eyebrow), .showcase li { color: var(--text-default) !important; }
.showcase .showcase-image { border-color: var(--border-subtle) !important; background-color: var(--surface-card) !important; }
/* Template 09's heritage block (About page) is a light content section:
 * page background with the regular text colours. */
.heritage, .section.heritage { background-color: var(--surface-page) !important; color: var(--text-default) !important; }
.heritage h1, .heritage h2, .heritage h3 { color: var(--text-strong) !important; }
.heritage p:not(.eyebrow), .heritage li { color: var(--text-default) !important; }
/* The feature card inside keeps its dark brand gradient: light copy there. */
.heritage .heritage-box h3 { color: var(--text-on-dark) !important; }
.heritage .heritage-box p:not(.eyebrow) { color: var(--text-on-dark-muted) !important; }
/* Some marketplace layouts place a generic .section/.container inside the
 * dark campaign wrapper. Keep that nested section on the same dark surface
 * so the inherited light text remains readable. */
.collection-band > .section {
  background-color: var(--surface-footer) !important;
  color: var(--text-on-dark) !important;
}
.showcase-box, .collection-box, .heritage-box { border-color: var(--border-strong) !important; }
.cta, .split-card.sell { background-color: var(--brand-primary) !important; color: var(--brand-primary-foreground) !important; }
.cta h1, .cta h2, .cta h3, .cta p, .split-card.sell h1, .split-card.sell h2,
.split-card.sell h3, .split-card.sell p { color: inherit !important; }

/* Image-backed hero and campaign blocks need a readable foreground in both
 * modes. Their media remains untouched; only text and the static template
 * accent span are redirected to the active palette. */
.hero, .page-hero, .collection-band { color: var(--text-on-dark) !important; }
.hero h1, .hero h2, .hero h3, .page-hero h1, .page-hero h2, .page-hero h3,
.collection-band h1,
.collection-band h2, .collection-band h3 { color: var(--text-on-dark) !important; }
.hero p:not(.eyebrow), .page-hero p:not(.eyebrow),
.collection-band p:not(.eyebrow), .collection-band li { color: var(--text-on-dark-muted) !important; }
/* The editable Studio hero subtext is a first-class content field. It must
 * follow the configured default text colour instead of the generic muted
 * overlay colour used by anonymous paragraphs on image-backed heroes. */
.hero p[data-steer-field="content.heroSubtext"],
.page-hero p[data-steer-field="content.heroSubtext"],
.hero-content p[data-steer-field="content.heroSubtext"] {
  color: var(--text-default) !important;
}
.hero .eyebrow, .page-hero .eyebrow, .heritage .eyebrow,
.collection-band .eyebrow, .showcase .eyebrow { color: var(--brand-accent) !important; }
.hero h1 span:not([style]), .page-hero h1 span:not([style]) { color: inherit !important; }
/* Every secondary page uses the same configurable heading and supporting
 * text roles as the home page. This prevents Listings, Contact, About,
 * Estimation, Privacy and Terms from keeping template-default colours. */
.page-hero h1 { color: var(--brand-primary) !important; }
.page-hero p:not(.eyebrow) { color: var(--text-default) !important; }

.site-footer, .footer, .dark-footer, .dark-bottom-footer {
  background-color: var(--surface-footer) !important;
  color: var(--text-on-dark) !important;
  border-color: var(--border-strong) !important;
}
.site-footer p, .site-footer .footer-links, .site-footer .footer-links a,
.footer p, .footer .footer-links, .footer .footer-links a,
.dark-footer p, .dark-footer a { color: var(--text-on-dark-muted) !important; }
.site-footer .brand, .site-footer .footer-title, .footer .footer-title,
.dark-footer-title { color: var(--text-on-dark) !important; }
.site-footer .footer-links a:hover, .footer .footer-links a:hover,
.dark-footer a:hover { color: var(--brand-accent) !important; }
.footer-bottom { border-color: var(--border-strong) !important; }
.site-footer .footer-social, .footer .footer-social,
.site-footer .footer-social-link, .footer .footer-social-link {
  color: var(--text-on-dark) !important;
  border-color: var(--border-strong) !important;
}
.site-footer .footer-social-link:hover, .footer .footer-social-link:hover {
  color: var(--brand-accent) !important;
  border-color: var(--brand-accent) !important;
}

h1, h2, h3, h4, h5, h6,
.primary-heading, .secondry-heading, .tertiary-heading,
.section-title { color: var(--text-strong) !important; }
p, .text, .section-description { color: var(--text-default) !important; }
.muted, .field__hint, .panel__hint { color: var(--text-muted) !important; }

a:not([class]) { color: var(--brand-primary); }
.primary-button, .btn-primary, .button {
  background-color: var(--brand-primary);
  color: var(--brand-primary-foreground);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.primary-button:hover, .btn-primary:hover, .button:hover {
  background-color: var(--state-hover);
}
.button.outline {
  background-color: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.button.outline:hover {
  background-color: var(--brand-primary);
  color: var(--brand-primary-foreground);
  border-color: var(--brand-primary);
}
.button.dark { background-color: var(--brand-dark); color: var(--brand-dark-foreground); }
.button.accent, .bar-blue { background-color: var(--brand-accent); color: var(--brand-accent-foreground); }
.accent, .highlight { color: var(--brand-accent); }

/* ── Shared page surfaces ──
 * Both published template families use the sections class rather than only
 * the section class. Keep the layout/background styles separate so a hero image is
 * never replaced while its fallback colour still follows the theme.
 */
.sections,
.section { background-color: var(--surface-page); color: var(--text-default); }
.sections.grey,
.sections.smoke-white,
.sections.buy,
.sections.car-ad-details,
.featured-section,
.sticky-card,
.car-ad-card,
.feature-card,
.small-price-block { background-color: var(--surface-card); color: var(--text-default); border-color: var(--border-subtle); }
.hero-section { background-color: var(--surface-page); color: var(--text-default); }
.hero-section h1,
.hero-section h2,
.hero-section h3,
.hero-section .primary-heading,
.hero-section .secondry-heading,
.hero-section .tertiary-heading { color: var(--text-strong) !important; }
.hero-section p,
.hero-section .primary-text,
.hero-section .pitch-text { color: var(--text-default) !important; }
.hero-section .primary-text.grey,
.hero-section .form-terms-text { color: var(--text-muted) !important; }
.hero-content { color: var(--text-default); }
.hero-content .eyebrow { color: var(--brand-accent) !important; }
.hero-content h1,
.hero-content h2,
.hero-content h3 { color: var(--text-strong) !important; }
/* Marketplace hero headings do not always carry a template class. Target
 * the Studio field directly so the configured heading color is applied on
 * every supported hero markup variant. Inline color spans inside the heading
 * still win for a deliberately colored text fragment. */
h1[data-steer-field="content.heroHeading"],
.hero h1[data-steer-field="content.heroHeading"],
.hero-content h1[data-steer-field="content.heroHeading"] { color: var(--brand-primary) !important; }
.hero-content > p:not(.eyebrow),
.hero-content .primary-text,
.hero-content .pitch-text { color: var(--text-default) !important; }
.hero-content .button { border-color: var(--brand-primary); }
.hero-content .button:not(.outline) { background-color: var(--brand-primary); color: var(--brand-primary-foreground); }
.hero-content .button.outline { background-color: transparent; color: var(--brand-primary); border-color: var(--brand-primary); }
.hero-content .button.outline:hover { background-color: var(--brand-primary); color: var(--brand-primary-foreground); }

/* Trust metrics are styled by each marketplace template with local
 * variables (and some templates add a more specific dark-mode rule). Keep
 * the semantic Studio palette authoritative while preserving any explicit
 * inline colour selected for an individual editable text field. */
.trust-item strong { color: var(--brand-accent) !important; }
.trust-item > span { color: var(--text-muted) !important; }

/* Testimonial headings follow the active Studio text palette. */
[data-steer-testimonials-heading] { color: var(--text-strong) !important; }

/* Studio adds this marker only when a global text token changes. It protects
 * the new token against a stale inline span that a marketplace template may
 * reinsert during asynchronous hydration. A later local color choice removes
 * the marker, so intentionally colored text still works. */
[data-steer-theme-color="strong"] [style*="color"] { color: var(--text-strong) !important; }
[data-steer-theme-color="default"] [style*="color"] { color: var(--text-default) !important; }
[data-steer-theme-color="muted"] [style*="color"] { color: var(--text-muted) !important; }

/* ── Services and section headings ── */
.section-head h1,
.section-head h2,
.section-head h3,
.services-grid .service h1,
.services-grid .service h2,
.services-grid .service h3 { color: var(--text-strong) !important; }
.section-head .eyebrow,
.services-grid .service .eyebrow,
.eyebrow { color: var(--brand-accent) !important; }
.services-grid .service { background-color: var(--surface-card); color: var(--text-default); border-color: var(--border-subtle); }
.services-grid .service p:not(.eyebrow) { color: var(--text-muted) !important; }

/* The templates contain a few high-specificity Webflow rules. These
 * selectors intentionally target only their known chrome classes, so an
 * inline colour created by the on-page text editor remains untouched. */
.sections:not(.site-footer) .heading,
.sections:not(.site-footer) .heading-4,
.sections:not(.site-footer) .secondary-heading,
.sections:not(.site-footer) .tertiary-heading,
.sections:not(.site-footer) .form-heading,
.sections:not(.site-footer) .faq-title,
.sections:not(.site-footer) .faq-answer,
.sections:not(.site-footer) .contact-value,
.contact-information-wrap,
.contact-information-flex,
.cotact-information-text,
.location-text { color: var(--text-default); }
.faq-title.white { color: var(--text-on-dark); }
.faq-answer.link,
.link-block,
.back-link-block { color: var(--brand-primary); }

/* ── Site navigation and footer ── */
.navbar-new,
.navbar-container { background-color: var(--surface-page); color: var(--text-default); border-color: var(--border-subtle); }
.site-header { background-color: var(--surface-page) !important; color: var(--text-default) !important; border-color: var(--border-subtle) !important; }
.nav,
.nav a,
.nav a:visited { color: var(--text-default) !important; }
.nav a:hover,
.nav a.active,
.nav a[aria-current="page"] { color: var(--brand-primary) !important; }
.navlink-new,
.navlink-new:visited { color: var(--text-default); }
.navlink-new:hover,
.navlink-new.w--current { color: var(--brand-primary); }
.menu-button-2,
.w-icon-nav-menu { color: var(--text-default); }
.site-footer,
.sections.site-footer { background-color: var(--surface-footer); color: var(--text-on-dark); border-color: var(--border-strong); }
.site-footer .footer-item,
.site-footer .footer-item p,
.site-footer .footer-item a,
.site-footer .footer-item .tertiary-heading,
.site-footer .footer-item .contact-value { color: var(--text-on-dark-muted) !important; }
.site-footer .footer-item h1,
.site-footer .footer-item h2,
.site-footer .footer-item h3,
.site-footer .footer-item h4,
.site-footer .footer-item .primary-heading,
.site-footer .footer-item .secondry-heading { color: var(--text-on-dark) !important; }
.site-footer .footer-item a:hover { color: var(--text-on-dark); }

/* ── Listings and detail pages ── */
.car-ad-text,
.card-ad-details-wrap,
.vehicle-content { color: var(--text-default); }
.car-ad-text h1,
.car-ad-text h2,
.car-ad-text h3,
.card-ad-details-card-title,
.vehicle-title h3 { color: var(--text-strong); }
.car-ad-text p,
.card-ad-price-text,
.range-sub-text,
.vehicle-title p,
.vehicle-specs { color: var(--text-muted); }
.card-ad-price-text,
.vehicle-price { color: var(--brand-primary); }
.car-ad-card a,
.card-ad-btn,
.car-submit-button,
.submit-button,
.open-modal-trigger { color: var(--brand-primary-foreground); background-color: var(--brand-primary); border-color: var(--brand-primary); }
.card-ad-btn:hover,
.car-submit-button:hover,
.submit-button:hover,
.open-modal-trigger:hover { background-color: var(--state-hover); }

/* ── Inputs, forms and feedback ── */
.form-wrapper,
.form-block-2,
.form-4,
.form-5,
.form-6,
.contact-field,
.contact-field-area,
.car-text-field,
.text-field,
.w-input { color: var(--text-default); background-color: var(--surface-card); border-color: var(--border-subtle); }
.form-wrapper label,
.form-4 label,
.form-5 label,
.form-6 label,
.filter-form-label,
.checkbox-heading { color: var(--text-default); }
.contact-lead-error,
.inspection-lead-error { color: var(--feedback-error); }

/* Runtime-generated testimonials and 360° viewer use inline styles for
 * sizing/layout. Only their colour properties are redirected here. */
.steer-testimonial-card { background-color: var(--surface-card) !important; border-color: var(--border-subtle) !important; color: var(--text-default) !important; }
.steer-testimonial-rating { color: var(--brand-accent) !important; }
.steer-testimonial-card blockquote { color: var(--text-default) !important; }
.steer-testimonial-name { color: var(--text-strong) !important; }
.steer-testimonial-role { color: var(--text-muted) !important; }
.three-sixty-section,
.three-sixty-section .panel { background-color: var(--surface-card); color: var(--text-default); border-color: var(--border-subtle); }
.three-sixty__tab { border-color: var(--brand-primary) !important; color: var(--brand-primary) !important; background-color: var(--surface-card) !important; }
.three-sixty__tab.is-active { background-color: var(--brand-primary) !important; color: var(--brand-primary-foreground) !important; }
.three-sixty__stage { background-color: var(--surface-page) !important; }

/* Runtime booking modal: preserve its inline spacing but make its visual
 * system follow the selected light/dark palette. */
#steer-booking-lead-modal { background-color: var(--surface-card) !important; color: var(--text-default) !important; border-color: var(--border-subtle) !important; }
#steer-booking-lead-modal h2 { color: var(--text-strong) !important; }
#steer-booking-lead-modal p,
#steer-booking-lead-modal label { color: var(--text-default); }
#steer-booking-lead-modal input,
#steer-booking-lead-modal select,
#steer-booking-lead-modal textarea { background-color: var(--surface-page) !important; color: var(--text-default) !important; border-color: var(--border-subtle) !important; }
#steer-booking-lead-modal button[type="submit"],
#steer-booking-lead-modal [data-steer-booking-slots-link] { background-color: var(--brand-primary) !important; color: var(--brand-primary-foreground) !important; }

/* ── Vehicle cards (listings and homepage inventory) ── */
.vehicle-content { color: var(--text-default); }
.vehicle-title h3 { color: var(--text-strong); }
.vehicle-title p { color: var(--text-muted); }
.vehicle-price { color: var(--brand-primary); }
.vehicle-specs { color: var(--text-muted); }
.vehicle-specs span { color: inherit; }

/* ── Homepage statistics ── */
.stat {
  background-color: var(--surface-card);
  color: var(--text-default);
  border-color: var(--border-subtle);
}
.stat strong { color: var(--brand-primary); }
.stat span { color: var(--text-muted); }

/* ── Homepage split call-to-action cards ── */
.split-card {
  background-color: var(--surface-card);
  color: var(--text-default);
}
.split-card h2 { color: var(--text-strong); }
.split-card p:not(.eyebrow) { color: var(--text-muted); }
.split-card.sell {
  background-color: var(--brand-primary);
  color: var(--brand-primary-foreground);
}
.split-card.sell h2,
.split-card.sell p:not(.eyebrow) { color: var(--brand-primary-foreground); }

/* ── Navbar (template uses .navbar-new / .navlink-new / .custom-btn, NOT .nav-link) ── */
.navbar-new {
  background-color: var(--surface-page);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 200ms ease, border-color 200ms ease;
}
.navlink-new {
  color: var(--text-default);
  transition: color 200ms ease;
}
.navlink-new:hover,
.navlink-new.w--current {
  color: var(--brand-primary);
}
.custom-btn {
  background-color: var(--brand-accent);
  color: var(--brand-accent-foreground);
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.custom-btn:hover { color: var(--brand-accent-foreground); }
.cta-button-title { color: inherit; }
/* Mobile slide-out menu adopts the surface so links stay readable */
@media (max-width: 991px) {
  .nav-menu-2 { background-color: var(--surface-page); }
}

.dark-footer, .dark-bottom-footer { background-color: var(--surface-footer); color: var(--text-on-dark); }
.section.dark .dark-footer, .section.dark-footer .dark-bottom-footer { background-color: var(--surface-footer); }
.dark-footer-title, .dark-footer-link { color: var(--text-on-dark); }
.bottom-footer-paragraph, .bottom-footer-link { color: var(--text-on-dark-muted); }
.bottom-footer-paragraph.dark, .bottom-footer-link.dark { color: var(--text-on-dark-muted); }
/* Legacy footer (different class set than dark-footer) */
.footer { background-color: var(--surface-footer); color: var(--text-on-dark-muted); }
.footer-title { color: var(--text-on-dark); }
.footer-link { color: var(--text-on-dark-muted); }
.footer-link:hover { color: var(--text-on-dark); }

.card, .small-price-block, .feature-card { background-color: var(--surface-card); color: var(--text-default); }
.elevated, .modal { background-color: var(--surface-elevated); }

input, textarea, select, .dark-field, .text-field, .w-input {
  background-color: var(--surface-card);
  color: var(--text-default);
  border-color: var(--border-subtle);
}
input:focus, textarea:focus, select:focus, .dark-field:focus, .text-field:focus, .w-input:focus {
  border-color: var(--brand-primary);
  outline: 2px solid var(--state-focus-ring);
  outline-offset: 1px;
}

.alert-error, .error { color: var(--feedback-error); }
.alert-success, .success { color: var(--feedback-success); }

/* ── Dark-mode scoped overrides ──
 * These mirror the rules above but with higher specificity, beating any
 * stray hardcoded values in the Webflow stylesheet on a dark theme. */
[data-theme="dark"] .navbar-new {
  background-color: var(--surface-page);
  border-bottom-color: var(--border-subtle);
}
[data-theme="dark"] .navlink-new { color: var(--text-default); }
[data-theme="dark"] .navlink-new:hover,
[data-theme="dark"] .navlink-new.w--current { color: var(--brand-accent); }
[data-theme="dark"] .custom-btn { background-color: var(--brand-accent); color: var(--brand-accent-foreground); }
[data-theme="dark"] .nav-menu-2 { background-color: var(--surface-page); }
[data-theme="dark"] .nav-link { color: var(--text-default); }
[data-theme="dark"] .nav-link:hover { background-color: var(--surface-card); color: var(--text-strong); }
[data-theme="dark"] .small-price-block { background-color: var(--surface-card); border-color: var(--border-subtle); }
[data-theme="dark"] body, [data-theme="dark"] .section { color: var(--text-default); }
[data-theme="dark"] .footer { background-color: var(--surface-footer); color: var(--text-on-dark-muted); }
[data-theme="dark"] .footer-title { color: var(--text-on-dark); }
[data-theme="dark"] .footer-link { color: var(--text-on-dark-muted); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .navbar-new {
    background-color: var(--surface-page);
    border-bottom-color: var(--border-subtle);
  }
  :root:not([data-theme="light"]) .navlink-new { color: var(--text-default); }
  :root:not([data-theme="light"]) .navlink-new:hover,
  :root:not([data-theme="light"]) .navlink-new.w--current { color: var(--brand-accent); }
  :root:not([data-theme="light"]) .custom-btn { background-color: var(--brand-accent); color: var(--brand-accent-foreground); }
  :root:not([data-theme="light"]) .nav-menu-2 { background-color: var(--surface-page); }
  :root:not([data-theme="light"]) .nav-link { color: var(--text-default); }
  :root:not([data-theme="light"]) .nav-link:hover { background-color: var(--surface-card); color: var(--text-strong); }
  :root:not([data-theme="light"]) .small-price-block { background-color: var(--surface-card); border-color: var(--border-subtle); }
  :root:not([data-theme="light"]) .footer { background-color: var(--surface-footer); color: var(--text-on-dark-muted); }
  :root:not([data-theme="light"]) .footer-title { color: var(--text-on-dark); }
  :root:not([data-theme="light"]) .footer-link { color: var(--text-on-dark-muted); }
}
