/*
 * MAP AFRICA CARS — standard MAP selector typography + phone/tablet layout.
 * Integrated with Cars Marketplace v3.4.1; intentionally ALL rules are
 * scoped to the independent Cars body. Auto Parts/Elementor remain untouched.
 * Bundled inside Cars Marketplace and loaded AFTER map-cars-clean.css so existing !important declarations can
 * be overridden in limited, explicit locations instead of generic resets.
 */

/* Universal Cars-only design tokens. No remote font download. */
body.map-cars-independent-body {
  --map-ui-font: Arial, "Helvetica Neue", Helvetica, "Segoe UI", sans-serif;
  --map-ui-ink: #102b4a;
  --map-ui-muted: #566d85;
  --map-ui-blue: #0a5497;
  --map-ui-red: #e51b2a;
  --map-ui-border: #d9e5f0;
  font-family: var(--map-ui-font) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  -webkit-text-size-adjust: 100%;
}
body.map-cars-independent-body :is(h1,h2,h3,h4,p,label,button,input,select,textarea) {
  font-family: var(--map-ui-font) !important;
}
body.map-cars-independent-body :is(.map-cars-shell,.map-cars-independent-main,
  .map-cars-independent-root,.map-cars-independent-header,
  .map-cars-independent-footer) { min-width: 0; box-sizing: border-box; }
body.map-cars-independent-body :is(input,select,textarea,button,a) { touch-action: manipulation; }
body.map-cars-independent-body :is(a,button,input,select,textarea):focus-visible {
  outline: 3px solid #1781cf !important;
  outline-offset: 3px;
}

/* Readable headline/paragraph scale across Cars marketplace pages. */
body.map-cars-independent-body .map-cars-shell h1,
body.map-cars-independent-body .map-cars-seller-account-hero h1,
body.map-cars-independent-body .map-cars-seller-auth-hero h1,
body.map-cars-independent-body .map-cars-buyer-account-hero h1 {
  font-family: var(--map-ui-font) !important;
  font-weight: 800 !important;
  letter-spacing: -.025em !important;
  line-height: 1.13 !important;
}
body.map-cars-independent-body .map-cars-kicker { font-size: 12px !important; line-height: 1.5 !important; }
body.map-cars-independent-body .map-cars-lead { font-size: 16px !important; line-height: 1.6 !important; }
body.map-cars-independent-body .map-cars-message { font-size: 15px !important; line-height: 1.55 !important; }

/* SELL YOUR CAR — six legible stages; preserve existing PHP field names and JS. */
body.map-cars-independent-body .map-cars-sell { width: 100%; max-width: 1320px !important; }
body.map-cars-independent-body .map-cars-sell-intro { min-width: 0; }
body.map-cars-independent-body .map-cars-sell-intro .map-cars-kicker {
  font-size: 12px !important; letter-spacing: 1.5px !important;
}
body.map-cars-independent-body .map-cars-sell-intro h1 { font-size: clamp(30px,3vw,42px) !important; }
body.map-cars-independent-body .map-cars-sell-intro .map-cars-lead { font-size: 16px !important; }
body.map-cars-independent-body .map-cars-sell-flow strong { font-size: 14px !important; font-weight: 750 !important; }
body.map-cars-independent-body .map-cars-sell-flow small { font-size: 12px !important; line-height: 1.4 !important; }
body.map-cars-independent-body .map-cars-sell-review-card strong { font-size: 17px !important; }
body.map-cars-independent-body .map-cars-sell-review-card p { font-size: 13px !important; line-height: 1.55 !important; }
body.map-cars-independent-body .map-cars-sell-review-card a { font-size: 13px !important; }
body.map-cars-independent-body .map-cars-sell-steps { min-width: 0; }
body.map-cars-independent-body .map-cars-sell-steps a {
  min-height: 52px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
}
body.map-cars-independent-body .map-cars-sell-steps b { font-size: 11px !important; }
body.map-cars-independent-body .map-cars-sell-panel { min-width: 0; }
body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head h2 {
  font-size: 23px !important; line-height: 1.2 !important; font-weight: 800 !important;
}
body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head p {
  font-size: 14px !important; line-height: 1.45 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-grid { min-width: 0; }
body.map-cars-independent-body .map-cars-sell .map-cars-grid > label { min-width: 0; }
body.map-cars-independent-body .map-cars-sell .map-cars-form label,
body.map-cars-independent-body .map-cars-sell .map-cars-upload-field > span {
  font-size: 14px !important; font-weight: 700 !important;
  line-height: 1.45 !important; letter-spacing: 0 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea) {
  box-sizing: border-box !important;
  max-width: 100% !important;
  min-height: 50px !important;
  padding: 11px 13px !important;
  border-radius: 10px !important;
  color: #183550 !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-form select:disabled {
  color: #627488 !important; background: #f1f5f9 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-form small {
  font-size: 12px !important; line-height: 1.45 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-source-note {
  font-size: 13px !important; line-height: 1.55 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-description-field textarea {
  min-height: 174px !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-upload-field input[type="file"] {
  min-height: 55px !important; padding: 7px !important; font-size: 14px !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-upload-field input[type="file"]::file-selector-button {
  min-height: 39px !important; padding: 8px 12px !important; font-size: 13px !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-submit-row strong { font-size: 17px !important; }
body.map-cars-independent-body .map-cars-sell .map-cars-submit-row span {
  font-size: 13px !important; line-height: 1.5 !important;
}
body.map-cars-independent-body .map-cars-sell :is(.map-cars-save-draft,.map-cars-submit) {
  min-height: 50px !important; padding: 12px 18px !important;
  font-size: 15px !important; font-weight: 750 !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-submit-actions {
  display: flex !important; flex-flow: row wrap; gap: 12px !important; align-items: center;
}

/* Matching type and tappable controls for the Cars buying, listing, and account UI. */
body.map-cars-independent-body .map-cars-header-search input,
body.map-cars-independent-body .map-car-home-filters :is(input,select),
body.map-cars-independent-body .map-car-filters :is(input,select),
body.map-cars-independent-body :is(.map-cars-seller-auth-form,
 .map-cars-seller-profile-form,.map-cars-seller-listing-editor,
 .map-cars-buyer-form,.map-cars-buyer-profile-form) :is(input,select,textarea) {
  min-width: 0 !important; min-height: 48px !important;
  font-size: 15px !important; font-weight: 500 !important;
  font-family: var(--map-ui-font) !important;
}
body.map-cars-independent-body :is(.map-cars-seller-auth-form,
 .map-cars-seller-profile-form,.map-cars-seller-listing-editor,
 .map-cars-buyer-form,.map-cars-buyer-profile-form) label,
body.map-cars-independent-body .map-car-home-filters label {
  font-size: 14px !important; font-weight: 700 !important;
}
body.map-cars-independent-body :is(.map-cars-seller-auth-form,
 .map-cars-seller-profile-form,.map-cars-seller-listing-editor,
 .map-cars-buyer-form,.map-cars-buyer-profile-form) small { font-size: 12px !important; }
body.map-cars-independent-body .map-cars-seller-auth-card h2,
body.map-cars-independent-body .map-cars-buyer-auth-card h2 { font-size: 27px !important; font-weight: 800 !important; }
body.map-cars-independent-body .map-cars-seller-listing-body h3 { font-size: 17px !important; }
body.map-cars-independent-body .map-cars-seller-listing-body > small { font-size: 12px !important; }
body.map-cars-independent-body .map-cars-seller-listing-body > strong { font-size: 19px !important; }
body.map-cars-independent-body .map-car-card h3 { font-size: 17px !important; line-height: 1.35 !important; }
body.map-cars-independent-body .map-car-meta { font-size: 13px !important; line-height: 1.5 !important; }
body.map-cars-independent-body .map-cars-seller-stat small,
body.map-cars-independent-body .map-cars-buyer-stat small { font-size: 12px !important; }
body.map-cars-independent-body :is(.map-cars-seller-sidebar,.map-cars-buyer-sidebar) nav a {
  font-size: 14px !important; min-height: 46px !important;
}
body.map-cars-independent-body .map-cars-nav-links a { font-size: 14px !important; }
body.map-cars-independent-body .map-cars-independent-footer { font-size: 14px !important; line-height: 1.6 !important; }
body.map-cars-independent-body .map-cars-independent-footer :is(a,p,span) { font-size: 13px !important; line-height: 1.5 !important; }

/* TABLET — two columns for longer forms, one column for sidebars. */
@media (max-width: 1024px) {
  body.map-cars-independent-body .map-cars-sell .map-cars-grid-4,
  body.map-cars-independent-body .map-cars-sell .map-cars-grid-3 {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  body.map-cars-independent-body .map-cars-sell-intro {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-cars-sell-review-card { max-width: none !important; }
  body.map-cars-independent-body .map-cars-sell-steps {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
  body.map-cars-independent-body .map-car-filters-expanded,
  body.map-cars-independent-body .map-car-home-filters,
  body.map-cars-independent-body .map-advanced-fields {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  body.map-cars-independent-body .map-cars-seller-account-layout,
  body.map-cars-independent-body .map-cars-buyer-account-layout,
  body.map-cars-independent-body .map-cars-buyer-dashboard-grid,
  body.map-cars-independent-body .map-cars-buyer-search-layout {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-cars-seller-sidebar,
  body.map-cars-independent-body .map-cars-buyer-sidebar {
    position: static !important; width: auto !important;
  }
  body.map-cars-independent-body .map-cars-seller-auth-grid,
  body.map-cars-independent-body .map-cars-buyer-auth-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
}

/* PHONE — one-column complete form, scrollable six-step guide and touch targets. */
@media (max-width: 640px) {
  body.map-cars-independent-body .map-cars-independent-main {
    width: 100% !important; max-width: 100% !important; padding: 0 !important;
  }
  body.map-cars-independent-body .map-cars-shell {
    width: 100% !important; max-width: 100% !important;
    margin: 0 auto !important; padding-left: 12px !important;
    padding-right: 12px !important; box-sizing: border-box !important;
  }
  body.map-cars-independent-body .map-cars-sell {
    padding-top: 14px !important; padding-bottom: 38px !important;
  }
  body.map-cars-independent-body .map-cars-sell-intro {
    padding: 21px 17px !important; gap: 15px !important;
    grid-template-columns: minmax(0,1fr) !important; border-radius: 16px !important;
  }
  body.map-cars-independent-body .map-cars-sell-intro h1 { font-size: 30px !important; }
  body.map-cars-independent-body .map-cars-sell-intro .map-cars-lead { font-size: 14px !important; }
  body.map-cars-independent-body .map-cars-sell-flow {
    display: grid !important; grid-template-columns: 1fr !important;
    gap: 8px !important; margin-top: 16px !important;
  }
  body.map-cars-independent-body .map-cars-sell-flow > span {
    min-width: 0 !important; padding: 10px !important;
  }
  body.map-cars-independent-body .map-cars-sell-flow strong { font-size: 14px !important; }
  body.map-cars-independent-body .map-cars-sell-flow small { font-size: 12px !important; }
  body.map-cars-independent-body .map-cars-sell-review-card { padding: 16px !important; }
  body.map-cars-independent-body .map-cars-sell-steps {
    display: flex !important; flex-wrap: nowrap !important;
    grid-template-columns: none !important; overflow-x: auto !important;
    overflow-y: hidden !important; width: 100% !important;
    gap: 7px !important; padding: 8px !important;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    scrollbar-width: thin; scrollbar-color: #b6cde4 #f4f8fc;
  }
  body.map-cars-independent-body .map-cars-sell-steps a {
    flex: 0 0 auto !important; min-width: 135px !important;
    min-height: 47px !important; padding: 9px 11px !important;
    font-size: 13px !important; scroll-snap-align: start;
  }
  body.map-cars-independent-body .map-cars-sell-steps b {
    width: 26px !important; height: 26px !important; flex: 0 0 26px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-form {
    display: grid !important; gap: 15px !important;
  }
  body.map-cars-independent-body .map-cars-sell-panel {
    width: 100% !important; padding: 17px 15px !important;
    overflow: hidden !important; box-sizing: border-box !important;
    scroll-margin-top: 18px;
  }
  body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head {
    margin: -17px -15px 18px !important; padding: 13px 14px !important;
    align-items: flex-start !important; gap: 10px !important;
  }
  body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head h2 {
    font-size: 20px !important;
  }
  body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head p {
    font-size: 12px !important; line-height: 1.45 !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-grid,
  body.map-cars-independent-body .map-cars-sell .map-cars-grid-2,
  body.map-cars-independent-body .map-cars-sell .map-cars-grid-3,
  body.map-cars-independent-body .map-cars-sell .map-cars-grid-4,
  body.map-cars-independent-body .map-cars-sell .map-cars-upload-grid {
    display: grid !important; grid-template-columns: minmax(0,1fr) !important;
    width: 100% !important; gap: 16px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-form label {
    font-size: 14px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-form :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]),select,textarea) {
    font-size: 16px !important; min-height: 52px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-form input[type="file"] {
    max-width: 100% !important; font-size: 13px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-description-field textarea { min-height: 166px !important; }
  body.map-cars-independent-body .map-cars-sell .map-cars-submit-row {
    flex-direction: column !important; align-items: stretch !important; gap: 17px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-submit-actions {
    display: flex !important; flex-direction: column !important; width: 100% !important;
    align-items: stretch !important; gap: 10px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-submit-actions button {
    width: 100% !important; min-width: 0 !important; min-height: 52px !important;
    font-size: 15px !important;
  }
  body.map-cars-independent-body .map-cars-sell .map-cars-upload-field { padding: 13px !important; }
  body.map-cars-independent-body .map-cars-sell .map-cars-upload-field input[type="file"]::file-selector-button {
    padding: 7px 9px !important; font-size: 12px !important;
  }

  /* Dedicated Cars header remains independent from the parts header. */
  body.map-cars-independent-body .map-cars-topbar {
    width: 100% !important; min-width: 0 !important;
  }
  body.map-cars-independent-body .map-cars-header-search input { min-width: 0 !important; font-size: 16px !important; }
  body.map-cars-independent-body .map-cars-mobile-toggle { min-width: 46px !important; min-height: 46px !important; }
  body.map-cars-independent-body .map-cars-nav-links a { min-height: 44px !important; font-size: 14px !important; }
  body.map-cars-independent-body .map-cars-independent-footer {
    min-width: 0 !important; overflow-wrap: anywhere;
  }
  body.map-cars-independent-body .map-cars-footer-main {
    grid-template-columns: minmax(0,1fr) !important; gap: 22px !important;
    padding: 28px 18px !important;
  }

  /* Homepage filters, vehicle listings, account forms, seller tools. */
  body.map-cars-independent-body .map-car-home-filters,
  body.map-cars-independent-body .map-car-filters,
  body.map-cars-independent-body .map-advanced-fields,
  body.map-cars-independent-body .map-cars-seller-profile-grid,
  body.map-cars-independent-body .map-cars-buyer-profile-grid,
  body.map-cars-independent-body .map-cars-buyer-form-two,
  body.map-cars-independent-body .map-cars-seller-auth-two {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-car-home-filters .map-car-filter-actions {
    grid-column: 1 / -1 !important;
  }
  body.map-cars-independent-body .map-car-home-grid,
  body.map-cars-independent-body .map-cars-buyer-car-grid,
  body.map-cars-independent-body .map-cars-seller-listing-grid {
    grid-template-columns: minmax(0,1fr) !important;
    gap: 14px !important;
  }
  body.map-cars-independent-body .map-cars-seller-edit-summary,
  body.map-cars-independent-body .map-cars-seller-current-photos,
  body.map-cars-independent-body .map-cars-seller-listing-editor .map-cars-grid {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-cars-seller-account-hero,
  body.map-cars-independent-body .map-cars-seller-auth-hero,
  body.map-cars-independent-body .map-cars-buyer-account-hero {
    padding: 20px 17px !important; gap: 15px !important;
    flex-direction: column !important; align-items: flex-start !important;
  }
  body.map-cars-independent-body :is(.map-cars-seller-auth-card,.map-cars-buyer-auth-card,
     .map-cars-seller-edit-section,.map-cars-buyer-profile-form > section) {
    padding: 17px !important;
  }
  body.map-cars-independent-body .map-cars-seller-account-hero h1,
  body.map-cars-independent-body .map-cars-seller-auth-hero h1,
  body.map-cars-independent-body .map-cars-buyer-account-hero h1 { font-size: 29px !important; }
  body.map-cars-independent-body .map-cars-seller-stat-grid,
  body.map-cars-independent-body .map-cars-buyer-stat-grid {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  }
  body.map-cars-independent-body .map-cars-seller-sidebar nav,
  body.map-cars-independent-body .map-cars-buyer-sidebar nav {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px !important;
  }
  body.map-cars-independent-body .map-cars-search-tabs { overflow-x: auto !important; white-space: nowrap; }
  body.map-cars-independent-body .map-cars-search-tabs .map-search-tab { font-size: 14px !important; }
  body.map-cars-independent-body .map-cars-dream-copy h1 { font-size: 36px !important; }
  body.map-cars-independent-body .map-cars-dream-copy p { font-size: 15px !important; }
  body.map-cars-independent-body .map-cars-browse-cta,
  body.map-cars-independent-body .map-cars-outline-cta { min-height: 47px !important; }
  body.map-cars-independent-body .map-car-card-image { height: auto !important; aspect-ratio: 4 / 3; }
  body.map-cars-independent-body .map-car-card-image img { width: 100% !important; height: 100% !important; object-fit: cover; }
}

@media (max-width: 380px) {
  body.map-cars-independent-body .map-cars-seller-stat-grid,
  body.map-cars-independent-body .map-cars-buyer-stat-grid,
  body.map-cars-independent-body .map-cars-seller-sidebar nav,
  body.map-cars-independent-body .map-cars-buyer-sidebar nav {
    grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-cars-sell-panel .map-cars-panel-head h2 { font-size: 19px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.map-cars-independent-body .map-cars-sell * { scroll-behavior: auto !important; transition: none !important; }
}


/* v3.4.1 — extra narrowly-scoped improvements for the existing buyer/seller UI. */
body.map-cars-independent-body .map-cars-independent-root {
  max-width: 100%;
  overflow-x: clip;
}
body.map-cars-independent-body .map-cars-sell .map-cars-sell-panel :is(input,select,textarea):focus-visible,
body.map-cars-independent-body :is(.map-car-home-filters,.map-cars-buyer-auth-card) :is(input,select):focus-visible {
  border-color: #1272ba !important;
  box-shadow: 0 0 0 3px rgba(18,114,186,.17) !important;
}
body.map-cars-independent-body .map-cars-sell .map-cars-sell-panel :is(input[type="checkbox"],input[type="radio"]) {
  width: auto !important; min-height: 0 !important; height: auto !important;
  accent-color: #095fa8;
}
body.map-cars-independent-body .map-cars-sell .map-cars-form select {
  padding-right: 30px !important;
}
body.map-cars-independent-body .map-car-home-filters :is(input,select),
body.map-cars-independent-body .map-advanced-fields :is(input,select) {
  box-sizing: border-box !important;
}
@media (max-width: 760px) {
  /* Avoid desktop menu/image overflow without changing PHP or search logic. */
  body.map-cars-independent-body :is(.map-cars-independent-main,.map-cars-buyer-home,
    .map-cars-sell,.map-car-home-grid,.map-cars-sell-panel,.map-car-home-filters) {
    min-width: 0 !important; max-width: 100% !important;
  }
  body.map-cars-independent-body .map-cars-header-search {
    width: 100% !important; max-width: 100% !important;
  }
  body.map-cars-independent-body .map-cars-search-tabs {
    max-width: 100%; overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body.map-cars-independent-body :is(.map-car-home-filters,.map-car-filters,.map-advanced-fields) > label {
    min-width: 0 !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home :is(.map-car-home-filters,.map-car-filters) :is(input,select),
  body.map-cars-independent-body :is(.map-cars-seller-auth-form,.map-cars-buyer-auth-form,
    .map-cars-seller-listing-editor,.map-cars-buyer-profile-form) :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {
    min-width: 0 !important; max-width: 100% !important;
    font-size: 16px !important; /* Prevent iOS auto-zoom. */
  }
  body.map-cars-independent-body :is(.map-cars-sell-panel,.map-cars-seller-auth-card,
    .map-cars-buyer-auth-card,.map-car-card,.map-cars-seller-listing-card) {
    overflow-wrap: anywhere;
  }
  body.map-cars-independent-body :is(.map-cars-sell-panel,.map-car-card) img {
    max-width: 100%;
  }
  body.map-cars-independent-body .map-cars-independent-footer,
  body.map-cars-independent-body .map-cars-independent-header {
    max-width: 100%;
  }
}
@media (max-width: 640px) {
  /* Keep every required buyer search field visible and touch friendly. */
  body.map-cars-independent-body .map-car-home-filters {
    display: grid !important; grid-template-columns: minmax(0,1fr) !important;
  }
  body.map-cars-independent-body .map-car-home-filters.is-quick .map-filter-keyword,
  body.map-cars-independent-body .map-car-home-filters .map-car-filter-actions {
    grid-column: 1 / -1 !important;
  }
  body.map-cars-independent-body .map-car-home-filters .map-car-filter-actions {
    display: flex !important; flex-wrap: wrap !important;
    align-items: stretch !important; width: 100% !important;
  }
  body.map-cars-independent-body .map-car-home-filters .map-car-filter-actions > * {
    min-height: 46px !important; flex: 1 1 auto !important;
  }
  body.map-cars-independent-body .map-cars-sell-steps a:focus-visible {
    outline-offset: -2px;
  }
}


/* v3.4.3: compact horizontal carousels matching the Auto Parts homepage.
   One row only; items automatically travel from right to left on desktop and mobile. */
body.map-cars-independent-body .map-cars-horizontal-carousel {
  position:relative; min-width:0; padding:0 34px;
}
body.map-cars-independent-body .map-cars-horizontal-viewport {
  width:100%; overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain;
  scrollbar-width:none; -ms-overflow-style:none; scroll-snap-type:x proximity;
  border-radius:12px; -webkit-overflow-scrolling:touch; touch-action:pan-x;
}
body.map-cars-independent-body .map-cars-horizontal-viewport::-webkit-scrollbar { display:none; }
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand-grid,
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-grid {
  display:flex!important; flex-wrap:nowrap!important; grid-template-columns:none!important;
  grid-auto-flow:unset!important; width:max-content!important; align-items:stretch; gap:10px!important;
}
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand {
  box-sizing:border-box; flex:0 0 118px!important; width:118px!important;
  min-width:118px!important; height:88px!important; min-height:88px!important;
  scroll-snap-align:start;
}
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-card {
  box-sizing:border-box; flex:0 0 176px!important; width:176px!important;
  min-width:176px!important; height:156px!important; min-height:156px!important;
  scroll-snap-align:start;
}
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-photo { height:88px!important; }
body.map-cars-independent-body .map-cars-horizontal-controls {
  pointer-events:none; position:absolute; inset:0; display:flex; align-items:center;
  justify-content:space-between; z-index:3;
}
body.map-cars-independent-body .map-cars-horizontal-controls button {
  pointer-events:auto; display:grid; place-items:center; width:29px; height:42px; padding:0;
  font:800 17px/1 Arial,sans-serif; color:#164778; background:rgba(255,255,255,.94);
  border:1px solid #cbdced; border-radius:10px; cursor:pointer; touch-action:manipulation;
  box-shadow:0 4px 14px rgba(7,55,105,.10);
}
body.map-cars-independent-body .map-cars-horizontal-controls button:hover,
body.map-cars-independent-body .map-cars-horizontal-controls button:focus-visible {
  color:#fff; background:#0b5396; border-color:#0b5396;
}
@media(max-width:650px) {
  body.map-cars-independent-body .map-cars-home-brands { padding-bottom:10px!important; }
  body.map-cars-independent-body .map-cars-horizontal-carousel { padding:0 26px; }
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand-grid,
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-grid { gap:7px!important; }
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand {
    flex-basis:96px!important; width:96px!important; min-width:96px!important;
    height:78px!important; min-height:78px!important; padding:4px 3px!important; gap:3px!important;
  }
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-card {
    flex-basis:136px!important; width:136px!important; min-width:136px!important;
    height:142px!important; min-height:142px!important;
  }
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-photo { height:78px!important; }
  body.map-cars-independent-body .map-cars-horizontal-controls button { width:24px; height:36px; font-size:15px; }
}
@media(max-width:365px) {
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand {
    flex-basis:88px!important; width:88px!important; min-width:88px!important;
  }
  body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-card {
    flex-basis:126px!important; width:126px!important; min-width:126px!important;
  }
}
@media(prefers-reduced-motion:reduce) {
  body.map-cars-independent-body .map-cars-horizontal-viewport { scroll-behavior:auto!important; }
}



/* v3.4.4 — clean arrow-free auto-moving carousels. */
body.map-cars-independent-body .map-cars-horizontal-carousel{padding:0!important;overflow:hidden!important;}
body.map-cars-independent-body .map-cars-horizontal-controls{display:none!important;}
body.map-cars-independent-body .map-cars-horizontal-viewport{
  cursor:grab; scroll-snap-type:none!important; scroll-behavior:auto!important;
}
body.map-cars-independent-body .map-cars-horizontal-viewport:active{cursor:grabbing;}
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-home-brand,
body.map-cars-independent-body .map-cars-horizontal-carousel .map-cars-body-card{scroll-snap-align:none!important;}

/* Smarter, shorter Buy a Car hero on phones. */
@media(max-width:650px){
  body.map-cars-independent-body .map-cars-dream-hero{
    min-height:285px!important;
    background-position:64% center!important;
  }
  body.map-cars-independent-body .map-cars-dream-copy{
    width:64%!important;
    padding:20px 12px 54px 16px!important;
  }
  body.map-cars-independent-body .map-cars-dream-copy .map-cars-kicker{
    font-size:9px!important;letter-spacing:1.5px!important;margin-bottom:5px!important;
  }
  body.map-cars-independent-body .map-cars-dream-copy h1{
    font-size:30px!important;line-height:.98!important;
  }
  body.map-cars-independent-body .map-cars-dream-copy p{
    font-size:12px!important;line-height:1.3!important;margin:9px 0 11px!important;max-width:100%!important;
  }
  body.map-cars-independent-body .map-cars-dream-actions{gap:7px!important;flex-wrap:nowrap!important;}
  body.map-cars-independent-body .map-cars-browse-cta,
  body.map-cars-independent-body .map-cars-outline-cta{
    min-height:35px!important;padding:0 10px!important;font-size:10px!important;white-space:nowrap!important;
  }
  body.map-cars-independent-body .map-cars-browse-cta span{font-size:17px!important;margin-left:5px!important;}
  body.map-cars-independent-body .map-cars-hero-trust{
    margin-top:10px!important;gap:8px!important;font-size:8px!important;
  }
  body.map-cars-independent-body .map-cars-hero-trust b{width:20px!important;height:20px!important;font-size:9px!important;}
  body.map-cars-independent-body .map-cars-search-panel{margin:-38px auto 0!important;}
}
@media(max-width:390px){
  body.map-cars-independent-body .map-cars-dream-hero{min-height:270px!important;background-position:61% center!important;}
  body.map-cars-independent-body .map-cars-dream-copy{width:68%!important;padding-left:13px!important;padding-bottom:48px!important;}
  body.map-cars-independent-body .map-cars-dream-copy h1{font-size:27px!important;}
  body.map-cars-independent-body .map-cars-dream-copy p{font-size:11px!important;}
}


/* v3.4.5 – genuinely automatic seamless brand/body-type marquees.
   Both groups are rendered in PHP: no timer or script is required to start moving.
   Scoping to the Cars shell protects the Auto Parts homepage. */
@keyframes mapcars-v345-move-left {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
body.map-cars-independent-body .map-cars-marquee {
  --mapcars-gap: 10px;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative;
}
body.map-cars-independent-body .map-cars-marquee .map-cars-horizontal-viewport {
  width: 100%;
  overflow: hidden !important;
  scroll-snap-type: none !important;
  scroll-behavior: auto !important;
  touch-action: pan-y;
  cursor: grab;
  border-radius: 11px;
}
body.map-cars-independent-body .map-cars-marquee .map-cars-horizontal-viewport:active {
  cursor: grabbing;
}
body.map-cars-independent-body .map-cars-marquee .map-cars-marquee-track {
  display: flex !important;
  flex-flow: row nowrap !important;
  align-items: stretch;
  width: max-content !important;
  max-width: none !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  will-change: transform;
  animation: mapcars-v345-move-left var(--mapcars-duration, 60s) linear infinite !important;
}
body.map-cars-independent-body .map-cars-marquee .map-cars-marquee-group {
  display: flex !important;
  flex: 0 0 auto !important;
  flex-flow: row nowrap !important;
  align-items: stretch;
  width: max-content !important;
  max-width: none !important;
  min-width: 0;
  gap: var(--mapcars-gap) !important;
  margin: 0 !important;
  padding: 0 var(--mapcars-gap) 0 0 !important;
  box-sizing: border-box;
}
body.map-cars-independent-body .map-cars-marquee .map-cars-horizontal-controls,
body.map-cars-independent-body .map-cars-marquee .slick-arrow,
body.map-cars-independent-body .map-cars-marquee .swiper-button-next,
body.map-cars-independent-body .map-cars-marquee .swiper-button-prev {
  display: none !important;
}
/* Only stop while a keyboard user actively navigates a card, never on hover. */
body.map-cars-independent-body .map-cars-marquee:focus-within .map-cars-marquee-track {
  animation-play-state: paused !important;
}
@media (max-width: 650px) {
  body.map-cars-independent-body .map-cars-marquee { --mapcars-gap: 7px; }
}
body.map-cars-independent-body .map-cars-marquee .map-cars-marquee-track a,
body.map-cars-independent-body .map-cars-marquee .map-cars-marquee-track img {
  -webkit-user-drag: none;
  user-select: none;
}

/* v3.4.7 — lightweight previews and clear upload feedback on seller pages only. */
body.map-cars-independent-body .map-cars-photo-status {
  display: block; margin: 12px 0 18px; padding: 12px 14px;
  background: #eff7ff; border: 1px solid #c6dff7; border-radius: 10px;
  font-size: 13px; line-height: 1.55; font-weight: 600; color: #143c65;
}
body.map-cars-independent-body .map-cars-photo-status.is-error {
  color: #8a1a1a; background: #fff0f0; border-color: #e99a9a;
}
body.map-cars-independent-body .map-cars-photo-preview {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 9px; width: 100%; margin-top: 10px;
}
body.map-cars-independent-body .map-cars-photo-preview:empty { display: none; }
body.map-cars-independent-body .map-cars-photo-tile {
  min-width: 0; overflow: hidden; border: 1px solid #d9e5f0;
  border-radius: 9px; background: white;
}
body.map-cars-independent-body .map-cars-photo-tile img {
  display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover;
}
body.map-cars-independent-body .map-cars-photo-tile span {
  display: block; padding: 6px; font-size: 10px; line-height: 1.3;
  font-weight: 500; color: #36506a; overflow-wrap: anywhere;
}
body.map-cars-independent-body .map-cars-form button[type="submit"]:disabled {
  cursor: wait; opacity: .7;
}
@media (max-width: 600px) {
  body.map-cars-independent-body .map-cars-photo-preview { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  body.map-cars-independent-body .map-cars-photo-tile span { font-size: 10px; }
  body.map-cars-independent-body .map-cars-photo-status { font-size: 12px; }
}

/* v3.5.5 — Desktop uses the existing full search tabs and form.
   The compact, two-column disclosure is restricted to mobile widths. */
@media (min-width: 768px) {
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure,
  body.map-cars-independent-body .map-cars-buyer-home .map-car-extra-filters { display: none !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-search-tabs { display: flex !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter > .map-car-home-filters { display: grid !important; }
}
@media (max-width: 767px) {
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter {
    width: min(94%, 1120px) !important;
    margin: -19px auto 0 !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    overflow: visible !important;
    box-shadow: 0 8px 22px rgba(10,44,83,.12) !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter > .map-cars-search-tabs { display: none !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure { display: block !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-toggle {
    display: flex !important; align-items: center !important;
    justify-content: space-between !important; gap: 10px !important;
    width: 100% !important; min-height: 52px !important; padding: 12px 14px !important;
    background: #0a5395 !important; border-radius: 11px !important;
    color: #fff !important; cursor: pointer !important;
    list-style: none !important; user-select: none;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-toggle:focus-visible {
    outline: 3px solid #ffca58 !important; outline-offset: 3px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-toggle::marker { content: ''; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-toggle::-webkit-details-marker { display: none; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure[open] > .map-cars-quick-search-toggle { border-radius: 11px 11px 0 0 !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-title {
    display: inline-flex !important; align-items: center !important; gap: 8px !important;
    color: #fff !important; font-size: 15px !important;
    line-height: 1.2 !important; font-weight: 950 !important; letter-spacing: .035em !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-title > span { font-size: 23px !important; line-height: 1 !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-right { display: flex !important; align-items: center !important; gap: 10px !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-applied {
    color: #fff !important; font-size: 11px !important; font-weight: 800 !important;
    background: rgba(255,255,255,.16) !important; padding: 5px 8px !important;
    border-radius: 999px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-chevron {
    display: block !important; width: 10px !important; height: 10px !important;
    border: solid #fff !important; border-width: 0 2.5px 2.5px 0 !important;
    transform: rotate(45deg) !important; transition: transform .18s ease !important;
    margin: -4px 2px 0 0 !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure[open] .map-cars-quick-search-chevron { transform: rotate(225deg) !important; margin: 4px 2px 0 0 !important; }
  /* A single form is shared by desktop and mobile. Its mobile visibility is
     controlled by the sibling native details element, even without JavaScript. */
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure:not([open]) + .map-car-home-filters { display: none !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-mobile-disclosure[open] + .map-car-home-filters {
    display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    padding: 13px 11px !important; gap: 10px 9px !important; min-width: 0 !important;
    margin: 0 !important; border-radius: 0 0 11px 11px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-home-filters > label {
    display: flex !important; flex-direction: column !important; justify-content: flex-end !important;
    gap: 5px !important; min-width: 0 !important; margin: 0 !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-home-filters > .map-filter-keyword {
    display: flex !important; grid-column: 1 / -1 !important;
  }
  /* Override desktop Quick Search mode on a resized mobile window. */
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-home-filters.is-quick > .map-filter-detail { display: flex !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-home-filters :is(input,select) {
    width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    height: 46px !important; min-height: 46px !important;
    padding: 0 7px !important; font-size: 16px !important;
    border-radius: 8px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-filter-title { font-size: 10px !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters {
    display: block !important; grid-column: 1 / -1 !important;
    min-width: 0 !important; padding-top: 9px !important;
    border-top: 1px solid #e3ebf2 !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters > summary {
    display: inline-flex !important; align-items: center !important; gap: 6px !important;
    color: #0a5395 !important; cursor: pointer !important; list-style: none !important;
    font-size: 12px !important; font-weight: 800 !important; padding: 4px 0 8px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters > summary::marker { content: ''; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters > summary::-webkit-details-marker { display: none; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters:not([open]) + .map-advanced-fields { display: none !important; }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-extra-filters[open] + .map-advanced-fields {
    display: grid !important; grid-column: 1 / -1 !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px !important; padding: 10px 0 5px !important;
    border: 0 !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-advanced-fields > label {
    display: flex !important; flex-direction: column !important;
    gap: 5px !important; min-width: 0 !important; font-size: 12px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-filter-actions {
    display: flex !important; grid-column: 1 / -1 !important;
    align-items: stretch !important; width: 100% !important; gap: 10px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-filter-actions button {
    min-height: 47px !important; height: 47px !important;
    flex: 1 1 auto !important; font-size: 14px !important;
  }
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-filter .map-car-filter-actions .map-car-clear {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    min-height: 47px !important; height: 47px !important; padding: 0 15px !important;
    flex: 0 0 auto !important;
  }
}
@media (max-width: 360px) {
  body.map-cars-independent-body .map-cars-buyer-home .map-cars-quick-search-applied { display: none !important; }
}


/* ===========================================================
   v3.5.7 — Compact THREE-COLUMN Cars footer on phones ONLY.
   Full-width brand above: Cars | Company | Marketplace.
   Preserve the existing desktop footer and all other features.
   =========================================================== */
@media (max-width: 767px) {
  body.map-cars-independent-body .map-cars-independent-footer {
    margin-top: 24px !important;
    overflow-x: clip;
  }
  body.map-cars-independent-body .map-cars-footer-main {
    display: grid !important;
    grid-template-columns: minmax(0, .92fr) minmax(0, .95fr) minmax(0, 1.23fr) !important;
    column-gap: 10px !important;
    row-gap: 16px !important;
    padding: 23px 15px 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  body.map-cars-independent-body .map-cars-footer-main > div {
    min-width: 0 !important;
    gap: 7px !important;
    align-items: flex-start !important;
  }
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-brand {
    grid-column: 1 / -1 !important;
    gap: 5px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid rgba(255,255,255,.15) !important;
  }
  body.map-cars-independent-body .map-cars-footer-main .map-footer-logo {
    font-size: 24px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
  }
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-brand p {
    max-width: 40ch !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-brand a {
    display: inline-block !important;
    margin-top: 2px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
  }
  body.map-cars-independent-body .map-cars-footer-main :is(.map-cars-footer-cars, .map-cars-footer-company, .map-cars-footer-marketplace) {
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: start !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    padding: 0 !important;
    border: 0 !important;
  }
  body.map-cars-independent-body .map-cars-footer-main :is(.map-cars-footer-cars, .map-cars-footer-company, .map-cars-footer-marketplace) strong {
    font-size: 12px !important;
    line-height: 1.35 !important;
    letter-spacing: -.12px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0 0 3px !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }
  body.map-cars-independent-body .map-cars-footer-main :is(.map-cars-footer-cars, .map-cars-footer-company) a,
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-marketplace span {
    font-size: 11px !important;
    line-height: 1.38 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    display: block !important;
  }
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-marketplace span:last-child {
    grid-column: auto !important;
  }
  body.map-cars-independent-body .map-cars-footer-bottom {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 4px !important;
    padding: 12px 15px 18px !important;
    line-height: 1.4 !important;
  }
  body.map-cars-independent-body .map-cars-footer-bottom span {
    font-size: 11px !important;
  }
}
@media (max-width: 355px) {
  body.map-cars-independent-body .map-cars-footer-main {
    column-gap: 8px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body.map-cars-independent-body .map-cars-footer-main :is(.map-cars-footer-cars, .map-cars-footer-company, .map-cars-footer-marketplace) strong {
    font-size: 11px !important;
  }
  body.map-cars-independent-body .map-cars-footer-main :is(.map-cars-footer-cars, .map-cars-footer-company) a,
  body.map-cars-independent-body .map-cars-footer-main .map-cars-footer-marketplace span {
    font-size: 10.5px !important;
  }
}
