/* CARFID V49: mobile product typography and system theme. */
@media (max-width:760px) {
  :root { color-scheme:light; --mobile-bg:#fff; --mobile-surface:#f5f6f8; --mobile-text:#15171b; --mobile-muted:#626b77; --mobile-line:#e2e6ec; --mobile-accent:#e9f2ff; }
  body:not(.owner-body) { background:var(--mobile-bg); color:var(--mobile-text); }
  body:not(.owner-body) .product-card.product-card-link {
    display:flex!important; flex-direction:column!important; height:auto!important;
    border:0!important; border-radius:0!important; background:transparent!important;
    padding:0 0 12px!important; overflow:visible!important; box-shadow:none!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-image {
    width:100%!important; height:auto!important; aspect-ratio:1/1.02;
    margin:0 0 10px!important; border:1px solid var(--mobile-line)!important;
    border-radius:16px!important; background:#f5f6f8!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-copy {
    display:flex!important; flex-direction:column!important; flex:1; gap:0;
    min-height:0!important; padding:0 2px!important; color:var(--mobile-text)!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-name {
    order:0; display:block!important; color:var(--mobile-text)!important;
    font-size:14px!important; font-weight:600!important; line-height:1.4!important;
    margin:0!important; min-height:0!important; max-height:none!important;
    white-space:normal!important; overflow:visible!important; overflow-wrap:anywhere;
    -webkit-line-clamp:unset!important; text-overflow:clip!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-bottom {
    order:1; display:block!important; margin:7px 0 9px!important; padding:0!important;
    text-align:left; min-height:44px; padding-right:48px!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-bottom strong {
    color:var(--mobile-text)!important; font-size:19px!important; font-weight:700!important;
    line-height:1.3!important; white-space:normal; overflow-wrap:anywhere;
  }
  body:not(.owner-body) .product-card.product-card-link .product-fitment-line {
    order:2; color:var(--mobile-muted)!important; margin:0 0 6px!important;
    font-size:12px!important; white-space:normal; overflow:visible;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badges {
    order:3; margin:0!important; flex-wrap:wrap!important; white-space:normal;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge {
    background:var(--mobile-surface)!important; border-color:var(--mobile-line)!important;
    color:var(--mobile-muted)!important; font-size:12px!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-stock { color:#247044!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-expected { color:#865d16!important; }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn {
    background:var(--mobile-bg)!important; color:var(--mobile-text)!important;
    border:1px solid var(--mobile-line)!important; box-shadow:none!important;
  }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn svg { stroke:currentColor; }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn.is-active svg { stroke:#e53935; fill:#e53935; }
  body:not(.owner-body) .mobile-card-cart {
    position:relative!important; order:1; align-self:flex-end;
    margin:-53px 0 9px!important; right:auto!important; bottom:auto!important;
    width:44px!important; height:44px!important; flex-shrink:0;
    background:var(--mobile-surface)!important; color:var(--mobile-text)!important;
  }
  body:not(.owner-body) .mobile-card-cart.added { background:#e9f4ec!important; color:#287044!important; }
  body:not(.owner-body) .product-card:focus-visible { outline:2px solid #568be0!important; outline-offset:4px; }
}
@media (max-width:760px) and (prefers-color-scheme:dark) {
  :root { color-scheme:dark; --mobile-bg:#202226; --mobile-surface:#2b2e33; --mobile-text:#f3f4f6; --mobile-muted:#b0b8c4; --mobile-line:#25282d; --mobile-accent:#263b55; --bg:#202226; --surface:#2b2e33; --surface2:#34383e; --text:#f3f4f6; --muted:#b0b8c4; --line:#25282d; }
  body:not(.owner-body) :is(.site-header,.mobile-bottom-nav,.mobile-smart-search,.mobile-smart-search-form,.mobile-auto-search-card,.mobile-vehicle-card,.category-card,.filter-chip,.mobile-category-scroll a,.icon-btn,.gallery-panel,.product-info,.detail-tabs-panel,.detail-copy,.vin-box,.cart-row,.cart-section,.account-panel,.account-side,.account-main,.account-mini-panel,.account-quick-card,.account-empty,.auth-card,.login-modal,.vehicle-picker-modal,.vehicle-picker-modal-premium,.vehicle-vin-panel,.vehicle-vin-result-card,.generation-card,.generation-card-premium,.garage-card,.garage-side-card,.search-suggestions,.search-suggestion,.modal-close,.question-btn,.price-input,.bonus-card,.loyalty-panel,.corporate-price-card) {
    background:var(--mobile-surface)!important; color:var(--mobile-text)!important; border-color:var(--mobile-line)!important;
  }
  body:not(.owner-body) :is(input,select,textarea) { background:var(--mobile-bg); color:var(--mobile-text); border-color:var(--mobile-line); }
  body:not(.owner-body) :is(input,textarea)::placeholder { color:var(--mobile-muted); }
  body:not(.owner-body) :is(.muted,.stock,.brand-sub,.breadcrumbs,.condition-table .label,.mobile-auto-search-copy small,.mobile-auto-search-copy em,.mobile-smart-search-panel>small,.product-fitment-line,.mobile-bottom-nav a) { color:var(--mobile-muted)!important; }
  body:not(.owner-body) :is(.mobile-category-scroll a.active,.mobile-smart-search-tabs button.active,.gallery-tab.active,.detail-tabs button.active,.mobile-bottom-nav a.active svg) { background:var(--mobile-accent)!important; color:#d6e7ff!important; border-color:#496486!important; }
  body:not(.owner-body) :is(.mobile-bottom-nav a.active,.mobile-section-title h2,.mobile-auto-search-copy b) { color:var(--mobile-text)!important; }
  body:not(.owner-body) :is(.mobile-smart-search-tabs,.gallery-tab) { background:var(--mobile-bg)!important; color:var(--mobile-muted)!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-stock { color:#9fe0bb!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-expected { color:#f3ce82!important; }
}

/* V49: uninterrupted title, price, vehicle details on mobile. */
@media (max-width:760px) {
  body:not(.owner-body) .product-card.product-card-link .mobile-card-cart { display:none!important; }
  body:not(.owner-body) .product-card.product-card-link .product-bottom {
    min-height:0!important; padding-right:0!important; margin:7px 0 9px!important;
  }
}

/* Full mobile title includes the vehicle in the same typography. */
.mobile-product-fitment { display:none; }
@media (max-width:760px) {
  body:not(.owner-body) .product-name .mobile-product-fitment { display:inline; font:inherit; color:inherit; }
  body:not(.owner-body) .product-card.product-card-link .product-fitment-line { display:none!important; }
}

/* V49 final: top-aligned copy and high-contrast availability labels. */
@media (max-width:760px) {
  body:not(.owner-body) .product-card.product-card-link .product-copy {
    justify-content:flex-start!important;
    align-items:stretch!important;
    align-content:start!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-fitment-line { display:none!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-stock {
    background:#18783d!important; border-color:#18783d!important; color:#fff!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-condition {
    background:#245dcc!important; border-color:#245dcc!important; color:#fff!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-expected {
    background:#945500!important; border-color:#945500!important; color:#fff!important;
  }
}

/* V50: brighter mobile cards, larger photos and photo position indicators. */
.card-photo-dots { display:none; }
@media (max-width:760px) {
  body:not(.owner-body) .product-card.product-card-link .product-image .adaptive-media-foreground {
    position:absolute!important; inset:0!important;
    width:100%!important; height:100%!important;
    object-fit:cover!important; object-position:center!important;
    transform:none!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-stock {
    background:#16843d!important; border-color:#16843d!important; color:#fff!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-condition {
    background:#2465df!important; border-color:#2465df!important; color:#fff!important;
  }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-expected {
    background:#bc5600!important; border-color:#bc5600!important; color:#fff!important;
  }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn {
    background:transparent!important; border:0!important; border-radius:0!important;
    box-shadow:none!important; color:#000!important;
    backdrop-filter:none!important; -webkit-backdrop-filter:none!important; filter:none!important;
  }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn svg {
    fill:currentColor!important; stroke:currentColor!important;
  }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn.is-active svg {
    fill:#ed343e!important; stroke:#ed343e!important;
  }
  .card-photo-dots {
    display:flex; position:absolute; left:50%; bottom:7px; transform:translateX(-50%);
    z-index:3; align-items:center; justify-content:center; gap:5px;
    max-width:90%; flex-wrap:wrap; padding:4px 6px; border-radius:12px;
    background:rgba(0,0,0,.32); pointer-events:none;
  }
  .card-photo-dots span { width:5px; height:5px; flex:0 0 5px; border-radius:50%; background:rgba(255,255,255,.5); }
  .card-photo-dots span.is-active { background:#fff; box-shadow:0 0 0 1px rgba(0,0,0,.2); }
}

/* V53: mobile header, quiet pinned search and touch feedback. */
.mobile-header-promo,.mobile-pinned-search { display:none; }
@media(max-width:760px) {
  body:not(.owner-body) .product-card.product-card-link .favorite-btn {
    -webkit-tap-highlight-color:transparent; -webkit-appearance:none; appearance:none;
  }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn:focus:not(:focus-visible) { outline:none!important; }
  body:not(.owner-body) .product-card.product-card-link .favorite-btn:active { background:transparent!important; box-shadow:none!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge { font-weight:400!important; color:#fff!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-stock { background:#21994d!important; border-color:#21994d!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-condition { background:#3479ed!important; border-color:#3479ed!important; }
  body:not(.owner-body) .product-card.product-card-link .product-badge.is-expected { background:#d16b08!important; border-color:#d16b08!important; }
  body:not(.owner-body) .site-header .header-actions { display:none!important; }
  body.home-page .site-header {
    position:relative!important; top:auto!important; height:100px!important; padding:16px 13px!important;
    display:flex!important; align-items:flex-start; overflow:hidden; border:0!important;
    background:linear-gradient(110deg,#fff 40%,#e1f2ff)!important; color:#151923!important;
  }
  body.home-page .site-header .brand { position:relative; z-index:2; flex-shrink:0; }
  body.home-page .site-header .brand-name { color:#151923!important; font-size:30px!important; }
  body.home-page .site-header .brand-sub { color:#777e8d!important; font-size:8px!important; }
  .mobile-header-promo { display:block; flex:1; position:relative; height:100%; min-width:0; }
  .mobile-header-promo span { position:relative; z-index:2; display:block; padding:7px 0 0 12px; font-size:11px; line-height:1.3; color:#171d27; }
  .mobile-header-promo b { color:#2582bd; font-weight:600; }
  .mobile-header-promo img { position:absolute; width:150px; height:85px; object-fit:contain; right:-55px; bottom:-29px; }
  body.home-page .mobile-marketplace-home { margin:0 -12px 12px!important; padding:0 10px 10px!important; background:#f7fbff!important; border-radius:0 0 18px 18px; }
  body.home-page .mobile-smart-search { background:#fff!important; color:#151923!important; border:0!important; border-radius:18px!important; padding:12px!important; box-shadow:0 2px 16px #dce8f355!important; }
  body.home-page .mobile-smart-search-head { align-items:center; gap:6px; padding-bottom:11px; }
  body.home-page .mobile-smart-search-head strong { font-size:20px!important; }
  body.home-page .mobile-smart-search-head .mobile-search-assurance { display:block!important; font-size:9px!important; color:#2582bd!important; background:#f0f6ff; padding:7px; border-radius:20px; white-space:nowrap; }
  body.home-page .mobile-smart-search-tabs { background:#f0f3fb!important; border-radius:16px; }
  body.home-page .mobile-smart-search-tabs button { color:#323b4a!important; height:36px; font-size:12px!important; font-weight:500; }
  body.home-page .mobile-smart-search-tabs button.active { background:#0086ff!important; color:#fff!important; box-shadow:0 2px 7px #0086ff33; }
  body.home-page .mobile-smart-search-form { background:#f7f9fc!important; border-color:#e1e8f2!important; border-radius:16px; }
  body.home-page .mobile-smart-search-form input { color:#202735!important; background:transparent!important; font-size:16px!important; }
  body.home-page .mobile-smart-search-form input::placeholder { color:#707887!important; font-size:12px; }
  body.home-page .mobile-smart-search-form button { background:#0086ff!important; color:#fff!important; border-radius:13px; }
  body.home-page .mobile-smart-search-panel>small { color:#7c8290!important; font-size:10px; }
  .mobile-pinned-search:not([hidden]) { display:block; position:fixed; top:0; left:0; right:0; z-index:80; padding:7px 12px; background:var(--mobile-bg); border-bottom:1px solid var(--mobile-line); }
  .mobile-pinned-search form { display:flex; align-items:center; gap:8px; height:42px; padding:0 10px; border-radius:12px; background:var(--mobile-surface); color:var(--mobile-muted); }
  .mobile-pinned-search input { flex:1; width:0; min-width:0; border:0!important; outline:none; background:transparent!important; color:var(--mobile-text); font-size:16px; }
  .mobile-pinned-search input::placeholder { font-size:12px; }
  .mobile-pinned-search button { display:grid; place-items:center; width:32px; height:32px; padding:0; border:0; background:transparent; color:inherit; }
}
@media(max-width:760px) and (prefers-color-scheme:dark) {
  :root { --mobile-bg:#1b1d20; --bg:#1b1d20; }
}
@media (max-width:760px) and (prefers-color-scheme:dark) {
  body:not(.owner-body) .product-card.product-card-link .favorite-btn { color:#fff!important; }
}
