/* =====================================================================
   mobile.css  -  Mobile-only overrides for motormomentumllc.com
   Activates below 760px so desktop layout is untouched.
   ===================================================================== */

/* === Mobile-only / desktop-only utilities =========================== */
.mobile-only  { display: none !important; }
.desktop-only { display: block !important; }

@media (max-width: 760px) {

  /* Toggle utilities ------------------------------------------------ */
  .mobile-only  { display: block !important; }
  .desktop-only { display: none !important; }

  html, body { overflow-x: hidden; }

  /* ---- Hide desktop topbar + nav, show mobile header ------------- */
  .site-header .topbar { display: none !important; }
  .site-header .mainbar .navbar { display: none !important; }
  .site-header .mainbar .search-trigger,
  .site-header .mainbar .mega { display: none !important; }
  /* Also hide the desktop search input + button so mobile icons fit */
  .site-header .mainbar .header-search { display: none !important; }
  .site-header .mainbar .search-btn { display: none !important; }

  /* Mobile header: hamburger LEFT | logos CENTER | (pin + phone) RIGHT */
  .site-header .mainbar-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px !important;
    height: 56px !important;
    gap: 8px;
    border-bottom: 1px solid var(--border);
  }
  .site-header .mainbar-inner .nav-toggle { order: 1 !important; }
  .site-header .mainbar-inner .logo-group { order: 2 !important; }
  .site-header .mainbar-inner .mobile-header-icons { order: 3 !important; }
  .site-header .logo-group {
    flex: 1;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 6px !important;
  }
  .site-header .logo-link--corp   { width: 60px !important; height: 30px !important; }
  .site-header .logo-link--dealer { display: none !important; }

  .site-header .nav-toggle {
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 40px; height: 40px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    position: static !important;
  }
  .site-header .nav-toggle span {
    width: 24px;
    height: 3px;
    background: #1d2733;
    border-radius: 2px;
    display: block;
    margin: 0;
  }

  /* Right-side icon group (we inject this in HTML) */
  .mobile-header-icons {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
  .mobile-header-icons a {
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-dark);
    border-radius: 50%;
  }
  .mobile-header-icons svg { width: 22px; height: 22px; }

  /* Dealer name subbar */
  .mobile-dealer-bar {
    display: block !important;
    text-align: center;
    padding: 10px 12px;
    background: #f4f6f9;
    color: var(--brand-blue);
    font-weight: 700;
    letter-spacing: .02em;
    font-size: 14px;
  }

  /* ---- HERO carousel: kill fixed height so it matches the image - */
  .hero {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .hero .carousel {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
  }
  /* Kill aspect-ratio and absolute slide positioning so container hugs image */
  .hero .slides,
  .hero .carousel .slides {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    position: relative !important;
    display: block !important;
  }
  .hero .slide {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
  }
  .hero .slide.is-active {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }
  .hero .slide img,
  .hero .ph-hero,
  .hero img.ph-hero,
  .hero picture {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    display: block !important;
    position: static !important;
  }
  .hero picture img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  /* Carousel arrows + dots overlay properly on image */
  .hero .carousel .car-arrow,
  .hero .carousel .arrow {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
    width: 36px !important;
    height: 36px !important;
    z-index: 5;
  }
  .hero .carousel .car-prev { left: 4px !important; }
  .hero .carousel .car-next { right: 4px !important; }
  .hero .carousel .car-dots {
    position: absolute !important;
    bottom: 8px !important;
    left: 0; right: 0;
    text-align: center;
    z-index: 5;
  }

  /* ---- Mobile-only 3 blue menu buttons (icon + text rectangle) -- */
  .mobile-menu-buttons {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
    padding: 18px 14px;
    background: #0b1f3d;
  }
  .mobile-menu-buttons .mobile-btn {
    display: flex !important;
    align-items: center;
    background: #066FEF;
    color: #fff !important;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 19px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(0,0,0,.35);
    text-decoration: none;
    border: 1px solid #fff;
    width: 100%;
    box-sizing: border-box;
  }
  .mobile-menu-buttons .mobile-btn__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    overflow: visible;
  }
  .mobile-menu-buttons .mobile-btn__icon img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: block !important;
    object-fit: contain;
  }
  .mobile-menu-buttons .mobile-btn__text {
    flex: 1;
    text-align: right;
    color: #fff;
  }

  /* ---- Hide desktop-only CTA cards (NEW FORD / USED / SERVICE) -- */
  .cta-cards {
    display: none !important;
  }

  /* ---- Hide desktop TVM promo banner (Employee Pricing strip) --- */
  .tvm-banner {
    display: none !important;
  }

  /* ---- Slide-out menu (when hamburger clicked) ------------------- */
  /* Re-style existing nav menu when open */
  .site-header .navbar.open {
    display: block !important;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 1000;
    overflow-y: auto;
    padding-top: 0;
  }
  .navbar.open .nav-menu {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .navbar.open .nav-menu > li {
    display: block;
    border-bottom: 1px solid #eee;
  }
  .navbar.open .nav-link {
    display: block;
    padding: 16px 20px;
    font-size: 17px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: .03em;
  }
  .navbar.open .dropdown {
    position: static !important;
    box-shadow: none !important;
    background: #f7f8fa !important;
    padding: 0 !important;
    display: none;
  }
  .navbar.open .nav-item.open > .dropdown,
  .navbar.open .nav-item.open .dropdown {
    display: block !important;
    position: static !important;
    box-shadow: none !important;
    background: #f7f8fa !important;
    padding: 8px 0 12px !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .navbar.open .dropdown.mega {
    column-count: 1 !important;
    grid-template-columns: 1fr !important;
    display: none !important;
  }
  .navbar.open .nav-item.open > .dropdown.mega { display: block !important; }
  /* First mega-col (top-level New links) — show its links directly, hide its h4 (redundant with NEW above) */
  .navbar.open .dropdown.mega .mega-col:first-child > h4 { display: none !important; }
  .navbar.open .dropdown.mega .mega-col:first-child > a { display: block !important; padding: 12px 32px !important; font-size: 14px !important; color: var(--text-muted) !important; }
  /* Other mega-cols: h4 is a clickable accordion header */
  .navbar.open .dropdown.mega .mega-col:not(:first-child) > h4 {
    position: relative;
    display: block !important;
    padding: 14px 32px !important;
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-top: 1px solid #eee;
  }
  .navbar.open .dropdown.mega .mega-col:not(:first-child) > h4::after {
    content: "";
    position: absolute;
    right: 24px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
  }
  .navbar.open .dropdown.mega .mega-col:not(:first-child).open > h4::after {
    transform: translateY(-30%) rotate(-135deg);
  }
  /* Hide links by default, show when col is open */
  .navbar.open .dropdown.mega .mega-col:not(:first-child) > a {
    display: none !important;
  }
  .navbar.open .dropdown.mega .mega-col:not(:first-child).open > a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 44px !important;
    font-size: 14px !important;
    color: var(--text-muted) !important;
  }
  .navbar.open .dropdown.mega .mega-col .mega-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }
  .navbar.open .nav-link {
    cursor: pointer !important;
  }
  .navbar.open .dropdown a {
    display: block;
    padding: 12px 32px;
    font-size: 14px;
    color: var(--text-muted);
  }
  .mobile-menu-close {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 17px;
  }

  /* Slide-out menu header (Menu + X close) */
  .navbar.open .mobile-menu-head {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 14px 22px;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
    font-weight: 700;
    font-size: 22px;
    color: #1d2733;
    position: sticky;
    top: 0;
    z-index: 5;
  }
  .navbar.open .mobile-menu-head__close {
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    font-size: 30px;
    color: #1d2733;
    cursor: pointer;
    line-height: 1;
  }
  /* When closed, never show the head outside the open menu */
  .mobile-menu-head { display: none; }

  /* =================================================================
     VDP (Vehicle Detail Page) mobile layout
     ================================================================= */

  /* Container & section widths */
  .vdp-bar, .vdp-shell, .vdp-main, .vdp-sec, .vdp-hero,
  .vdp-gallery, .vdp-thumbs, .vdp-side, .vdp-other,
  .vdp-pricing, .vdp-specs, .vdp-features, .vdp-related,
  .vdp-description, .vdp-details, .vdp-section, .vdp-contact {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    box-sizing: border-box;
  }

  /* Top breadcrumbs / inline bar */
  .vdp-bar { padding: 10px 12px !important; font-size: 12px; }

  /* Big hero photo */
  .vdp-hero {
    padding: 0 !important;
    position: relative;
  }
  .vdp-hero img,
  .vdp-gallery__main,
  .vdp-gallery__main img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }
  /* Photo counter badge */
  .vdp-photo-count {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: #fff;
    padding: 8px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,.2);
  }

  /* Dark info panel below hero */
  .vdp-info-dark {
    background: #2b343f;
    color: #fff;
    padding: 16px 16px 12px !important;
    margin: 0 !important;
  }
  .vdp-info-dark h1, .vdp-info-dark .vdp-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
  }
  .vdp-info-dark .vdp-meta {
    font-size: 13px;
    color: #b9c0c8;
    margin-bottom: 14px;
  }
  .vdp-action-icons {
    display: flex;
    gap: 24px;
    padding-top: 8px;
    border-top: 1px solid #3d4754;
  }
  .vdp-action-icons button,
  .vdp-action-icons a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.25);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .vdp-action-icons svg { width: 18px; height: 18px; }

  /* Selling price box */
  .vdp-pricing__row,
  .vdp-pricing-row,
  .vdp-price-block {
    padding: 16px !important;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin: 14px 12px;
  }
  .vdp-pricing__row .label,
  .vdp-price-block .label {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
  }
  .vdp-pricing__row .amount,
  .vdp-price-block .amount {
    font-size: 22px;
    font-weight: 700;
    color: #1d2733;
  }

  /* Green CTA buttons stacked */
  .vdp-cta-stack,
  .vdp-ctas--green {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 12px;
  }
  .vdp-cta-stack a,
  .vdp-cta-stack button,
  .vdp-ctas--green .btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #2bb04f;
    color: #fff !important;
    padding: 14px 18px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    border: 0;
    text-decoration: none;
  }
  .vdp-cta-stack a:hover { background: #259a44; }

  /* Native .vdp-cta button → green on mobile (Confirm Availability + Click To Call) */
  .vdp-side .vdp-cta {
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 8px 12px !important;
    text-align: center;
    background: #2bb04f !important;
    color: #fff !important;
    padding: 16px 18px !important;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    border: 0;
    text-decoration: none;
  }
  .vdp-side .vdp-cta-call { background: #2bb04f !important; }

  /* Dark gray title bar (moved below the hero on mobile) */
  .vdp-bar {
    background: #2b343f !important;
    color: #fff !important;
    margin: 0 !important;
    padding: 14px 16px !important;
  }
  .vdp-bar .container,
  .vdp-bar .vdp-bar__inner {
    padding: 0 !important;
    max-width: 100% !important;
  }
  .vdp-bar .vdp-bar__title {
    color: #fff !important;
    font-size: 17px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
  }
  .vdp-bar .vdp-bar__cond { color: #fff; }
  .vdp-bar .vdp-bar__meta {
    color: #b9c0c8 !important;
    font-size: 13px !important;
  }
  .vdp-bar .vdp-bar__sep { color: #b9c0c8; }

  /* Pricing card style on mobile — centered horizontally, no Details link */
  .vdp-side .vdp-pricing {
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: 4px !important;
    margin: 14px auto !important;
    padding: 20px 24px !important;
    width: calc(100% - 24px) !important;
    max-width: 460px !important;
    text-align: center !important;
    box-sizing: border-box;
  }
  .vdp-side .vdp-pricing__row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    padding: 4px 0 !important;
  }
  .vdp-side .vdp-pricing__details { display: none !important; }
  /* Also hide the inline "Details" question-mark link near pricing */
  .vdp-side .vdp-pricing a[href*="disclaimer"],
  .vdp-side .vdp-pricing__row .vdp-pricing__info { display: none !important; }

  /* Blue CTA buttons stacked (pill style) */
  .vdp-ctas--blue {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
  }
  .vdp-ctas--blue .btn,
  .vdp-ctas--blue a {
    background: var(--brand-blue);
    color: #fff !important;
    padding: 14px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
  }

  /* "Basic Info" specs table */
  .vdp-specs {
    background: #f4f6f9;
    padding: 16px !important;
    margin: 14px 0 !important;
  }
  .vdp-specs__row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e1e5ea;
  }
  .vdp-specs__row:last-child { border-bottom: 0; }
  .vdp-specs__row .label { font-weight: 700; }

  /* Key features grid (3-column icon grid) */
  .vdp-features ul,
  .vdp-features__grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    list-style: none;
    padding: 0;
  }
  .vdp-features li,
  .vdp-features__item {
    border: 1px solid #e1e5ea;
    border-radius: 4px;
    padding: 14px 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
  }

  /* Other vehicles cards */
  .vdp-other__grid,
  .vdp-related__grid {
    display: flex !important;
    flex-direction: column;
    gap: 14px;
  }
  .vdp-other__card,
  .vdp-related__card {
    width: 100% !important;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
  }
  .vdp-other__card img,
  .vdp-related__card img { width: 100%; height: auto; display: block; }

  /* Description block */
  .vdp-description {
    padding: 16px 12px !important;
    background: #fff;
    line-height: 1.55;
    font-size: 15px;
  }

  /* Details accordion */
  .vdp-details summary,
  .vdp-accordion summary {
    padding: 14px 16px;
    background: #f4f6f9;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  /* Get Directions / Contact Us cards */
  .vdp-card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 18px 16px;
    margin: 14px 12px;
    border-radius: 4px;
  }
  .vdp-card h3 { font-size: 18px; margin-bottom: 10px; }

  /* Disclaimer */
  .vdp-disclaimer,
  .disclaimer {
    font-style: italic;
    font-size: 13px;
    color: #5a6675;
    padding: 18px 16px;
    background: #f4f6f9;
  }

  /* ---- Footer mobile rework -------------------------------------- */
  /* H4 sections in the footer become accordions (closed by default) */
  .site-footer .footer-col:not(.footer-col--plain) {
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .site-footer .footer-col:not(.footer-col--plain) h4 {
    position: relative;
    padding: 14px 28px 14px 0 !important;
    margin: 0 !important;
    cursor: pointer;
    user-select: none;
  }
  .site-footer .footer-col:not(.footer-col--plain) h4::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform .2s ease;
  }
  .site-footer .footer-col:not(.footer-col--plain).is-open h4::after {
    transform: translateY(-30%) rotate(-135deg);
  }
  .site-footer .footer-col:not(.footer-col--plain) a {
    display: none !important;
  }
  .site-footer .footer-col:not(.footer-col--plain).is-open a {
    display: block !important;
    padding: 10px 0 !important;
  }

  .site-footer { padding: 0 !important; text-align: left !important; }
  .site-footer *,
  .site-footer h2,
  .site-footer h3,
  .site-footer h4,
  .site-footer a,
  .site-footer p,
  .site-footer ul,
  .site-footer li {
    text-align: left !important;
  }
  .site-footer .footer-top,
  .site-footer .footer-grid,
  .site-footer .footer-bottom {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 20px !important;
    text-align: left !important;
  }
  .site-footer .footer-grid {
    display: flex !important;
    flex-direction: column;
    gap: 0 !important;
    text-align: left !important;
  }
  .site-footer .footer-col {
    width: 100% !important;
    padding: 0 0 8px !important;
    text-align: left !important;
  }
  .site-footer .footer-col h4 {
    font-size: 15px !important;
    margin-bottom: 6px;
    text-transform: uppercase;
    text-align: left !important;
  }
  .site-footer .footer-col a {
    padding: 8px 0;
    display: block;
    text-align: left !important;
  }
  /* Move socials to the very bottom of the footer on mobile */
  .site-footer .footer-social {
    order: 99 !important;
    display: flex !important;
    gap: 16px !important;
    padding: 18px 16px 8px !important;
    background: transparent !important;
    width: 100% !important;
    justify-content: flex-start;
  }
  .site-footer .footer-social a {
    width: 32px; height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-blue);
    background: transparent !important;
  }

  /* Prevent the carousels from overflowing */
  .carousel, .slides, .slide { box-sizing: border-box; }
  .reviews-carousel, .reviews-carousel * { max-width: 100% !important; }

  /* GLOBAL: any image, ad, banner, promo must fit screen width.
     Override any inline width/height that came from desktop scrape. */
  img,
  .banner img,
  .ad img,
  .promo img,
  .special img,
  .hero img,
  .promo-card img,
  .vehicle-card__media img,
  section img,
  article img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  /* Logos must stay their natural small size, not fill the row */
  .site-header img,
  .footer-social img,
  .mobile-header-icons img,
  .ph-corp-logo,
  .logo-link img {
    width: auto !important;
    max-width: 100% !important;
  }

  /* Banner sections that wrap an image */
  .banner, .ad, .promo, .special, .promo-card, .home-banner {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 0 14px !important;
    overflow: hidden;
  }
  /* If an image is inside a background-image style, force contain */
  .hero, .hero .slide, .banner {
    background-size: contain !important;
    background-repeat: no-repeat;
    background-position: center;
  }

  /* "WE'RE HERE FOR YOU" section text alignment */
  .home-reviews h2,
  .reviews-section h2 {
    text-align: center !important;
    font-size: 22px !important;
    padding: 0 16px;
  }

  /* ---- Carfax button on used vehicle cards (was huge) ----------- */
  .vehicle-card .btn-carfax,
  .btn-carfax {
    max-width: 130px !important;
    width: 130px !important;
    height: auto !important;
    display: inline-block !important;
    margin: 8px 0 !important;
  }
  .vehicle-card .btn-carfax img,
  .btn-carfax img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* ---- Play video button on used vehicle cards same size -------- */
  .vehicle-card .btn-playvideo,
  .btn-playvideo {
    max-width: 130px !important;
    width: 130px !important;
    height: auto !important;
    display: inline-block !important;
    margin: 8px 0 !important;
  }
  .vehicle-card .btn-playvideo img,
  .btn-playvideo img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  /* ---- Mobile listing cards: stack and full width --------------- */
  .vehicle-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 12px !important;
  }
  .vehicle-card {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* ---- VRP (vehicle results) mobile layout ---------------------- */
  .vrp { padding: 0 !important; }
  .vrp-layout { display: block !important; }
  .vrp-seo, .feature-bar { display: none !important; }
  /* Hide the secondary inv-search bar on mobile (we have one in the sticky bar) */
  .inv-search { display: none !important; }
  /* VRP banner: use ad1.jpg as a mobile-specific ad (replaces desktop TVM strip) */
  .vrp-banner { display: block !important; padding: 0 !important; margin: 0 !important; }
  .vrp-banner .container { padding: 0 !important; max-width: 100% !important; }
  .vrp-banner__img,
  .vrp-banner img { display: none !important; }
  .vrp-banner__link {
    display: block !important;
    width: 100% !important;
    height: 0 !important;
    padding-top: 33.33% !important; /* 3:1 ratio for ad1.jpg (600x200) */
    background: linear-gradient(135deg,#102b4e,#066fef);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
  .vrp-results-head { padding: 12px 14px !important; }
  .vrp-results-head h1 { font-size: 18px !important; line-height: 1.3; }
  .vrp-tools { display: none !important; }  /* desktop sort/view */

  /* Filter sidebar: hidden by default on mobile, fullscreen modal when open */
  .vrp-filters {
    display: none !important;
  }
  .vrp-filters.mobile-open {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1000 !important;
    background: #fff !important;
    overflow-y: auto !important;
    padding: 56px 16px 90px !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .vrp-filters__close {
    position: fixed !important;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    border: 1px solid #e1e5ea;
    background: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 1001;
    border-radius: 4px;
  }
  /* Mobile filter "New" toggle: don't grey it out — make it pressable */
  .vrp-filters .type-toggle--disabled,
  .vrp-filters.mobile-open .type-toggle {
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
  }

  /* Sticky mobile sort/filter bar: 2 rows — Search top, Sort+Filter below */
  .vrp-mobile-bar {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: 14px 14px;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid #e1e5ea;
  }
  .vrp-mobile-bar__search {
    grid-column: 1 / -1;
    background: #fff;
    border: 1px solid #ccd2d8;
    padding: 14px 16px 14px 40px;
    font-size: 15px;
    border-radius: 4px;
    color: #1d2733;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d2733' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.5' y2='16.5'/></svg>");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 18px 18px;
    width: 100%;
    box-sizing: border-box;
  }
  .vrp-mobile-bar__btn {
    padding: 14px 14px;
    background: #102b4e;
    color: #fff;
    border: 0;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
  }
  .vrp-mobile-bar__btn svg { width: 18px; height: 18px; fill: #fff; }

  /* Sort dropdown panel (positioned below the Sort button, NOT fullscreen) */
  .vrp-sort-modal {
    display: none;
    position: absolute;
    left: 14px;
    top: auto;
    width: calc(50% - 22px);
    background: #fff;
    z-index: 60;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
    border-radius: 6px;
    border: 1px solid #e1e5ea;
    overflow: hidden;
  }
  .vrp-sort-modal.open { display: block !important; }
  .vrp-sort-modal__head { display: none !important; } /* hide header — dropdown style */
  .vrp-sort-modal ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
  }
  .vrp-sort-modal li { border: 0; }
  .vrp-sort-modal li button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: 12px 18px 12px 36px;
    font-size: 15px;
    color: #1d2733;
    cursor: pointer;
    position: relative;
  }
  .vrp-sort-modal li.is-active button {
    font-weight: 700;
  }
  .vrp-sort-modal li.is-active button::before {
    content: "\2713";
    position: absolute;
    left: 14px;
    color: #1d2733;
    font-weight: 700;
  }

  /* ========= Filter modal redesign (matches target screenshot) ====== */
  .vrp-filters.mobile-open {
    padding: 0 !important;
  }
  /* Header bar with title + X */
  .vrp-filters__close {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 60px !important;
    height: 60px !important;
    border: 0 !important;
    border-left: 1px solid #e1e5ea !important;
    background: #fff !important;
    font-size: 30px !important;
    color: #1d2733 !important;
    border-radius: 0 !important;
    z-index: 1002;
  }
  .vrp-filters.mobile-open::before {
    content: "Filter Inventory";
    display: block;
    padding: 18px 24px;
    font-size: 20px;
    font-weight: 700;
    color: #1d2733;
    border-bottom: 1px solid #e1e5ea;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1001;
    height: 60px;
    box-sizing: border-box;
  }
  /* Content padding inside the modal */
  .vrp-filters.mobile-open > *:not(.vrp-filters__close) {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Vehicle Type toggles — keep the original switch design, no fake checkbox */
  .vrp-filters.mobile-open .type-toggles {
    display: flex !important;
    gap: 22px !important;
    flex-wrap: wrap;
    padding: 16px 20px !important;
  }
  .vrp-filters.mobile-open .type-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
  }
  .vrp-filters.mobile-open .type-toggle__label {
    font-size: 14px;
    color: #1d2733;
    font-weight: 600;
  }

  /* Section headings (Vehicle Type / Price / Other Filters) */
  .vrp-filters.mobile-open h2,
  .vrp-filters.mobile-open h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 24px 20px 12px !important;
    padding: 0 !important;
  }

  /* Price section card */
  .vrp-filters.mobile-open .price-section,
  .vrp-filters.mobile-open .filter-section--price {
    background: #fff !important;
    border: 1px solid #e1e5ea;
    border-radius: 8px;
    padding: 24px 20px !important;
    margin: 0 20px 16px !important;
  }
  .vrp-filters.mobile-open .price-inputs { display: flex; gap: 10px; align-items: center; }
  .vrp-filters.mobile-open .price-inputs input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #ccd2d8;
    border-radius: 4px;
    text-align: center;
    font-size: 15px;
  }

  /* Other Filters grid (Year/Make/Model etc as 3-col) */
  .vrp-filters.mobile-open .filter-accordion,
  .vrp-filters.mobile-open .filter-sections,
  .vrp-filters.mobile-open .filter-grid,
  .vrp-filters.mobile-open .accordions {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
    padding: 0 20px 100px !important;
  }
  .vrp-filters.mobile-open .filter-accordion > .acc,
  .vrp-filters.mobile-open .filter-accordion > details,
  .vrp-filters.mobile-open .accordion {
    border: 1px solid #e1e5ea !important;
    border-radius: 6px !important;
    padding: 18px 8px !important;
    text-align: center !important;
    background: #fff !important;
  }

  /* Hide top-level applied-filter chips on mobile (they don't work; pc only) */
  .vrp-results > .vrp-chips,
  .vrp-results .vrp-chips {
    display: none !important;
  }
  /* But keep them visible INSIDE the open filter modal */
  .vrp-filters.mobile-open .vrp-chips {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 20px !important;
  }
  .vrp-filters.mobile-open .vrp-chip,
  .vrp-filters.mobile-open .vrp-chips__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #ccd2d8;
    border-radius: 999px;
    font-size: 14px;
    background: #fff;
  }

  /* Ad cards between listings: own card slot, full image natural ratio (no crop) */
  .vehicle-card--ad {
    overflow: visible !important;
    background: #fff !important;
    border: 0 !important;
    display: block !important;
    position: relative !important;
    width: 100% !important;
    aspect-ratio: auto !important;
    max-height: none !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .vehicle-card--ad img,
  .vehicle-card--ad .vehicle-ad__img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: top !important;
    display: block !important;
    position: static !important;
    aspect-ratio: auto !important;
  }

  /* Directions modal (opens from header location pin) */
  .directions-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1100;
    align-items: flex-start;
    justify-content: center;
    padding: 70px 16px 24px;
  }
  .directions-modal.open { display: flex !important; }
  .directions-modal__panel {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
  }
  .directions-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #e1e5ea;
  }
  .directions-modal__head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .directions-modal__head svg { width: 18px; height: 18px; fill: #102b4e; }
  .directions-modal__close {
    width: 36px; height: 36px;
    background: transparent;
    border: 0;
    font-size: 22px;
    cursor: pointer;
    color: #1d2733;
  }
  .directions-modal__body { padding: 18px; }
  .directions-modal__address {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    color: #1d2733;
  }
  .directions-modal__address svg { width: 18px; height: 18px; fill: #102b4e; flex: 0 0 18px; margin-top: 2px; }
  .directions-modal__input {
    width: 100%;
    padding: 14px 16px;
    background: #f4f6f9;
    border: 0;
    font-size: 15px;
    color: #1d2733;
    margin-bottom: 14px;
    box-sizing: border-box;
  }
  .directions-modal__go {
    display: block;
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #066fef;
    background: #fff;
    color: #066fef;
    font-weight: 700;
    font-size: 16px;
    border-radius: 999px;
    cursor: pointer;
  }

  /* Sticky bottom bar inside filter modal (Clear All + View matches) */
  .vrp-filters.mobile-open::after {
    content: "";
    display: block;
    height: 70px;
  }
  .vrp-filters__actions {
    position: fixed !important;
    bottom: 0; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e1e5ea;
    padding: 12px 20px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1002;
  }
}

/* Below very small screens (iPhone SE etc) */
@media (max-width: 360px) {
  .site-header .logo-link--corp { width: 50px !important; height: 26px !important; }
  .mobile-dealer-bar { font-size: 12px; }
}
