/* Used product listing â€” extends listing.css */

.listing-page-heading {
    font-size: 1.375rem;
    font-weight: 600;
    color: #24272c;
    margin: 0 0 12px;
    line-height: 1.3;
}

.used-listing-card-inner {
    position: relative;
    overflow: hidden;
}

.listing-sold-badge {
    position: absolute;
    top: 12px;
    right: -28px;
    z-index: 2;
    transform: rotate(45deg);
    background: #c92127;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 4px 32px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    pointer-events: none;
}

.used-listing-card-inner .listing-card-price-block .listing-price-note {
    display: none;
}

.used-listing-card-inner .listing-cta-primary {
    flex: 1;
    text-align: center;
}

.used-listing-intro .card {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.used-listing-intro .card-body {
    padding: 0 0 16px;
}

/* Legacy search-content inside modern filter panels */
.listing-sidebar .product-bodyType.listing-filter-options .search-content,
.listing-filter-sheet .product-bodyType.listing-filter-options .search-content,
.listing-sidebar .product-Listing.listing-filter-options .search-content,
.listing-filter-sheet .product-Listing.listing-filter-options .search-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.listing-sidebar .product-bodyType.listing-filter-options .search-content:hover,
.listing-filter-sheet .product-bodyType.listing-filter-options .search-content:hover,
.listing-sidebar .product-Listing.listing-filter-options .search-content:hover,
.listing-filter-sheet .product-Listing.listing-filter-options .search-content:hover {
    background: #f5f6f8;
}

.listing-sidebar .product-bodyType.listing-filter-options input[type="checkbox"],
.listing-filter-sheet .product-bodyType.listing-filter-options input[type="checkbox"],
.listing-sidebar .product-Listing.listing-filter-options input[type="checkbox"],
.listing-filter-sheet .product-Listing.listing-filter-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #c92127;
    flex-shrink: 0;
}

.listing-sidebar .product-bodyType.listing-filter-options label,
.listing-filter-sheet .product-bodyType.listing-filter-options label,
.listing-sidebar .product-Listing.listing-filter-options label,
.listing-filter-sheet .product-Listing.listing-filter-options label {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    color: #24272c;
    cursor: pointer;
    flex: 1;
}

/* Full-bleed banner inside flex #masonry — always starts a new row, no empty card slots */
#masonry > .listing-used-banner-row,
.listing-used-banner-row {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    float: none;
    clear: both;
    margin: 4px 0 12px;
    padding-left: 6px;
    padding-right: 6px;
}

#masonry > .listing-used-banner-row > div,
.listing-used-banner-row > div {
    width: 100%;
    margin: 0;
}

.listing-used-banner-desktop { display: block; }
.listing-used-banner-mobile { display: none; }

@media (max-width: 767px) {
    .listing-used-banner-desktop { display: none !important; }
    .listing-used-banner-mobile { display: block !important; }
}

.listing-used-banner-row img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Hide empty / broken banner shells that would leave blank space */
#masonry > .listing-used-banner-row:not(:has(img[src]:not([src=""]))) {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.listing-filter-slider-wrap {
    padding: 4px 2px 8px;
}

.listing-filter-slider-wrap .slider-container,
.listing-native-section-content .slider-container {
    padding: 8px 4px 4px;
}

.listing-sidebar .listing-state-list,
.listing-sidebar .listing-store-list,
.listing-filter-sheet .listing-state-list {
    max-height: 220px;
    overflow-y: auto;
}

.listing-native-state-scroll {
    max-height: 200px;
}

.listing-state-item.is-hidden,
.listing-store-item.is-hidden {
    display: none !important;
}

.listing-filter-no-match {
    display: none;
    font-size: 13px;
    color: #6b7280;
    padding: 8px 4px;
}

.listing-filter-no-match.is-visible {
    display: block;
}

/* Popular used models â€” home-style section (UsedVehicleByType) */
.listing-page .listing-popular-used.home-section,
.listing-page .ud-similar-section.home-section {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    margin: 20px 0 8px;
    box-shadow: 0 2px 12px rgba(36, 39, 44, 0.06);
    overflow: hidden;
    padding: 0;
}

.listing-page .listing-popular-used .ud-similar-head,
.listing-page .listing-popular-used .home-section-header {
    display: flex;
    align-items: flex-start;
    padding: 22px 22px 14px;
    border-bottom: 1px solid #f0f2f5;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.listing-page .listing-popular-used .ud-similar-title,
.listing-page .listing-popular-used .home-section-title {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 800;
    color: #12263a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.listing-page .listing-popular-used .tb-home-product-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 16px 20px 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.listing-page .listing-popular-used .tb-home-product-track::-webkit-scrollbar {
    display: none;
}

.listing-page .listing-popular-used .tb-home-product-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(36, 39, 44, 0.05);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.listing-page .listing-popular-used .tb-home-product-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 6px 18px rgba(36, 39, 44, 0.1);
    transform: translateY(-2px);
}

.listing-page .listing-popular-used .tb-home-product-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.listing-page .listing-popular-used .tb-home-product-img {
    aspect-ratio: 3 / 2;
    background: #f8f9fb;
    overflow: hidden;
}

.listing-page .listing-popular-used .tb-home-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

/* Keep sold ribbon clear of wishlist (wishlist is top-left) */
.used-listing-card-inner .listing-sold-badge {
    z-index: 4;
}

.listing-page .listing-popular-used .tb-home-product-name {
    margin: 0;
    padding: 12px 14px 4px;
    font-size: 14px;
    font-weight: 700;
    color: #24272c;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.listing-page .listing-popular-used .tb-home-product-cta {
    padding: 8px 12px 12px;
    margin-top: auto;
}

.listing-page .listing-popular-used .tb-home-product-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 0 12px !important;
    margin: 0 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #c92127 !important;
    border: 1.5px solid #c92127 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.listing-page .listing-popular-used .tb-home-product-btn:hover {
    background: #c92127 !important;
    color: #fff !important;
}

/* Used listing: fixed image frame, full vehicle via contain; equal desktop cards via flex */
.used-listing-card-inner .listing-card-media {
    aspect-ratio: 3 / 2;
    height: auto;
    flex: 0 0 auto;
}

.used-listing-card-inner .listing-card-image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.used-listing-card-inner .listing-card-image-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}

.used-listing-card-inner .listing-card-media > .tb-wish-btn {
    top: 10px;
    left: 10px;
    right: auto;
    z-index: 5;
}

@media (min-width: 768px) {
    #masonry > .listing-card,
    #ltrSponsored > .listing-card {
        display: flex;
        flex-direction: column;
        align-self: stretch;
    }

    #masonry > .listing-card > .dlab-feed-list,
    #ltrSponsored > .listing-card > .dlab-feed-list,
    #masonry > .listing-card .listing-card-inner,
    #ltrSponsored > .listing-card .listing-card-inner {
        height: 100%;
    }

    .used-listing-card-inner .listing-card-image-link img {
        object-fit: contain;
    }
}



@media (max-width: 767px) {
    .listing-page #masonry > .listing-card {
        padding-left: 8px;
        padding-right: 8px;
    }

    .listing-page #masonry > .listing-card .listing-card-inner,
    .listing-page #masonry > .listing-card .used-listing-card-inner {
        display: flex;
        flex-direction: column;
    }

    .listing-page #masonry > .listing-card .listing-card-media {
        width: 100%;
        height: auto;
        min-height: 0;
        margin: 0;
        aspect-ratio: 3 / 2;
        border-radius: 0;
        overflow: hidden;
    }

    .listing-page #masonry > .listing-card .listing-card-image-link img,
    .used-listing-card-inner .listing-card-image-link img {
        object-fit: cover;
        object-position: center center;
    }
}

/* Stable listing layout + new-listing page width (match Bootstrap breakpoints) */
.listing-page .listing-layout-row{display:flex!important;flex-wrap:wrap!important;margin-left:-15px;margin-right:-15px}
.listing-page .listing-sidebar-col,
.listing-page .listing-main-col{float:none!important;box-sizing:border-box;padding-left:15px;padding-right:15px}
.listing-page .listing-sidebar-col{display:none!important;width:100%;max-width:100%}
.listing-page .listing-main-col{display:block!important;width:100%;max-width:100%;flex:0 0 100%}
@media(min-width:768px){
.listing-page .listing-sidebar-col{display:block!important;width:33.33333333%!important;flex:0 0 33.33333333%;max-width:33.33333333%}
.listing-page .listing-main-col{width:66.66666667%!important;flex:0 0 66.66666667%;max-width:66.66666667%}
}
@media(min-width:1200px){
.listing-page .listing-sidebar-col{width:25%!important;flex:0 0 25%;max-width:25%}
.listing-page .listing-main-col{width:75%!important;flex:0 0 75%;max-width:75%}
.listing-page .container,
.page-content .container,
.listing-container,
.breadCrumn .container,
.tb-header__main.container,
.tb-faq-wrap.container,
.listing-below-fold.container{
width:1200px!important;
max-width:1200px!important;
margin-left:auto!important;
margin-right:auto!important;
padding-left:15px!important;
padding-right:15px!important;
box-sizing:border-box!important;
}
}
/* ===== Below-fold explore sections (State / Brand / Popular / FAQ) ===== */
.listing-below-fold {
    padding-top: 8px;
    padding-bottom: 8px;
}

.listing-explore-section {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    margin: 0 0 16px;
    box-shadow: 0 2px 12px rgba(36, 39, 44, 0.06);
    overflow: hidden;
}

.listing-explore-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #f0f2f5;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}

.listing-explore-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.2vw, 1.5rem);
    font-weight: 800;
    color: #12263a;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.listing-explore-sub,
.listing-page .listing-popular-used .home-section-sub,
.listing-page .listing-popular-used .listing-explore-sub {
    margin: 4px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.listing-explore-body {
    padding: 0;
}

.listing-explore-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 14px 20px 18px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.listing-explore-track::-webkit-scrollbar {
    display: none;
}

/* State cards */
.listing-state-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: inherit;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 12px 10px 12px;
    box-shadow: 0 1px 4px rgba(36, 39, 44, 0.05);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    min-height: 148px;
    box-sizing: border-box;
}

.listing-state-card:hover,
.listing-state-card:focus {
    border-color: #d81517;
    box-shadow: 0 4px 14px rgba(216, 21, 23, 0.12);
    transform: translateY(-2px);
    text-decoration: none !important;
    color: inherit;
    outline: none;
}

.listing-state-card-media {
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fb;
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 10px;
}

.listing-state-card-media img {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.listing-state-card-name {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #24272c;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Brand cards inside used listing explore */
.listing-brands-used-section .tb-brand-card {
    flex: 0 0 132px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 14px 10px 12px;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    box-shadow: 0 1px 4px rgba(36, 39, 44, 0.05);
    min-height: 148px;
    box-sizing: border-box;
}

.listing-brands-used-section .tb-brand-card:hover,
.listing-brands-used-section .tb-brand-card:focus {
    border-color: #d81517;
    box-shadow: 0 4px 14px rgba(216, 21, 23, 0.1);
    transform: translateY(-2px);
    text-decoration: none !important;
    color: inherit;
    outline: none;
}

.listing-brands-used-section .tb-brand-card-logo {
    width: 100%;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fb;
    border-radius: 10px;
    padding: 10px 8px;
    margin-bottom: 10px;
}

.listing-brands-used-section .tb-brand-card-logo img {
    max-width: 100%;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.listing-brands-used-section .tb-brand-card-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eef1f5;
    color: #4b5563;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.listing-brands-used-section .tb-brand-card-name {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #24272c;
    text-align: center;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

/* Popular used — tighten consistency with explore sections */
.listing-page .listing-popular-used.listing-explore-section {
    margin: 0 0 16px;
}

.listing-page .listing-popular-used .tb-home-product-track {
    padding: 14px 20px 18px;
}

.listing-page .listing-popular-used .tb-home-product-btn {
    min-height: 44px;
}

@media (max-width: 767px) {
    .listing-below-fold {
        padding-left: 0;
        padding-right: 0;
    }

    .listing-explore-header,
    .listing-page .listing-popular-used .listing-explore-header,
    .listing-page .listing-popular-used .home-section-header {
        padding: 16px 16px 12px;
    }

    .listing-explore-title,
    .listing-page .listing-popular-used .listing-explore-title {
        font-size: 1.2rem;
    }

    .listing-explore-track,
    .listing-page .listing-popular-used .tb-home-product-track {
        padding: 12px 16px 16px;
        gap: 10px;
    }

    .listing-state-card,
    .listing-brands-used-section .tb-brand-card {
        flex: 0 0 118px;
        min-height: 140px;
        padding: 10px 8px 10px;
    }

    .listing-state-card-media,
    .listing-brands-used-section .tb-brand-card-logo {
        min-height: 64px;
        padding: 8px 6px;
    }

    .listing-state-card-media img,
    .listing-brands-used-section .tb-brand-card-logo img {
        max-height: 48px;
    }

    .listing-state-card-name,
    .listing-brands-used-section .tb-brand-card-name {
        font-size: 11px;
    }

    .listing-page .listing-popular-used .tb-home-product-card {
        flex: 0 0 200px;
    }
}

@media (min-width: 992px) {
    .listing-explore-section {
        margin-bottom: 20px;
    }

    .listing-state-card,
    .listing-brands-used-section .tb-brand-card {
        flex-basis: 140px;
    }
}

/* Infinite scroll — hide Load More button, keep sentinel + skeleton */
#showMore-product.is-infinite-scroll {
    min-height: 24px;
    margin-top: 8px;
    margin-bottom: 12px;
    text-align: center;
}
#showMore-product.is-infinite-scroll > #_loadMore {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    pointer-events: none;
}
#showMore-product.is-infinite-scroll.is-fetching-more {
    min-height: 120px;
}
#showMore-product.is-infinite-scroll .listing-infinite-status {
    display: none;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    padding: 8px 0 4px;
}
#showMore-product.is-infinite-scroll.is-fetching-more .listing-infinite-status {
    display: block;
}
#showMore-product.is-infinite-scroll.is-hidden {
    display: none !important;
}
