/*
============================================================
AUTOMART VEHICLE SEARCH MOBILE V41.1
GRID + LIST
MOBILE ONLY
============================================================
*/

.am-v411-filter-backdrop,
.am-v411-filter-button {
    display:none;
}


@media (max-width:767px) {

    /* =====================================================
       PAGE
       ===================================================== */

    body.site-page .market-searchbar {
        display:none !important;
    }

    body.site-page .premium-listing-v14-1 {
        padding:10px 0 22px !important;
        background:
            linear-gradient(
                180deg,
                #f7faf8 0,
                #fff 210px
            ) !important;
    }

    body.site-page
    .premium-listing-v14-1 > .container {
        width:calc(100% - 16px) !important;
        max-width:none !important;
        margin:0 auto !important;
    }


    /* =====================================================
       MOBILE TITLE + TOOLBAR
       ===================================================== */

    body.site-page .market-title-row {
        display:grid !important;
        grid-template-columns:1fr !important;
        gap:11px !important;
        margin:0 0 13px !important;
        padding:8px 2px 0 !important;
    }

    body.site-page .market-title-row h1 {
        margin:0 !important;
        font-size:24px !important;
        line-height:1.08 !important;
        letter-spacing:-.035em !important;
    }

    body.site-page .market-title-row p {
        margin:4px 0 0 !important;
        color:#748091 !important;
    }

    body.site-page .view-tools {
        display:grid !important;
        grid-template-columns:
            minmax(0,1fr)
            48px
            48px
            48px !important;
        gap:7px !important;
        width:100% !important;
        align-items:center !important;
    }

    body.site-page .view-tools label {
        height:46px !important;
        min-width:0 !important;

        display:flex !important;
        align-items:center !important;
        gap:7px !important;

        padding:0 10px !important;

        border:1px solid #dfe7e3 !important;
        border-radius:13px !important;

        background:#fff !important;

        box-shadow:
            0 4px 12px rgba(16,24,40,.045) !important;
    }

    body.site-page .view-tools label select {
        min-width:0 !important;
        width:100% !important;

        border:0 !important;
        outline:0 !important;

        background:transparent !important;

        font:inherit !important;
        font-weight:700 !important;
    }

    body.site-page .view-tools .view-btn {
        width:48px !important;
        height:46px !important;
        min-width:48px !important;

        padding:0 !important;

        display:grid !important;
        place-items:center !important;

        border:1px solid #dfe7e3 !important;
        border-radius:13px !important;

        background:#fff !important;
        color:#344054 !important;

        font-size:0 !important;

        box-shadow:
            0 4px 12px rgba(16,24,40,.045) !important;
    }

    body.site-page .view-tools .view-btn::before {
        font-size:19px !important;
        line-height:1;
    }

    body.site-page .view-tools .view-btn:nth-of-type(1)::before {
        content:"▦";
    }

    body.site-page .view-tools .view-btn:nth-of-type(2)::before {
        content:"☷";
    }

    body.site-page .view-tools .view-btn.active {
        border-color:#07985b !important;

        background:
            linear-gradient(
                145deg,
                #14ae68,
                #078b52
            ) !important;

        color:#fff !important;

        box-shadow:
            0 7px 16px rgba(7,150,95,.20) !important;
    }

    /*
     * Existing Map button is hidden on phone.
     * Its space becomes our Filters button.
     */

    body.site-page .view-tools .view-btn:nth-of-type(3) {
        display:none !important;
    }

    .am-v411-filter-button {
        width:48px;
        height:46px;

        display:grid;
        place-items:center;

        padding:0;

        border:1px solid #dfe7e3;
        border-radius:13px;

        background:#fff;
        color:#344054;

        box-shadow:
            0 4px 12px rgba(16,24,40,.045);
    }

    .am-v411-filter-button svg {
        width:20px;
        height:20px;
    }


    /* =====================================================
       LAYOUT
       ===================================================== */

    body.site-page .premium-listing-layout-v14-1 {
        display:block !important;

        width:100% !important;

        grid-template-columns:1fr !important;

        gap:0 !important;
    }

    body.site-page .premium-search-results-v15,
    body.site-page .results {
        width:100% !important;
        min-width:0 !important;
        max-width:none !important;
    }


    /* =====================================================
       FILTER DRAWER
       ===================================================== */

    body.site-page .premium-filter-v14-1,
    body.site-page .filters.am-filter-v14 {
        display:block !important;

        position:fixed !important;

        top:12px !important;
        left:10px !important;
        right:10px !important;
        bottom:
            calc(
                76px
                + env(safe-area-inset-bottom)
            ) !important;

        z-index:1601 !important;

        width:auto !important;
        min-width:0 !important;
        max-width:none !important;

        margin:0 !important;

        padding:15px !important;

        overflow-y:auto !important;

        border:1px solid #dce6e0 !important;
        border-radius:20px !important;

        background:#fff !important;

        box-shadow:
            0 24px 65px rgba(5,22,14,.24) !important;

        opacity:0;
        visibility:hidden;
        pointer-events:none;

        transform:
            translateY(18px) scale(.99) !important;

        transition:
            opacity .18s ease,
            visibility .18s ease,
            transform .18s ease !important;
    }

    body.am-v411-filter-open
    .premium-filter-v14-1,

    body.am-v411-filter-open
    .filters.am-filter-v14 {
        opacity:1;

        visibility:visible;

        pointer-events:auto;

        transform:
            translateY(0) scale(1) !important;
    }

    .am-v411-filter-backdrop {
        position:fixed;

        inset:0;

        z-index:1600;

        display:block;

        border:0;

        background:
            rgba(3,15,9,.48);

        backdrop-filter:blur(3px);

        opacity:0;
        visibility:hidden;
        pointer-events:none;

        transition:
            opacity .18s ease,
            visibility .18s ease;
    }

    body.am-v411-filter-open
    .am-v411-filter-backdrop {
        opacity:1;
        visibility:visible;
        pointer-events:auto;
    }

    body.am-v411-filter-open {
        overflow:hidden !important;
    }


    /* =====================================================
       GRID MODE
       TWO COLUMNS
       ===================================================== */

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-search-grid-v15 {
        display:grid !important;

        grid-template-columns:
            repeat(2,minmax(0,1fr))
            !important;

        gap:10px !important;

        width:100% !important;
    }


    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-card,

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .vehicle-card {
        display:block !important;

        width:100% !important;
        min-width:0 !important;

        overflow:hidden !important;

        border:
            1px solid #dfe7e3 !important;

        border-radius:
            15px !important;

        background:#fff !important;

        box-shadow:
            0 7px 20px rgba(16,24,40,.065)
            !important;
    }


    /* Premium card image */

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-media {
        height:145px !important;
        min-height:145px !important;
        max-height:145px !important;

        border-radius:0 !important;

        overflow:hidden !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-media img {
        width:100% !important;

        height:145px !important;
        min-height:145px !important;

        object-fit:cover !important;
        object-position:center !important;
    }


    /* Older card image fallback */

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .vehicle-card .vehicle-image {
        height:145px !important;

        overflow:hidden !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .vehicle-card .vehicle-image img {
        width:100% !important;
        height:100% !important;

        object-fit:cover !important;
    }


    /* Badges */

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-card-badges {
        top:8px !important;
        left:8px !important;
        right:40px !important;

        gap:4px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-badge {
        min-height:21px !important;

        padding:0 6px !important;

        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-heart {
        top:8px !important;
        right:8px !important;

        width:31px !important;
        height:31px !important;
        min-width:31px !important;

        font-size:18px !important;
    }


    /* Grid body */

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-body {
        display:block !important;

        padding:10px !important;

        min-height:0 !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-title-row {
        display:grid !important;

        grid-template-columns:
            minmax(0,1fr)
            auto !important;

        gap:5px !important;

        align-items:start !important;

        margin:0 0 6px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-brandmark {
        display:none !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-title-copy {
        min-width:0 !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-title-copy h3 {
        display:-webkit-box;

        margin:0 !important;

        overflow:hidden;

        -webkit-box-orient:vertical;
        -webkit-line-clamp:2;

        line-height:1.18 !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-title-copy p {
        margin:3px 0 0 !important;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-condition {
        max-width:72px;

        padding:4px 6px !important;

        overflow:hidden;

        border-radius:7px !important;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-price {
        margin:4px 0 0 !important;

        color:#07894f !important;

        font-size:18px !important;
        line-height:1.08 !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-monthly {
        margin:4px 0 8px !important;

        overflow:hidden;

        color:#748095 !important;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:10px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-facts {
        display:grid !important;

        grid-template-columns:
            repeat(2,minmax(0,1fr))
            !important;

        gap:6px !important;

        padding:0 0 8px !important;

        border-bottom:
            1px solid #edf1ef !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-facts span {
        min-width:0;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:10px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-dealer-row {
        display:grid !important;

        grid-template-columns:
            28px
            minmax(0,1fr)
            auto !important;

        align-items:center !important;

        gap:5px !important;

        margin-top:8px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-dealer-avatar {
        width:28px !important;
        height:28px !important;
        min-width:28px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-dealer-row > div:nth-child(2) {
        min-width:0;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-dealer-row > div:nth-child(2) strong,

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-dealer-row > div:nth-child(2) small {
        display:block;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-rating small {
        display:none !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-card-actions {
        display:grid !important;

        grid-template-columns:
            1fr 1fr !important;

        gap:5px !important;

        margin-top:8px !important;
    }

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-card-actions a {
        min-width:0 !important;
        min-height:34px !important;

        padding:0 4px !important;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:10px !important;
    }


    /* =====================================================
       LIST MODE
       IMAGE LEFT + CONTENT RIGHT
       ===================================================== */

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-search-grid-v15 {
        display:grid !important;

        grid-template-columns:
            1fr !important;

        gap:10px !important;

        width:100% !important;
    }


    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-auto-card,

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .vehicle-card {
        display:grid !important;

        grid-template-columns:
            minmax(136px,42%)
            minmax(0,58%)
            !important;

        width:100% !important;

        min-height:225px !important;

        overflow:hidden !important;

        border:
            1px solid #dfe7e3 !important;

        border-radius:
            15px !important;

        background:#fff !important;

        box-shadow:
            0 7px 20px rgba(16,24,40,.065)
            !important;
    }


    /* Premium list image */

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-auto-media {
        width:100% !important;

        height:100% !important;

        min-height:225px !important;
        max-height:none !important;

        border-radius:0 !important;

        overflow:hidden !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-auto-media img {
        width:100% !important;
        height:100% !important;

        min-height:225px !important;
        max-height:none !important;

        object-fit:cover !important;
        object-position:center !important;
    }


    /* Old vehicle-card fallback */

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .vehicle-card .vehicle-image {
        width:100% !important;

        height:100% !important;

        min-height:225px !important;

        overflow:hidden !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .vehicle-card .vehicle-image img {
        width:100% !important;
        height:100% !important;

        object-fit:cover !important;
    }


    /* List body */

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-auto-body {
        display:block !important;

        min-width:0 !important;
        min-height:225px !important;

        padding:10px 9px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-title-row {
        display:grid !important;

        grid-template-columns:
            minmax(0,1fr)
            auto !important;

        gap:4px !important;

        align-items:start !important;

        margin:0 0 5px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-brandmark {
        display:none !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-title-copy {
        min-width:0 !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-title-copy h3 {
        display:-webkit-box;

        margin:0 !important;

        overflow:hidden;

        -webkit-box-orient:vertical;
        -webkit-line-clamp:2;

        white-space:normal !important;

        font-size:14px !important;
        line-height:1.16 !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-title-copy p {
        margin:2px 0 0 !important;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:10px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-condition {
        max-width:62px;

        padding:4px 5px !important;

        overflow:hidden;

        border-radius:7px !important;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:8.5px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-price {
        margin:4px 0 0 !important;

        color:#07894f !important;

        font-size:17px !important;
        line-height:1.05 !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-monthly {
        margin:3px 0 7px !important;

        overflow:hidden;

        color:#748095 !important;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-facts {
        display:grid !important;

        grid-template-columns:
            repeat(2,minmax(0,1fr))
            !important;

        gap:5px !important;

        padding:0 0 7px !important;

        border-bottom:
            1px solid #edf1ef !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-facts span {
        min-width:0 !important;

        overflow:hidden !important;

        text-overflow:ellipsis !important;
        white-space:nowrap !important;

        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-dealer-row {
        display:grid !important;

        grid-template-columns:
            26px
            minmax(0,1fr)
            auto !important;

        align-items:center !important;

        gap:4px !important;

        margin-top:7px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-dealer-avatar {
        width:26px !important;
        height:26px !important;
        min-width:26px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-dealer-row > div:nth-child(2) {
        min-width:0;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-dealer-row > div:nth-child(2) strong,

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-dealer-row > div:nth-child(2) small {
        display:block;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-rating strong {
        font-size:9px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-rating small {
        display:none !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-card-actions {
        display:grid !important;

        grid-template-columns:
            1fr 1fr !important;

        gap:4px !important;

        margin-top:7px !important;
    }

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-card-actions a {
        min-width:0 !important;
        min-height:31px !important;

        padding:0 3px !important;

        overflow:hidden;

        text-overflow:ellipsis;
        white-space:nowrap;

        font-size:9px !important;
    }

}



/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width:380px) {

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-media,

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .premium-auto-media img,

    body.site-page
    .premium-search-results-v15:not(.view-mode-list-v17)
    .vehicle-card .vehicle-image {
        height:132px !important;
        min-height:132px !important;
    }


    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .premium-auto-card,

    body.site-page
    .premium-search-results-v15.view-mode-list-v17
    .vehicle-card {
        grid-template-columns:
            128px
            minmax(0,1fr)
            !important;
    }

}
