/*
 * BackWoods V2 sitewide system polish.
 * Purpose: keep the approved V2 pages aligned without merging each page's CSS.
 * This file is intentionally scoped to V2 templates so the legacy pages stay safe.
 */
body.bw2-v2-prototype-page {
  --bw2-v95-width: 1140px;
  --bw2-v95-gutter: 40px;
  --bw2-v95-mobile-gutter: 28px;
  --bw2-v95-top: 42px;
  --bw2-v95-top-mobile: 30px;
  --bw2-v95-bottom: 56px;
  --bw2-v95-maroon: #870012;
  --bw2-v95-maroon-dark: #5e000b;
  --bw2-v95-ink: #232b37;
  --bw2-v95-muted: #596372;
}

/* Desktop/laptop width standard: match Home, Inventory, and Vehicle detail rhythm. */
@media (min-width: 901px) {
  body.bw2-v2-prototype-page .bw2-wrap,
  body.bw2-v2-prototype-page .bwiv2-wrap,
  body.bw2-v2-prototype-page .bwcv2-wrap,
  body.bw2-v2-prototype-page .bwfv2-wrap,
  body.bw2-v2-prototype-page .bwav2-wrap,
  body.bw2-v2-prototype-page .bwsv2-wrap,
  body.bw2-v2-prototype-page .bwfv2-cta-inner {
    box-sizing: border-box !important;
    inline-size: min(calc(100vw - var(--bw2-v95-gutter)), var(--bw2-v95-width)) !important;
    max-inline-size: var(--bw2-v95-width) !important;
    margin-inline: auto !important;
  }
}

/* Keep phones/tablets comfortable instead of forcing desktop width. */
@media (max-width: 900px) {
  body.bw2-v2-prototype-page .bw2-wrap,
  body.bw2-v2-prototype-page .bwiv2-wrap,
  body.bw2-v2-prototype-page .bwcv2-wrap,
  body.bw2-v2-prototype-page .bwfv2-wrap,
  body.bw2-v2-prototype-page .bwav2-wrap,
  body.bw2-v2-prototype-page .bwsv2-wrap,
  body.bw2-v2-prototype-page .bwfv2-cta-inner {
    box-sizing: border-box !important;
    inline-size: min(calc(100vw - var(--bw2-v95-mobile-gutter)), var(--bw2-v95-width)) !important;
    max-inline-size: var(--bw2-v95-width) !important;
    margin-inline: auto !important;
  }
}

/* Inner page top rhythm: use Contact/Inventory as the baseline. */
body.bwcv2-contact-template .bwcv2-hero,
body.bwiv2-inventory-template .bwiv2-page,
body.bwfv2-financing-template .bwfv2-page-head,
body.bwav2-about-template .bwav2-hero {
  padding-top: var(--bw2-v95-top) !important;
}

body.bwcv2-contact-template .bwcv2-main,
body.bwiv2-inventory-template .bwiv2-page,
body.bwfv2-financing-template .bwfv2-cta,
body.bwav2-about-template .bwav2-section--cta,
body.bwsv2-detail-template .bwsv2-vdp {
  padding-bottom: var(--bw2-v95-bottom) !important;
}

@media (max-width: 720px) {
  body.bwcv2-contact-template .bwcv2-hero,
  body.bwiv2-inventory-template .bwiv2-page,
  body.bwfv2-financing-template .bwfv2-page-head,
  body.bwav2-about-template .bwav2-hero {
    padding-top: var(--bw2-v95-top-mobile) !important;
  }
}

/* Header link hover/focus should be BackWoods maroon, not browser/Astra blue. */
body.bw2-v2-prototype-page #masthead a:hover,
body.bw2-v2-prototype-page #masthead a:focus-visible,
body.bw2-v2-prototype-page .site-header a:hover,
body.bw2-v2-prototype-page .site-header a:focus-visible,
body.bw2-v2-prototype-page .main-header-menu .menu-link:hover,
body.bw2-v2-prototype-page .main-header-menu .menu-link:focus,
body.bw2-v2-prototype-page .main-header-menu .menu-link:focus-visible,
body.bw2-v2-prototype-page .ast-builder-menu .main-navigation .menu-item:hover > .menu-link,
body.bw2-v2-prototype-page .ast-builder-menu .main-navigation .menu-item > .menu-link:hover,
body.bw2-v2-prototype-page .ast-builder-menu .main-navigation .menu-item > .menu-link:focus,
body.bw2-v2-prototype-page .ast-builder-menu .main-navigation .current-menu-item > .menu-link,
body.bw2-v2-prototype-page .ast-builder-menu .main-navigation .current_page_item > .menu-link {
  color: var(--bw2-v95-maroon) !important;
  border-color: var(--bw2-v95-maroon) !important;
}

/* Financing page: use same width + typography feel as the other V2 pages. */
body.bwfv2-financing-template .site-content > .ast-container,
body.bwfv2-financing-template #primary,
body.bwfv2-financing-template .site-main,
body.bwfv2-financing-template article,
body.bwfv2-financing-template .entry-content {
  box-sizing: border-box !important;
  inline-size: 100% !important;
  max-inline-size: none !important;
  margin-inline: 0 !important;
  padding-inline: 0 !important;
}

body.bwfv2-financing-template .bwfv2-page {
  background: #fff !important;
  inline-size: 100% !important;
  max-inline-size: none !important;
  margin-inline: 0 !important;
}

body.bwfv2-financing-template .bwfv2-kicker,
body.bwfv2-financing-template .bwfv2-page-head .bwfv2-kicker {
  color: var(--bw2-v95-maroon) !important;
  font-weight: 800 !important;
}

body.bwfv2-financing-template .bwfv2-page-head h1 {
  color: var(--bw2-v95-ink) !important;
  font-size: clamp(31px, 3.6vw, 43px) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em !important;
  line-height: 1.08 !important;
}

body.bwfv2-financing-template .bwfv2-section-title h2,
body.bwfv2-financing-template .bwfv2-bring-card h2,
body.bwfv2-financing-template .bwfv2-cta h2 {
  font-weight: 800 !important;
}

body.bwfv2-financing-template .bwfv2-page-head p,
body.bwfv2-financing-template .bwfv2-section-title p,
body.bwfv2-financing-template .bwfv2-step-row p,
body.bwfv2-financing-template .bwfv2-bring-card > p:not(.bwfv2-kicker),
body.bwfv2-financing-template .bwfv2-cta p {
  color: var(--bw2-v95-muted) !important;
  font-size: 16px !important;
  line-height: 1.58 !important;
}

body.bwfv2-financing-template .bwfv2-cta-inner {
  background: var(--bw2-v95-maroon) !important;
  border: 2px solid var(--bw2-v95-maroon-dark) !important;
}

body.bwfv2-financing-template .bwfv2-cta h2,
body.bwfv2-financing-template .bwfv2-cta p,
body.bwfv2-financing-template .bwfv2-cta .bwfv2-kicker,
body.bwfv2-financing-template .bwfv2-cta .bwfv2-kicker--light {
  color: #fff !important;
}

/* About page: reduce the small extra top feel and keep map/footer handoff clean. */
body.bwav2-about-template .bwav2-hero {
  padding-bottom: 24px !important;
}

body.bwav2-about-template .bwav2-section--cta {
  padding-bottom: 54px !important;
}

/* Footer/map handoff: avoid extra blank bands before the map/footer. */
body.bw2-v2-prototype-page main#primary {
  margin-bottom: 0 !important;
}

body.bw2-v2-prototype-page footer.elementor-location-footer,
body.bw2-v2-prototype-page #colophon,
body.bw2-v2-prototype-page footer {
  margin-top: 0 !important;
}
