/*
Theme Name: Heartland Airguns Modern
Description: Phase-2 redesign of Heartland Airguns — a modern, professional, clean commerce theme. Dark brand chrome (header/hero/dealer band/footer) with light, airy commerce sections. Self-hosted Inter + Barlow Condensed. WooCommerce ready with dealer pricing support.
Version: 2.0.0
Author: Heartland Airguns
Text Domain: heartland-modern
Update URI: https://github.com/ThePROX/heartland_airguns
*/

/* ── Fonts (self-hosted, latin subset) ──────────────────────────────────
   Inter is served by Google Fonts as a single variable-font woff2 that
   covers weights 400–700; Barlow Condensed ships as two static weights. */
@font-face {
    font-family: 'Inter';
    src: url('assets/fonts/Inter-variable-latin.woff2') format('woff2');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('assets/fonts/BarlowCondensed-500-latin.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow Condensed';
    src: url('assets/fonts/BarlowCondensed-600-latin.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ── Design tokens (spec §1) ─────────────────────────────────────────── */
:root {
    /* Color */
    /* Unified dark (operator directive 2026-07-06): one continuous dark
       surface, no light sections. Token NAMES kept — values redefined.
       paper = elevated card surface, paper-2 = subtle alt/wells. */
    --ha-ink: #0F1216;
    --ha-ink-2: #171C22;
    --ha-paper: #151A21;
    --ha-paper-2: #10141A;
    --ha-line: rgba(255,255,255,.08);
    --ha-line-dark: rgba(255,255,255,.10);
    --ha-text: #E8ECF1;
    --ha-text-soft: #9AA5B1;
    --ha-text-inv: #F5F7F8;
    --ha-text-inv-soft: #A7B0BB;
    --ha-blue: #1D4EB8;        /* button fills only — too dim for text on dark */
    --ha-blue-deep: #16409A;
    --ha-blue-bright: #2D9CFF; /* all text accents/links/overlines */
    --ha-blue-tint: rgba(45,156,255,.12);
    --ha-success: #3DCC7A;
    --ha-error: #FF7A80;
    --ha-star: #E8A33D;

    /* Typography */
    --ha-font-display: 'Barlow Condensed', 'Arial Narrow', 'Helvetica Neue', sans-serif;
    --ha-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    /* Spacing (4px base scale) */
    --ha-sp-1: 4px;
    --ha-sp-2: 8px;
    --ha-sp-3: 12px;
    --ha-sp-4: 16px;
    --ha-sp-5: 24px;
    --ha-sp-6: 32px;
    --ha-sp-7: 48px;
    --ha-sp-8: 64px;
    --ha-sp-9: 96px;
    --ha-sp-10: 128px;

    /* Radius */
    --ha-radius-btn: 6px;
    --ha-radius-input: 8px;
    --ha-radius-card: 12px;
    --ha-radius-pill: 999px;

    /* Shadow */
    --ha-shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --ha-shadow-md: 0 6px 24px rgba(0,0,0,.45);
    --ha-shadow-lg: 0 16px 48px rgba(0,0,0,.6);

    /* Motion */
    --ha-motion-fast: 150ms ease-out;
    --ha-motion-panel: 250ms ease-out;
}

/* ── Reset / base ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ha-ink);
    color: var(--ha-text);
    font-family: var(--ha-font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--ha-blue-bright); text-decoration: none; }
a:hover { color: #6FBBFF; }
h1, h2, h3, h4, h5, h6 { color: var(--ha-text); line-height: 1.25; margin: 0 0 var(--ha-sp-4); }
p { margin: 0 0 var(--ha-sp-4); }
ul, ol { margin: 0 0 var(--ha-sp-4); padding-left: 1.25em; }
button { font-family: inherit; }

/* Focus visibility (spec §7) */
:focus-visible {
    outline: 2px solid var(--ha-blue-bright);
    outline-offset: 2px;
}

/* Skip link */
.ha-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: var(--ha-blue);
    color: #fff;
    padding: 12px 20px;
    border-radius: 0 0 6px 0;
    font-family: var(--ha-font-body);
    font-weight: 600;
}
.ha-skip-link:focus {
    left: 0;
}

/* ── Layout helpers ──────────────────────────────────────────────────── */
.ha-container {
    max-width: 1160px;
    margin-inline: auto;
    padding-inline: 24px;
}
.ha-section {
    padding-block: 56px;
}
.ha-section--alt {
    background: var(--ha-paper-2);
}
.ha-section--dark {
    background: var(--ha-ink);
    color: var(--ha-text-inv);
}
.ha-section--dark h1,
.ha-section--dark h2,
.ha-section--dark h3,
.ha-section--dark h4,
.ha-section--dark p {
    color: var(--ha-text-inv);
}

/* ── Typography helpers ──────────────────────────────────────────────── */
.ha-overline {
    display: block;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--ha-blue-bright);
    margin: 0 0 var(--ha-sp-3);
}
.ha-section--dark .ha-overline,
.ha-ink .ha-overline {
    color: var(--ha-blue-bright);
}

.ha-display {
    font-family: var(--ha-font-display);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.1;
    color: var(--ha-text);
    margin: 0 0 var(--ha-sp-4);
}
.ha-section--dark .ha-display {
    color: var(--ha-text-inv);
}
h1.ha-display { font-size: clamp(34px, 4.5vw, 52px); }
h2.ha-display { font-size: clamp(26px, 3.5vw, 36px); }
h3.ha-display { font-size: 28px; }

.ha-lead { font-size: 18px; }
.ha-lg-lead { font-size: 22px; line-height: 1.6; }
.ha-text-soft { color: var(--ha-text-soft); }
.ha-section--dark .ha-text-soft,
.ha-text-inv-soft { color: var(--ha-text-inv-soft); }

/* ── Buttons (spec §2) ───────────────────────────────────────────────── */
.ha-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--ha-blue);
    color: #fff;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    padding: 12px 24px;
    border: 0;
    border-radius: var(--ha-radius-btn);
    cursor: pointer;
    text-decoration: none;
    min-height: 44px;
    transition: background var(--ha-motion-fast), transform var(--ha-motion-fast), box-shadow var(--ha-motion-fast);
}
.ha-btn:hover {
    background: var(--ha-blue-deep);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--ha-shadow-sm);
}
.ha-btn--lg {
    padding: 14px 28px;
    font-size: 16px;
}
.ha-btn--secondary {
    background: transparent;
    color: var(--ha-text);
    border: 1.5px solid rgba(255,255,255,.25);
}
.ha-btn--secondary:hover {
    border-color: var(--ha-blue-bright);
    color: var(--ha-blue-bright);
    background: transparent;
    box-shadow: none;
    transform: translateY(-1px);
}
.ha-btn--inverse {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.28);
}
.ha-btn--inverse:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.28);
}
.ha-btn--sm {
    padding: 8px 16px;
    font-size: 13px;
    min-height: 36px;
}
.ha-btn--full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────────────── */
.ha-card {
    background: var(--ha-paper);
    border: 1px solid var(--ha-line);
    border-radius: var(--ha-radius-card);
    box-shadow: var(--ha-shadow-sm);
}

/* ── Reduced motion (spec §1 + §7) ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .ha-btn:hover,
    .ha-product-card:hover,
    .ha-btn--secondary:hover {
        transform: none !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   HEADER (spec §3)
   ══════════════════════════════════════════════════════════════════════ */
.ha-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(15,18,22,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ha-line-dark);
    height: 72px;
    transition: box-shadow var(--ha-motion-fast);
}
.ha-header.is-scrolled {
    box-shadow: var(--ha-shadow-md);
}
.ha-header__inner {
    max-width: 1160px;
    margin: 0 auto;
    padding-inline: 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.ha-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.ha-header__logo img {
    /* logo-white.png = white-on-transparent (generated from the black-plate original), no blend hacks needed */
    height: 48px;
    width: auto;
}
.ha-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}
.ha-nav__list {
    display: flex;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ha-nav__list a {
    display: inline-block;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ha-text-inv-soft);
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}
.ha-nav__list a:hover {
    color: #fff;
}
.ha-nav__list .current-menu-item > a,
.ha-nav__list a.is-active {
    color: var(--ha-blue-bright);
    border-bottom-color: var(--ha-blue-bright);
}
.ha-header__icons {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}
.ha-header__icons a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ha-text-inv-soft);
    width: 44px;
    height: 44px;
}
.ha-header__icons a:hover { color: #fff; }
.ha-header__icons svg { width: 20px; height: 20px; fill: currentColor; }
.ha-cart-count {
    position: absolute;
    top: 6px;
    right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: var(--ha-radius-pill);
    background: var(--ha-blue-bright);
    color: var(--ha-ink);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}
/* No items → no bubble. The span stays in the DOM (hidden) so it remains a
   valid cart-fragment replaceWith target. */
.ha-cart-count--empty { display: none; }
/* Brief pop when the count updates after an add-to-cart (JS toggles the class). */
.ha-cart-count.is-bumped { animation: ha-cart-pop .35s ease; }
@keyframes ha-cart-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Mobile hamburger */
.ha-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.ha-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    transition: transform var(--ha-motion-fast), opacity var(--ha-motion-fast);
}
.ha-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ha-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ha-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.ha-mobile-panel {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--ha-ink);
    border-bottom: 1px solid var(--ha-line-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--ha-motion-panel);
    z-index: 199;
}
.ha-mobile-panel.is-open {
    max-height: 80vh;
    overflow-y: auto;
}
.ha-mobile-panel__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}
.ha-mobile-panel__list a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ha-text-inv);
    border-bottom: 1px solid var(--ha-line-dark);
    text-decoration: none;
}
.ha-mobile-panel__list a:hover { color: var(--ha-blue-bright); }

/* ══════════════════════════════════════════════════════════════════════
   HOMEPAGE (spec §4)
   ══════════════════════════════════════════════════════════════════════ */

/* 1. Hero */
.ha-hero {
    position: relative;
    /* no texture stripes — depth from a soft blue glow (spec flow rules) */
    background:
        radial-gradient(ellipse 80% 90% at 18% 0%, rgba(45,156,255,.10), transparent 60%),
        var(--ha-ink);
    border-bottom: 1px solid var(--ha-line);
    padding-block: 72px;
    color: var(--ha-text-inv);
}
.ha-hero__content {
    max-width: 660px;
}
.ha-hero .ha-overline { color: var(--ha-blue-bright); }
.ha-hero h1 {
    color: #fff;
}
.ha-hero__tagline {
    font-size: 20px;
    font-weight: 500;
    color: var(--ha-text-inv);
    margin: 0 0 var(--ha-sp-3);
}
.ha-hero__lead {
    color: var(--ha-text-inv-soft);
    font-size: 17px;
    max-width: 560px;
    margin-bottom: var(--ha-sp-5);
}
.ha-hero__ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* 2. Trust strip */
.ha-trust {
    padding-block: 36px;
    background: transparent;
    border-bottom: 1px solid var(--ha-line);
}
.ha-trust__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}
.ha-trust__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.ha-trust__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--ha-radius-input);
    background: var(--ha-blue-tint);
}
.ha-trust__icon svg {
    width: 24px;
    height: 24px;
    fill: var(--ha-blue-bright);
}
.ha-trust__label {
    font-weight: 600;
    font-size: 15px;
    color: var(--ha-text);
    margin-bottom: 2px;
}
.ha-trust__sub {
    font-size: 14px;
    color: var(--ha-text-soft);
}

/* 3. Featured products */
.ha-section__head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--ha-sp-6);
}
.ha-section__head .ha-overline,
.ha-section__head .ha-display { text-align: center; }
.ha-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: var(--ha-sp-5);
}
.ha-product-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* Shared product-card contract (used on homepage AND shop loop, see README).
   Hover treatment lives here so both surfaces share one implementation —
   Agent B's shop grid should reuse .ha-product-card-wrap, not redefine this. */
.ha-product-card-wrap {
    transition: transform var(--ha-motion-fast), box-shadow var(--ha-motion-fast), border-color var(--ha-motion-fast);
}
.ha-product-card-wrap:hover {
    transform: translateY(-3px);
    box-shadow: var(--ha-shadow-md);
    border-color: rgba(45,156,255,.35);
}
.ha-product-card {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
    overflow: hidden;
}
.ha-product-card:hover { color: inherit; }
.ha-product-card__media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ha-paper-2);
    border-radius: var(--ha-radius-card) var(--ha-radius-card) 0 0;
    overflow: hidden;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ha-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ha-product-card__body {
    padding: 16px 20px 20px;
}
.ha-product-card__title {
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 16px;
    color: var(--ha-text);
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ha-product-card__price {
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 15px;
    color: var(--ha-text);
}
.ha-product-card__price del {
    color: var(--ha-text-soft);
    font-weight: 400;
    margin-right: 6px;
    text-decoration: line-through;
}
.ha-product-card__price ins {
    text-decoration: none;
}
.ha-product-card__multiple {
    font-size: 13px;
    color: var(--ha-text-soft);
    margin-top: 4px;
}
.ha-section--products-cta {
    text-align: center;
    /* The grid <ul> carries an inline margin:0 reset, so own the gap here —
       otherwise the button butts against the full-card clickable links and
       clicks near it land on a product card. */
    margin-top: var(--ha-sp-6);
}

/* 4. Featured video */
.ha-video-feature__cols {
    display: grid;
    grid-template-columns: 55% 1fr;
    gap: 64px;
    align-items: center;
}
.ha-video-feature__media {
    border-radius: var(--ha-radius-card);
    overflow: hidden;
    box-shadow: var(--ha-shadow-md);
    background: #000;
}
.ha-video-feature__media video,
.ha-video-feature__media img {
    width: 100%;
    display: block;
}
.ha-video-feature__text .ha-btn { margin-top: var(--ha-sp-5); }

/* 5. Mission */
.ha-mission {
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}
.ha-mission__statement {
    font-size: 22px;
    line-height: 1.6;
    color: var(--ha-text);
}

/* 6. Reviews */
.ha-reviews__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.ha-review-card {
    padding: 28px 24px;
}
.ha-review-card__stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 10px;
}
.ha-review-card__stars svg {
    width: 16px;
    height: 16px;
    fill: var(--ha-star);
}
.ha-review-card__badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ha-blue-bright);
    background: var(--ha-blue-tint);
    padding: 2px 10px;
    border-radius: var(--ha-radius-pill);
    margin-bottom: 14px;
}
.ha-review-card__quote {
    font-size: 15px;
    line-height: 1.7;
    color: var(--ha-text);
    margin-bottom: 20px;
}
.ha-review-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
}
.ha-review-card__avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--ha-radius-pill);
    background: var(--ha-blue);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ha-review-card__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--ha-text);
}
.ha-review-card__date {
    font-size: 13px;
    color: var(--ha-text-soft);
}

/* 7. Dealer band */
.ha-dealer-band {
    position: relative;
    /* elevated band, no texture stripe */
    background:
        radial-gradient(ellipse 70% 100% at 50% 100%, rgba(45,156,255,.08), transparent 65%),
        var(--ha-paper-2);
    border-block: 1px solid var(--ha-line);
    text-align: center;
}
.ha-dealer-band__sub {
    max-width: 520px;
    margin: 0 auto var(--ha-sp-6);
    color: var(--ha-text-inv-soft);
}
.ha-dealer-band__ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 8. Footer */
.ha-footer {
    background: #0B0E12;
    color: var(--ha-text-inv-soft);
    padding-top: var(--ha-sp-7);
}
.ha-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
    padding-bottom: var(--ha-sp-6);
}
.ha-footer__logo img {
    height: 36px;
    width: auto;
    margin-bottom: 12px;
}
.ha-footer__tagline {
    font-size: 14px;
    color: var(--ha-text-inv-soft);
    margin-bottom: 20px;
}
.ha-footer__social {
    display: flex;
    gap: 16px;
}
.ha-footer__social a {
    color: var(--ha-text-inv-soft);
    display: inline-flex;
}
.ha-footer__social a:hover { color: var(--ha-blue-bright); }
.ha-footer__social svg { width: 20px; height: 20px; fill: currentColor; }
.ha-footer__heading {
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ha-text-inv);
    margin-bottom: 16px;
}
.ha-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ha-footer__list li { margin-bottom: 10px; }
.ha-footer__list a {
    color: var(--ha-text-inv-soft);
    font-size: 14px;
    text-decoration: none;
}
.ha-footer__list a:hover { color: #fff; }
.ha-footer__bottom {
    border-top: 1px solid var(--ha-line-dark);
    padding-block: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--ha-text-inv-soft);
}

/* ══════════════════════════════════════════════════════════════════════
   CHAT WIDGET (floating message bubble → contact form panel)
   ══════════════════════════════════════════════════════════════════════ */
.ha-chat {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 998;
}
.ha-chat__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ha-blue);
    color: #fff;
    border: 0;
    border-radius: var(--ha-radius-pill);
    padding: 13px 20px;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--ha-shadow-md);
    transition: background var(--ha-motion-fast), transform var(--ha-motion-fast);
}
.ha-chat__toggle:hover { background: var(--ha-blue-deep); transform: translateY(-1px); }
.ha-chat__icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.ha-chat__icon--close { display: none; }
/* When open, collapse the pill to a round close button. */
.ha-chat.is-open .ha-chat__toggle { padding: 13px; border-radius: var(--ha-radius-pill); }
.ha-chat.is-open .ha-chat__icon--open,
.ha-chat.is-open .ha-chat__toggle-label { display: none; }
.ha-chat.is-open .ha-chat__icon--close { display: block; }

.ha-chat__panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: 350px;
    max-width: calc(100vw - 32px);
    background: var(--ha-paper);
    border: 1px solid var(--ha-line);
    border-radius: 14px;
    box-shadow: var(--ha-shadow-lg);
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transform-origin: bottom right;
    transition: opacity var(--ha-motion-panel), transform var(--ha-motion-panel);
    pointer-events: none;
}
.ha-chat.is-open .ha-chat__panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.ha-chat__header {
    background:
        radial-gradient(ellipse 90% 120% at 100% 0%, rgba(45,156,255,.14), transparent 65%),
        var(--ha-ink-2);
    padding: 18px 20px;
    border-bottom: 1px solid var(--ha-line);
}
.ha-chat__header-title {
    font-family: var(--ha-font-display);
    font-weight: 600;
    font-size: 18px;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--ha-text-inv);
}
.ha-chat__header-sub {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ha-text-soft);
}
.ha-chat__body { padding: 16px 20px 20px; }
/* Compact the CF7 form inside the panel. */
.ha-chat__body .wpcf7-form p { margin-bottom: 12px; }
.ha-chat__body .wpcf7-form label { font-size: 13px; }
.ha-chat__body .wpcf7-form textarea { min-height: 84px; }
.ha-chat__body .wpcf7-form input[type="submit"] { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════
   INNER PAGES (spec §5)
   ══════════════════════════════════════════════════════════════════════ */
.ha-page-header {
    background: var(--ha-ink);
    border-bottom: 1px solid var(--ha-line);
    padding-block: 36px;
}
.ha-page-header h1 {
    color: #fff;
    margin-bottom: 0;
}
.ha-page-header__sub {
    color: var(--ha-text-inv-soft);
    font-size: 15px;
    margin-top: 8px;
    margin-bottom: 0;
}

.ha-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding-inline: 24px;
}

/* Dealer cards */
.ha-dealer-card {
    padding: 24px;
    margin-bottom: 20px;
}
.ha-dealer-card__name {
    font-family: var(--ha-font-body);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 4px;
}
.ha-dealer-card__location {
    color: var(--ha-text-soft);
    font-size: 15px;
    margin-bottom: 16px;
}
.ha-dealer-cta {
    background: var(--ha-paper-2);
    border-radius: var(--ha-radius-card);
    padding: 32px;
    text-align: center;
    margin-top: var(--ha-sp-7);
}
.ha-dealer-cta p { max-width: 560px; margin-inline: auto; }

/* Prose styling for page.php content (Terms/Privacy etc.) */
.ha-prose {
    max-width: 720px;
}
.ha-prose h2 {
    font-family: var(--ha-font-body);
    font-weight: 700;
    font-size: 24px;
    margin-top: var(--ha-sp-7);
    margin-bottom: var(--ha-sp-3);
}
.ha-prose h2:first-child { margin-top: 0; }
.ha-prose h3 {
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 19px;
    margin-top: var(--ha-sp-6);
    margin-bottom: var(--ha-sp-2);
}
.ha-prose p { margin-bottom: var(--ha-sp-4); color: var(--ha-text); }
.ha-prose ul, .ha-prose ol { margin-bottom: var(--ha-sp-4); }
.ha-prose li { margin-bottom: var(--ha-sp-2); }
.ha-prose a { text-decoration: underline; }

/* Contact Form 7 styling (global) */
.wpcf7-form label {
    display: block;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 14px;
    color: var(--ha-text);
    margin-bottom: 6px;
}
.wpcf7-form p { margin-bottom: 18px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea {
    width: 100%;
    min-height: 44px;
    background: var(--ha-paper-2);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--ha-radius-input);
    color: var(--ha-text);
    padding: 10px 14px;
    font-family: var(--ha-font-body);
    font-size: 15px;
    transition: border-color var(--ha-motion-fast), box-shadow var(--ha-motion-fast);
}
.wpcf7-form textarea { min-height: 120px; }
.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--ha-blue-bright);
    box-shadow: 0 0 0 3px var(--ha-blue-tint);
}
.wpcf7-form input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ha-blue);
    color: #fff;
    font-family: var(--ha-font-body);
    font-weight: 600;
    font-size: 15px;
    border: 0;
    border-radius: var(--ha-radius-btn);
    padding: 12px 24px;
    min-height: 44px;
    cursor: pointer;
    transition: background var(--ha-motion-fast), transform var(--ha-motion-fast);
}
.wpcf7-form input[type="submit"]:hover {
    background: var(--ha-blue-deep);
    transform: translateY(-1px);
}
.wpcf7-not-valid-tip {
    color: var(--ha-error);
    font-size: 13px;
    margin-top: 4px;
    display: block;
}
.wpcf7-response-output {
    border-radius: var(--ha-radius-input);
    padding: 12px 16px;
    font-size: 14px;
    margin-top: 20px;
}
.wpcf7-mail-sent-ok {
    background: rgba(61,204,122,.12);
    color: var(--ha-success);
    border: 1px solid rgba(61,204,122,.3) !important;
}
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng {
    background: rgba(255,122,128,.12);
    color: var(--ha-error);
    border: 1px solid rgba(255,122,128,.3) !important;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE (breakpoints ~900px nav / ~640px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .ha-nav { display: none; }
    .ha-hamburger { display: flex; }

    .ha-trust__grid { grid-template-columns: repeat(2, 1fr); }
    .ha-product-grid { grid-template-columns: repeat(2, 1fr); }
    .ha-video-feature__cols { grid-template-columns: 1fr; gap: 32px; }
    .ha-reviews__grid { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
    .ha-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }

    .ha-section { padding-block: 40px; }
    .ha-hero { padding-block: 56px; }
}

@media (max-width: 640px) {
    .ha-trust__grid { grid-template-columns: 1fr; gap: 24px; }
    .ha-product-grid { grid-template-columns: 1fr; }
    .ha-footer__grid { grid-template-columns: 1fr; }
    .ha-hero__ctas,
    .ha-dealer-band__ctas { flex-direction: column; align-items: stretch; }
    .ha-hero__ctas .ha-btn,
    .ha-dealer-band__ctas .ha-btn { width: 100%; }
    .ha-header__inner { padding-inline: 16px; }
    .ha-container { padding-inline: 16px; }
    .ha-chat { right: 16px; bottom: 16px; }
    .ha-chat__panel { width: calc(100vw - 32px); }
}
