/* ==========================================================================
   Dealerweb — Shared stylesheet for all header blocks
   --------------------------------------------------------------------------
   THEMES: set one class on <body> (or any wrapper):
     .theme-white     -> white          (light, default)
     .theme-platinum  -> platinum grey  (light; white panels, silver base)
     .theme-black     -> pure black
     .theme-slate     -> slate blue-grey (dark)
     .theme-midnight  -> deep navy blue  (dark)
     .theme-carbon    -> carbon-fibre black (dark; woven texture)
     .theme-custom    -> customisable (defaults to black; override --dw-custom-*)
   Primary colour is BLUE across every theme. Change the --primary tokens
   inside a theme to rebrand it.
   ========================================================================== */
/* ---- LIGHT THEME -------------------------------------------------------- */

/* Light theme — pure monochrome: white base, black text, neutral greys.
   Primary is black (Tailwind neutral scale is hueless). */
:root,
.theme-white {
  --bg:#f7f6f5;              /* neutral-100 */
  --bg-elevated:#ffffff;     /* white       */
  --bg-subtle:#f8f8f8;       /* neutral-200 */

  --text:#171717;            /* neutral-900 */
  --text-muted:#737373;      /* neutral-500 */
  --border:#e5e5e5;          /* neutral-200 */

  --primary:#000000;         /* black       */
  --primary-hover:#404040;   /* neutral-700 */
  --primary-soft:#e5e5e5;    /* neutral-200 */
  --primary-contrast:#ffffff;/* white       */

  --topbar-bg:#171717;       /* neutral-900 */
  --topbar-text:#fafafa;     /* neutral-50  */

  --nav-highlight:rgba(0,0,0,.06);   /* black @ 6% */
}

/* ---- PLATINUM THEME ----------------------------------------------------- */

/* Platinum theme — light, same as white but with the base threshold dropped to
   a soft platinum grey (#e5e4e2). Panels stay near-white so content still reads
   like the white theme; only the body/background tone shifts. Primary is black. */
.theme-platinum {
  --bg:#e5e4e2;              /* platinum        */
  --bg-elevated:#f4f3f2;     /* near-white panel */
  --bg-subtle:#dcdbd9;       /* platinum-200    */

  --text:#171717;            /* neutral-900 */
  --text-muted:#6e6e6e;      /* neutral-500 */
  --border:#cecdcb;          /* platinum-300 */

  --primary:#000000;         /* black       */
  --primary-hover:#404040;   /* neutral-700 */
  --primary-soft:#d4d3d1;    /* platinum-250 */
  --primary-contrast:#ffffff;/* white       */

  --topbar-bg:#171717;       /* neutral-900 */
  --topbar-text:#fafafa;     /* neutral-50  */

  --nav-highlight:rgba(0,0,0,.06);   /* black @ 6% */
}

/* ---- DARK THEME --------------------------------------------------------- */

/* Dark theme — pure monochrome: black base, white text, neutral greys.
   Primary is white. */
.theme-black {
  --bg:#000000;              /* black       */
  --bg-elevated:#171717;     /* neutral-900 */
  --bg-subtle:#0a0a0a;       /* neutral-950 */

  --text:#ffffff;            /* white       */
  --text-muted:#a3a3a3;      /* neutral-400 */
  --border:#262626;          /* neutral-800 */

  --primary:#ffffff;         /* white       */
  --primary-hover:#d4d4d4;   /* neutral-300 */
  --primary-soft:rgba(255,255,255,.12);  /* white @ 12% */
  --primary-contrast:#000000;/* black       */

  --topbar-bg:#0a0a0a;       /* neutral-950 */
  --topbar-text:#d4d4d4;     /* neutral-300 */

  --nav-highlight:rgba(255,255,255,.045);  /* white @ 4.5% */
}

.theme-black .dw-header,
.theme-black .dw-services-why-choose-us,
.theme-black .dw-services-centered,
.theme-black .dw-cta-split,
.theme-black .dw-cta-horizontal,
.theme-black .dw-cta-centered {
    background:#111111;
}

/* ---- SLATE THEME -------------------------------------------------------- */

/* Slate theme — dark, blue-grey (Tailwind slate scale). Same structure as the
   black theme but with a slate hue instead of neutral. Primary is light slate. */
.theme-slate {
  --bg:#0f172a;              /* slate-900   */
  --bg-elevated:#1e293b;     /* slate-800   */
  --bg-subtle:#020617;       /* slate-950   */

  --text:#f8fafc;            /* slate-50    */
  --text-muted:#94a3b8;      /* slate-400   */
  --border:#334155;          /* slate-700   */

  --primary:#e2e8f0;         /* slate-200   */
  --primary-hover:#f8fafc;   /* slate-50    */
  --primary-soft:rgba(226,232,240,.12);  /* slate-200 @ 12% */
  --primary-contrast:#0f172a;/* slate-900   */

  --topbar-bg:#020617;       /* slate-950   */
  --topbar-text:#cbd5e1;     /* slate-300   */

  --nav-highlight:rgba(255,255,255,.045);  /* white @ 4.5% */
}

.theme-slate .dw-header,
.theme-slate .dw-services-why-choose-us,
.theme-slate .dw-services-centered,
.theme-slate .dw-cta-split,
.theme-slate .dw-cta-horizontal,
.theme-slate .dw-cta-centered {
    background:#172033;
}

/* ---- MIDNIGHT THEME ----------------------------------------------------- */

/* Midnight theme — dark, deep navy blue. Same structure as the black/slate
   themes but with a deeper midnight-navy base. Primary is light. */
.theme-midnight {
  --bg:#0a0f1f;              /* midnight navy   */
  --bg-elevated:#111a2e;     /* navy panel      */
  --bg-subtle:#05070f;       /* near-black navy */

  --text:#f8fafc;            /* slate-50        */
  --text-muted:#8b96ab;      /* muted slate     */
  --border:#1c2740;          /* navy border     */

  --primary:#e5eaf2;         /* light slate     */
  --primary-hover:#ffffff;   /* white           */
  --primary-soft:rgba(229,234,242,.12);  /* light slate @ 12% */
  --primary-contrast:#0a0f1f;/* midnight navy   */

  --topbar-bg:#05070f;       /* near-black navy */
  --topbar-text:#c7cfdd;     /* light navy grey */

  --nav-highlight:rgba(255,255,255,.045);  /* white @ 4.5% */
}

.theme-midnight .dw-header,
.theme-midnight .dw-services-why-choose-us,
.theme-midnight .dw-services-centered,
.theme-midnight .dw-cta-split,
.theme-midnight .dw-cta-horizontal,
.theme-midnight .dw-cta-centered {
    background:#0f1729;
}

/* ---- CARBON THEME ------------------------------------------------------- */

/* Carbon theme — dark, near-black with a carbon-fibre woven texture on the body
   background (see the body.theme-carbon override below the Base section). The
   colour tokens mirror the black theme so panels/cards stay solid and readable;
   the weave only shows through the body/hero gaps. Primary is white. */
.theme-carbon {
  --bg:#131313;              /* carbon base */
  --bg-elevated:#1c1c1c;     /* panel       */
  --bg-subtle:#0a0a0a;       /* deep        */

  --text:#ffffff;            /* white       */
  --text-muted:#a3a3a3;      /* neutral-400 */
  --border:#2a2a2a;          /* neutral-800 */

  --primary:#ffffff;         /* white       */
  --primary-hover:#d4d4d4;   /* neutral-300 */
  --primary-soft:rgba(255,255,255,.12);  /* white @ 12% */
  --primary-contrast:#000000;/* black       */

  --topbar-bg:#0a0a0a;       /* neutral-950 */
  --topbar-text:#d4d4d4;     /* neutral-300 */

  --nav-highlight:rgba(255,255,255,.045);  /* white @ 4.5% */
}

.theme-carbon .dw-header,
.theme-carbon .dw-services-why-choose-us,
.theme-carbon .dw-services-centered,
.theme-carbon .dw-cta-split,
.theme-carbon .dw-cta-horizontal,
.theme-carbon .dw-cta-centered {
    background:#141414;
}

/* ---- CUSTOM THEME ------------------------------------------------------- */

/* Custom theme — every token defaults to the black theme, but each one reads
   from an overridable --dw-custom-* variable first. Set those variables inline
   on <body> (from the CRM) to recolour the site without touching this file;
   leave them unset and it's identical to the black theme. */
.theme-custom {
  --bg:            var(--dw-custom-bg,             #000000);
  --bg-elevated:   var(--dw-custom-bg-elevated,    #171717);
  --bg-subtle:     var(--dw-custom-bg-subtle,      #0a0a0a);

  --text:          var(--dw-custom-text,           #ffffff);
  --text-muted:    var(--dw-custom-text-muted,     #a3a3a3);
  --border:        var(--dw-custom-border,         #262626);

  --primary:          var(--dw-custom-primary,          #ffffff);
  --primary-hover:    var(--dw-custom-primary-hover,    #d4d4d4);
  --primary-soft:     var(--dw-custom-primary-soft,     rgba(255,255,255,.12));
  --primary-contrast: var(--dw-custom-primary-contrast, #000000);

  --topbar-bg:     var(--dw-custom-topbar-bg,      #0a0a0a);
  --topbar-text:   var(--dw-custom-topbar-text,    #d4d4d4);

  --nav-highlight: var(--dw-custom-nav-highlight,  rgba(255,255,255,.045));
}

.theme-custom .dw-header,
.theme-custom .dw-services-why-choose-us,
.theme-custom .dw-services-centered,
.theme-custom .dw-cta-split,
.theme-custom .dw-cta-horizontal,
.theme-custom .dw-cta-centered {
    background: var(--dw-custom-section, #111111);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-size: 95%; /* base body text reduced 5% */
  /* Body font comes from the account ($font) via --dw-font-body, set inline on
     <body> by includes/fonts.php. Unset = no web font = the system stack. */
  font-family: var(--dw-font-body, ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  /* Subtle vertical gradient (~3% spread) derived from the theme's --bg:
     ~1.5% lighter at the top, ~1.5% darker at the bottom. Solid --bg stays
     as the fallback for browsers without color-mix support. */
  background-color: var(--bg);
  background-image: linear-gradient(180deg,
      color-mix(in srgb, var(--bg) 98.5%, #fff),
      color-mix(in srgb, var(--bg) 98.5%, #000));
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation; /* disable double-tap-to-zoom on touch devices */
}

/* Carbon theme — replace the flat gradient with a woven carbon-fibre pattern.
   The theme class lives on <body>, so body.theme-carbon overrides the rule
   above. Layered diagonal gradients form the twill weave; kept fixed so it
   stays put on scroll. */
body.theme-carbon {
  background-color: #0a0a0a;
  background-image:
    linear-gradient(27deg,  #0d0d0d 5px, transparent 5px),
    linear-gradient(207deg, #0d0d0d 5px, transparent 5px),
    linear-gradient(27deg,  #111111 5px, transparent 5px),
    linear-gradient(207deg, #111111 5px, transparent 5px),
    linear-gradient(90deg,  #0e0e0e 10px, transparent 10px),
    linear-gradient(#0f0f0f 25%, #0d0d0d 25%, #0d0d0d 50%, transparent 50%, transparent 75%, #121212 75%, #121212);
  background-size: 20px 20px;
  background-position: 0 5px, 10px 0, 0 10px, 10px 5px, 0 0, 0 0;
  background-attachment: fixed;
}
a { text-decoration: none; color: inherit; }

/* Heading font comes from the account ($fontHead) via --dw-font-head, set
   inline on <body> by includes/fonts.php. Unset = inherit the body font, so the
   historical default (one font for everything) is preserved. */
h1, h2, h3, h4 { font-family: var(--dw-font-head, inherit); }

/* Menu font comes from the account ($fontMenu) via --dw-font-menu, set inline on
   <body> by includes/fonts.php. Applied to nav elements and their links. Unset =
   inherit the body font, so the historical default (one font for everything) is
   preserved. */
nav, .dw-nav-link {
  font-family: var(--dw-font-menu, inherit);
  letter-spacing: var(--dw-font-menu-spacing, normal);
}

/* Helper tokens */
.dw-header     { background: var(--bg-elevated); color: var(--text); }
/* Subtle drop shadow on the whole header element (~1% opacity). */
header { box-shadow: 0 6px 20px rgba(0, 0, 0, .01); }
/* When a hero (image/slider/video) sits directly below, let the header cast a
   soft drop shadow down onto it. */
body.dw-has-hero .dw-header { position: relative; z-index: 20; box-shadow: 0 14px 24px -8px rgba(0, 0, 0, .125); }

/* Custom header background (config: $headerBackground). Overrides the header bg
   with --dw-header-bg and recolours the text/links with the auto-contrasted
   --dw-header-text (both set inline on <body>). The bottom border is dropped.
   Placed before the overlay-mode rules so a floating overlay header still wins. */
body.dw-header-custom .dw-header {
  background: var(--dw-header-bg);
  color: var(--dw-header-text);
  border-bottom: 0;
}
body.dw-header-custom .dw-header.dw-border-b { border-bottom: 0; }
body.dw-header-custom .dw-desktop-nav { border-top-color: var(--dw-header-border) !important; }
body.dw-header-custom .dw-header .dw-nav-link,
body.dw-header-custom .dw-header .dw-nav-link:hover,
body.dw-header-custom .dw-header .dw-logo-mark,
body.dw-header-custom .dw-header .dw-social,
body.dw-header-custom .dw-header .dw-cta-text,
body.dw-header-custom .dw-header .dw-cta-sub,
body.dw-header-custom .dw-header .dw-icon-cta,
body.dw-header-custom .dw-header .dw-icon-whatsapp,
body.dw-header-custom .dw-burger { color: var(--dw-header-text); }
body.dw-header-custom .dw-burger-bar { background: var(--dw-header-text); }
/* The sliding highlight is the only pill; the active item keeps its text colour
   with no background of its own (avoids a doubled pill under the highlight). */
body.dw-header-custom .dw-nav-highlight { background: var(--dw-header-highlight); }
body.dw-header-custom .dw-header .dw-nav-link.is-active,
body.dw-header-custom .dw-header .dw-nav-link.underline-hover.is-active {
  color: var(--dw-header-text);
  background: transparent;
  box-shadow: none;
}
/* Heritage phone pill is a transparent outline button — follows the contrasted
   header colour for its text and border. */
body.dw-header-custom .dw-header .dw-header-tel,
body.dw-header-custom .dw-header .dw-header-tel:hover {
  color: var(--dw-header-text);
  border-color: var(--dw-header-text);
}
body.dw-header-custom .dw-header .dw-header-tel:hover { background: var(--dw-header-highlight); }
/* Mobile menu on a custom header: item hover, row dividers and the makes-menu
   tiles use translucent tints of the contrasted header colour (the defaults use
   light --bg-subtle / dark rgba borders, which vanish on a dark header). */
body.dw-header-custom [data-menu] .dw-nav-link { border-bottom-color: var(--dw-header-border) !important; }
body.dw-header-custom [data-menu] .dw-nav-link:hover {
  color: var(--dw-header-text);
  background: var(--dw-header-highlight);
}
body.dw-header-custom .dw-makes-mobile .dw-make:not(.dw-make--all) {
  background: transparent;
  border-color: var(--dw-header-border);
}

.dw-surface    { background: var(--bg-elevated); }
.dw-subtle     { background: var(--bg-subtle); }
.dw-border     { border-color: var(--border); }
.dw-border-b   { border-bottom: 1px solid var(--border); }
.dw-text       { color: var(--text); }
.dw-text-muted { color: var(--text-muted); }
.dw-logo-mark  { color: var(--primary); }
/* Uploaded logo image ($templateLogoPath) — fit within the header height. */
/* Height comes from config.php ($logoHeight, applied inline on the img). */
.dw-logo-img { width: auto; max-width: 344px; margin: .4025rem 0; object-fit: contain; display: block; }
@media (max-width: 767px) { .dw-logo-img { max-width: 200px; } }

/* --------------------------------------------------------------------------
   Homepage hero (templates/blocks/hero/: image | slider | video)
   -------------------------------------------------------------------------- */
.dw-hero {
  position: relative; width: 100%; min-height: 60vh; overflow: hidden;
  background: var(--bg-subtle);
}
@media (max-width: 767px) { .dw-hero { min-height: 50vh; } }
/* Media (img / video) fills the hero, cropping to cover. */
.dw-hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Dark overlay — opacity set inline from $homepageHeroOpacity. */
.dw-hero-overlay { position: absolute; inset: 0; background: #000; pointer-events: none; z-index: 1; }

/* --------------------------------------------------------------------------
   Optional hero bottom shape dividers (modifier classes on .dw-hero).
   A pseudo-element band at the hero's bottom edge, filled with the next
   section's background colour and clipped/masked into the chosen shape. The
   base (straight) hero has no ::after, so it's fully backwards compatible.
   The image keeps covering the hero (the divider only paints the bottom strip)
   and text/buttons/arrows sit above it (z-index 2/3 > 1). Override the colour to
   match the section that follows via --dw-hero-divider-color.
   -------------------------------------------------------------------------- */
/* Height token on the element. Angled uses a taller band for a steeper slope. */
.dw-hero--divider-angled,
.dw-hero--divider-chevron,
.dw-hero--divider-diamond,
.dw-hero--divider-wave,
.dw-hero--divider-eclipse {
  --dw-hero-divider-h: 64px;
}
.dw-hero--divider-angled { --dw-hero-divider-h: 120px; }
@media (max-width: 767px) {
  .dw-hero--divider-angled,
  .dw-hero--divider-chevron,
  .dw-hero--divider-diamond,
  .dw-hero--divider-wave,
  .dw-hero--divider-eclipse { --dw-hero-divider-h: 38px; }
  .dw-hero--divider-angled { --dw-hero-divider-h: 60px; }
}
/* Divider fill — a band at the hero bottom in the next section's colour. */
.dw-hero--divider-angled::after,
.dw-hero--divider-chevron::after,
.dw-hero--divider-diamond::after,
.dw-hero--divider-wave::after,
.dw-hero--divider-eclipse::after {
  content: ""; position: absolute; left: -1px; right: -1px; bottom: -1px;
  height: var(--dw-hero-divider-h);
  background: var(--dw-hero-divider-color, var(--bg));
  z-index: 1; pointer-events: none;
}
/* Shapes (clip-path fill anchored to the bottom edge). */
.dw-hero--divider-angled::after  { clip-path: polygon(0 100%, 100% 0, 100% 100%); }
/* Diamond point — the hero image comes to a clean downward point at the centre
   (colour fills the two sides). */
.dw-hero--divider-diamond::after { clip-path: polygon(0 100%, 0 0, 50% 100%, 100% 0, 100% 100%); }
.dw-hero--divider-chevron::after { clip-path: polygon(0 100%, 0 0, 50% 78%, 100% 0, 100% 100%); }
/* Smooth wave — SVG mask keeps the colour driven by the CSS variable. */
.dw-hero--divider-wave::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,90 350,0 600,40 C850,80 1050,10 1200,40 L1200,100 L0,100 Z' fill='%23000'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,40 C150,90 350,0 600,40 C850,80 1050,10 1200,40 L1200,100 L0,100 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* Eclipse — a single smooth circular arc that dips to a concave curve at the
   centre (colour rises at the edges). */
.dw-hero--divider-eclipse::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L0,6 Q600,150 1200,6 L1200,100 Z' fill='%23000'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 100' preserveAspectRatio='none'%3E%3Cpath d='M0,100 L0,6 Q600,150 1200,6 L1200,100 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* Slider: stack slides and cross-fade the active one. */
.dw-hero-slide { opacity: 0; transition: opacity .8s ease; z-index: 0; }
.dw-hero-slide.is-active { opacity: 1; z-index: 1; }

/* Slider next arrow — pinned to the bottom-right corner, square, hover uses the
   colour scheme. */
.dw-hero-nav {
  position: absolute; right: 0; bottom: 0; z-index: 3;
  display: flex;
}
.dw-hero-arrow {
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 0;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  position: relative; background: transparent; color: #fff;
  transition: opacity .2s ease;
}
.dw-hero-arrow:hover { opacity: .7; }
.dw-hero-arrow svg { width: 20px; height: 20px; }
/* Thin white divider between the pause and next controls. */
.dw-hero-nav .dw-hero-arrow + .dw-hero-arrow::before {
  content: ""; position: absolute; left: 0; top: 25%; height: 50%; width: 1px;
  background: rgba(255, 255, 255, .5);
}
.dw-hero-arrow .dw-hero-ico-play { display: none; }
.dw-hero-arrow.is-paused .dw-hero-ico-pause { display: none; }
.dw-hero-arrow.is-paused .dw-hero-ico-play { display: inline; }
/* Mobile: smaller arrow (still bottom-right corner). */
@media (max-width: 767px) {
  .dw-hero-arrow { width: 36px; height: 36px; }
  .dw-hero-arrow svg { width: 16px; height: 16px; }
}

/* Hero text overlay. Sits above the media + dark overlay; position comes from
   $homepageHeroTextPosition (none = not rendered at all). The container ignores
   pointer events so only the inner block (and its buttons) are interactive. */
.dw-hero-text {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none; color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
/* Independently-positioned layer. The text (eyebrow + title) and the links
   (filter / CTA buttons) each get their own __pos block so they can sit in
   different corners — see $homepageHeroTextPosition / $homepageHeroLinksPosition. */
.dw-hero-text__pos {
  position: absolute; inset: 0;
  display: flex; padding: clamp(1.5rem, 5vw, 4rem);
  pointer-events: none;
}
.dw-hero-text__inner { max-width: 42rem; pointer-events: auto; }
/* Slider: one text overlay per slide, cross-fading in sync with the images.
   Only the active overlay is visible and interactive. */
.dw-hero--slider .dw-hero-text { opacity: 0; transition: opacity .8s ease; }
.dw-hero--slider .dw-hero-text.is-active { opacity: 1; }
.dw-hero--slider .dw-hero-text:not(.is-active),
.dw-hero--slider .dw-hero-text:not(.is-active) .dw-hero-text__inner { pointer-events: none; }
.dw-hero-text__eyebrow {
  margin: 0 0 .75rem; font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 600; letter-spacing: .02em;
  opacity: .9;
}
/* Short accent dash below the eyebrow. */
.dw-hero-text__eyebrow::after {
  content: ""; display: block; margin-top: .5rem;
  width: 2.5rem; height: 3px; border-radius: 2px;
  background: var(--primary);
}
.dw-hero-text--center-center .dw-hero-text__eyebrow::after { margin-left: auto; margin-right: auto; }
.dw-hero-text__title {
  margin: 0 0 3rem; font-size: clamp(1.75rem, 5vw, 3.25rem);
  line-height: 1.1; font-weight: 800; text-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
/* Larger hero title on mobile; keep whole words intact (no mid-word breaks). */
@media (max-width: 767px) {
  .dw-hero-text__title {
    font-size: 2.126rem;
    overflow-wrap: normal; word-break: normal; hyphens: none;
  }
}
.dw-hero-text__cta { display: flex; flex-wrap: wrap; gap: .75rem; }
/* Buttons shouldn't inherit the hero text-shadow. */
.dw-hero-text .dw-btn { text-shadow: none; }
/* Taller hero CTAs: vertical padding bumped 20% (.625rem -> .75rem). */
.dw-hero-text .dw-btn-primary,
.dw-hero-text .dw-btn-outline { padding-top: .75rem; padding-bottom: .75rem; }
/* Arrow on the primary CTA, nudged right on hover. */
.dw-btn-arrow { width: 1.1em; height: 1.1em; flex: none; transition: transform .15s ease; }
.dw-btn-primary:hover .dw-btn-arrow { transform: translateX(3px); }
/* Outline button reads better as white over the image; on hover it fills white
   with dark text (a fixed dark so it stays readable on every theme). */
.dw-hero-text .dw-btn-outline { color: #fff; border-color: rgba(255, 255, 255, .7); background: transparent; }
.dw-hero-text .dw-btn-outline:hover { background: #fff; color: #111827; border-color: #fff; }

/* Combined layout — when the text and links share the same position
   ($homepageHeroTextPosition === $homepageHeroLinksPosition) they're emitted in a
   single stacked __pos block so they flow vertically instead of overlapping. The
   title's default 3rem bottom margin collapses into a controlled gap here. */
.dw-hero-text__pos--stacked .dw-hero-text__inner {
  display: flex; flex-direction: column; gap: 1.5rem;
}
.dw-hero-text__pos--stacked .dw-hero-text__title { margin-bottom: 0; }

/* Position variants: vertical via align-items, horizontal via justify + text-align. */
.dw-hero-text--center-left   { align-items: center;    justify-content: flex-start; text-align: left; }
.dw-hero-text--bottom-left   { align-items: flex-end;  justify-content: flex-start; text-align: left; }
.dw-hero-text--bottom-right  { align-items: flex-end;  justify-content: flex-end;   text-align: right; }
.dw-hero-text--center-center { align-items: center;    justify-content: center;     text-align: center; }
.dw-hero-text--center-center .dw-hero-text__cta { justify-content: center; }
.dw-hero-text--bottom-right  .dw-hero-text__cta { justify-content: flex-end; }

/* Subtle staggered fade-up on page load. */
.dw-hero-text__eyebrow,
.dw-hero-text__title,
.dw-hero-text__cta { animation: dw-hero-fade .7s ease both; }
.dw-hero-text__title { animation-delay: .12s; }
.dw-hero-text__cta   { animation-delay: .24s; }
@keyframes dw-hero-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-hero-text__eyebrow,
  .dw-hero-text__title,
  .dw-hero-text__cta,
  .dw-hero-filter { animation: none; }
}

/* Hero search bar ($homepageHeroCta = 'filter') — Make / Model / Budget selects
   in a --bg card that replaces the CTA buttons. Its own light surface, so text
   drops the hero's white colour + shadow. */
.dw-hero-filter {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem;
  width: 100%; max-width: 46rem; padding: 1rem;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  color: var(--text); text-shadow: none;
  border: 1px solid var(--border);
  border-radius: var(--dw-btn-radius, .5rem);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
  animation: dw-hero-fade .7s ease both; animation-delay: .24s;
}
.dw-hero-filter__field { flex: 1 1 10rem; min-width: 0; display: flex; }
.dw-hero-filter__select {
  width: 100%; padding: .75rem 2.25rem .75rem .9rem;
  font: inherit; font-size: .95rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--dw-btn-radius, .5rem);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  /* Chevron drawn with the muted text colour. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .8rem center;
}
.dw-hero-filter__select:focus-visible { outline: 2px solid var(--primary); outline-offset: -1px; }
.dw-hero-filter__select:disabled { opacity: .55; cursor: not-allowed; }
.dw-hero-filter__search {
  flex: 0 0 auto; padding: .75rem 1.75rem;
  font: inherit; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--primary-contrast, #fff); background: var(--primary);
  border: 1px solid var(--primary); border-radius: var(--dw-btn-radius, .5rem);
  cursor: pointer; transition: filter .15s ease;
}
.dw-hero-filter__search:hover { filter: brightness(1.05); }
.dw-hero-filter__search:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* Stack the fields on narrow screens (search goes full-width at the bottom). */
@media (max-width: 640px) {
  .dw-hero-filter { flex-direction: column; }
  .dw-hero-filter__field { flex: 1 1 auto; }
  .dw-hero-filter__search { width: 100%; }
}

/* Layout heights ($homepageHeroLayout) — fixed variants (+20%). */
.dw-hero.hero-min-fixed { min-height: 360px; height: 360px; }
.dw-hero.hero-med-fixed { min-height: 552px; height: 552px; }
.dw-hero.hero-max-fixed { min-height: 720px; height: 720px; }
@media (max-width: 767px) {
  .dw-hero.hero-min-fixed { height: 288px; min-height: 288px; }
  .dw-hero.hero-med-fixed { height: 360px; min-height: 360px; }
  .dw-hero.hero-max-fixed { height: 504px; min-height: 504px; }
}
/* Hero search filter on mobile — fill the viewport so the Make / Model / Budget
   bar sits on a full-screen hero. Keyed off the filter being present (:has), so
   no PHP flag is needed; the fixed-height variants are listed to beat them on
   specificity. svh keeps it stable against the mobile address bar (vh fallback). */
@media (max-width: 767px) {
  .dw-hero:has(.dw-hero-filter),
  .dw-hero.hero-min-fixed:has(.dw-hero-filter),
  .dw-hero.hero-med-fixed:has(.dw-hero-filter),
  .dw-hero.hero-max-fixed:has(.dw-hero-filter) {
    height: 80vh; min-height: 80vh;
    height: 80svh; min-height: 80svh;
  }
}

/* Optional gap around fixed hero layouts (config.php $heroFixedGap = true).
   1.5rem inset (matches the profile blocks); width:auto keeps the side margins
   from overflowing. */
.dw-hero--gap {
  width: auto;
  margin: 1.5rem;
  border-radius: 0.5rem; /* matches the 'smooth' button scheme */
}

/* Services strip (templates/blocks/services/why-choose-us.php) — below the hero.
   Icon circles use the branding colour; section follows the theme background. */
/* Pulled up tight under the hero so the two read as one block. */
.dw-services-why-choose-us { background: var(--bg); padding: 1.5rem 1.5rem; }
.dw-services-why-choose-us__heading {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-services-why-choose-us__subheading {
  margin: 0 0 2rem; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-services-why-choose-us__grid {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
/* Icon centred above the title. */
.dw-services-why-choose-us__item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem;
}
.dw-services-why-choose-us__title {
  margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text);
}
.dw-services-why-choose-us__icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 3.5em; height: 3.5em; border-radius: .85em;
  background: var(--primary); color: var(--primary-contrast);
}
.dw-services-why-choose-us__icon svg { width: 2em; height: 2em; }
.dw-services-why-choose-us__icon i { font-size: 2em; line-height: 1; }
.dw-services-why-choose-us__desc { margin: 0; color: var(--text-muted); line-height: 1.5; text-wrap: pretty; }

/* 4 services: same inline icon + title, text centred beneath. */
.dw-services-why-choose-us--4 .dw-services-why-choose-us__item {
  align-items: center; text-align: center; gap: .7rem;
}
@media (max-width: 767px) {
  .dw-services-why-choose-us { padding: 1.5rem 1.25rem; }
}

/* Services block (templates/blocks/services/centered.php) — centred title and
   description above a bordered box holding a row of selected services. */
.dw-services-centered { background: var(--bg); padding: 3rem 1.5rem; }
.dw-services-centered__heading {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-services-centered__desc {
  margin: 0 auto 2rem; max-width: 60ch; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-services-centered__grid {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}
.dw-services-centered--no-border { border: 0; }
.dw-services-centered__item {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem;
}
.dw-services-centered__icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 3.5em; height: 3.5em; border-radius: .85em;
  background: var(--primary); color: var(--primary-contrast);
}
.dw-services-centered__icon i { font-size: 2em; line-height: 1; }
.dw-services-centered__name { font-weight: 600; color: var(--text); }
@media (max-width: 767px) {
  .dw-services-centered { padding: 2.5rem 1.25rem; }
}

/* Call-to-action band (templates/blocks/cta/split.php) — below the
   hero. Left column = tag pill + heading; right column = description + button. */
.dw-cta-split { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-split__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem;
  align-items: center;
}
.dw-cta-split__tag {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  border: 1px dashed var(--border); color: var(--text);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.dw-cta-split__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  /* ~10% lighter than body text (mixed toward the background). */
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-cta-split__desc {
  margin: 0 0 1.75rem; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
/* Vertical divider sitting in the gap between the two columns, with a soft
   shadow so it reads as a raised line. */
.dw-cta-split__body { position: relative; }
.dw-cta-split__body::before {
  content: ""; position: absolute; top: .25rem; bottom: .25rem; left: -2rem;
  width: 1px; background: var(--border);
}
.dw-cta-split__chevrons { width: 1.1em; height: 1.1em; }
@media (max-width: 767px) {
  .dw-cta-split { padding: 2.5rem 1.25rem; }
  .dw-cta-split__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .dw-cta-split__body::before { display: none; }
}

/* Call-to-action band (templates/blocks/cta/horizontal.php) — below the hero.
   Single row: left column = tag pill + heading + description stacked; right
   column = a single button, vertically centred against the text. */
.dw-cta-horizontal { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-horizontal__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 3rem;
  align-items: center;
}
.dw-cta-horizontal__tag {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  border: 1px dashed var(--border); color: var(--text);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.dw-cta-horizontal__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  /* ~10% lighter than body text (mixed toward the background). */
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-cta-horizontal__desc {
  margin: .85rem 0 0; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-cta-horizontal__btn { white-space: nowrap; }
.dw-cta-horizontal__chevrons { width: 1.1em; height: 1.1em; }
/* Vertical divider in the gap between the text and the button — spans the inner
   content height (the action cell stretches to match the text column). */
.dw-cta-horizontal__action {
  position: relative; align-self: stretch; display: flex; align-items: center;
}
.dw-cta-horizontal__action::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -1.5rem;
  width: 1px; background: var(--border);
}
@media (max-width: 767px) {
  .dw-cta-horizontal { padding: 2.5rem 1.25rem; }
  .dw-cta-horizontal__inner { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .dw-cta-horizontal__action::before { display: none; }
}

/* Call-to-action band (templates/blocks/cta/image.php) — below the hero.
   Two columns: left = tag pill + heading + description + button stacked;
   right = a single image. */
.dw-cta-image { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-image__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem;
  align-items: center;
}
.dw-cta-image__tag {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  border: 1px dashed var(--border); color: var(--text);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.dw-cta-image__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
/* Short divider below the heading (same border colour as the other CTAs). */
.dw-cta-image__divider {
  display: block; width: 3rem; height: 1px; margin: 1.25rem 0 0;
  background: var(--border);
}
.dw-cta-image__desc {
  margin: .85rem 0 1.75rem; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-cta-image__chevrons { width: 1.1em; height: 1.1em; }
.dw-cta-image__media { position: relative; align-self: stretch; }
.dw-cta-image__img {
  display: block; width: 100%; height: 100%; min-height: 18rem;
  object-fit: cover; border-radius: var(--dw-btn-radius, .5rem);
}
/* Dark overlay over the image (strength from the hero opacity option). */
.dw-cta-image__overlay {
  position: absolute; inset: 0; background: #000; pointer-events: none;
  border-radius: var(--dw-btn-radius, .5rem);
}
@media (max-width: 767px) {
  .dw-cta-image { padding: 2.5rem 1.25rem; }
  .dw-cta-image__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .dw-cta-image__media { order: -1; }
  .dw-cta-image__img { min-height: 12rem; }
}
/* Full-bleed (hero gap off): drop the inner padding, image fills the height. */
.dw-cta-image--flush .dw-cta-image__inner { padding: 0; overflow: hidden; }
.dw-cta-image--flush .dw-cta-image__content { padding: 2.5rem 2rem; }
.dw-cta-image--flush .dw-cta-image__img { height: 100%; border-radius: 0; }

/* Profile + opening hours (templates/blocks/profile/profile-opening-hours.php)
   — two-column card (mirrors cta/image.php): profile text left, opening hours
   right (styled like the classic footer). */
.dw-profile-hours { background: var(--bg); padding: 0 1.5rem 1.5rem; }
.dw-profile-hours__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; grid-template-columns: 2fr 1fr; gap: 2rem 3rem;
  align-items: center;
}
/* Single-column variant (profile.php — no opening hours): full-width, no grid. */
.dw-profile-hours--single .dw-profile-hours__inner { display: block; }
/* Borderless variant ($homepageProfileBorder = false). */
.dw-profile-hours--no-border .dw-profile-hours__inner { border: 0; }
/* Opening-hours column: centred and vertically aligned, divider on its left. */
.dw-profile-hours__aside {
  align-self: center; text-align: center;
  border-left: 1px solid var(--border); padding-left: 3rem;
}
.dw-profile-hours__hours { display: inline-block; text-align: left; }
/* Profile text: standard body text, clean margins and word breaks. */
.dw-profile-hours__text { overflow-wrap: break-word; }
.dw-profile-hours__text :where(p) { margin: 1rem 0; }
.dw-profile-hours__text :where(p):first-child { margin-top: 0; }
.dw-profile-hours__text :where(p):last-child { margin-bottom: 0; }
.dw-profile-hours__btn { margin-top: 2.25rem; }
.dw-profile-hours__heading {
  margin: 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-profile-hours__welcome {
  display: block; margin-bottom: .35rem;
  font-size: .5em; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted);
}
.dw-profile-hours__divider {
  display: block; width: 3rem; height: 1px; margin: 1.25rem 0; background: var(--border);
}
.dw-profile-hours__hours-title {
  margin: 0 0 1rem; font-size: 1.1rem; font-weight: 700; color: var(--text);
}
.dw-profile-hours__hours { list-style: none; margin: 0; padding: 0; }
.dw-profile-hours__hours li {
  display: flex; gap: 2.5rem; padding: .15rem 0; color: var(--text-muted);
}
.dw-profile-hours__day { flex: none; min-width: 7rem; }
.dw-profile-hours__time { flex: none; }
.dw-profile-hours__hours li.is-today { color: var(--primary); font-weight: 700; }
.dw-profile-hours__note { margin: 1.5rem 0 0; color: var(--text-muted); font-size: .9rem; }
/* Image variant (profile-image.php): equal two-column split, image fills its
   column. Reuses the cta/image.php photo source. */
.dw-profile-hours--image .dw-profile-hours__inner { grid-template-columns: 1fr 1fr; }
.dw-profile-hours__media { align-self: stretch; }
.dw-profile-hours__img {
  display: block; width: 100%; height: 100%; min-height: 18rem;
  object-fit: cover; border-radius: var(--dw-btn-radius, .5rem);
}
@media (max-width: 767px) {
  .dw-profile-hours { padding: 2.5rem 1.25rem; }
  .dw-profile-hours__inner { grid-template-columns: 1fr; gap: 2rem; }
  /* Hide the opening-hours column on mobile. */
  .dw-profile-hours__aside { display: none; }
  /* Image variant: keep the image, stacked below the text. */
  .dw-profile-hours--image .dw-profile-hours__inner { grid-template-columns: 1fr; }
  .dw-profile-hours__img { min-height: 12rem; }
}

/* Call-to-action band (templates/blocks/cta/video.php) — below the hero.
   Two columns: left = tag pill + heading + description + button stacked;
   right = a single looping video with a play/pause control. */
.dw-cta-video { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-video__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 4rem;
  align-items: center;
}
.dw-cta-video__tag {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  border: 1px dashed var(--border); color: var(--text);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.dw-cta-video__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
/* Short divider below the heading (same border colour as the other CTAs). */
.dw-cta-video__divider {
  display: block; width: 3rem; height: 1px; margin: 1.25rem 0 0;
  background: var(--border);
}
.dw-cta-video__desc {
  margin: .85rem 0 1.75rem; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-cta-video__chevrons { width: 1.1em; height: 1.1em; }
.dw-cta-video__media { position: relative; align-self: stretch; }
.dw-cta-video__vid {
  display: block; width: 100%; height: 100%; min-height: 18rem;
  object-fit: cover; border-radius: var(--dw-btn-radius, .5rem);
}
/* Dark overlay over the video (strength from the hero opacity option). */
.dw-cta-video__overlay {
  position: absolute; inset: 0; background: #000; pointer-events: none;
  border-radius: var(--dw-btn-radius, .5rem);
}
/* Play/pause control, bottom-left of the video. */
.dw-cta-video__toggle {
  position: absolute; left: .75rem; bottom: .75rem; z-index: 1;
  width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: rgba(0, 0, 0, .5); border: 0; border-radius: 999px; cursor: pointer;
  transition: background .15s ease;
}
.dw-cta-video__toggle:hover { background: rgba(0, 0, 0, .7); }
.dw-cta-video__toggle svg { width: 1.25rem; height: 1.25rem; }
/* Show pause while playing, play while paused. */
.dw-cta-video__ico-play { display: none; }
.dw-cta-video__media.is-paused .dw-cta-video__ico-play { display: block; }
.dw-cta-video__media.is-paused .dw-cta-video__ico-pause { display: none; }
@media (max-width: 767px) {
  .dw-cta-video { padding: 2.5rem 1.25rem; }
  .dw-cta-video__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .dw-cta-video__media { order: -1; }
  .dw-cta-video__vid { min-height: 12rem; }
}
/* Full-bleed (hero gap off): drop the inner padding, video fills the height. */
.dw-cta-video--flush .dw-cta-video__inner { padding: 0; overflow: hidden; }
.dw-cta-video--flush .dw-cta-video__content { padding: 2.5rem 2rem; }
.dw-cta-video--flush .dw-cta-video__vid { height: 100%; border-radius: 0; }

/* Call-to-action band (templates/blocks/cta/background.php) — below the hero.
   Full-width background image with a dark overlay and centred light text. */
.dw-cta-background { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-background__inner {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 auto; border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 5rem 2.5rem; min-height: 20rem;
  display: grid; grid-template-columns: 1fr; align-items: center; text-align: left;
}
.dw-cta-background__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: inherit;
}
/* Darker on the left (behind the text), fading lighter to the right. The inline
   opacity from the hero option scales the whole gradient. */
.dw-cta-background__overlay {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to right, #000 0%, rgba(0, 0, 0, .15) 100%);
  border-radius: inherit;
}
.dw-cta-background__content {
  max-width: 40rem;
  display: flex; flex-direction: column; align-items: flex-start;
}
.dw-cta-background__tag {
  display: inline-block; margin: 0 0 1.25rem; padding: .4rem 1rem; border-radius: 999px;
  color: #fff; font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  /* Default tint so the label is readable; overridden inline to 2x the overlay
     opacity when an overlay is set. */
  background: rgba(0, 0, 0, .35);
}
.dw-cta-background__heading {
  margin: 0; color: #fff;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
/* Short divider below the heading — translucent white for contrast on the image. */
.dw-cta-background__divider {
  display: block; width: 3rem; height: 1px; margin: 1.25rem 0 0;
  background: rgba(255, 255, 255, .5);
}
.dw-cta-background__desc {
  margin: 1.25rem 0 0; max-width: 46ch; color: rgba(255, 255, 255, .9);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.dw-cta-background__btn { margin-top: 2rem; white-space: nowrap; }
.dw-cta-background__chevrons { width: 1.1em; height: 1.1em; }
@media (max-width: 767px) {
  .dw-cta-background { padding: 2.5rem 1.25rem; }
  .dw-cta-background__inner { padding: 3rem 1.5rem; }
}

/* Call-to-action band (templates/blocks/cta/centered.php) — below the hero.
   One centred column: tag pill, heading, description and a single button, all
   centred. */
.dw-cta-centered { background: var(--bg); padding: 3rem 1.5rem; }
.dw-cta-centered__inner {
  margin: 0 auto; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.dw-cta-centered__tag {
  display: inline-block; padding: .4rem 1rem; border-radius: 999px;
  border: 1px dashed var(--border); color: var(--text);
  font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.dw-cta-centered__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(1.35rem, 2.7vw, 2.025rem); font-weight: 800; line-height: 1.1;
  /* ~10% lighter than body text (mixed toward the background). */
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
/* Short centred divider below the heading (same border colour as the other CTAs). */
.dw-cta-centered__divider {
  display: block; width: 3rem; height: 1px; margin: 1.25rem auto 0;
  background: var(--border);
}
.dw-cta-centered__desc {
  margin: .85rem auto 0; max-width: 60ch; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-cta-centered__btn { margin-top: 1.75rem; white-space: nowrap; }
.dw-cta-centered__chevrons { width: 1.1em; height: 1.1em; }
@media (max-width: 767px) {
  .dw-cta-centered { padding: 2.5rem 1.25rem; }
}

/* Shared: drop the inner-card border when $dwCtaBorder is false. */
.dw-cta--no-border { border: 0; }

/* Overlay variants — hero sits full-bleed behind a transparent header. */
.dw-hero.hero-med-overlay  { height: 600px; min-height: 600px; }
.dw-hero.hero-max-overlay  { height: 700px; min-height: 700px; }
.dw-hero.hero-full-overlay { height: 100vh; min-height: 100vh; }
@supports (height: 100svh) {
  .dw-hero.hero-full-overlay { height: 100svh; min-height: 100svh; }
}
@media (max-width: 767px) {
  .dw-hero.hero-med-overlay { height: 456px; min-height: 456px; }
  .dw-hero.hero-max-overlay { height: 520px; min-height: 520px; }
}
/* Overlay mode: the header floats transparently over the hero and the top bar
   is hidden, so the hero image shows behind the navigation. Light text for
   contrast against the (overlaid) image. */
body.dw-overlay-mode .dw-topbar { display: none; }
/* The whole header (normally sticky/in-flow) floats over the hero. Positioning
   the <header> element itself keeps every control clickable above the hero. */
body.dw-overlay-mode header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
}
body.dw-overlay-mode .dw-header {
  background: rgba(0, 0, 0, .1); border-bottom: 0; box-shadow: none; color: #fff;
}
/* Keep the hero (and its media) below the floating header. */
body.dw-overlay-mode .dw-hero { position: relative; z-index: 1; }
body.dw-overlay-mode .dw-desktop-nav { border-top-color: transparent !important; }
body.dw-overlay-mode .dw-header .dw-nav-link,
body.dw-overlay-mode .dw-header .dw-nav-link:hover,
body.dw-overlay-mode .dw-burger,
body.dw-overlay-mode .dw-burger:hover,
body.dw-overlay-mode .dw-header .dw-social,
body.dw-overlay-mode .dw-header .dw-icon-cta,
body.dw-overlay-mode .dw-header .dw-icon-whatsapp,
body.dw-overlay-mode .dw-header .dw-cta-text,
body.dw-overlay-mode .dw-header .dw-cta-text:hover,
body.dw-overlay-mode .dw-logo-mark { color: #fff; }
/* Secondary line (email under the phone) — slightly dimmed white to keep the
   hierarchy that --text-muted gives outside overlay mode. */
body.dw-overlay-mode .dw-header .dw-cta-sub,
body.dw-overlay-mode .dw-header .dw-cta-sub:hover { color: rgba(255, 255, 255, .85); }
body.dw-overlay-mode .dw-nav-highlight { background: rgba(255, 255, 255, .079); }
/* Active menu item over the hero: white text, no pill background. */
body.dw-overlay-mode .dw-header .dw-nav-link.is-active,
body.dw-overlay-mode .dw-header .dw-nav-link.underline-hover.is-active {
  color: #fff;
  background: transparent;
  box-shadow: none;
}

/* Overlay mode: the header floats over the hero with plain white controls, so
   the icon CTA action buttons (phone / email / WhatsApp) drop their solid
   backgrounds and render as plain icons, matching the burger — on desktop as
   well as mobile. */
body.dw-overlay-mode .dw-header .dw-icon-cta,
body.dw-overlay-mode .dw-header .dw-icon-cta:hover,
body.dw-overlay-mode .dw-header .dw-icon-whatsapp,
body.dw-overlay-mode .dw-header .dw-icon-whatsapp:hover {
  background: transparent;
  box-shadow: none;
}
/* With no button background the glyphs need to match the plain social icons
   (24px) so they look the same size — the 20px default only suits the filled
   button look used outside overlay mode. */
body.dw-overlay-mode .dw-icon-cta svg,
body.dw-overlay-mode .dw-icon-whatsapp svg { width: 24px; height: 24px; }

/* Mobile: the telephone / telephone-email text CTAs normally collapse to a
   filled primary icon button. Over the hero, drop the fill so they render as
   plain white icons like the burger and the other overlay CTAs. */
@media (max-width: 767px) {
  body.dw-overlay-mode .dw-header .dw-cta-text,
  body.dw-overlay-mode .dw-header .dw-cta-text:hover {
    background: transparent;
    color: #fff;
    box-shadow: none;
  }
  body.dw-overlay-mode .dw-header .dw-cta-text .dw-cta-tel-icon,
  body.dw-overlay-mode .dw-header .dw-cta-text .dw-cta-mail-icon { width: 24px; height: 24px; }
}

/* Heritage header phone pill: a filled primary button normally, but a
   transparent white ghost button over the hero in overlay mode. */
body.dw-overlay-mode .dw-header .dw-header-tel,
body.dw-overlay-mode .dw-header .dw-header-tel:hover {
  background: transparent;
  color: #fff;
  box-shadow: none;
}
body.dw-overlay-mode .dw-header .dw-header-tel:hover { background: rgba(255, 255, 255, .12); }

/* Mobile menu open in overlay mode: drop the transparent look and use the
   theme colour scheme so the menu is readable. Matched two ways: via the body
   `dw-menu-open` flag, and via the menu panel's own visible state
   (`[data-menu].flex`, added by app.js on open). The second selector means the
   solid theme background still applies even if the JS body-class toggle never
   runs. */
body.dw-overlay-mode.dw-menu-open .dw-header,
body.dw-overlay-mode .dw-header:has([data-menu].flex) {
  background: var(--bg-elevated);
  color: var(--text);
}
body.dw-overlay-mode.dw-menu-open .dw-header .dw-nav-link,
body.dw-overlay-mode.dw-menu-open .dw-burger,
body.dw-overlay-mode.dw-menu-open .dw-burger:hover,
body.dw-overlay-mode.dw-menu-open .dw-header .dw-social,
body.dw-overlay-mode.dw-menu-open .dw-header .dw-icon-cta,
body.dw-overlay-mode.dw-menu-open .dw-header .dw-icon-whatsapp,
body.dw-overlay-mode.dw-menu-open .dw-header .dw-cta-text,
body.dw-overlay-mode.dw-menu-open .dw-header .dw-cta-sub,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-nav-link,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-burger,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-burger:hover,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-social,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-icon-cta,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-cta-text,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-cta-sub,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-icon-whatsapp { color: var(--text); }
body.dw-overlay-mode.dw-menu-open .dw-logo-mark,
body.dw-overlay-mode .dw-header:has([data-menu].flex) .dw-logo-mark { color: var(--primary); }

/* Desktop nav. NOTE: no overflow:auto here — a scroll container clips on BOTH
   axes, which would cut off the Servicing dropdown flyout. Overlap with the
   logo/CTA is handled by the flex layout + gaps in the header instead. */
.dw-desktop-nav { min-width: 0; position: relative; padding-inline: 8px; padding-block: 1rem; height: auto; }

/* Sliding "magic" highlight that glides between nav items on hover (added by
   app.js). Links sit above it; per-item hover/active backgrounds are suppressed
   on desktop so this single pill is the only highlight. */
.dw-desktop-nav .dw-nav-link { position: relative; z-index: 1; }
.dw-nav-highlight {
  position: absolute; top: 0; left: 0; z-index: 0;
  border-radius: 0.2rem;
  background: var(--nav-highlight, rgba(127, 127, 127, .12));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
  opacity: 0; pointer-events: none; will-change: transform, width;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1),
              width .28s cubic-bezier(.4, 0, .2, 1),
              height .28s cubic-bezier(.4, 0, .2, 1),
              opacity .2s ease;
}
.dw-desktop-nav .dw-nav-link:hover,
.dw-desktop-nav .dw-nav-link.is-active,
.dw-desktop-nav .dw-nav-link.underline-hover:hover,
.dw-desktop-nav .dw-nav-link.underline-hover.is-active,
.dw-desktop-nav .dw-dropdown:hover > .dw-nav-link,
.dw-desktop-nav .dw-dropdown.is-open > .dw-nav-link {
  color: var(--text); background: transparent; box-shadow: none;
}
/* Classic header: nav sits centered in the space between logo and CTA.
   `safe center` keeps it centered when it fits but falls back to start-aligned
   when items overflow, so the first item stays visible. */
.dw-desktop-nav--center { flex: 1 1 0%; justify-content: safe center; }

/* Legacy header: push the Contact item to the far right of the nav row. */
.dw-nav--spread .dw-nav-item-contact { margin-left: auto; }

/* Nav links */
.dw-nav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: .3rem;
  color: var(--text);
  font-weight: var(--dw-font-menu-weight, 500);
  white-space: nowrap;
  transition: color .15s ease;
}
/* Desktop nav: padding/radius live on the base state so rest, hover and active
   share the same padding (.25rem .65rem) — the active item never grows or
   shifts relative to its siblings. */
.dw-desktop-nav .dw-nav-link {
  padding: .25rem .65rem;
  border-radius: var(--dw-btn-radius, .5rem);
}
.dw-nav-link:hover { color: var(--primary); }
/* Active link: no colour change — same raised background pill as the hover. */
.dw-nav-link.is-active {
  color: var(--text);
  background: var(--bg-subtle);
}
/* underline-hover variant: no colour change on hover/active — mark both with a
   subtle raised background pill. */
.dw-nav-link.underline-hover:hover {
  color: var(--text);
  background: var(--bg-subtle);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.dw-nav-link.underline-hover.is-active {
  color: var(--text);
  background: var(--bg-subtle);
}

/* --------------------------------------------------------------------------
   Dropdown menu (Servicing)
   -------------------------------------------------------------------------- */
.dw-dropdown { position: relative; display: inline-flex; align-items: center; }
.dw-caret { transition: transform .15s ease; }
.dw-dropdown:hover .dw-caret,
.dw-dropdown.is-open .dw-caret { transform: rotate(180deg); }

/* Dropdown parent link (e.g. Servicing): no colour change — same background
   pill as the other nav links on hover / while the menu is open. */
.dw-dropdown > .dw-nav-link {
  padding: .25rem .65rem;
  border-radius: var(--dw-btn-radius, .5rem);
}
.dw-dropdown > .dw-nav-link:hover,
.dw-dropdown:hover > .dw-nav-link,
.dw-dropdown.is-open > .dw-nav-link {
  color: var(--text);
  background: var(--bg-subtle);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}

.dw-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: .625rem;
  min-width: 230px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: .75rem;
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
  padding: 1rem;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  z-index: 70;
}
/* Transparent bridge across the gap so moving the cursor from the nav item to
   the menu doesn't drop the :hover and close it. */
.dw-dropdown-menu::before {
  content: ""; position: absolute; left: 0; right: 0; top: -.625rem; height: .625rem;
}
/* Arrow pointing up to the parent nav item (speech-bubble style). */
.dw-dropdown-menu::after {
  content: ""; position: absolute; top: -6px; left: 24px;
  width: 11px; height: 11px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-top-left-radius: 3px;
  transform: rotate(45deg);
  pointer-events: none;
}
.dw-dropdown:hover .dw-dropdown-menu,
.dw-dropdown.is-open .dw-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dw-dropdown-menu a {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem .7rem; padding-left: .75rem; border-radius: .5rem;
  color: var(--text); font-weight: 500; font-size: .95rem;
  border: 1px solid transparent;
}
.dw-dropdown-menu a:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
}
.dw-dropdown-menu a svg { flex: none; }

/* Right-aligned variant (when item sits near the end of the bar) */
.dw-dropdown-menu.align-right { left: auto; right: 0; }
.dw-dropdown-menu.align-right::after { left: auto; right: 24px; }

/* Manufacturer (makes) dropdown — 2-column compact grid of makes, with an
   optional price column (divider) alongside. */
.dw-makes-menu {
  display: flex; gap: 1rem; min-width: 420px;
}
/* The price column needs extra room — only the priced variant stays wide. */
.dw-makes-menu--hasprice { min-width: 560px; }
.dw-makes-menu__brands {
  flex: 1 1 auto; align-content: start;
  display: grid; grid-template-columns: repeat(2, minmax(115px, 1fr)); gap: .4rem;
}
.dw-makes-menu__prices {
  flex: 0 0 auto; width: 11rem;
  padding-left: 1rem; border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: .1rem;
}
.dw-makes-menu__prices-title {
  margin: 0 0 .35rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
}
.dw-makes-menu__prices-title--sub { margin-top: .6rem; }
/* Scoped so it beats the generic .dw-dropdown-menu a rule. */
.dw-makes-menu__prices .dw-make-price {
  display: block; margin: 0; padding: .3rem .5rem; font-size: .9rem; line-height: 1.3;
  color: var(--text); text-decoration: none; border-radius: .4rem; white-space: nowrap;
}
.dw-makes-menu__prices .dw-make-price:hover { background: rgba(0, 0, 0, .04); color: var(--primary); }
.dw-makes-menu .dw-make {
  padding: .2rem .5rem; gap: .4rem; font-size: .9rem;
  /* Faint tile behind each brand to outline them. */
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: .4rem;
}
/* White colour scheme: soften the brand tile background by 50% (the flat white
   header makes the .3 tint read too dark). Excludes the "View All" button. */
body.theme-white .dw-makes-menu .dw-make:not(.dw-make--all),
body.theme-platinum .dw-makes-menu .dw-make:not(.dw-make--all) {
  background: rgba(0, 0, 0, 0.01);
}
/* Brand tiles in the makes dropdown get a slightly roomier hit area than the
   base .dw-make. Excludes .dw-make--all, which keeps its own button padding. */
.dw-makes-menu__brands .dw-make:not(.dw-make--all) {
  padding: .5rem;
}
.dw-makes-menu .dw-make__logo { width: 1.4rem; height: 1.4rem; }
.dw-makes-mobile .dw-make {
  display: flex; align-items: center; gap: .5rem; padding: .25rem .6rem;
  /* Faint tile behind each brand to outline them (matches desktop). */
  background: rgba(0, 0, 0, .02);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: .4rem;
}
.dw-make__logo { width: 1.7rem; height: 1.7rem; object-fit: contain; flex: none; }
.dw-make__name { text-decoration: underline; white-space: nowrap; }
/* "View All" spans the full width below the makes, styled as a primary button
   (matches .dw-btn.dw-btn-primary). Menu-scoped so it beats .dw-dropdown-menu a. */
.dw-makes-menu__brands .dw-make--all,
.dw-makes-mobile .dw-make--all {
  grid-column: 1 / -1; justify-content: center; margin-top: .75rem;
  padding: .625rem 1.25rem; font-weight: 600;
  color: var(--primary-contrast);
  background: var(--primary);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary), white 2.5%),
    color-mix(in srgb, var(--primary), black 2.5%));
  border: 1px solid var(--primary); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-makes-menu__brands .dw-make--all:hover,
.dw-makes-mobile .dw-make--all:hover {
  color: var(--primary-contrast);
  background: var(--primary-hover);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary-hover), white 2.5%),
    color-mix(in srgb, var(--primary-hover), black 2.5%));
  border-color: var(--primary-hover);
}
.dw-make--all .dw-make__name { font-weight: 700; text-decoration: none; color: inherit; }

/* Mobile disclosure (Servicing inside the burger menu) */
.dw-mobile-sub { display: none; padding-left: .75rem; }
[data-mobile-sub-toggle].is-open + .dw-mobile-sub { display: flex; flex-direction: column; }
[data-mobile-sub-toggle] .dw-caret.is-open { transform: rotate(180deg); }

/* Mobile menu items: each link gets a bottom border to separate the rows.
   var(--border) is theme-aware, so it reads on both light and dark. */
/* Remove the inter-item flex gap so the hover background fills each row fully
   (otherwise the gap leaves an unhighlighted strip above the hovered item). */
/* Cap the open mobile menu height and let it scroll on its own — otherwise a
   long expanded submenu (e.g. manufacturers) can't be reached inside a
   positioned/overlay header. -webkit-overflow-scrolling for iOS momentum. */
[data-menu] { gap: 0; max-height: 80vh; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
/* Smooth open: the panel fades + slides in, its items gently stagger.
   Runs when app.js adds .flex (open); closing stays instant. */
[data-menu].flex { animation: dw-menu-in .28s ease both; }
[data-menu].flex > * { animation: dw-menu-item-in .32s ease both; }
[data-menu].flex > *:nth-child(1) { animation-delay: .04s; }
[data-menu].flex > *:nth-child(2) { animation-delay: .08s; }
[data-menu].flex > *:nth-child(3) { animation-delay: .12s; }
[data-menu].flex > *:nth-child(4) { animation-delay: .16s; }
[data-menu].flex > *:nth-child(5) { animation-delay: .20s; }
[data-menu].flex > *:nth-child(6) { animation-delay: .24s; }
[data-menu].flex > *:nth-child(n+7) { animation-delay: .28s; }
@keyframes dw-menu-in {
  from { opacity: 0; transform: translateY(-.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dw-menu-item-in {
  from { opacity: 0; transform: translateY(-.4rem); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-menu].flex,
  [data-menu].flex > * { animation: none; }
}
/* Manufacturer submenu: 2 columns on mobile. */
[data-mobile-sub-toggle].is-open + .dw-makes-mobile {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; padding: .5rem;
}
/* Dropdown parent toggle (mobile): styles moved off inline so the :hover
   background rule can take effect (inline styles would otherwise win). */
.dw-nav-sub-toggle {
  width: 100%; justify-content: space-between;
  background: none; border: 0; cursor: pointer;
  padding-right: 1rem;
}
/* Bigger dropdown caret in the mobile menu, rotating when expanded. */
.dw-nav-sub-toggle .dw-caret {
  width: 1.5rem; height: 1.5rem;
  transition: transform .3s ease;
}
.dw-nav-sub-toggle.is-open .dw-caret { transform: rotate(180deg); }
[data-menu] .dw-nav-link {
  padding-left: .75rem;
  /* !important so it beats the inline `border:0` reset on the dropdown
     toggle <button>, which is also a .dw-nav-link. */
  border-bottom: 1px solid var(--border) !important;
}
/* Mobile hover: copy the desktop nav pill — no colour change, just a subtle
   raised background. */
[data-menu] .dw-nav-link:hover {
  color: var(--text);
  background: var(--bg-subtle);
}
/* Small section heading inside the mobile menu (e.g. "Menu", "Socials"). */
.dw-menu-divider {
  margin-top: .75rem; padding: .5rem .75rem .25rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text-muted);
}
/* WhatsApp mobile-menu item: WhatsApp green text + icon. */
[data-menu] .dw-nav-link--whatsapp,
[data-menu] .dw-nav-link--whatsapp:hover { color: #25D366 !important; }
/* Mobile "View All" is also a .dw-nav-link, so the generic [data-menu] nav-link
   hover/border rules leak onto it — re-assert the primary button styling with a
   higher-specificity selector (and !important to beat the nav-link border). */
[data-menu] .dw-makes-mobile .dw-make--all { border: 1px solid var(--primary) !important; }
[data-menu] .dw-makes-mobile .dw-make--all:hover {
  color: var(--primary-contrast);
  background: var(--primary-hover);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary-hover), white 2.5%),
    color-mix(in srgb, var(--primary-hover), black 2.5%));
  border-color: var(--primary-hover) !important;
}
/* Mobile-menu main CTA button: extra top/bottom padding for a bigger tap target. */
.dw-menu-cta { padding-top: 1.5rem; padding-bottom: 1.5rem; margin-top: 1rem; margin-bottom: 1rem; }
/* Mobile menu CTA (the primary button inside the open menu): centre the text and
   give it breathing room top and bottom. */
[data-menu] .dw-btn-primary {
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  /* [data-menu] is a scrollable flex column; without this the button shrinks
     (losing its padding/height) once an expanded submenu overflows it. */
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.dw-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; border-radius: var(--dw-btn-radius, .5rem); padding: .625rem 1.25rem;
  cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
/* Subtle ~5% top-to-bottom gradient derived from the branding primary colour.
   The plain `background` line is a fallback for browsers without color-mix(). */
.dw-btn-primary {
  background: var(--primary);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary), white 2.5%),
    color-mix(in srgb, var(--primary), black 2.5%));
  color: var(--primary-contrast);
}
.dw-btn-primary:hover {
  background: var(--primary-hover);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary-hover), white 2.5%),
    color-mix(in srgb, var(--primary-hover), black 2.5%));
}
/* Sheen: a diagonal light streak sweeps left-to-right across the button on
   hover. Needs position/overflow on the button so the streak clips to it. */
.dw-btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.dw-btn-primary::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .45) 50%, transparent 62%);
  transform: translateX(-130%);
}
.dw-btn-primary:hover::after { transform: translateX(130%); transition: transform .7s ease; }
@media (prefers-reduced-motion: reduce) {
  .dw-btn-primary::after { display: none; }
}

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

.dw-btn-ghost    { background: transparent; color: var(--text); border-color: var(--border); }
.dw-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* Solid --bg button — a filled button that sits on the page background colour. */
.dw-btn-solid    { background: var(--bg); color: var(--text); border-color: var(--border); }
.dw-btn-solid:hover { background: var(--bg-elevated); border-color: var(--bg-elevated); color: var(--primary); }

/* Header contact CTA — text variants (telephone / telephone-email).
   The button variants reuse .dw-btn .dw-btn-primary. */
.dw-cta-text {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--text); font-weight: 700; font-size: 1.25rem;
  line-height: 1.2; white-space: nowrap;
}
.dw-cta-stack {
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: .1rem;
}
/* Email line under the phone number stays smaller/secondary. */
.dw-cta-sub { font-weight: 500; font-size: .9rem; color: var(--text-muted); }

/* Primary icon CTA (button-email) — same footprint as the WhatsApp/social
   icon buttons so all header icons line up at the same size. */
.dw-icon-cta {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--dw-btn-radius, .5rem);
  background: var(--primary); color: var(--primary-contrast); flex: none;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary), white 2.5%),
    color-mix(in srgb, var(--primary), black 2.5%));
}
.dw-icon-cta:hover {
  background: var(--primary-hover);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--primary-hover), white 2.5%),
    color-mix(in srgb, var(--primary-hover), black 2.5%));
}

/* Lock the icon-button footprint and the glyph size for every header icon
   button, so they all match regardless of the Tailwind w-5/h-5 utility. */
.dw-icon-cta, .dw-icon-whatsapp, .dw-social {
  min-width: 44px; min-height: 44px; box-sizing: border-box;
}
.dw-icon-cta svg, .dw-icon-whatsapp svg, .dw-social svg {
  width: 20px; height: 20px; flex: none;
}

/* WhatsApp */
.dw-btn-whatsapp { background: #25D366; color: #ffffff; }
.dw-btn-whatsapp:hover { background: #1ebe5b; }
.dw-icon-whatsapp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--dw-btn-radius, .5rem);
  background: #25D366; color: #fff; flex: none;
}
.dw-icon-whatsapp:hover { background: #1ebe5b; }

/* Text CTA variants (telephone / email / telephone-email): icon on mobile, the
   value (number / address) from md up. Base = mobile-first (icon shown, value
   hidden). The button-telephone/button-email variants are separate icon buttons.*/
.dw-cta-tel-icon, .dw-cta-mail-icon { display: inline-flex; }
.dw-cta-tel-num,  .dw-cta-mail-num  { display: none; }
@media (min-width: 768px) {
  /* Desktop: words only — no icons on the telephone / email / telephone-email CTAs. */
  .dw-cta-tel-num, .dw-cta-mail-num { display: inline; }
  .dw-cta-text .dw-cta-tel-icon,
  .dw-cta-text .dw-cta-mail-icon { display: none; }
}
/* Mobile: icons only, rendered as filled 44x44 icon buttons that match the
   button-email / button-telephone (.dw-icon-cta) — same footprint, 20px glyph
   and primary-colour background. The telephone-email stack becomes two buttons
   side by side. */
@media (max-width: 767px) {
  .dw-cta-text {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
    padding: 0; gap: 0; flex: none; justify-content: center;
    border-radius: var(--dw-btn-radius, .5rem);
    color: var(--primary-contrast);
    background: var(--primary);
    background: linear-gradient(to bottom,
      color-mix(in srgb, var(--primary), white 2.5%),
      color-mix(in srgb, var(--primary), black 2.5%));
  }
  .dw-cta-text .dw-cta-tel-icon,
  .dw-cta-text .dw-cta-mail-icon { width: 20px; height: 20px; }
  .dw-cta-stack { flex-direction: row; align-items: center; gap: .5rem; }
  .dw-cta-stack .dw-cta-sub { color: var(--primary-contrast); font-weight: inherit; font-size: inherit; }
}

/* Social icon buttons (match the WhatsApp button) */
.dw-social {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--dw-btn-radius, .5rem);
  color: #fff; flex: none;
  transition: background .15s ease, opacity .15s ease;
}
.dw-social:hover { opacity: .9; }
.dw-facebook  { background: #1877F2; }
.dw-instagram { background: #E4405F; }
.dw-youtube   { background: #FF0000; }
.dw-linkedin  { background: #0A66C2; }
.dw-tiktok    { background: #000000; }
.dw-twitter   { background: #000000; }

/* Greyscale mode (body.dw-mono): drop brand colours on social + WhatsApp buttons.
   Uses the mono --primary/--primary-contrast already set on <body>. */
body.dw-mono .dw-social,
body.dw-mono .dw-icon-whatsapp {
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: none;
}
body.dw-mono .dw-social:hover,
body.dw-mono .dw-icon-whatsapp:hover { background: var(--primary-hover); opacity: 1; }
/* Plain header social icons keep the theme text colour in greyscale mode, so on
   dark themes they stay white instead of taking the mono contrast (black). */
body.dw-mono .dw-header .dw-social.dw-social--plain { color: var(--text); }

/* Heritage header phone pill (first CTA): no background fill — renders as a
   brand-coloured icon/text outline button instead. Overlay mode still overrides
   the colour to white via its own rules. */
.dw-header-tel, .dw-header-tel:hover {
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
/* No sheen sweep without a fill. */
.dw-header-tel::after { display: none; }
/* Outline border (uses currentColor so it follows the theme/overlay text colour). */
.dw-header-tel { border-color: currentColor; }

/* Plain social style ($socialIconStyle = 'plain'): no background, icons only.
   Applied per-icon via dw_social_links(); placed after the mono rules so it
   also wins in greyscale mode. */
.dw-social.dw-social--plain {
  background: transparent !important;
  color: var(--text);
  box-shadow: none;
  width: auto; height: auto; min-width: 0; min-height: 0;
}
.dw-social.dw-social--plain svg { width: 24px; height: 24px; }
.dw-social.dw-social--plain:hover { background: transparent !important; color: var(--primary); opacity: 1; }
/* Plain icons have no button background, so give them more breathing room
   (gap-6 instead of gap-2). */
.dw-social-wrap:has(.dw-social--plain) { gap: 1.5rem; }

/* Mobile: the header social icons are hidden, so surface them at the top-left
   of the top bar (always plain). Hidden from md up where the header shows them. */
.dw-topbar-social { display: none; }
@media (max-width: 767px) {
  .dw-topbar-social {
    display: flex; align-items: center; gap: 1.5rem; margin-right: auto;
    /* Scroll horizontally if there are many icons, so the layout holds. */
    flex-wrap: nowrap; min-width: 0; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .dw-topbar-social::-webkit-scrollbar { display: none; }
  .dw-topbar-social .dw-social { flex: none; }
}
.dw-topbar .dw-social.dw-social--plain { color: var(--topbar-text); }
.dw-topbar .dw-social.dw-social--plain:hover { color: #fff; }
/* Match the other top-bar icons (w-4 h-4 = 16px). */
.dw-topbar-social .dw-social.dw-social--plain svg { width: 16px; height: 16px; }

/* Top utility / address bar — visible on all viewports. The address is hidden
   on mobile and shown from md (768px) up. Handled here (not via Tailwind
   md:block, which isn't in the prebuilt dist/tailwind.css) so it works
   regardless of the Tailwind build. */
.dw-topbar {
  background: var(--topbar-bg); color: var(--topbar-text); display: block;
  max-height: 5rem; overflow: hidden;
  transition: max-height .3s ease;
}
/* On scroll, collapse the topbar so the main nav alone stays stuck to the top. */
body.dw-scrolled .dw-topbar { max-height: 0; }
.dw-topbar a:hover { color: #ffffff; }
/* Telephone / mobile links (both use tel:) — underline on hover. */
.dw-topbar a[href^="tel:"]:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Custom top-bar background (config: $topbarBackground): --topbar-bg/--topbar-text
   are overridden inline on <body>; keep the link hover legible on any colour
   (the plain #fff hover would vanish on a light custom bar). */
body.dw-topbar-custom .dw-topbar a:hover,
body.dw-topbar-custom .dw-topbar .dw-social.dw-social--plain:hover { color: var(--topbar-text); }
/* Keep phone/contact numbers on one line. */
.dw-topbar a { white-space: nowrap; }
/* Address: hidden on mobile, shown from md (768px) up. */
.dw-topbar-address { display: none; }
@media (min-width: 768px) { .dw-topbar-address { display: flex; } }
/* Right-align the top-bar contents on mobile; space-between from md up. */
.dw-topbar > div { justify-content: flex-end; }
@media (min-width: 768px) { .dw-topbar > div { justify-content: space-between; } }
/* Mobile: top bar shows only the main telephone — hide the mobile number. */
@media (max-width: 767px) { .dw-topbar-mobile { display: none !important; } }
/* Spacer/divider between top-bar contact items (e.g. telephone | mobile). */
.dw-topbar-sep {
  display: inline-block; width: 1px; height: 16px;
  background: currentColor; opacity: .3; flex: none;
}

/* Phone / icon pill */
.dw-pill { display: inline-flex; align-items: center; gap: .5rem; color: var(--primary); font-weight: 600; }

/* Hamburger — no background, just the icon in the current text colour. */
.dw-burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  border-radius: var(--dw-btn-radius, .5rem); box-sizing: border-box;
  border: 1px solid transparent;
  color: var(--text); background: transparent; cursor: pointer;
}
.dw-burger:hover,
.dw-burger:active,
.dw-burger.is-active,
.dw-burger.is-open { color: var(--text); }
/* Animated burger -> X */
.dw-burger-box { position: relative; width: 22px; height: 16px; }
.dw-burger-bar {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .3s ease, opacity .2s ease, top .3s ease;
}
.dw-burger-bar:nth-child(1) { top: 0; }
.dw-burger-bar:nth-child(2) { top: 7px; }
.dw-burger-bar:nth-child(3) { top: 14px; }
.dw-burger.is-open .dw-burger-bar:nth-child(1) { top: 7px; transform: rotate(45deg); }
.dw-burger.is-open .dw-burger-bar:nth-child(2) { opacity: 0; }
.dw-burger.is-open .dw-burger-bar:nth-child(3) { top: 7px; transform: rotate(-45deg); }
/* --- Mobile-menu breakpoint (79rem ≈ 1264px) --------------------------------
   The nav switches between the hamburger (mobile) and the full desktop nav
   here. Tailwind's prebuilt dist has no xl: utilities, so the xl:flex /
   xl:hidden classes used in the header markup are defined here.

   These rules use !important, so this single media query governs the entire
   heritage swap (left socials show, right socials hide, burger hides, desktop
   nav shows) regardless of Tailwind's own 80rem xl: rule. It is deliberately
   set ~16px below 1280px so a 1280px browser window still lands in the desktop
   layout once the vertical scrollbar is subtracted from the layout viewport —
   otherwise the header gets stuck in its cramped mobile band (socials on the
   right next to the phone CTA and burger) right at 1280. */
@media (min-width: 79rem) {
  .xl\:flex   { display: flex !important; }
  .xl\:hidden { display: none !important; }
  /* Burger is mobile-only: hide it once the desktop nav appears. */
  .dw-burger  { display: none !important; }
}

/* Mobile: nudge all text down slightly. Most sizing (and Tailwind's text
   utilities) is rem-based, so trimming the root font-size scales every
   text size proportionally. 16px -> 15px = ~6% smaller. */
@media (max-width: 767px) {
  html { font-size: 93.75%; }
}

/* --------------------------------------------------------------------------
   Announcement — banner (below header) and modal (popup on load)
   -------------------------------------------------------------------------- */
.dw-announce-bar {
  background: var(--primary); color: var(--primary-contrast);
  font-size: .95rem; line-height: 1.4;
}
.dw-announce-bar > div { position: relative; padding: .625rem 2.75rem; text-align: center; }
@media (max-width: 767px) { .dw-announce-bar > div { text-align: left; } }
.dw-announce-bar a { color: inherit; text-decoration: underline; }
.dw-announce-bar__close {
  position: absolute; top: 50%; right: .5rem; transform: translateY(-50%);
  width: 1.75rem; height: 1.75rem; line-height: 1; font-size: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: inherit; cursor: pointer;
  border-radius: 999px; opacity: .85;
}
.dw-announce-bar__close:hover { opacity: 1; background: rgba(0, 0, 0, .15); }

.dw-announce-modal[hidden] { display: none; }
.dw-announce-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.dw-announce-modal__overlay {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .6);
}
.dw-announce-modal__box {
  position: relative; z-index: 1; width: 100%; max-width: 32rem;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  padding: 2rem 1.75rem 1.75rem;
}
.dw-announce-modal__close {
  position: absolute; top: .5rem; right: .5rem;
  width: 2rem; height: 2rem; line-height: 1; font-size: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text-muted);
  cursor: pointer; border-radius: 999px;
}
.dw-announce-modal__close:hover { background: var(--bg-subtle); color: var(--text); }
.dw-announce-modal__title {
    margin: 0 0 .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
    color: var(--text);
}
.dw-announce-modal__body { font-size: 1rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Demo-only theme switcher (remove in production)
   -------------------------------------------------------------------------- */
.dw-theme-switch {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(15, 23, 42, .92); box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.dw-theme-switch button {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); cursor: pointer; padding: 0;
}
.dw-theme-switch button[data-theme="theme-white"]    { background:#ffffff; }
.dw-theme-switch button[data-theme="theme-platinum"] { background:#e5e4e2; }
.dw-theme-switch button[data-theme="theme-black"]    { background:#000000; }
.dw-theme-switch button[data-theme="theme-slate"]    { background:#0f172a; }
.dw-theme-switch button[data-theme="theme-midnight"] { background:#0a0f1f; }
.dw-theme-switch button[data-theme="theme-carbon"]   {
  background:#0a0a0a;
  background-image:
    linear-gradient(27deg,  #0d0d0d 2px, transparent 2px),
    linear-gradient(207deg, #111111 2px, transparent 2px);
  background-size: 6px 6px;
}
.dw-theme-switch button[data-theme="theme-custom"]   { background: var(--dw-custom-bg, #000000); }

/* --------------------------------------------------------------------------
   SEO make-filter band (templates/blocks/seo/make-filter.php)
   Inline "Used {make}" links in a muted gutter directly above the footer.
   -------------------------------------------------------------------------- */
/* AA Car Standards banner block (templates/blocks/banners/aa-car-standards.php).
   Full-width band with the same centred gutter as the make-seo band. */
.dw-banner { background: var(--bg); }
.dw-banner__inner { max-width: 80rem; margin: 0 auto; padding: 2rem 2.5rem 4rem; }
.dw-banner__link { display: block; }
.dw-banner__img { display: block; width: 100%; height: auto; border-radius: var(--dw-btn-radius, .5rem); }
/* Soft shadow so the AA banner lifts off the page rather than sitting flat. */
.dw-banner--aa .dw-banner__img { box-shadow: 0 10px 28px rgba(0, 0, 0, .18); }
@media (max-width: 767px) {
  .dw-banner__inner { padding: 1.5rem 1.5rem 3rem; }
}

/* Dealer Promise page (dealer-promise.php). */
/* Anchor the ribbon to the .dw-page__inner card so it sits inline within the
   inner (flush to its top-right corner) instead of overflowing to the border.
   overflow:hidden clips the ribbon to the card's rounded corner. */
.dw-page__inner:has(> .dw-promise) { position: relative; overflow: hidden; }
/* AA Cars ribbon pinned to the inner card's top-right corner. */
.dw-promise__ribbon {
  position: absolute; top: 0; right: 0;
  width: clamp(120px, 22%, 200px); height: auto;
  pointer-events: none;
}
/* Smaller on phones so it doesn't crowd the heading. */
@media (max-width: 640px) {
  .dw-promise__ribbon { width: clamp(90px, 32%, 130px); }
}
/* Very narrow: drop the ribbon into flow above the heading, full-bleed to the
   inner card's edges (negative margins cancel the inner's mobile padding:
   2rem top / 1.5rem sides). overflow:hidden on the inner clips the corners. */
@media (max-width: 520px) {
  .dw-promise__ribbon { position: static; display: block; width: calc(100% + 3rem); margin: -2rem -1.5rem 1rem; }
}
/* Tick list — dark check on a #F8D347 circle, in its own --bg gutter panel. */
.dw-page__inner ul.dw-promise__list {
  list-style: none; margin: 0 0 1.35rem;
  padding: 1.5rem 1.75rem;
  background: var(--bg);
  border-radius: var(--dw-btn-radius, .5rem);
}
.dw-promise__list li { position: relative; padding-left: 2.4rem; margin: 0 0 .75rem; line-height: 1.75; color: var(--text); }
.dw-promise__list li:last-child { margin-bottom: 0; }
/* Small print above the Back button. */
.dw-promise__disclaimer { margin: 1.5rem 0 .5rem; color: var(--text-muted); font-size: .8rem; line-height: 1.5; }

.dw-promise__list li::before {
  content: ""; position: absolute; left: 0; top: .18rem;
  width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background-color: #F8D347;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23111827" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12l4 4L19 7"/></svg>');
  background-repeat: no-repeat; background-position: center; background-size: .85rem;
}
.dw-promise__list li::marker { content: none; }

/* Service cards — templates/blocks/cards/service-cards.php.
   Image cards (title + sub-label) linking to the matching menu item, over a dark
   overlay (hero opacity). The card count drives the grid:
   2->2col, 3->3col, 4->4col, 6->3x2, 5->bento (first card spans a 2x2 block). */
.dw-service-cards { background: var(--bg); padding: 3rem 1.5rem; }
.dw-service-cards__inner { margin: 0 auto; }
.dw-service-cards__title {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 92%, var(--bg));
}
.dw-service-cards__subheading {
  margin: 0 0 1.5rem; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
/* Columns use minmax(0, 1fr), not 1fr: 1fr's implicit minimum is the track's
   min-content, which Chrome inflates via the cards' aspect-ratio/min-height and
   overflows the grid. minmax(0, …) lets the tracks shrink so the cards resize. */
.dw-service-cards__grid { display: grid; gap: 1.25rem; padding: 1.5rem 0; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .dw-service-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) {
  .dw-service-cards__grid[data-cards="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dw-service-cards__grid[data-cards="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dw-service-cards__grid[data-cards="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dw-service-cards__grid[data-cards="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* 5 cards — bento: first card fills a 2x2 block, the other four sit 2x2 beside it.
     Cards fill the grid cells here (no aspect ratio) so the big card stays 2x tall. */
  .dw-service-cards__grid[data-cards="5"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(230px, 1fr));
  }
  .dw-service-cards__grid[data-cards="5"] > .dw-service-card { aspect-ratio: auto; min-height: 0; }
  .dw-service-cards__grid[data-cards="5"] > .dw-service-card:first-child { grid-column: span 2; grid-row: span 2; }
}
.dw-service-card {
  position: relative; isolation: isolate; overflow: hidden;
  /* Height comes from a responsive min-height, NOT aspect-ratio. aspect-ratio on
     a grid item + min-height transfers into an automatic minimum WIDTH (~4/3 of
     the min-height); Chrome enforces that against the track and overflows the row
     even with min-width:0 / minmax(0,1fr). A plain min-height has no cross-axis
     transfer, so the columns always shrink and the cards resize cleanly. */
  min-width: 0;
  min-height: clamp(260px, 22vw, 340px);
  display: flex; border-radius: var(--dw-btn-radius, .5rem);
  color: #fff; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  transition: transform .3s ease, box-shadow .3s ease;
}
/* Subtle grow + deeper shadow on hover so the cards feel raised off a white
   background (grows rather than lifting, so it never reads as shrinking). */
.dw-service-card { transform-origin: center; }
.dw-service-card:hover { transform: scale(1.02); box-shadow: 0 16px 34px rgba(0, 0, 0, .22); }
.dw-service-card__media {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform .4s ease;
}
.dw-service-card:hover .dw-service-card__media { transform: scale(1.22); }
.dw-service-card__overlay { position: absolute; inset: 0; z-index: 1; background: #000; pointer-events: none; }
.dw-service-card__body {
  position: relative; z-index: 2; width: 100%; padding: 1.5rem;
  display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; text-align: left;
}
.dw-service-card__title { margin: 0; font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 800; line-height: 1.15; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
.dw-service-card__description { margin: 0; color: rgba(255, 255, 255, .9); font-size: 1rem; line-height: 1.4; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
/* Small button pinned to the bottom of the card. It's decorative (the whole card
   is the link) — trigger its primary-button sheen when the card is hovered. */
.dw-service-card__btn { margin-top: auto; padding: .4rem .9rem; font-size: .85rem; border: 0; }
.dw-service-card:hover .dw-service-card__btn::after { transform: translateX(130%); transition: transform .7s ease; }
/* Whole-card link — the title is the real anchor; its ::after stretches over the
   entire card so a click anywhere on the card follows the link. */
.dw-service-card__link { color: inherit; text-decoration: none; }
.dw-service-card__link::after { content: ""; position: absolute; inset: 0; z-index: 3; }
.dw-service-card__link:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }

/* FAQ accordion (templates/blocks/faq/faq-card.php) — stacked <details> cards;
   opening one closes the others (JS). Cards are a subtle fill on the section bg. */
.dw-faq { background: var(--bg); padding: 3rem 2.5rem; }
/* 75% width (25% narrower), centred, with the section padding as a gutter.
   Full width on mobile so the column doesn't get too cramped. */
.dw-faq__inner { max-width: 75%; margin: 0 auto; }
@media (max-width: 767px) { .dw-faq__inner { max-width: none; } }
.dw-faq__title {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 92%, var(--bg));
}
.dw-faq__subheading {
  margin: 1.75rem 0 0; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-faq__subheading a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.dw-faq__list { display: flex; flex-direction: column; gap: .85rem; padding: 1.5rem 0; }
.dw-faq__item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--dw-btn-radius, .5rem);
  overflow: hidden;
}
/* Question row (the <summary>). Marker removed; chevron on the right. */
.dw-faq__question {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.5rem;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.35; color: var(--text);
}
.dw-faq__question::-webkit-details-marker { display: none; }
.dw-faq__question:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.dw-faq__chevron {
  flex: none; width: 1.25rem; height: 1.25rem; color: var(--text-muted);
  transition: transform .25s ease;
}
.dw-faq__item[open] .dw-faq__chevron { transform: rotate(180deg); }
.dw-faq__answer {
  padding: 0 1.5rem 1.25rem; color: var(--text-muted);
  font-size: 1rem; line-height: 1.6; text-wrap: pretty;
}
.dw-faq__answer p { margin: 0; }

/* Subtle top-to-bottom gradient: --bg (0%) easing to 5% darker at the base. */
.dw-make-seo {
  background: var(--bg);
  background: linear-gradient(to bottom, var(--bg), color-mix(in srgb, var(--bg), black 5%));
  border-top: 1px solid var(--border);
}
/* When a custom footer background is set, match this band to the footer colour —
   nudged 5% toward the contrast text (lighter on a dark footer, darker on a light
   one) for a subtle step above the footer. Text tokens re-map so it stays legible. */
body.dw-footer-custom .dw-make-seo {
  --text: var(--dw-footer-text);
  --text-muted: var(--dw-footer-muted);
  --border: var(--dw-footer-border);
  background: color-mix(in srgb, var(--dw-footer-bg), var(--dw-footer-text) 5%);
}
.dw-make-seo__inner { max-width: 80rem; margin: 0 auto; padding: 2rem 2.5rem; }
.dw-make-seo__title {
  margin: 0 0 1rem;
  font-size: 1.15rem; font-weight: 700; color: var(--text);
}
.dw-make-seo__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .4rem 1.4rem;
}
.dw-make-seo__list a {
  font-size: .8rem; color: var(--text-muted);
  text-decoration: underline; text-underline-offset: 2px;
  transition: color .15s ease;
}
.dw-make-seo__list a:hover { color: var(--primary); }
@media (max-width: 767px) {
  .dw-make-seo__inner { padding: 1.5rem 1.5rem; }
}

/* --------------------------------------------------------------------------
   Footer — classic (templates/blocks/footers/classic.php)
   Three columns (Address, Opening Hours, Sitemap), a disclaimer band and a
   bottom bar. Sits on the base theme background.
   -------------------------------------------------------------------------- */
.dw-footer-classic { background: var(--bg-elevated); color: var(--text); border-top: 1px solid var(--border); }
/* Custom footer background (config: $footerBackground). Applies to all three
   footer styles (they share .dw-footer-classic). Re-maps the theme tokens inside
   the footer so every element (headings, text, links, dividers) recolours to the
   auto-contrasted --dw-footer-text. */
body.dw-footer-custom .dw-footer-classic {
  --text: var(--dw-footer-text);
  --text-muted: var(--dw-footer-muted);
  --border: var(--dw-footer-border);
  background: var(--dw-footer-bg);
  color: var(--dw-footer-text);
  border-top-color: var(--dw-footer-border);
}
/* Heritage contact cards (--bg) + phone pill (--bg-elevated) — replace the solid
   light backgrounds with translucent tints of the footer text so they blend on
   any custom footer colour (otherwise they show as stark light cards). */
body.dw-footer-custom .dw-footer-heritage__card {
  background: color-mix(in srgb, var(--dw-footer-text) 6%, transparent);
  border-color: var(--dw-footer-border);
}
body.dw-footer-custom .dw-footer-heritage__card-value {
  background: var(--dw-footer-border); color: var(--dw-footer-text);
}
/* Contact icon circles (phone / email / WhatsApp) use --bg-subtle for the disc —
   swap it for a translucent tint of the footer text so they blend on any colour
   instead of showing as stark light circles. */
body.dw-footer-custom .dw-footer-contact-icon {
  background: var(--dw-footer-border); color: var(--dw-footer-text);
}
.dw-footer-classic__inner {
  max-width: 80rem; margin: 0 auto; padding: 5.5rem 2.5rem 3rem;
}
.dw-footer-classic__cols {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  justify-content: space-between; gap: 3.5rem 4rem;
}
/* Section heading with a short underline beneath it. */
.dw-footer-classic__heading {
  margin: 0 0 1.75rem; padding-bottom: .85rem; position: relative;
  font-size: 1.375rem; font-weight: 800; line-height: 1.1;
}
.dw-footer-classic__heading::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 2rem; height: 2px; background: var(--primary);
}
/* Address column */
.dw-footer-classic__address { margin: 0 0 1.5rem; }
.dw-footer-classic__address p { margin: 0 0 .15rem; color: var(--text-muted); line-height: 1.5; }
.dw-footer-classic__name { font-size: 1.375rem; line-height: 1.3; font-weight: 700; color: var(--text) !important; margin-bottom: .5rem !important; }
.dw-footer-classic__contact { display: flex; flex-direction: column; gap: .6rem; margin: 0 0 1.5rem; max-width: 100%; overflow-x: auto; }
.dw-footer-classic__contact a { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; width: fit-content; }
.dw-footer-classic__contact a:hover { color: var(--primary); }
/* Circular icon badge on the contact links (both footers). */
.dw-footer-contact-icon {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--bg-subtle); color: var(--text);
}
.dw-footer-contact-icon svg { width: 1rem; height: 1rem; }
.dw-footer-contact-label { text-decoration: underline; text-underline-offset: 2px; }
.dw-footer-classic__social { display: flex; align-items: center; gap: 1rem; }
.dw-footer-classic__social .dw-whatsapp { color: #25D366; }
/* Opening hours */
.dw-footer-classic__hours { list-style: none; margin: 0; padding: 0; }
.dw-footer-classic__hours li {
  display: flex; gap: 2.5rem;
  padding: .15rem 0; color: var(--text-muted);
}
/* Fixed day width keeps the times aligned now the column hugs its content. */
.dw-footer-classic__day { flex: none; min-width: 7rem; }
.dw-footer-classic__time { flex: none; }
.dw-footer-classic__hours li.is-today { color: var(--text); font-weight: 700; }
.dw-footer-classic__note { margin: 1.5rem 0 0; color: var(--text-muted); font-size: .9rem; }
/* Sitemap — two columns of links */
.dw-footer-classic__sitemap {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem;
}
.dw-footer-classic__sitemap li { padding: .15rem 0; }
.dw-footer-classic__sitemap a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.dw-footer-classic__sitemap a:hover { color: var(--primary); }
/* Dropdown sub-groups nested inside the Sitemap column. */
.dw-footer-classic__sitemap-group { margin-top: 1.75rem; }
.dw-footer-classic__subheading {
  margin: 0 0 .85rem; font-size: 1rem; font-weight: 700; color: var(--text);
}
/* Disclaimer */
.dw-footer-classic__disclaimer { margin-top: 2.5rem; }
.dw-footer-classic__disclaimer .dw-footer-classic__heading { font-size: .859375rem; }
.dw-footer-classic__disclaimer p { margin: 0; width: 100%; max-width: 100%; color: var(--text-muted); font-size: 93.75%; line-height: 1.4; }
/* Financial disclosure: clamp to 3 lines until expanded. */
.dw-footer-classic__finance.is-clamped:not(.is-open) p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.dw-footer-classic__readmore {
  margin-top: .75rem; padding: 0; background: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 400; font-size: .8125rem; color: var(--text);
  text-decoration: underline; text-underline-offset: 2px;
}
.dw-footer-classic__readmore:hover { color: var(--primary); }
/* Bottom bar */
.dw-footer-classic__bottom {
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--border);
  /* Legal (left) and links (right) share the top row; the Dealer Websites credit
     sits centred on its own row below the links. */
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1rem 2rem;
}
.dw-footer-classic__bottom .dw-footer-classic__legal  { grid-column: 1; grid-row: 1; justify-self: start; }
.dw-footer-classic__bottom .dw-footer-classic__links  { grid-column: 2; grid-row: 1; justify-self: end; }
.dw-footer-classic__bottom .dw-footer-classic__credit { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
.dw-footer-classic__copy { margin: 0; font-weight: 700; }
.dw-footer-classic__reg { margin: .25rem 0 0; color: var(--text-muted); font-size: .9rem; }
/* Dealer Websites credit — muted line centred below the site links; only the
   "Dealer Websites" name is a link. */
.dw-footer-classic__credit {
  margin: 0; font-size: .8125rem; color: var(--text-muted);
}
.dw-footer-classic__credit-link {
  color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px;
  transition: color .15s ease;
}
.dw-footer-classic__credit-link:hover { color: var(--primary); }
.dw-footer-classic__links { display: flex; align-items: center; gap: .75rem; }
.dw-footer-classic__links a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.dw-footer-classic__links a:hover { color: var(--primary); }
/* Pipe separators between the bottom links. */
.dw-footer-classic__links a + a { position: relative; padding-left: .85rem; }
.dw-footer-classic__links a + a::before {
  content: "|"; position: absolute; left: 0; color: var(--text-muted); text-decoration: none;
}
@media (max-width: 767px) {
  .dw-footer-classic__inner { padding: 3.5rem 1.5rem 2.5rem; }
  .dw-footer-classic__cols { gap: 3rem; }
  .dw-footer-classic__sitemap { display: block; }
  .dw-footer-classic__sitemap li { display: inline-block; margin-right: 1.5rem; }
  /* Stack the bottom bar into a single centred column on mobile, keeping the
     credit below the links. */
  .dw-footer-classic__bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .dw-footer-classic__bottom .dw-footer-classic__legal,
  .dw-footer-classic__bottom .dw-footer-classic__credit,
  .dw-footer-classic__bottom .dw-footer-classic__links { grid-column: auto; grid-row: auto; justify-self: center; }
  .dw-footer-classic__bottom .dw-footer-classic__legal  { order: 1; }
  .dw-footer-classic__bottom .dw-footer-classic__links   { order: 2; }
  .dw-footer-classic__bottom .dw-footer-classic__credit  { order: 3; padding-top: 1rem; }
}

/* Footer — heritage: "Reach Out To Us" contact section — a centred header above
   a 3-up row of contact cards (address / phone / email), with social icons
   centred beneath them. */
.dw-footer-heritage__contact-head { max-width: 60rem; margin: 0 auto 3rem; text-align: center; }
.dw-footer-heritage__title {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; color: var(--text);
}
.dw-footer-heritage__intro {
  margin: 0 auto; max-width: 56rem; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-footer-heritage__cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.dw-footer-heritage__card {
  background: var(--bg); border: 1px solid var(--border); border-radius: .75rem; padding: 2rem;
  text-align: center;
}
/* Icon sits inline to the left of the card heading. */
.dw-footer-heritage__card-head { display: flex; align-items: center; justify-content: center; gap: .75rem; margin: 0 0 .75rem; }
.dw-footer-heritage__card-icon { flex: none; display: inline-flex; color: var(--text); }
.dw-footer-heritage__card-icon svg { width: 1.5rem; height: 1.5rem; }
.dw-footer-heritage__card-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text); }
.dw-footer-heritage__card-blurb { margin: 0; color: var(--text-muted); line-height: 1.4; }
.dw-footer-heritage__card-rule { display: block; height: 1px; background: var(--border); margin: 1.5rem 0; }
.dw-footer-heritage__card-value { margin: 0; color: var(--text); background: var(--bg-elevated); padding: .6rem 1rem; border-radius: .5rem; }
.dw-footer-heritage__card-value a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.dw-footer-heritage__card-value a:hover { border-bottom-color: var(--primary); }
/* Phone + email are single-line — pad them to match the 2-line address box */
.dw-footer-heritage__phones,
.dw-footer-heritage__email { padding-top: 1.35rem; padding-bottom: 1.35rem; }
/* Telephone + mobile on one line, separated by a hairline divider. */
.dw-footer-heritage__phones { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem; }
.dw-footer-heritage__phones-sep { width: 1px; height: 1em; background: var(--border); }
.dw-footer-heritage__social { justify-content: center; margin-top: 2.5rem; }
@media (max-width: 767px) {
  .dw-footer-heritage__cards { grid-template-columns: 1fr; }
}
/* Centre the disclaimer + finance disclosure text and their heading underlines. */
.dw-footer-heritage .dw-footer-classic__disclaimer { text-align: center; }
.dw-footer-heritage .dw-footer-classic__disclaimer p { margin-left: auto; margin-right: auto; }
.dw-footer-heritage .dw-footer-classic__heading { text-align: center; }
.dw-footer-heritage .dw-footer-classic__heading::after { left: 50%; transform: translateX(-50%); }

/* Footer — legacy: two columns (address + socials | inline contact). */
.dw-footer-legacy__cols {
  display: grid; grid-template-columns: 1fr auto; gap: 2.5rem 4rem; align-items: center;
}
/* Push the icon badges to the far right of the row. */
.dw-footer-legacy__contact { justify-content: flex-end; }
.dw-footer-legacy__left .dw-footer-classic__social { margin-top: 1.25rem; }
/* Telephone / mobile / email / whatsapp as icon badges only — larger badges. */
.dw-footer-legacy__contact { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.dw-footer-legacy__contact a { display: inline-flex; color: var(--text); }
.dw-footer-legacy__contact a:hover .dw-footer-contact-icon { color: var(--primary); }
.dw-footer-legacy__contact .dw-footer-contact-icon { width: 3rem; height: 3rem; }
.dw-footer-legacy__contact .dw-footer-contact-icon svg { width: 1.5rem; height: 1.5rem; }
/* WhatsApp keeps its brand green. */
.dw-footer-legacy__contact a[aria-label="WhatsApp"] .dw-footer-contact-icon { color: #25D366; }
/* Divider above the financial disclosure. */
.dw-footer-legacy .dw-footer-classic__disclaimer {
  border-top: 1px solid var(--border); padding-top: 2.5rem;
}
@media (max-width: 767px) {
  .dw-footer-legacy__cols { grid-template-columns: 1fr; gap: 2rem; align-items: start; }
  .dw-footer-legacy__contact { justify-content: center; }
  .dw-footer-legacy__left { text-align: center; }
  .dw-footer-legacy__left .dw-footer-classic__social { justify-content: center; }
}

/* --------------------------------------------------------------------------
   Reviews — platform strip (templates/blocks/reviews/reviews-platform.php)
   -------------------------------------------------------------------------- */
.dw-reviews-ratings { background: var(--bg); padding: 3rem 1.5rem; }
/* Centred heading + description (matches services/centered.php). */
.dw-reviews-ratings__heading {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-reviews-ratings__desc {
  margin: 0 auto 2.5rem; max-width: 60ch; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-reviews-ratings__inner {
  max-width: 80rem; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  align-items: stretch;
}
/* When only 1 or 2 rating cards are returned, centre them instead of leaving a
   gap on the right of the 3-column grid (desktop only — mobile stacks). */
@media (min-width: 768px) {
  .dw-reviews-ratings__inner:has(> .dw-reviews-ratings__item:last-child:nth-child(1)) {
    grid-template-columns: minmax(0, 24rem);
    justify-content: center;
  }
  .dw-reviews-ratings__inner:has(> .dw-reviews-ratings__item:last-child:nth-child(2)) {
    grid-template-columns: repeat(2, minmax(0, 24rem));
    justify-content: center;
  }
}
.dw-reviews-ratings__item {
  position: relative; padding: 2rem;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem;
  color: inherit; text-decoration: none;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: .75rem;
  transition: opacity .15s ease;
}
.dw-reviews-ratings__item:hover { opacity: .8; }
/* Borderless variant ($homepageReviewsBorder = false). */
.dw-reviews-ratings--no-border .dw-reviews-ratings__item { border: 0; }
/* Full brand logo (e.g. AutoTrader) — fixed height, intrinsic width. */
.dw-reviews-ratings__logo {
  display: block; height: 2.2rem; width: auto; max-width: none;
  flex: none; color: var(--text);
}
/* CDN logos are white SVGs (built for the dark theme); invert them to dark on
   the light theme so they read on both. */
.theme-white .dw-reviews-ratings__logo,
.theme-platinum .dw-reviews-ratings__logo { filter: brightness(0); }
/* Trustpilot reads a touch small, so bump only its height. */
.dw-reviews-ratings__logo--trustpilot { height: 2.2rem; }
/* AutoTrader logo reads large, so reduce its height. */
.dw-reviews-ratings__logo--autotrader { height: 1.3rem; }
/* CarGurus logo reads large, so reduce its height. */
.dw-reviews-ratings__logo--cargurus { height: 1.98rem; }
/* Brand icon (facebook/google) — monochrome, follows the theme text colour. */
.dw-reviews-ratings__icon { display: inline-flex; color: var(--text); }
.dw-reviews-ratings__icon svg { width: 2rem; height: 2rem; }
/* Text wordmark (autotrader, cargurus, trustpilot, car dealer reviews). */
.dw-reviews-ratings__wordmark {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1;
  letter-spacing: -.5px; color: var(--text);
}
.dw-reviews-ratings__score { margin: 0; color: var(--text-muted); font-size: 1.0625rem; }
.dw-reviews-ratings__score strong { color: var(--text); font-weight: 800; }
.dw-reviews-ratings__stars { display: inline-flex; gap: .15rem; }
.dw-reviews-ratings__star { color: var(--border); display: inline-flex; }
.dw-reviews-ratings__star svg { width: 1.25rem; height: 1.25rem; }
.dw-reviews-ratings__star svg path { fill: currentColor; }
.dw-reviews-ratings__star.is-on { color: #f5b301; }
@media (max-width: 767px) {
  .dw-reviews-ratings__inner { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Reviews page (reviews.php) — list of customer reviews
   -------------------------------------------------------------------------- */
.dw-reviews { padding: 1.5rem; background: var(--bg); }
.dw-reviews__list { display: flex; flex-direction: column; gap: 1rem; }
/* Full-width (single-column) list is centred to a readable width. */
.dw-reviews:not(.dw-reviews--split) > .dw-reviews__list,
.dw-reviews:not(.dw-reviews--split) > .dw-reviews__empty { max-width: 60rem; margin-inline: auto; }

/* Two-column layout ($reviewsForm = 1): reviews (transparent column) + form. */
.dw-reviews__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start;
}
.dw-reviews__col { align-self: start; min-width: 0; }
.dw-reviews__form { align-self: start; }
.dw-reviews__empty { color: var(--text-muted); }
@media (max-width: 900px) {
  .dw-reviews__grid { grid-template-columns: 1fr; }
}

.dw-reviews__item {
  padding: 1.5rem 1.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--dw-btn-radius, .5rem);
}
.dw-reviews__stars { display: inline-flex; gap: .12rem; color: #f5b301; margin-bottom: .55rem; }
.dw-reviews__star { width: 1.05rem; height: 1.05rem; }
.dw-reviews__star path { fill: currentColor; }
.dw-reviews__title { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 700; line-height: 1.35; color: var(--text); }
.dw-reviews__body { margin: 0; line-height: 1.7; color: var(--text); }
.dw-reviews__body.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.dw-reviews__vehicle { font-style: italic; color: var(--text-muted); }
.dw-reviews__more {
  margin-top: .55rem; padding: 0; background: none; border: 0;
  font: inherit; font-weight: 600; color: var(--primary); cursor: pointer;
}
.dw-reviews__more:hover { text-decoration: underline; }
.dw-reviews__meta { margin: .9rem 0 0; font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.dw-reviews__pagination { max-width: 60rem; margin: 0 auto; padding: 0 1.5rem 2.5rem; }

/* --------------------------------------------------------------------------
   Brands — manufacturer logo carousel, 6 per view + arrows
   (templates/blocks/brands/carousel.php)
   -------------------------------------------------------------------------- */
.dw-brands {
    --dw-brands-gap: 1.5rem;
    --dw-brands-cols: 6;
    background: var(--bg);
}
.dw-brands__inner {
    position: relative;
    max-width: 80rem; margin: 0 auto; padding: 2.25rem 3.75rem;
}
.dw-brands__viewport {
    display: flex; gap: var(--dw-brands-gap);
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
}
.dw-brands__viewport::-webkit-scrollbar { display: none; }
.dw-brands__item {
    flex: 0 0 calc((100% - (var(--dw-brands-cols) - 1) * var(--dw-brands-gap)) / var(--dw-brands-cols));
    display: flex; align-items: center; justify-content: center;
    scroll-snap-align: start;
}
.dw-brands__logo {
    height: 64px; width: auto; max-width: 100%; display: block; object-fit: contain;
    opacity: .85; transition: opacity .2s ease;
}
.dw-brands__link:hover .dw-brands__logo,
.dw-brands__logo:hover { opacity: 1; }

/* Prev / next arrows, vertically centred over the section gutters. */
.dw-brands__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; padding: 0; z-index: 2;
    color: var(--text); background: var(--bg);
    border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.dw-brands__arrow:hover { color: var(--primary); border-color: var(--primary); }
.dw-brands__arrow:disabled { opacity: .35; cursor: default; color: var(--text); border-color: var(--border); }
.dw-brands__arrow svg { width: 1.1rem; height: 1.1rem; }
.dw-brands__arrow--prev { left: .5rem; }
.dw-brands__arrow--next { right: .5rem; }

/* Fewer logos per view on narrower screens. */
@media (max-width: 1024px) { .dw-brands { --dw-brands-cols: 4; } }
@media (max-width: 768px)  { .dw-brands { --dw-brands-cols: 3; } }
@media (max-width: 520px)  { .dw-brands { --dw-brands-cols: 2; } .dw-brands__logo { height: 52px; } }

/* Awards carousel (templates/blocks/brands/awards.php) — scroll-snap row of
   award badges with prev/next arrows; centred when they all fit. */
.dw-awards { background: var(--bg); }
.dw-awards__inner { position: relative; max-width: 80rem; margin: 0 auto; padding: 2.5rem 3.75rem; }
.dw-awards__viewport {
    display: flex; gap: 1.5rem; justify-content: safe center;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    scrollbar-width: none; -ms-overflow-style: none;
}
.dw-awards__viewport::-webkit-scrollbar { display: none; }
.dw-awards__item { flex: 0 0 auto; scroll-snap-align: start; }
.dw-awards__img {
    height: 150px; width: auto; max-width: 100%; display: block; object-fit: contain;
    border-radius: var(--dw-btn-radius, .5rem);
}
/* Prev / next arrows, vertically centred over the section gutters. */
.dw-awards__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.5rem; height: 2.5rem; padding: 0; z-index: 2;
    color: var(--text); background: var(--bg);
    border: 1px solid var(--border); border-radius: 50%; cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.dw-awards__arrow:hover { color: var(--primary); border-color: var(--primary); }
.dw-awards__arrow:disabled { opacity: .35; cursor: default; color: var(--text); border-color: var(--border); }
.dw-awards__arrow svg { width: 1.1rem; height: 1.1rem; }
.dw-awards__arrow--prev { left: .5rem; }
.dw-awards__arrow--next { right: .5rem; }
@media (max-width: 520px) { .dw-awards__img { height: 120px; } }

/* --------------------------------------------------------------------------
   Reviews — testimonial carousel (templates/blocks/reviews/reviews-carousel.php)
   -------------------------------------------------------------------------- */
.dw-reviews-carousel { background: var(--bg); padding: 3rem 1.5rem; }
.dw-reviews-carousel__inner { position: relative; max-width: 80rem; margin: 0 auto; }
/* Centred heading + description (matches services/centered.php). */
.dw-reviews-carousel__heading {
  margin: 0 0 .5rem; text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1;
  color: color-mix(in srgb, var(--text) 90%, var(--bg));
}
.dw-reviews-carousel__desc {
  margin: 0 auto 2rem; max-width: 60ch; text-align: center; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
/* Scroll-snap track — cards scroll horizontally, arrows nudge by one card. */
.dw-reviews-carousel__viewport {
  display: flex; gap: 1.5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: .5rem 0;
}
.dw-reviews-carousel__viewport::-webkit-scrollbar { display: none; }
.dw-reviews-carousel__card {
  flex: 0 0 calc((100% - 3rem) / 3); scroll-snap-align: start;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1rem;
  padding: 2rem; border: 1px solid var(--border); border-radius: .75rem;
  background: var(--bg-elevated);
}
/* Borderless variant ($homepageReviewsBorder = false). */
.dw-reviews-carousel--no-border .dw-reviews-carousel__card { border: 0; }
.dw-reviews-carousel__title {
  margin: 0; font-size: 1.125rem; font-weight: 700; line-height: 1.4; color: var(--text);
}
.dw-reviews-carousel__customer {
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
}
/* "Read more" button — opens the full review in a modal. */
.dw-reviews-carousel__more {
  margin-top: .25rem; padding: .5rem 1.25rem; cursor: pointer;
  font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--text); background: transparent;
  border: 1px solid var(--border); border-radius: 999px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dw-reviews-carousel__more:hover {
  background: var(--primary); color: var(--primary-contrast); border-color: var(--primary);
}
/* Modal. */
.dw-reviews-carousel__modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.dw-reviews-carousel__modal[hidden] { display: none; }
.dw-reviews-carousel__backdrop {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .6);
}
.dw-reviews-carousel__dialog {
  position: relative; z-index: 1; width: 100%; max-width: 34rem;
  max-height: 85vh; overflow-y: auto;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: .75rem;
  padding: 2.5rem 2rem 2rem; text-align: left;
}
.dw-reviews-carousel__close {
  position: absolute; top: .75rem; right: .75rem;
  width: 2.25rem; height: 2.25rem; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted); background: transparent; border: 0; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.dw-reviews-carousel__close:hover { background: var(--bg-subtle); color: var(--text); }
.dw-reviews-carousel__close svg { width: 1.25rem; height: 1.25rem; }
.dw-reviews-carousel__modal-title { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.dw-reviews-carousel__modal-desc { margin: 0 0 1.25rem; color: var(--text); line-height: 1.4; text-wrap: pretty; }
.dw-reviews-carousel__modal-rule { margin: 1.25rem 0; border: 0; border-top: 1px solid var(--border); width: 3rem; }
.dw-reviews-carousel__modal-customer { margin: 0; font-weight: 600; }
.dw-reviews-carousel__modal-location,
.dw-reviews-carousel__modal-vehicle { margin: .25rem 0 0; color: var(--text-muted); font-size: .9375rem; }
.dw-reviews-carousel__stars { display: inline-flex; gap: .15rem; }
.dw-reviews-carousel__star { color: var(--border); display: inline-flex; }
.dw-reviews-carousel__star svg { width: 1.25rem; height: 1.25rem; }
.dw-reviews-carousel__star svg path { fill: currentColor; }
.dw-reviews-carousel__star.is-on { color: #f5b301; }
/* Prev/next arrows. */
.dw-reviews-carousel__nav { display: flex; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.dw-reviews-carousel__arrow {
  width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elevated);
  color: var(--text); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.dw-reviews-carousel__arrow:hover { background: var(--primary); color: var(--primary-contrast); }
.dw-reviews-carousel__arrow svg { width: 1.25rem; height: 1.25rem; }
@media (max-width: 991px) {
  .dw-reviews-carousel__card { flex-basis: calc((100% - 1.5rem) / 2); }
}
@media (max-width: 767px) {
  .dw-reviews-carousel__card { flex-basis: 100%; }
}

/* Floating back-to-top button — square, appears at the bottom of the page. */
.dw-back-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60;
  width: 2.75rem; height: 2.75rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: var(--primary-contrast);
  border: 0; border-radius: var(--dw-btn-radius, .5rem); cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.dw-back-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.dw-back-top svg { width: 1.25rem; height: 1.25rem; }

/* Website Unavailable page (status = 0). The body/centering rule stays inline in
   includes/header.php; these are the component styles. */
.unavailable { max-width: 32rem; }
.unavailable h1 { font-size: 1.75rem; margin: 0 0 .75rem; }
.unavailable p { font-size: 1rem; line-height: 1.6; margin: .25rem 0; color: #444; }
.unavailable a { color: #1c1c1c; font-weight: 600; }

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.dw-breadcrumbs { margin: 0 0 1rem; }
.dw-breadcrumbs__list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: nowrap; align-items: center; gap: .5rem;
    font-size: .85rem;
    /* Always one line — scroll horizontally rather than wrap. */
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.dw-breadcrumbs__item { display: inline-flex; align-items: center; gap: .5rem; flex: 0 0 auto; white-space: nowrap; }
.dw-breadcrumbs__item + .dw-breadcrumbs__item::before {
    content: "/"; opacity: .5; -webkit-user-select: none; user-select: none;
}
.dw-breadcrumbs__item a { color: var(--primary); text-decoration: none; }
.dw-breadcrumbs__item a:hover { text-decoration: underline; }
.dw-breadcrumbs__item[aria-current="page"] { opacity: .7; }

/* ==========================================================================
   Standard content pages (terms, privacy, ...) — reusable global .dw-page wrapper
   --------------------------------------------------------------------------
   Mirrors the CTA blocks: a full-width section with 3rem 1.5rem padding and a
   centred, elevated inner card. All content typography (headings, paragraphs,
   lists, address) is defined on .dw-page__inner, so every standard page that uses
   this markup shares the same body styling — gaps, padding, margins, ul, li.
   ========================================================================== */
.dw-page { background: var(--bg); padding: 1.5rem 1.5rem; }
.dw-page__inner {
    margin: 0 auto; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    padding: 1.5rem 2rem;
}
/* Sitemap link lists — wrapping rows of pill links (sitemap.php). */
.dw-sitemap__list {
    list-style: none; margin: 1rem 0 1.5rem; padding: 0;
    display: flex; flex-wrap: wrap; gap: .5rem;
}
.dw-sitemap__list li { margin: 0; }
.dw-sitemap__list a {
    display: inline-block; padding: .4rem .9rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    font-size: .9rem; line-height: 1.2; text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.dw-sitemap__list a:hover {
    background: var(--primary); color: var(--primary-contrast, #fff);
    border-color: var(--primary);
}
.dw-sitemap__list a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Headings */
.dw-page__inner h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
    color: color-mix(in srgb, var(--text) 92%, var(--bg));
}
.dw-page__inner h2 {
    margin: 1.25rem 0 .85rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 700; line-height: 1.3; letter-spacing: -0.01em;
    color: var(--text);
}
.dw-page__inner h2:first-of-type { margin-top: 1.5rem; }
.dw-page__inner h3 {
    margin: 1.75rem 0 .6rem;
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    font-weight: 700; line-height: 1.35; color: var(--text);
}

/* Body copy, lists, address — global across all standard pages */
.dw-page__inner p { margin: 0 0 0.5rem; line-height: 1.75; color: var(--text); }
.dw-page__inner ul { margin: 0 0 1.35rem; padding-left: 1.35rem; }
.dw-page__inner li { margin: 0 0 .55rem; line-height: 1.75; color: var(--text); }
.dw-page__inner li::marker { color: var(--primary); }
.dw-page__inner a { color: var(--primary); text-decoration: underline; }
.dw-page__inner address {
    font-style: normal; line-height: 1.8; margin: .5rem 0 0; color: var(--text);
}
.dw-page__inner code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: .9em;
    padding: .1rem .4rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: .3rem;
    color: var(--text);
}

/* Boxed panel listing the cookies currently stored on the visitor's device. */
.dw-page__inner .dw-cookie-list {
    margin: 0 0 1.35rem;
    padding: 1rem 1rem 1rem 2.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: .4rem;
}
.dw-page__inner .dw-cookie-list li:last-child { margin-bottom: 0; }

/* "Back to homepage" link at the foot of a standard page. */
.dw-page__back {
    display: inline-flex; align-items: center; gap: .4rem;
    margin-top: 2rem;
    color: var(--primary); font-weight: 600; text-decoration: none;
}
.dw-page__back:hover { text-decoration: underline; }
.dw-page__back svg { width: 1rem; height: 1rem; }

@media (max-width: 767px) {
    .dw-page { padding: 2.5rem 1.25rem; }
    .dw-page__inner { padding: 2rem 1.5rem; }
}

/* Steps block (.dw-vehicle__step) — reusable "how it works" cards for the
   part-exchange / finance intros. Selectors are scoped so the generic
   .dw-page__inner element rules don't override the block. */
.dw-vehicle__step {
    list-style: none; margin: 2rem 0; padding: 0;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.dw-vehicle__step .dw-vehicle__step-item {
    display: flex; align-items: center; gap: 1.25rem;
    margin: 0; padding: 2rem 1.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__step .dw-vehicle__step-icon {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    width: 3.5rem; height: 3.5rem; border-radius: 50%;
    background: var(--primary); color: var(--primary-contrast);
}
.dw-vehicle__step .dw-vehicle__step-icon svg { width: 1.5rem; height: 1.5rem; }
.dw-vehicle__step .dw-vehicle__step-content { display: block; }
.dw-vehicle__step .dw-vehicle__step-title {
    margin: 0 0 .5rem; padding: 0; border: 0;
    font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--text);
}
.dw-vehicle__step .dw-vehicle__step-text {
    margin: 0; font-size: .95rem; line-height: 1.6; color: var(--text-muted);
}
.dw-vehicle__step .dw-vehicle__step-text a { color: var(--primary); }
@media (max-width: 900px) {
    .dw-vehicle__step { grid-template-columns: 1fr; }
}
/* Stacked variant — vertical, centred cards (used in a form aside, e.g. sell). */
.dw-vehicle__step--stacked { grid-template-columns: 1fr; margin: 0; gap: 1.25rem; }
.dw-vehicle__step--stacked .dw-vehicle__step-item {
    flex-direction: column; align-items: center; text-align: center;
    gap: 1rem; padding: 2rem 1.75rem;
}
.dw-vehicle__step--stacked .dw-vehicle__step-icon {
    width: 3rem; height: 3rem;
    background: var(--primary); color: var(--primary-contrast);
}
/* Steps aside is a plain (card-less) column so the step cards sit on the page. */
.dw-form__col--steps { align-self: start; }
/* Keep the back link neutral inside .dw-page__inner (whose generic `a` rule
   otherwise tints it with the brand colour + underline). */
.dw-page__inner a.dw-vehicle__back,
.dw-page__inner a.dw-vehicle__back:hover {
    color: var(--text-muted); text-decoration: none; border-color: var(--border);
}

/* Button-style links (e.g. the warranty PDF download) inside .dw-page__inner
   must keep their button colour, not the generic tinted/underlined link style. */
.dw-page__inner a.dw-btn { text-decoration: none; }
.dw-page__inner a.dw-btn-primary,
.dw-page__inner a.dw-btn-primary:hover { color: var(--primary-contrast); }
.dw-page__inner a.dw-btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ==========================================================================
   Two-column form layout — reusable .dw-form
   --------------------------------------------------------------------------
   A full-width section holding a two-column grid: the primary column carries a
   form (contact, part exchange, finance, ...) and the secondary column is for
   supporting content (map, opening hours, info) — left empty for now. Shares
   the same section padding and elevated-card styling as .dw-page. All colours,
   spacing and radius come from CSS variables.
   ========================================================================== */
.dw-form { background: var(--bg); padding: 1.5rem 1.5rem; }
.dw-form__inner {
    /* No max-width — content expands to fill the section, matching .dw-page. */
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
    align-items: start;
}

/* Columns */
.dw-form__col {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    padding: 2.5rem 2rem;
}
.dw-form__col--aside { padding: 0; overflow: hidden; }

/* "Vehicle of Interest" panel (contact form aside on vehicle enquiries) */
.dw-vehicle__selected { display: flex; flex-direction: column; height: 100%; }
.dw-vehicle__selected-media { display: block; }
.dw-vehicle__selected-media img {
    display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover;
}
.dw-vehicle__selected-body { padding: 2rem; }
.dw-vehicle__selected-title {
    margin: 0 0 .35rem; font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; color: var(--text);
}
.dw-vehicle__selected-change { margin: 0 0 1.5rem; font-size: .9rem; color: var(--text-muted); }
.dw-vehicle__selected-change a { color: var(--primary); text-decoration: underline; }
.dw-vehicle__selected-specs {
    margin: 0; padding: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem;
}
.dw-vehicle__selected-spec {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .5rem 0; border-bottom: 1px solid var(--border);
}
.dw-vehicle__selected-label { margin: 0; font-size: .95rem; color: var(--text-muted); }
.dw-vehicle__selected-value {
    margin: 0; font-size: .95rem; font-weight: 700; text-align: right; color: var(--text);
}
@media (max-width: 768px) {
    .dw-vehicle__selected-specs { grid-template-columns: 1fr; gap: 0; }
    .dw-vehicle__selected-body { padding: 1.5rem; }
}

/* Headings + intro copy */
.dw-form__title {
    margin: 0 0 1rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
    color: color-mix(in srgb, var(--text) 92%, var(--bg));
}
.dw-form__intro { margin: 0 0 .75rem; line-height: 1.75; color: var(--text); }
.dw-form__intro a[href^="tel:"] {
    color: inherit; text-decoration: none;
    border-bottom: 1px dotted currentColor;
}
.dw-form__required { margin: 0 0 1.5rem; font-size: .875rem; color: var(--text-muted); }
.dw-form__legend {
    margin: 0 0 1.25rem; padding: 0;
    font-size: clamp(1.15rem, 2.4vw, 1.4rem);
    font-weight: 700; letter-spacing: -0.01em; color: var(--text);
}

/* Field grid */
.dw-form__grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem;
}
.dw-form__field { display: flex; flex-direction: column; gap: .4rem; }
.dw-form__field--full { grid-column: 1 / -1; }

.dw-form__label { font-weight: 600; font-size: .95rem; color: var(--text); }

/* Submission feedback + per-field errors */
.dw-form__alert {
    margin: 0 0 1.5rem; padding: .9rem 1.1rem;
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    line-height: 1.6;
}
.dw-form__alert--success {
    color: #166534; background: #f0fdf4; border-color: #bbf7d0;
}
.dw-form__alert--error {
    color: #991b1b; background: #fef2f2; border-color: #fecaca;
}
.dw-form__alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.dw-form__error { margin-top: .1rem; font-size: .75rem; color: #dc2626; }
.dw-form__input[aria-invalid="true"],
.dw-form__select[aria-invalid="true"],
.dw-form__textarea[aria-invalid="true"] { border-color: #dc2626; }
.dw-form__label .dw-form__req { color: var(--primary); }

.dw-form__input,
.dw-form__select,
.dw-form__textarea {
    width: 100%;
    padding: .75rem .9rem;
    font: inherit; color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dw-form__input::placeholder,
.dw-form__textarea::placeholder { color: var(--text-muted); }
.dw-form__input:focus,
.dw-form__select:focus,
.dw-form__textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.dw-form__textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }
.dw-form__select { appearance: none; cursor: pointer; }
.dw-form__input--upper { text-transform: uppercase; }
.dw-form__input--upper::placeholder { text-transform: none; }
.dw-form__file {
    width: 100%;
    padding: .55rem .9rem;
    font: inherit; color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    cursor: pointer;
}
.dw-form__file::file-selector-button {
    margin-right: .75rem; padding: .4rem .8rem;
    font: inherit; font-weight: 600; color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    cursor: pointer;
}
.dw-form__file[aria-invalid="true"] { border-color: #dc2626; }

/* Conditional finance sections (previous address / employment) + notes. */
.dw-is-hidden { display: none !important; }
.dw-form__note { margin: 0 0 1rem; font-size: .8rem; color: var(--text-muted); }
.dw-form__legal { margin: 1.25rem 0 0; }
.dw-form__legal p { margin: 0 0 .6rem; font-size: .65rem; line-height: 1.6; color: var(--text-muted); }
.dw-form__legal a { color: var(--primary); }

/* Actions + fine print */
.dw-form__actions { margin-top: 1.75rem; }
.dw-form__actions .dw-btn { width: 100%; justify-content: center; }
.dw-form__disclaimer {
    margin: 1.5rem 0 0; font-size: .8rem; line-height: 1.7; color: var(--text-muted);
}
.dw-form__disclaimer a { color: var(--primary); text-decoration: underline; }

/* Required consent checkbox on the disclaimer */
.dw-form__consent { margin-top: 1.5rem; }
.dw-form__consent-label {
    display: flex; align-items: flex-start; gap: .6rem; cursor: pointer;
}
.dw-form__consent-check {
    flex: none; width: 1.1rem; height: 1.1rem; margin: .1rem 0 0;
    accent-color: var(--primary); cursor: pointer;
}
.dw-form__consent-label .dw-form__disclaimer { margin: 0; }
.dw-form__consent-check[aria-invalid="true"] { outline: 2px solid #dc2626; outline-offset: 2px; }

/* "Secure payment powered by Stripe" badge under the reserve submit button. */
.dw-reserve-secure {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    margin: .85rem 0 0; font-size: .8rem; color: var(--text-muted);
}
.dw-reserve-secure svg { width: .95rem; height: .95rem; flex: none; }
.dw-reserve-secure__logo { height: 20px; width: auto; display: inline-block; }
/* The Stripe SVG is white — invert it to black on the light theme so it shows. */
.theme-white .dw-reserve-secure__logo,
.theme-platinum .dw-reserve-secure__logo { filter: brightness(0); }

/* Reservation terms / fine print (reserve.php) */
.dw-form__terms { margin-top: 1.25rem; color: var(--text-muted); }
.dw-form__terms p { margin: 0 0 .6rem; font-size: .78rem; line-height: 1.5; }
.dw-form__terms p:last-child { margin-bottom: 0; }
.dw-form__terms a { color: var(--primary); text-decoration: underline; }

/* Aside placeholder (map / info to be added later) */
.dw-form__aside-placeholder {
    display: flex; align-items: center; justify-content: center;
    min-height: 100%; padding: 3rem 1.5rem;
    color: var(--text-muted); text-align: center;
}

@media (max-width: 900px) {
    .dw-form__inner { grid-template-columns: 1fr; }
    .dw-form__col--aside { min-height: 320px; }
}
@media (max-width: 767px) {
    .dw-form { padding: 2.5rem 1.25rem; }
    .dw-form__col { padding: 2rem 1.5rem; }
    .dw-form__grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Google Map block — reusable .dw-map (templates/blocks/cta/map.php)
   --------------------------------------------------------------------------
   Fills its container (e.g. the .dw-form aside column) with a sensible default
   height. Dark/light map styling is handled in the block's JS via the theme.
   ========================================================================== */
.dw-map { display: flex; flex-direction: column; width: 100%; height: 100%; }
.dw-map__canvas {
    flex: 1 1 auto; width: 100%;
    min-height: 400px;
    background: var(--bg-subtle);
}

/* "Get in touch" contact block shown below the map (toggled via _text.php) */
.dw-map__contact {
    flex: none;
    padding: 1.25rem;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}
.dw-map__contact-label {
    margin: 0 0 .6rem;
    font-weight: 700; font-size: 1.05rem; color: var(--text);
}
.dw-map__divider {
    display: block; width: 2.5rem; height: 3px;
    margin: 0 0 .85rem;
    background: var(--primary); border-radius: 2px;
}
.dw-map__contact-list { list-style: none; margin: 0; padding: 0; }
.dw-map__contact-list li { margin: 0 0 .35rem; line-height: 1.6; color: var(--text); }
.dw-map__contact-list li:last-child { margin-bottom: 0; }
.dw-map__contact-key { font-weight: 600; color: var(--text); }
.dw-map__contact-list a { color: var(--primary); text-decoration: none; }
.dw-map__contact-list a:hover { text-decoration: underline; }

/* "Get directions" postcode form pinned below the map canvas */
.dw-map__directions {
    flex: none;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}
.dw-map__directions-label {
    display: block; margin: 0 0 .5rem;
    font-weight: 600; font-size: .95rem; color: var(--text);
}
.dw-map__directions-row { display: flex; gap: .6rem; }
.dw-map__directions-input {
    flex: 1 1 auto; min-width: 0;
    padding: .75rem .9rem;
    font: inherit; color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dw-map__directions-input::placeholder { color: var(--text-muted); }
.dw-map__directions-input:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.dw-map__directions-btn { flex: none; }
.dw-map--empty {
    display: flex; align-items: center; justify-content: center;
    min-height: clamp(320px, 45vh, 520px);
    background: var(--bg-subtle);
    border-radius: var(--dw-btn-radius, .5rem);
}
.dw-map__notice {
    margin: 0; padding: 1.5rem; text-align: center;
    color: var(--text-muted); line-height: 1.6;
}

/* ==========================================================================
   Body-type visual filter (templates/blocks/vehicles/bodytype.php)
   ========================================================================== */
.dw-bodytype-filter { background: var(--bg); padding: 2rem 1.5rem; }
.dw-bodytype-filter__title {
    margin: 0 0 1.5rem; text-align: center; font-weight: 700; letter-spacing: -.01em;
    font-size: 1rem; color: var(--text);
}
.dw-bodytype-filter__grid {
    display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end;
    gap: 1rem 2rem;
}
.dw-bodytype-filter__option {
    flex: 0 1 170px;
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    padding: .5rem; border-radius: var(--dw-btn-radius, .5rem);
    text-decoration: none; color: var(--text-muted);
    transition: color .15s ease, transform .15s ease;
}
.dw-bodytype-filter__option:hover { color: var(--primary); transform: translateY(-2px); }
.dw-bodytype-filter__img { width: 100%; max-width: 160px; height: auto; display: block; }
.dw-bodytype-filter__label { font-size: .9rem; text-align: center; }
@media (max-width: 640px) {
    .dw-bodytype-filter__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .dw-bodytype-filter__option { flex: none; }
}

/* ==========================================================================
   Stock filter — make/model/body/fuel/transmission bar + sort controls
   --------------------------------------------------------------------------
   Full-width bar above the stock grid (templates/blocks/vehicles/filter.php).
   All colours, spacing and radius come from CSS variables.
   ========================================================================== */
/* Mirrors .dw-page: a grey gutter section wrapping an elevated, bordered card. */
.dw-stock-filter { background: var(--bg); padding: 1.5rem 1.5rem 1rem; }
.dw-stock-filter > form {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    padding: 1.5rem 2rem;
}
/* Reset link + layout toggles — outside/below the filter card, compact. */
.dw-stock-reset {
    display: flex; align-items: center; gap: .5rem .85rem;
    background: var(--bg); padding: 0 1.5rem 1.25rem;
    font-size: .9rem; color: var(--text-muted);
}
/* Stock page: drop the intro card's bottom padding so it sits close to the filter. */
.dw-page:has(+ .dw-stock) { padding-bottom: 0; }
@media (max-width: 767px) {
    .dw-stock-filter { padding: 1.25rem 1.25rem 1rem; }
    .dw-stock-grid { padding: 1.25rem 1.25rem 1rem; }
    .dw-stock .dw-stock-grid { margin: 0 1.25rem 1.25rem; }
    .dw-stock--sold .dw-stock-grid { margin-top: 1.25rem; }
    .dw-stock-filter > form { padding: 2rem 1.5rem; }
    .dw-stock-reset { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* Options grid: filters + controls + sort + price all in one grid.
   1 col (mobile) -> 2 (sm) -> 6 (lg). */
.dw-stock-filter__grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .dw-stock-filter__grid { grid-template-columns: repeat(6, 1fr); }
    /* Row 2: Order by (col 5), Price (col 6). */
    .dw-stock-filter__order { grid-column: 5 / 6; grid-row: 2; }
    .dw-stock-filter__range { grid-column: 6 / 7; grid-row: 2; }
}

/* Selects (filter + sort share this look) */
.dw-stock-filter__select {
    width: 100%; cursor: pointer;
    padding: .7rem 2.4rem .7rem .9rem;
    font: inherit; color: var(--text);
    background-color: var(--bg);
    /* Custom chevron so its position is controllable (native arrow can't move). */
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.1rem center;
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    transition: border-color .15s ease, box-shadow .15s ease;
    text-align: center;
}
.dw-stock-filter__select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.dw-stock-filter__select:disabled { opacity: .5; cursor: not-allowed; }
/* Stronger border when a select has an active (chosen) value. */
.dw-stock-filter__select--active { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }

/* Order-by + Price range cells — the select fills the grid column. */
.dw-stock-filter__order,
.dw-stock-filter__range { display: block; min-width: 0; }
.dw-stock-filter__order .dw-stock-filter__select,
.dw-stock-filter__range .dw-stock-filter__select { width: 100%; text-align: center;}

/* Search button */
.dw-stock-filter__search {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .7rem 1.25rem;
    font-weight: 600; font-size: .95rem;
    color: var(--primary-contrast); background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--dw-btn-radius, .5rem);
    text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.dw-stock-filter__search:hover {
    background: var(--primary-hover); border-color: var(--primary-hover);
}

.dw-stock-filter__sep { opacity: .4; -webkit-user-select: none; user-select: none; }
.dw-stock-filter__link {
    display: inline-flex; align-items: center; gap: .35rem;
    color: var(--primary); font-weight: 600; text-decoration: none;
}
.dw-stock-filter__link:hover { text-decoration: underline; }
.dw-stock-filter__toggle {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-muted); text-decoration: none; transition: color .15s ease;
}
.dw-stock-filter__toggle:hover { color: var(--primary); }
.dw-stock-filter__icon { width: 1.15rem; height: 1.15rem; flex: none; }

/* ==========================================================================
   Vehicle detail page — header block
   ========================================================================== */
.dw-page--breadcrumbs { padding-bottom: 0; }
.dw-vehicle { padding: 1rem 1.5rem 1.5rem; }
.dw-vehicle__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem 2rem; flex-wrap: wrap;
    padding-bottom: 1.5rem; border-bottom: 1px solid var(--border);
}
.dw-vehicle__identity { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.dw-vehicle__logo { width: 3rem; height: 3rem; object-fit: contain; flex: none; }
.dw-vehicle__titles { min-width: 0; }
.dw-vehicle__title { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.2; color: var(--text); }
.dw-vehicle__sub { margin: .25rem 0 0; font-size: 1rem; font-weight: 600; color: var(--text); }
.dw-vehicle__back {
    display: inline-flex; align-items: center;
    margin: .5rem 0 0; padding: .2rem .6rem;
    font-size: .75rem; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
    transition: color .15s ease, border-color .15s ease;
}
.dw-vehicle__back:hover { color: var(--primary); border-color: var(--primary); }
.dw-vehicle__pricing { text-align: right; flex: none; background-color: var(--bg-elevated); padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem); }
.dw-vehicle__price { margin: 0; font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--text); }
.dw-vehicle__vat { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.dw-vehicle__finance { margin: .3rem 0 0; font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.dw-vehicle__finance small { font-weight: 500; }
.dw-vehicle__finance-link { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; cursor: pointer; }
.dw-vehicle__finance-link:hover { opacity: .8; }
/* Action bar — tools (left) + CTAs (right) on an elevated bar, with page gutter. */
.dw-vehicle__actions { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__actions-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: var(--bg-elevated); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__tools { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.dw-vehicle__ctas { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }
.dw-vehicle__cta {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 1.4rem; border-radius: var(--dw-btn-radius, .5rem);
    font-weight: 600; font-size: .95rem; line-height: 1.25rem; text-decoration: none;
    color: var(--text); background: var(--bg-subtle);
    border: 1px solid var(--border);
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
/* Match the icon box to the text line-height so icon-only and text buttons
   share the same height. */
.dw-vehicle__cta svg { width: 1.25rem; height: 1.25rem; flex: none; }
.dw-vehicle__cta:hover { border-color: var(--primary); color: var(--primary); }
/* WhatsApp: keep the standard button, just colour the icon green. */
.dw-vehicle__cta--whatsapp svg { color: #25D366; }
.dw-vehicle__cta--whatsapp:hover { border-color: #25D366; color: #25D366; }
.dw-vehicle__cta--primary {
    color: var(--primary-contrast); background: var(--primary); border-color: var(--primary);
}
.dw-vehicle__cta--primary:hover {
    background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-contrast);
}
/* Enquire split button: the "Enquire" link and the menu toggle sit flush, so
   they read as one control. Only the outer corners are rounded. */
.dw-vehicle__enquire { display: inline-flex; align-items: stretch; }
.dw-vehicle__enquire-main {
    border-top-right-radius: 0; border-bottom-right-radius: 0;
}
.dw-vehicle__enquire-toggle {
    padding-left: .8rem; padding-right: .8rem;
    border-top-left-radius: 0; border-bottom-left-radius: 0;
    border-left-color: rgba(255,255,255,.35); cursor: pointer;
}
.dw-vehicle__enquire-menu { min-width: 200px; }
/* Open on hover as well as click (the toggle button still works for touch/keyboard). */
.dw-vehicle__enquire:hover .dw-dropdown-menu,
.dw-vehicle__enquire.is-open .dw-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
@media (max-width: 640px) {
    /* Keep every action on one row. The phone icon is redundant here (Call Now
       lives in the Enquire dropdown), so drop it to make room. */
    .dw-vehicle__actions-bar { flex-wrap: nowrap; justify-content: space-between; }
    .dw-vehicle__cta { padding: .55rem 1.1rem; font-size: .9rem; }
    .dw-vehicle__cta--call { display: none; }
}

/* Video — full-width responsive 16:9 YouTube embed (same gutter). */
.dw-vehicle__video { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__video-frame {
    position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
    background: #000; border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__video-frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}

/* Features — labelled attribute cards (same gutter). */
.dw-vehicle__features { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__features-title,
.dw-vehicle__description-title,
.dw-vehicle__specification-title,
.dw-vehicle__options-title {
    margin: 0 0 1.25rem; padding-bottom: .75rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem; font-weight: 800; color: var(--text);
}
/* Related vehicles — reuses the stock card grid. */
.dw-vehicle__related-head { padding: 1rem 1.5rem; }
.dw-vehicle__related-title { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--text); }
.dw-vehicle__related-intro { margin: .5rem 0 0; line-height: 1.6; color: var(--text-muted); }
.dw-vehicle__related-intro a { color: var(--primary); text-decoration: underline; }

/* Share — centred social share buttons. */
.dw-vehicle__disclaimer { padding: 0 1.5rem 2rem; }
.dw-vehicle__disclaimer-inner {
    padding: 1.25rem 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__disclaimer-title { margin: 0 0 .5rem; font-size: 1rem; font-weight: 700; color: var(--text); }
.dw-vehicle__disclaimer-text { margin: 0; font-size: .8rem; line-height: 1.6; color: var(--text-muted); }

.dw-vehicle__share { padding: 0 1.5rem 2rem; text-align: center; }
.dw-vehicle__share-label { margin: 0 0 .85rem; font-size: .9rem; font-weight: 600; color: var(--text-muted); }
.dw-vehicle__share-list { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; padding: 1.75rem 0; }
.dw-vehicle__share-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: 50%;
    color: #fff; text-decoration: none; transition: opacity .15s ease;
}
.dw-vehicle__share-link:hover { opacity: .85; }
.dw-vehicle__share-link svg { width: 1.2rem; height: 1.2rem; }
.dw-vehicle__share-link--facebook  { background: #1877F2; }
.dw-vehicle__share-link--messenger { background: #0084FF; }
.dw-vehicle__share-link--whatsapp  { background: #25D366; }
.dw-vehicle__share-link--x         { background: #000; }
.dw-vehicle__share-link--email     { background: var(--primary); color: var(--primary-contrast); }

/* Codeweavers finance calculator (plugin container). */
.dw-vehicle__codeweavers { padding: 0 1.5rem 1.5rem; }
/* Offset the anchor target so the sticky header doesn't overlap it on scroll. */
#finance-calculator { scroll-margin-top: 7rem; }
.dw-vehicle__codeweavers-plugin {
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__codeweavers-plugin iframe { border: 0; width: 100%; display: block; }

/* iVendi finance calculator (plugin container). */
.dw-vehicle__ivendi { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__ivendi-plugin {
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__ivendi-plugin iframe { border: 0; width: 100%; display: block; }

/* AutoConvert finance calculator (plugin container). */
.dw-vehicle__autoconvert { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__autoconvert-plugin {
    padding: 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__autoconvert-plugin iframe { border: 0; width: 100%; display: block; }

/* Features / options — inline chips (AutoTrader flat, clamped) or grouped accordions. */
.dw-vehicle__options { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__options-list {
    list-style: none; margin: 0; padding: 1rem 1.25rem;
    display: flex; flex-wrap: wrap; gap: .5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__options-list.is-clamped { max-height: 9rem; overflow: hidden; }
.dw-vehicle__option {
    display: inline-block; padding: .35rem .75rem;
    font-size: .85rem; color: var(--text);
    background: var(--bg-subtle);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__options-more {
    margin-top: .85rem; padding: 0;
    font: inherit; font-weight: 600; color: var(--primary);
    background: none; border: 0; cursor: pointer; text-decoration: underline;
}
/* Grouped (manual CMS) accordions. */
.dw-vehicle__option-group { border-bottom: 1px solid var(--border); }
.dw-vehicle__option-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .9rem 0; cursor: pointer; font-weight: 700; color: var(--text);
    list-style: none;
}
.dw-vehicle__option-summary::-webkit-details-marker { display: none; }
.dw-vehicle__option-caret { width: 1.1rem; height: 1.1rem; flex: none; transition: transform .2s ease; }
.dw-vehicle__option-group[open] > .dw-vehicle__option-summary .dw-vehicle__option-caret { transform: rotate(180deg); }
/* Inside an accordion the chips aren't boxed (the group already has a divider). */
.dw-vehicle__option-group .dw-vehicle__options-list {
    padding: 0 0 .9rem; background: none; border: 0; border-radius: 0;
}
/* Specification — key/value rows flowing across two balanced columns. */
.dw-vehicle__specification { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__spec-list {
    margin: 0; columns: 2; column-gap: 2.5rem;
    padding: .5rem 1.5rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__spec {
    break-inside: avoid; -webkit-column-break-inside: avoid;
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
    padding: .6rem 0; border-bottom: 1px solid var(--border);
}
.dw-vehicle__spec-label { margin: 0; font-size: .9rem; color: var(--text-muted); }
.dw-vehicle__spec-value { margin: 0; font-size: .9rem; font-weight: 600; text-align: right; color: var(--text); }
@media (max-width: 768px) { .dw-vehicle__spec-list { columns: 1; } }
/* Description — text panel (same gutter). */
.dw-vehicle__description { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__description-text {
    padding: 1.25rem; line-height: 1.7; color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__features-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem;
}
.dw-vehicle__feature { display: flex; flex-direction: column; gap: .4rem; }
.dw-vehicle__feature-label {
    padding: .6rem .5rem; text-align: center;
    font-size: .95rem; font-weight: 700;
    color: var(--primary-contrast); background: var(--primary);
    border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__feature-value {
    padding: .7rem .5rem; text-align: center;
    font-size: .95rem; color: var(--text); background: var(--bg-elevated);
    border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__feature-value small { font-size: .75rem; color: var(--text-muted); }

/* Gallery — main image + thumbnails (same gutter as the action bar). */
.dw-vehicle__gallery { padding: 0 1.5rem 1.5rem; }
.dw-vehicle__gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.dw-vehicle__gallery.is-single .dw-vehicle__gallery-grid { grid-template-columns: 1fr; }
.dw-vehicle__gallery-main,
.dw-vehicle__gallery-thumb {
    position: relative; display: block; padding: 0; margin: 0; overflow: hidden;
    border: 0; cursor: pointer; background: var(--bg-elevated);
    border-radius: var(--dw-btn-radius, .5rem);
}
.dw-vehicle__gallery-main { aspect-ratio: 4 / 3; }
.dw-vehicle__gallery.is-single .dw-vehicle__gallery-main { aspect-ratio: 16 / 9; }
.dw-vehicle__gallery-main img,
.dw-vehicle__gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* AutoTrader price indicator — top-left of the main image. */
.dw-vehicle__indicator { position: absolute; top: .75rem; left: .75rem; }
.dw-vehicle__indicator img { display: block; height: 2.25rem; width: auto; }
/* Attention-grabber flag reused from the stock card — bottom-right on the main image. */
.dw-vehicle__gallery-main .dw-stock-card__flag { left: auto; right: .75rem; bottom: .75rem; }
.dw-vehicle__gallery-thumbs {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem;
    align-content: start;
}
/* Exactly 5 photos (4 thumbs): show them 2-up. Extra specificity so it also
   wins over the mobile 3-column rule below. */
.dw-vehicle__gallery-thumbs.dw-vehicle__gallery-thumbs--cols2 { grid-template-columns: repeat(2, 1fr); }
.dw-vehicle__gallery-thumb { aspect-ratio: 4 / 3; }
/* "Gallery" pill (bottom-left of the main image). */
.dw-vehicle__gallery-btn {
    position: absolute; left: .75rem; bottom: .75rem;
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .9rem; font-size: .85rem; font-weight: 600;
    color: var(--text); background: var(--bg-elevated);
    border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.dw-vehicle__gallery-btn svg { width: 1rem; height: 1rem; }
/* Photo-count badge (bottom-right of the last thumbnail). */
.dw-vehicle__gallery-count {
    position: absolute; right: .5rem; bottom: .5rem;
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .35rem .6rem; font-size: .8rem; font-weight: 700;
    color: var(--text); background: var(--bg-elevated);
    border-radius: .4rem; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.dw-vehicle__gallery-count svg { width: .9rem; height: .9rem; }
@media (max-width: 640px) {
    .dw-vehicle__gallery-grid { grid-template-columns: 1fr; }
    .dw-vehicle__gallery-main { aspect-ratio: 16 / 10; }
    .dw-vehicle__gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    /* Keep the title + price side by side (2 cols); a long make/model scrolls. */
    .dw-vehicle__head { flex-wrap: nowrap; gap: 1rem; }
    .dw-vehicle__logo { display: none; }
    .dw-vehicle__identity { flex: 1 1 auto; min-width: 0; }
    .dw-vehicle__titles { min-width: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
    .dw-vehicle__title { white-space: nowrap; font-size: 1.15rem; }
    /* Derivative may wrap to a second line (with sensible word breaks). */
    .dw-vehicle__sub { white-space: normal; overflow-wrap: break-word; word-break: normal; font-size: .85rem; }
    .dw-vehicle__pricing { flex: none; }
    .dw-vehicle__price { font-size: 1.25rem; }
    .dw-vehicle__finance { font-size: .85rem; }
}

/* ==========================================================================
   Representative example (FCA finance disclosure)
   ========================================================================== */
.dw-finance-rep { padding: 1rem .75rem; }
.dw-finance-rep__title { margin: 0 0 .75rem; text-align: center; font-size: .9rem; font-weight: 700; color: var(--text); }
.dw-finance-rep__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; }
.dw-finance-rep__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    padding: .45rem .4rem; text-align: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: .3rem;
}
.dw-finance-rep__item--apr { grid-column: 1 / -1; }
.dw-finance-rep__label { font-size: .62rem; color: var(--text-muted); line-height: 1.25; }
.dw-finance-rep__value { font-size: .72rem; font-weight: 700; color: var(--text); }
@media (max-width: 900px) { .dw-finance-rep__grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .dw-finance-rep__grid { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Stock pagination
   ========================================================================== */
.dw-stock-pagination {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem; padding: 1.5rem; background: var(--bg);
}
.dw-stock-pagination__total { margin: 0; font-size: .9rem; color: var(--text-muted); }
.dw-stock-pagination__pages,
.dw-stock-pagination__nav {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    list-style: none; margin: 0; padding: 0;
}
.dw-stock-pagination__page a,
.dw-stock-pagination__page span,
.dw-stock-pagination__nav a {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.25rem; padding: .5rem .7rem;
    font-size: .9rem; color: var(--text); text-decoration: none;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    transition: border-color .15s ease, color .15s ease;
}
.dw-stock-pagination__page a:hover,
.dw-stock-pagination__nav a:hover { border-color: var(--primary); color: var(--primary); }
.dw-stock-pagination__page.is-active span {
    color: var(--primary-contrast); background: var(--primary); border-color: var(--primary);
}

/* ==========================================================================
   Stock grid + vehicle card (grid / inline layouts)
   ========================================================================== */
/* Elevated, bordered panel — matches the intro (.dw-page__inner) and filter
   (.dw-stock-filter > form) cards. */
.dw-stock-grid {
    padding: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--dw-btn-radius, .5rem);
}
/* On the stock page the grid sits flush, so add the same side/bottom gutter the
   intro + filter wrappers use (the homepage recent block has its own container). */
.dw-stock .dw-stock-grid { margin: 0 1.5rem 1.5rem; }
/* Sold page has no filter above the grid, so add the top gap the filter would
   otherwise provide on the stock page. */
.dw-stock--sold .dw-stock-grid { margin-top: 1.5rem; }

/* Grid layout: 1 col (mobile) -> 2 (tablet, forced) -> chosen cols (desktop) */
/* Recent stock preview (homepage) — templates/blocks/vehicles/recent.php */
.dw-stock-recent { background: var(--bg); padding: 1.5rem 1.5rem; }
.dw-stock-recent__inner { margin: 0 auto; }
.dw-stock-recent__head { margin: 0 0 1.75rem; text-align: center; }
.dw-stock-recent__title {
  margin: 0 0 .5rem; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.1; color: var(--text);
}
.dw-stock-recent__subheading {
  margin: 0; color: var(--text-muted);
  font-size: 1.0625rem; line-height: 1.4; text-wrap: pretty;
}
.dw-stock-recent__subheading a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.dw-stock-recent__cta { margin-top: 2rem; text-align: center; }

/* Recent stock carousel — horizontal scroll-snap track with prev/next arrows
   below. Per-view count (2/3/4) comes from data-template-cols; drops to 2-up on
   tablet and ~1-up (with a peek) on mobile. */
.dw-stock-carousel__viewport {
  display: flex; gap: 1.25rem; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  /* Elevated padded panel, matching the stock.php grid. scroll-padding keeps
     snapped cards aligned to the padded content edge. */
  padding: 1.5rem; scroll-padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
}
.dw-stock-carousel__viewport::-webkit-scrollbar { display: none; }
.dw-stock-carousel__viewport > .dw-stock-card { scroll-snap-align: start; }
.dw-stock-carousel__viewport[data-template-cols="2"] > .dw-stock-card { flex: 0 0 calc((100% - 1.25rem) / 2); }
.dw-stock-carousel__viewport[data-template-cols="3"] > .dw-stock-card { flex: 0 0 calc((100% - 2.5rem) / 3); }
.dw-stock-carousel__viewport[data-template-cols="4"] > .dw-stock-card { flex: 0 0 calc((100% - 3.75rem) / 4); }
@media (max-width: 991px) {
  .dw-stock-carousel__viewport > .dw-stock-card { flex-basis: calc((100% - 1.25rem) / 2) !important; }
}
@media (max-width: 767px) {
  .dw-stock-carousel__viewport > .dw-stock-card { flex-basis: 85% !important; }
}
/* Actions row below the track: arrows + View All button. */
.dw-stock-recent__actions {
  display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin-top: 2rem;
}
.dw-stock-recent__actions .dw-stock-recent__cta { margin-top: 0; }
.dw-stock-carousel__nav { display: flex; justify-content: center; gap: .75rem; }
.dw-stock-carousel__arrow {
  width: 2.75rem; height: 2.75rem; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  background: var(--bg-elevated); color: var(--text); cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.dw-stock-carousel__arrow:hover { background: var(--primary); color: var(--primary-contrast); border-color: var(--primary); }
.dw-stock-carousel__arrow svg { width: 1.25rem; height: 1.25rem; }

.dw-stock-grid--grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
/* Tablet and down: always 2 columns regardless of the chosen count. */
@media (min-width: 600px) {
    .dw-stock-grid--grid { grid-template-columns: repeat(2, 1fr); }
}
/* Desktop: honour data-template-cols (2 / 3 / 4). */
@media (min-width: 1024px) {
    .dw-stock-grid--grid[data-template-cols="2"] { grid-template-columns: repeat(2, 1fr); }
    .dw-stock-grid--grid[data-template-cols="3"] { grid-template-columns: repeat(3, 1fr); }
    .dw-stock-grid--grid[data-template-cols="4"] { grid-template-columns: repeat(4, 1fr); }
}

/* Empty state — spans all columns and centres. */
.dw-stock-grid__empty { grid-column: 1 / -1; margin: 0; padding: 1.5rem 0; text-align: center; }
.dw-stock-grid__empty a { color: var(--primary); text-decoration: underline; }

/* Inline layout: single stacked column of horizontal rows (no columns) */
.dw-stock-grid--inline { display: flex; flex-direction: column; gap: 1rem; }

/* Card */
.dw-stock-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--bg-elevated);
    border-radius: var(--dw-btn-radius, .5rem);
    /* Product-card look: soft shadow instead of a border. */
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 16px -6px rgba(0, 0, 0, .12);
}
/* Dark theme: a black shadow vanishes on the dark card/panel, so use a faint
   light hairline plus a stronger dark drop to keep the card lifted. */
.theme-black .dw-stock-card,
.theme-slate .dw-stock-card,
.theme-midnight .dw-stock-card,
.theme-carbon .dw-stock-card,
.theme-custom .dw-stock-card {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 10px 26px -8px rgba(0, 0, 0, .7);
}
.dw-stock-card__media {
    position: relative; display: block; overflow: hidden; background: var(--bg-subtle);
}
/* Flash/shine sweep across the image on hover */
.dw-stock-card__media::after {
    content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%;
    background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.26) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg); pointer-events: none; opacity: 0; z-index: 2;
}
.dw-stock-card:hover .dw-stock-card__media::after { animation: dw-card-flash .75s ease; }
@keyframes dw-card-flash {
    0%   { left: -75%; opacity: 1; }
    100% { left: 130%; opacity: 1; }
}
.dw-stock-card__media-link { display: block; width: 100%; }
.dw-stock-card__img { width: 100%; height: auto; object-fit: cover; display: block; }
/* Placeholder (transparent SVG): contain + centre on the theme-aware bg */
.dw-stock-card__img--placeholder {
    width: 100%; object-fit: contain; display: block;
    padding: 8%; background: var(--bg-subtle);
}

/* Aspect ratio — driven by $stockAspectRatio on the image classes.
   ar-default uses the image's natural ratio (no CSS aspect-ratio). */
.ar-standard { aspect-ratio: 4 / 3; }
.ar-video    { aspect-ratio: 16 / 9; }
.ar-custom   { aspect-ratio: var(--dw-ar-custom, 4 / 3); }
.ar-default  { aspect-ratio: auto; }
.dw-stock-card__flag {
    position: absolute; bottom: .6rem; left: .6rem;
    padding: .25rem .55rem; font-size: .72rem; font-weight: 600;
    color: #fff; background: rgba(0, 0, 0, .25); border-radius: .3rem;
}
/* Image overlays: photo count + walkaround video (grouped, top-right) */
.dw-stock-card__badges {
    position: absolute; top: .6rem; right: .6rem; z-index: 1;
    display: flex; align-items: stretch; gap: .4rem;
}
.dw-stock-card__count,
.dw-stock-card__video {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .5rem; font-size: .72rem; font-weight: 600;
    color: #fff; background: rgba(0, 0, 0, .25); border-radius: .3rem;
    text-decoration: none;
}
.dw-stock-card__video,
.dw-stock-card__count { border: none; cursor: pointer; font-family: inherit; }

/* Photo lightbox gallery */
.dw-gallery-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 1.5rem; background: rgba(0, 0, 0, .85);
}
.dw-gallery-modal.is-open { display: flex; }
.dw-gallery-modal__img { max-width: 90%; max-height: 78vh; border-radius: .5rem; display: block; }
.dw-gallery-modal__actions {
    position: absolute; bottom: 1rem; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    gap: .6rem; padding: 0 1rem;
}
/* Keep the Email/Telephone group hard-right even when the Specification action
   isn't rendered (e.g. on the vehicle page). */
.dw-gallery-modal__action-group { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.dw-gallery-modal__action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; flex: none;
    color: #171717; background: rgba(255, 255, 255, .9);
    border: none; border-radius: 50%; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.dw-gallery-modal__action svg { width: 1.2rem; height: 1.2rem; }
.dw-gallery-modal__close {
    position: absolute; top: 1rem; right: 1.25rem;
    width: 2.5rem; height: 2.5rem; padding: 0;
    font-size: 2rem; line-height: 1; color: #fff;
    background: transparent; border: none; cursor: pointer;
}
.dw-gallery-modal__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 3rem; height: 3rem; padding: 0;
    font-size: 2rem; line-height: 1; color: #171717;
    background: rgba(255, 255, 255, .9); border: none; border-radius: 50%;
    cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.dw-gallery-modal__prev { left: 1rem; }
.dw-gallery-modal__next { right: 1rem; }

/* Vehicle video modal */
.dw-video-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 1.5rem; background: rgba(0, 0, 0, .8);
}
.dw-video-modal.is-open { display: flex; }
.dw-video-modal__inner { position: relative; width: 100%; max-width: 900px; }
.dw-video-modal__frame { position: relative; padding-top: 56.25%; }
.dw-video-modal__frame iframe {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; border-radius: .5rem;
}
.dw-video-modal__close {
    position: absolute; top: -2.6rem; right: 0;
    width: 2.5rem; height: 2.5rem; padding: 0;
    font-size: 2rem; line-height: 1; color: #fff;
    background: transparent; border: none; cursor: pointer;
}
body.dw-video-open { overflow: hidden; }
.dw-stock-card__count svg { width: .9rem; height: .9rem; }
.dw-stock-card__video svg { width: .8rem; height: .8rem; }
.dw-stock-card__indicator { position: absolute; top: .6rem; left: .6rem; }
.dw-stock-card__indicator img { display: block; height: 1.92rem; width: auto; }
/* Image carousel: next-only arrow + position counter */
.dw-stock-card__next {
    position: absolute; top: 50%; right: .6rem; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 2.3rem; height: 2.3rem; padding: 0;
    color: #171717; background: rgba(255, 255, 255, .9);
    border: none; border-radius: 50%; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25); transition: background .15s ease;
}
.dw-stock-card__next:hover { background: #fff; }
.dw-stock-card__next svg { width: 1.1rem; height: 1.1rem; }
/* Preview gallery — 3 thumbnails under the featured image (grid layout only) */
.dw-stock-card__gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--bg-elevated); }
.dw-stock-card__thumb { display: block; overflow: hidden; background: var(--bg-elevated); }
.dw-stock-card__thumb img { width: 100%; height: auto; object-fit: cover; display: block; }
.dw-stock-card__gallery .dw-stock-card__img--placeholder { background: var(--bg-elevated); }
.dw-stock-grid--inline .dw-stock-card__gallery { display: none; }

.dw-stock-card__body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding: 1rem 1.1rem; background: var(--bg); }
.dw-stock-card__title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.dw-stock-card__title a { color: var(--text); text-decoration: none; }
.dw-stock-card__title a:hover { color: var(--primary); }
.dw-stock-card__subtitle { margin: 0; font-size: .85rem; font-weight: 700; line-height: 1.35; min-height: 2em; color: var(--text-muted); }
/* Vehicle description — inline layout only. */
.dw-stock-card__desc { display: none; margin: 0; font-size: .85rem; line-height: 1.5; color: var(--text-muted); }
.dw-stock-grid--inline .dw-stock-card__desc { display: block; }
.dw-stock-card__pricing { display: flex; align-items: center; gap: .9rem; margin: .1rem 0; }
.dw-stock-card__price { margin: 0; font-size: 1.15rem; font-weight: 800; line-height: 1.1em; color: var(--text); }
.dw-stock-card__vat { margin-left: 0; font-size: .75rem; font-weight: 500; color: var(--text-muted); }
.dw-stock-card__finance { margin: 0; padding-left: .9rem; border-left: 1px solid var(--border); font-size: .9rem; font-weight: 700; color: var(--text-muted); }
.dw-stock-card__finance-amt {
    padding: 0; font: inherit; color: var(--primary);
    background: transparent; border: 0;
    border-bottom: 1px dotted currentColor; cursor: pointer;
}
.dw-stock-card__finance-amt:hover { opacity: .8; }
.dw-stock-card__finance small { font-weight: 500; }

/* ==========================================================================
   Finance illustration modal
   ========================================================================== */
.dw-finance-modal[hidden] { display: none; }
.dw-finance-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.dw-finance-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.dw-finance-modal__dialog {
    position: relative; z-index: 1;
    width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    text-align: center;
}
.dw-finance-modal__close {
    position: absolute; top: .6rem; right: .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; padding: 0;
    color: var(--text-muted); background: transparent; border: 0; cursor: pointer;
    border-radius: 50%;
}
.dw-finance-modal__close:hover { background: var(--bg-elevated); color: var(--text); }
.dw-finance-modal__close svg { width: 1.1rem; height: 1.1rem; }
.dw-finance-modal__lender { margin: 0 0 1rem; }
.dw-finance-modal__lender img { max-height: 44px; width: auto; }
.dw-finance-modal__head { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.dw-finance-modal__vehicle { margin: 0; font-size: 1.05rem; font-weight: 700; }
.dw-finance-modal__vehicle-sub { margin: .2rem 0 0; font-size: .82rem; color: var(--text-muted); }
.dw-finance-modal__title {
    display: flex; align-items: center; justify-content: center; gap: .6rem;
    margin: 0 0 1rem; text-align: left;
}
.dw-finance-modal__badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.6rem; padding: .35rem .5rem;
    font-size: 1rem; font-weight: 700; line-height: 1;
    color: var(--primary-contrast); background: var(--primary);
    border-radius: .3rem;
}
.dw-finance-modal__title-text { font-size: .95rem; line-height: 1.25; color: var(--text); }
.dw-finance-modal__title-text strong { display: block; font-size: 1.05rem; }
.dw-finance-modal__rows {
    display: grid; grid-template-columns: 1fr 1fr; gap: .4rem;
    margin: 0 0 1.25rem; padding: 0;
}
.dw-finance-modal__row {
    display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
    padding: .5rem .6rem; text-align: left;
    background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: .3rem;
}
.dw-finance-modal__row dt { margin: 0; font-size: .72rem; color: var(--text-muted); line-height: 1.25; }
.dw-finance-modal__row dd { margin: 0; font-size: .88rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.dw-finance-modal__apply { display: block; width: 100%; text-align: center; }
.dw-finance-modal__disclaimer { margin: 1rem 0 0; font-size: .7rem; color: var(--text-muted); line-height: 1.4; }
body.dw-finance-modal-open { overflow: hidden; }

/* Generic modal (Stock Alert) — same shell as the finance modal, left-aligned
   body copy for the longer message. */
.dw-modal[hidden] { display: none; }
.dw-modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.dw-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.dw-modal__dialog {
    position: relative; z-index: 1;
    width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
    padding: 1.75rem 1.5rem 1.5rem;
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.dw-modal__close {
    position: absolute; top: .6rem; right: .6rem;
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; padding: 0;
    color: var(--text-muted); background: transparent; border: 0; cursor: pointer;
    border-radius: 50%;
}
.dw-modal__close:hover { background: var(--bg-elevated); color: var(--text); }
.dw-modal__close svg { width: 1.1rem; height: 1.1rem; }
.dw-modal__title { margin: 0 0 1rem; font-size: 1.35rem; font-weight: 700; }
.dw-modal__text { margin: 0 0 1rem; font-size: .92rem; line-height: 1.5; color: var(--text); }
.dw-modal__text--fine { font-size: .75rem; color: var(--text-muted); }
.dw-modal__text a { color: var(--primary); text-decoration: underline; }
.dw-modal__cta { display: block; width: 100%; text-align: center; margin-top: 1.25rem; }
body.dw-modal-open { overflow: hidden; }
.dw-stock-card__specs {
    display: flex; flex-wrap: wrap; gap: .3rem;
    list-style: none; margin: 0; padding: 0;
}
.dw-stock-card__specs li {
    display: inline-flex; align-items: center; gap: .28rem;
    padding: .28rem .55rem;
    font-size: .68rem; font-weight: 600; line-height: 1.3;
    color: var(--text); background: var(--bg-elevated);
    border-radius: .3rem;
}
/* Electric fuel-type gets a plug icon before the label (inherits the text colour). */
.dw-stock-card__spec-icon { width: 1em; height: 1em; flex: none; }
@media (max-width: 640px) {
    .dw-stock-card__specs li { font-size: .748rem; }
}
.dw-stock-card__cta { margin-top: auto; padding-top: .85rem; border-top: 1px solid var(--border); }
.dw-stock-card__promo { margin-top: .6rem; overflow: hidden; border-radius: var(--dw-btn-radius, .5rem); }
.dw-stock-card__promo img { display: block; width: 50%; height: auto; margin: 0 auto; }
.dw-stock-card__note { margin-top: .55rem; font-size: .72rem; line-height: 1.5; text-align: left; color: var(--text-muted); }
.dw-stock-card__note p { margin: 0; }
.dw-stock-card__note a { color: var(--primary); text-decoration: none; }
.dw-stock-card__note a:hover { text-decoration: underline; }
.dw-stock-card__cta .dw-btn { width: 100%; justify-content: center; }

/* Inline layout — horizontal card from sm up */
@media (min-width: 1024px) {
    .dw-stock-grid--inline .dw-stock-card { flex-direction: row; align-items: stretch; }
    .dw-stock-grid--inline .dw-stock-card__media {
        flex: 0 0 40%; max-width: 340px; aspect-ratio: auto;
    }
    /* Main image fills the full (stretched) card height — no gap below it. */
    .dw-stock-grid--inline .dw-stock-card__media-link { height: 100%; }
    .dw-stock-grid--inline .dw-stock-card__img { height: 100%; width: 100%; object-fit: cover; aspect-ratio: auto; }
    /* Preview gallery sits to the right of the main image as a vertical stack */
    .dw-stock-grid--inline .dw-stock-card__gallery {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(2, 1fr);
        flex: 0 0 18%; max-width: 180px;
    }
    .dw-stock-grid--inline .dw-stock-card__thumb { aspect-ratio: auto; height: 100%; }
    .dw-stock-grid--inline .dw-stock-card__thumb img { height: 100%; aspect-ratio: auto; }
    .dw-stock-grid--inline .dw-stock-card__thumb:nth-child(3) { display: none; }
    .dw-stock-grid--inline .dw-stock-card__cta .dw-btn { width: auto; }
    .dw-stock-grid--inline .dw-stock-card__promo { max-width: 300px; }

    /* Horizontal layout only: the description sits beside the pinned price, so
       reserve room for it. On the stacked layout it's below the price = full width. */
    .dw-stock-grid--inline .dw-stock-card__desc { padding-right: 9.5rem; }
}

/* Price (and any monthly finance) pinned to the card's top-right corner —
   inline layout only, at every breakpoint (stays put below 1024px too).
   Stacked and right-aligned in that position. */
.dw-stock-grid--inline .dw-stock-card__body { position: relative; }
.dw-stock-grid--inline .dw-stock-card__pricing {
    position: absolute; top: 1rem; right: 1.1rem;
    flex-direction: column; align-items: flex-end;
    gap: .1rem; margin: 0; max-width: 45%; text-align: right;
}
/* No left divider when stacked under the price. */
.dw-stock-grid--inline .dw-stock-card__finance { padding-left: 0; border-left: 0; }
/* Keep the heading clear of the pinned price (title/subtitle sit beside it at
   the top in every layout). The description only needs the reserve in the
   horizontal layout (≥1024px) — see below — otherwise it spans full width. */
.dw-stock-grid--inline .dw-stock-card__title,
.dw-stock-grid--inline .dw-stock-card__subtitle { padding-right: 9.5rem; }

/* Active layout toggle in the filter bar */
.dw-stock-filter__toggle.is-active { color: var(--primary); }

@media (max-width: 640px) {
    /* Layout toggle is desktop-only (cards are single column on mobile). */
    .dw-stock-reset .dw-stock-filter__toggle,
    .dw-stock-reset .dw-stock-filter__sep { display: none; }
}

/* ── Floating welcome chat widget (templates/blocks/chat/welcome.php) ───────── */
.dw-welcome {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1000;
  display: flex; flex-direction: column; align-items: flex-end; gap: .75rem;
  /* Fade in on load; fade out near the page bottom (.is-hidden). */
  opacity: 0; transform: translateY(.5rem);
  transition: opacity .4s ease, transform .4s ease;
  pointer-events: none;
}
.dw-welcome.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.dw-welcome.is-hidden { opacity: 0; transform: translateY(.5rem); pointer-events: none; }

/* Toggle button (the floating icon). */
.dw-welcome__toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3.5rem; height: 3.5rem; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: var(--primary); color: var(--primary-contrast, #fff);
  box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dw-welcome__toggle:hover { transform: translateY(-2px); box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .3); }
.dw-welcome__icon { width: 1.5rem; height: 1.5rem; }
.dw-welcome__icon--close { display: none; }
.dw-welcome.is-open .dw-welcome__icon--chat { display: none; }
.dw-welcome.is-open .dw-welcome__icon--close { display: block; }

/* Message panel (hidden until the toggle is clicked). */
.dw-welcome__panel {
  width: min(20rem, calc(100vw - 2.5rem));
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--dw-btn-radius, .5rem);
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .22);
  padding: 1.25rem; position: relative;
  opacity: 0; transform: translateY(.5rem) scale(.98);
  transform-origin: bottom right; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.dw-welcome.is-open .dw-welcome__panel { opacity: 1; transform: none; pointer-events: auto; }
.dw-welcome__close {
  position: absolute; top: .5rem; right: .5rem;
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.75rem; height: 1.75rem; padding: 0;
  border: 0; background: transparent; color: var(--text-muted); cursor: pointer;
  border-radius: 50%;
}
.dw-welcome__close:hover { color: var(--text); background: color-mix(in srgb, var(--text) 8%, transparent); }
.dw-welcome__close svg { width: 1.1rem; height: 1.1rem; }
.dw-welcome__msg { margin: 0 1.25rem .25rem 0; font-size: .85rem; line-height: 1.5; quotes: "\201C" "\201D"; }
.dw-welcome__msg::before { content: open-quote; }
.dw-welcome__msg::after  { content: close-quote; }
.dw-welcome__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.dw-welcome__btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .8rem; font-size: .8rem;
}
.dw-welcome__btn svg { width: .95rem; height: .95rem; }

@media (max-width: 640px) {
  .dw-welcome { right: 1rem; bottom: 1rem; }
}
