/* Mobile — clean dealer layout */

@media (max-width: 960px) {
    html,
    body,
    .site-shell,
    .site-main {
        background: #ffffff;
    }

    body.nav-open { overflow: hidden; }

    .container { width: calc(100% - 2rem); }

    /* Header */
    .site-header__address--full { display: none; }
    .site-header__address--short { display: block; }
    .site-header__address { white-space: normal; line-height: 1.4; font-size: 0.75rem; }

    .site-nav.is-open {
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* —— Hero: text on image (desktop-style overlay) —— */
    .hero-ca {
        position: relative;
        display: flex;
        align-items: flex-start;
        min-height: 520px;
        padding: 0;
        background: #ffffff;
        overflow: hidden;
        border-bottom: 1px solid var(--border);
    }

    .hero-ca__bg {
        position: absolute;
        inset: 0;
        order: unset;
        width: auto;
        height: auto;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(255, 255, 255, 0.94) 16%,
                rgba(255, 255, 255, 0.78) 30%,
                rgba(255, 255, 255, 0.42) 44%,
                rgba(255, 255, 255, 0.08) 58%,
                rgba(255, 255, 255, 0) 68%
            ),
            url('/assets/images/hero-california-mobile.jpg') 68% 62% / cover no-repeat;
    }

    .hero-ca > .container {
        order: unset;
        position: relative;
        z-index: 1;
        width: 100%;
        padding: 2rem 0 2.75rem;
        background: transparent;
    }

    .hero-ca__content {
        max-width: 100%;
        padding: 0;
        margin: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .hero-ca__eyebrow {
        margin: 0 0 0.5rem;
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--red);
    }

    .hero-ca__content h1 {
        margin: 0 0 0.75rem;
        font-size: clamp(1.75rem, 7.5vw, 2.2rem);
        line-height: 1.06;
        letter-spacing: 0.01em;
        max-width: 12ch;
    }

    .hero-ca__lead {
        margin: 0 0 1.25rem;
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--text-muted);
        max-width: 32ch;
    }

    .hero-ca__actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.6rem;
        max-width: 100%;
    }

    .hero-ca__actions .btn {
        flex: 1 1 140px;
        padding: 0.85rem 1rem;
        font-size: 0.76rem;
    }

    /* Inventory hero */
    .inventory-hero {
        position: relative;
        display: flex;
        align-items: flex-start;
        min-height: 300px;
        padding: 0;
        background: #ffffff;
        overflow: hidden;
        border-bottom: 1px solid var(--border);
    }

    .inventory-hero__bg {
        position: absolute;
        inset: 0;
        order: unset;
        width: auto;
        height: auto;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(255, 255, 255, 0.94) 16%,
                rgba(255, 255, 255, 0.78) 30%,
                rgba(255, 255, 255, 0.42) 44%,
                rgba(255, 255, 255, 0.08) 58%,
                rgba(255, 255, 255, 0) 68%
            ),
            url('/assets/images/inventory-hero-mobile.jpg') 72% 68% / cover no-repeat;
    }

    .inventory-hero__wrap {
        order: unset;
        position: relative;
        z-index: 1;
        width: 100%;
        padding: 2rem 0 2.5rem;
        background: transparent;
    }

    .inventory-hero__content {
        max-width: 100%;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .inventory-hero__content h1 {
        margin: 0 0 0.5rem;
        font-size: clamp(1.75rem, 7.5vw, 2.2rem);
        font-style: normal;
        font-weight: 700;
        line-height: 1.06;
        max-width: 12ch;
        text-shadow: none;
    }

    .inventory-hero__content > p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--text-muted);
        max-width: 30ch;
        text-shadow: none;
    }

    /* Inner banners — text on image */
    .page-banner {
        position: relative;
        display: flex;
        align-items: flex-start;
        min-height: 280px;
        padding: 0;
        overflow: hidden;
        border-bottom: 1px solid var(--border);
        background: #ffffff;
    }

    .page-banner__bg {
        position: absolute;
        inset: 0;
        background:
            linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.98) 0%,
                rgba(255, 255, 255, 0.94) 16%,
                rgba(255, 255, 255, 0.78) 30%,
                rgba(255, 255, 255, 0.42) 44%,
                rgba(255, 255, 255, 0.08) 58%,
                rgba(255, 255, 255, 0) 68%
            ),
            url('/assets/images/banner-palms-mobile.jpg') 70% 68% / cover no-repeat;
    }

    .page-banner > .container {
        position: relative;
        z-index: 1;
        padding: 2rem 0 2.5rem;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .page-banner h1 {
        margin: 0 0 0.5rem;
        font-size: clamp(1.65rem, 7vw, 2.1rem);
        line-height: 1.06;
        max-width: 14ch;
        text-shadow: none;
    }

    .page-banner p {
        margin: 0;
        font-size: 0.9rem;
        line-height: 1.5;
        color: var(--text-muted);
        max-width: 32ch;
        text-shadow: none;
    }

    .page-banner--financing .page-banner__bg {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 16%, rgba(255,255,255,0.78) 30%, rgba(255,255,255,0.42) 44%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0) 68%),
            url('/assets/images/banner-financing-mobile.jpg') 70% 68% / cover no-repeat;
    }

    .page-banner--shipping .page-banner__bg {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 16%, rgba(255,255,255,0.78) 30%, rgba(255,255,255,0.42) 44%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0) 68%),
            url('/assets/images/banner-shipping-mobile.jpg') 70% 68% / cover no-repeat;
    }

    .page-banner--about .page-banner__bg {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 16%, rgba(255,255,255,0.78) 30%, rgba(255,255,255,0.42) 44%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0) 68%),
            url('/assets/images/banner-about-mobile.jpg') 70% 68% / cover no-repeat;
    }

    .page-banner--contact .page-banner__bg {
        background:
            linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 16%, rgba(255,255,255,0.78) 30%, rgba(255,255,255,0.42) 44%, rgba(255,255,255,0.08) 58%, rgba(255,255,255,0) 68%),
            url('/assets/images/contact-sunset-mobile.jpg') 70% 68% / cover no-repeat;
    }

    /* Inner page content */
    .inner-intro {
        padding: 2rem 0 0;
        background: #ffffff;
    }

    .inner-intro__content {
        text-align: left;
        max-width: none;
    }

    .inner-intro__content h2 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .inner-intro__content p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .inner-section {
        padding: 2.5rem 0;
        background: #ffffff;
    }

    .inner-section--muted { background: var(--bg-soft); }

    .inner-section__title {
        margin-bottom: 1.25rem;
        font-size: 1.3rem;
        text-align: left;
    }

    .process-grid { grid-template-columns: 1fr; gap: 0.85rem; }

    .process-card { padding: 1.15rem 1.1rem; }

    .info-cards,
    .info-cards--3 {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .info-card { padding: 1.15rem 1.1rem; }

    .about-split {
        padding: 2.25rem 0;
        background: #ffffff;
    }

    .about-split__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-split__photo {
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .about-split__photo img { aspect-ratio: 16/10; }

    .about-split__text h2 { font-size: 1.35rem; }

    .about-split__text p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .about-stats__item { padding: 1.15rem 0.85rem; }

    .features-ca__title {
        font-size: 1.35rem;
        margin-bottom: 1.25rem;
        text-align: left;
    }

    .feature-ca {
        padding: 1.15rem 0;
        border-bottom: 1px solid var(--border);
    }

    .feature-ca:last-child { border-bottom: 0; }

    .inventory-page {
        padding: 1.75rem 0 2.75rem;
        background: var(--bg-soft);
    }

    .inventory-empty {
        padding: 2rem 1.25rem;
        text-align: center;
    }

    .inner-cta {
        padding: 2rem 0;
        background: var(--black);
    }

    .inner-cta__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1.15rem;
    }

    .inner-cta h2 { font-size: 1.25rem; }

    .inner-cta p { font-size: 0.88rem; }

    .inner-cta__actions {
        width: 100%;
        flex-direction: column;
        gap: 0.6rem;
    }

    .inner-cta__actions .btn { width: 100%; }

    .page-contact .contact-ca__photo { display: none; }

    .contact-ca__form-wrap h2 { font-size: 1.3rem; }

    /* Vehicle detail — mobile */
    .page-vehicle .vehicle-detail {
        padding: 0 0 2.5rem;
        background: #ffffff;
    }

    .page-vehicle .vehicle-breadcrumb {
        display: none;
    }

    .page-vehicle .vehicle-detail__layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main-top"
            "sidebar"
            "main-bottom";
        gap: 0;
        margin-bottom: 1.5rem;
    }

    .page-vehicle .vehicle-detail__gallery {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        margin-bottom: 1rem;
    }

    .page-vehicle .vehicle-gallery__main {
        aspect-ratio: 4/3;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }

    .page-vehicle .vehicle-gallery__nav {
        display: none;
    }

    .page-vehicle .vehicle-gallery__thumbs--desktop {
        display: none !important;
    }

    .page-vehicle .vehicle-gallery__thumbs--mobile {
        display: flex;
        gap: 0.4rem;
        margin: 0;
        padding: 0.5rem 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        touch-action: pan-x;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
    }

    .page-vehicle .vehicle-gallery__thumbs--mobile .vehicle-gallery__thumb {
        flex: 0 0 64px;
        scroll-snap-align: start;
        border-radius: 4px;
        border-width: 2px;
    }

    .page-vehicle .vehicle-gallery__thumbs--mobile .vehicle-gallery__thumb img {
        width: 64px;
        height: 48px;
        border-radius: 2px;
    }

    .page-vehicle .vehicle-gallery__dots {
        display: none;
    }

    .page-vehicle .vehicle-gallery__expand {
        width: 32px;
        height: 32px;
        right: 0.65rem;
        bottom: 0.65rem;
    }

    .page-vehicle .vehicle-gallery__counter {
        display: block;
        top: 0.65rem;
        left: 0.65rem;
        font-size: 0.72rem;
    }

    .page-vehicle .vehicle-lightbox__nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .page-vehicle .vehicle-lightbox__nav--prev { left: 0.5rem; }
    .page-vehicle .vehicle-lightbox__nav--next { right: 0.5rem; }

    .page-vehicle .vehicle-lightbox__close {
        top: 0.65rem;
        right: 0.65rem;
    }

    .page-vehicle .vehicle-lightbox__counter {
        bottom: calc(4.75rem + env(safe-area-inset-bottom, 0));
    }

    .page-vehicle .vehicle-lightbox__img {
        max-height: calc(100dvh - 5.5rem - env(safe-area-inset-bottom, 0));
    }

    .page-vehicle .vehicle-detail__main h1 {
        font-size: clamp(1.2rem, 5.5vw, 1.5rem);
        line-height: 1.15;
        text-transform: none;
        margin-bottom: 0.3rem;
    }

    .page-vehicle .vehicle-detail__subtitle {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .page-vehicle .vehicle-detail__price {
        font-size: 1.55rem;
        margin-bottom: 0.75rem;
    }

    .page-vehicle .vehicle-detail__mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        margin-bottom: 0.85rem;
        font-size: 0.78rem;
    }

    .page-vehicle .vehicle-detail__location {
        font-weight: 600;
        color: var(--text-muted);
    }

    .page-vehicle .vehicle-detail__badge {
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--black);
    }

    .page-vehicle .vehicle-detail__specs-list {
        display: flex;
        flex-direction: column;
        margin-bottom: 0.85rem;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        background: #ffffff;
    }

    .page-vehicle .vehicle-spec-row {
        display: grid;
        grid-template-columns: 24px 1fr auto;
        align-items: center;
        gap: 0.6rem;
        padding: 0.75rem 0.85rem;
        border-bottom: 1px solid var(--border);
        font-size: 0.82rem;
    }

    .page-vehicle .vehicle-spec-row:last-child {
        border-bottom: 0;
    }

    .page-vehicle .vehicle-spec-row__icon {
        width: 20px;
        height: 20px;
        background: center/contain no-repeat;
        opacity: 0.75;
    }

    .page-vehicle .vehicle-spec-row__icon--mileage { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M12 6v6l3 2'/%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--engine { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M8 10h8v8H8z'/%3E%3Cpath d='M10 6h4v4h-4z'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--horsepower { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M13 2L4 14h7l-1 8 9-12h-7l1-8z'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--transmission { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Ccircle cx='7' cy='7' r='2'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3Cpath d='M9 7h6M7 9v6M15 15V9'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--drivetrain { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v4M12 18v4M2 12h4M18 12h4'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--fuel { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M6 20V6a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v14'/%3E%3Cpath d='M14 8h2a2 2 0 0 1 2 2v4l2 2v4'/%3E%3C/svg%3E"); }
    .page-vehicle .vehicle-spec-row__icon--color { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666' stroke-width='1.8'%3E%3Cpath d='M12 2a10 10 0 0 0 0 20c4 0 5-3 5-6H9'/%3E%3C/svg%3E"); }

    .page-vehicle .vehicle-spec-row__label {
        font-weight: 600;
        color: var(--text-muted);
    }

    .page-vehicle .vehicle-spec-row__value {
        font-weight: 700;
        color: var(--black);
        text-align: right;
    }

    .page-vehicle .vehicle-detail__vin {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 1rem;
        padding: 0.8rem 0.85rem;
        background: var(--bg-soft);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        font-size: 0.78rem;
    }

    .page-vehicle .vehicle-detail__vin-label {
        font-weight: 700;
        flex-shrink: 0;
    }

    .page-vehicle .vehicle-detail__vin-value {
        flex: 1;
        min-width: 0;
        font-weight: 600;
        word-break: break-all;
    }

    .page-vehicle .vehicle-detail__vin-copy {
        flex-shrink: 0;
        padding: 0.35rem 0.75rem;
        border: 1px solid var(--border);
        border-radius: 4px;
        background: #ffffff;
        font-size: 0.72rem;
        font-weight: 700;
        cursor: pointer;
    }

    .page-vehicle .vehicle-highlights {
        display: none;
    }

    .page-vehicle .vehicle-specs-panel {
        display: none;
    }

    .page-vehicle .vehicle-detail__sidebar {
        position: static;
        margin-bottom: 1.25rem;
    }

    .page-vehicle .vehicle-detail__sidebar .vehicle-detail__btn {
        display: none;
    }

    .page-vehicle .lead-form-card--sidebar {
        padding: 1.15rem;
    }

    .page-vehicle .lead-form-card--sidebar h2 {
        font-size: 1.05rem;
    }

    .page-vehicle .vehicle-description {
        margin-bottom: 1.25rem;
    }

    .page-vehicle .vehicle-description h2,
    .page-vehicle .vehicle-features h2 {
        font-size: 0.95rem;
        margin-bottom: 0.65rem;
    }

    .page-vehicle .vehicle-description__text {
        font-size: 0.86rem;
        line-height: 1.6;
    }

    .page-vehicle .vehicle-features__grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .page-vehicle .vehicle-features__grid li {
        font-size: 0.82rem;
    }

    .page-vehicle .vehicle-detail__map {
        margin-top: 0.5rem;
    }

    .page-vehicle .contact-map__iframe {
        min-height: 200px;
    }

    .page-vehicle .site-main {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0));
    }

    .page-vehicle .vehicle-mobile-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90;
        padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0));
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    }

    .page-vehicle .vehicle-mobile-bar .btn {
        padding: 0.85rem 0.5rem;
        font-size: 0.74rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    /* Sections */
    .section-ca,
    .features-ca,
    .contact-ca { padding: 2.75rem 0; }

    .section-head-ca {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        margin-bottom: 1.35rem;
    }

    .section-head-ca h2 { font-size: 1.45rem; }

    .vehicle-grid--ca {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .vehicle-card--ca {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }

    .vehicle-card__body h3 { font-size: 0.88rem; line-height: 1.25; }
    .vehicle-card__meta { font-size: 0.74rem; }
    .vehicle-card__price { font-size: 1.2rem; }

    .inventory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .features-ca__grid { grid-template-columns: 1fr; gap: 1.5rem; }

    .contact-ca__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-ca__photo {
        order: -1;
        border-radius: var(--radius);
        overflow: hidden;
        max-height: none;
    }

    .contact-ca__photo img {
        min-height: 0;
        max-height: none;
        aspect-ratio: 16/10;
        object-fit: cover;
    }

    .contact-map__iframe { min-height: 220px; }

    .contact-map__caption {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .site-footer__grid { grid-template-columns: 1fr 1fr; }
    .site-footer__col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .container { width: calc(100% - 1.5rem); }

    .site-header { padding-top: env(safe-area-inset-top, 0); }
    .site-header__inner { min-height: 60px; }
    .site-nav { inset: 60px 0 auto 0; }

    .brand__speed { font-size: 1.05rem; }
    .brand__sub { font-size: 0.58rem; }

    .vehicle-grid--ca,
    .inventory-grid { grid-template-columns: 1fr; gap: 1.1rem; }

    .vehicle-card__body { padding: 1rem 1.1rem 1.15rem; }

    .inv-card__fav { display: none; }

    .site-footer__grid { grid-template-columns: 1fr; }

    .hero-ca { min-height: 480px; }

    .inventory-hero,
    .page-banner { min-height: 260px; }

    .hero-ca__actions {
        flex-direction: column;
    }

    .hero-ca__actions .btn {
        width: 100%;
        flex: none;
    }
}
