/*
|--------------------------------------------------------------------------
| BUYSELL GH — MARKETLY HOMEPAGE V4.4
|--------------------------------------------------------------------------
|
| APPROVED ARCHITECTURE
|
| Desktop master width: 1360px
| Large desktop gutters: 28px minimum
| Floating sticky header: 1360px
| Search dock: 1160px
| Minimum readable typography: 12px
|
*/


:root{

    --bsg-home-master:
        1360px;

    --bsg-home-gutter:
        28px;

    --bsg-home-search:
        1160px;

    --bsg-sticky-top:
        12px;

}


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


html{

    scroll-padding-top:
        105px;

}


body.am-marketly-home{

    overflow-x:
        clip;

}


/*
|--------------------------------------------------------------------------
| MASTER CONTENT WIDTH
|--------------------------------------------------------------------------
*/


.am-marketly-home
.am-container{

    width:
        min(
            var(--bsg-home-master),
            calc(
                100% - 56px
            )
        )
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

    margin-left:
        auto
        !important;

    margin-right:
        auto
        !important;

}


/* ========================================================= */
/* TRUE FLOATING STICKY HEADER                                */
/* ========================================================= */


.am-marketly-home
.am-header{

    position:
        sticky
        !important;

    position:
        -webkit-sticky
        !important;

    top:
        var(--bsg-sticky-top)
        !important;

    left:
        auto
        !important;

    right:
        auto
        !important;

    z-index:
        1200
        !important;


    width:
        min(
            var(--bsg-home-master),
            calc(
                100% - 56px
            )
        )
        !important;

    max-width:
        var(--bsg-home-master)
        !important;


    margin:
        12px auto 0
        !important;


    border:
        1px solid
        rgba(
            221,
            223,
            226,
            .90
        )
        !important;

    border-radius:
        17px
        !important;


    background:
        rgba(
            255,
            255,
            255,
            .94
        )
        !important;


    box-shadow:

        0 12px 34px
        rgba(
            20,
            32,
            49,
            .10
        ),

        0 2px 9px
        rgba(
            20,
            32,
            49,
            .045
        )
        !important;


    backdrop-filter:
        blur(18px)
        saturate(1.18)
        !important;

    -webkit-backdrop-filter:
        blur(18px)
        saturate(1.18)
        !important;


    overflow:
        visible
        !important;

}


/*
|--------------------------------------------------------------------------
| Header contents use full available floating-header width.
|--------------------------------------------------------------------------
*/


.am-marketly-home
.am-header-inner{

    width:
        100%
        !important;

    max-width:
        none
        !important;

    min-height:
        72px
        !important;

    margin:
        0
        !important;

    padding-left:
        20px
        !important;

    padding-right:
        18px
        !important;

}


/*
|--------------------------------------------------------------------------
| Remove old first-nav underline offset designed for absolute header.
|--------------------------------------------------------------------------
*/


.am-marketly-home
.am-main-nav a:first-child:after{

    bottom:
        -16px
        !important;

}


/*
|--------------------------------------------------------------------------
| Sticky header should remain visibly floating when page moves.
|--------------------------------------------------------------------------
*/


.am-marketly-home
.am-header:before{

    content:
        "";

    position:
        absolute;

    inset:
        0;

    pointer-events:
        none;

    border-radius:
        inherit;

    box-shadow:
        inset 0 1px 0
        rgba(
            255,
            255,
            255,
            .85
        );

}


/* ========================================================= */
/* HERO — CONFORM TO STICKY HEADER                            */
/* ========================================================= */


/*
|--------------------------------------------------------------------------
| V4.0–V4.3 used large top padding because the header was absolute.
|
| The header now occupies real layout space, so reduce the hero's internal
| offset. This removes the excessive dead area below the navigation.
|--------------------------------------------------------------------------
*/


.am4-hero{

    margin-top:
        10px
        !important;

    min-height:
        590px
        !important;

}


.am4-hero-inner{

    min-height:
        590px
        !important;

    padding-top:
        62px
        !important;

}


/*
|--------------------------------------------------------------------------
| Slightly reduce headline scale to match reference proportions.
|--------------------------------------------------------------------------
*/


.am4-hero-copy{

    width:
        555px
        !important;

}


.am4-hero h1{

    max-width:
        550px
        !important;

    font-size:
        clamp(
            58px,
            4.55vw,
            72px
        )
        !important;

    line-height:
        .93
        !important;

    letter-spacing:
        -3px
        !important;

}


.am4-hero-text{

    max-width:
        490px
        !important;

}


/* ========================================================= */
/* HERO RIGHT-SIDE COMPOSITION                                */
/* ========================================================= */


.am4-hero-vehicle{

    right:
        15%
        !important;

    bottom:
        30px
        !important;

    width:
        445px
        !important;

    height:
        210px
        !important;

}


.am4-floating-card{

    min-width:
        285px
        !important;

    max-width:
        305px
        !important;

    min-height:
        104px
        !important;

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

}


.am4-floating-media{

    width:
        94px
        !important;

    height:
        80px
        !important;

}


.am4-floating-car{

    right:
        34%
        !important;

    top:
        185px
        !important;

}


.am4-floating-property{

    right:
        4px
        !important;

    top:
        72px
        !important;

}


.am4-floating-phone{

    right:
        4px
        !important;

    bottom:
        62px
        !important;

}


/* ========================================================= */
/* FLOATING SEARCH                                            */
/* ========================================================= */


.am4-discovery{

    margin-top:
        -34px
        !important;

}


.am4-search-dock{

    width:
        min(
            var(--bsg-home-search),
            calc(
                100% - 120px
            )
        )
        !important;

    max-width:
        var(--bsg-home-search)
        !important;

    min-height:
        78px
        !important;

    border-radius:
        23px
        !important;

}


/* ========================================================= */
/* CATEGORY DOCK                                              */
/* ========================================================= */


.am4-category-dock{

    width:
        100%
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

    margin-left:
        auto
        !important;

    margin-right:
        auto
        !important;

    padding-left:
        28px
        !important;

    padding-right:
        28px
        !important;

}


/* ========================================================= */
/* FEATURED                                                   */
/* ========================================================= */


.am4-featured-grid{

    width:
        100%
        !important;

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

    gap:
        15px
        !important;

}


.am4-listing-media{

    height:
        196px
        !important;

}


/* ========================================================= */
/* VEHICLE PROMO                                              */
/* ========================================================= */


.am4-drive-banner{

    width:
        100%
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

    margin-left:
        auto
        !important;

    margin-right:
        auto
        !important;

    min-height:
        220px
        !important;

}


/* ========================================================= */
/* POPULAR CATEGORIES                                         */
/* ========================================================= */


.am4-popular-grid{

    width:
        100%
        !important;

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

    gap:
        14px
        !important;

}


/* ========================================================= */
/* HOW IT WORKS                                               */
/* ========================================================= */


.am4-process-grid{

    width:
        100%
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

}


/* ========================================================= */
/* APP BANNER                                                 */
/* ========================================================= */


.am4-app-banner{

    width:
        100%
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

    margin-left:
        auto
        !important;

    margin-right:
        auto
        !important;

}


/* ========================================================= */
/* FOOTER INNER WIDTH                                         */
/* ========================================================= */


.am-marketly-home
.am-footer-inner{

    width:
        min(
            var(--bsg-home-master),
            calc(
                100% - 56px
            )
        )
        !important;

    max-width:
        var(--bsg-home-master)
        !important;

    margin-left:
        auto
        !important;

    margin-right:
        auto
        !important;

}


/* ========================================================= */
/* MINIMUM READABLE FONT                                      */
/* ========================================================= */


/*
|--------------------------------------------------------------------------
| Reinforce approved 12px homepage minimum.
|--------------------------------------------------------------------------
*/


.am-marketly-home
small,

.am-marketly-home
.am-main-nav a,

.am-marketly-home
.am-sign-link,

.am-marketly-home
.am-post-button,

.am-marketly-home
.am4-eyebrow,

.am-marketly-home
.am4-section-kicker,

.am-marketly-home
.am4-drive-kicker,

.am-marketly-home
.am4-category-orb strong,

.am-marketly-home
.am4-listing-title,

.am-marketly-home
.am4-card-location,

.am-marketly-home
.am4-card-meta,

.am-marketly-home
.am4-floating-card small,

.am-marketly-home
.am4-floating-card strong,

.am-marketly-home
.am4-section-header p,

.am-marketly-home
.am4-section-header > a,

.am-marketly-home
.am4-popular-bottom strong,

.am-marketly-home
.am4-popular-bottom small,

.am-marketly-home
.am4-process-grid strong,

.am-marketly-home
.am4-process-grid p,

.am-marketly-home
.am4-app-copy p,

.am-marketly-home
.am4-app-benefits span,

.am-marketly-home
.am-footer-copy,

.am-marketly-home
.am-footer-links a{

    font-size:
        max(
            12px,
            1em
        );

}


/* ========================================================= */
/* LARGE DESKTOP                                              */
/* ========================================================= */


@media(min-width:1500px){

    .am-marketly-home
    .am-container,

    .am-marketly-home
    .am-header,

    .am-marketly-home
    .am-footer-inner{

        width:
            var(--bsg-home-master)
            !important;

    }

}


/* ========================================================= */
/* NORMAL LAPTOP / TABLET                                     */
/* ========================================================= */


@media(max-width:1400px){

    .am-marketly-home
    .am-container,

    .am-marketly-home
    .am-header,

    .am-marketly-home
    .am-footer-inner{

        width:
            calc(
                100% - 40px
            )
            !important;

    }


    .am4-search-dock{

        width:
            min(
                var(--bsg-home-search),
                calc(
                    100% - 70px
                )
            )
            !important;

    }

}


@media(max-width:1180px){

    .am4-hero h1{

        font-size:
            60px
            !important;

    }


    .am4-floating-phone{

        display:
            none
            !important;

    }


    .am4-hero-vehicle{

        right:
            3%
            !important;

        width:
            400px
            !important;

    }


    .am4-floating-car{

        right:
            29%
            !important;

    }


    .am4-featured-grid{

        grid-template-columns:
            repeat(
                4,
                1fr
            )
            !important;

    }


    .am4-featured-grid
    .am4-listing-card:nth-child(5){

        display:
            none;

    }

}


/* ========================================================= */
/* TABLET                                                     */
/* ========================================================= */


@media(max-width:900px){

    :root{

        --bsg-sticky-top:
            8px;

    }


    .am-marketly-home
    .am-header{

        width:
            calc(
                100% - 24px
            )
            !important;

        margin-top:
            8px
            !important;

        border-radius:
            14px
            !important;

    }


    .am-marketly-home
    .am-header-inner{

        min-height:
            66px
            !important;

        padding-left:
            13px
            !important;

        padding-right:
            13px
            !important;

    }


    .am-marketly-home
    .am-container,

    .am-marketly-home
    .am-footer-inner{

        width:
            calc(
                100% - 30px
            )
            !important;

    }


    .am4-hero{

        margin-top:
            8px
            !important;

    }


    .am4-hero-inner{

        padding-top:
            48px
            !important;

    }


    .am4-search-dock{

        width:
            100%
            !important;

    }


    .am4-featured-grid{

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

    }


    .am4-featured-grid
    .am4-listing-card:nth-child(5){

        display:
            block;

    }


    .am4-popular-grid{

        grid-template-columns:
            repeat(
                3,
                1fr
            )
            !important;

    }

}


/* ========================================================= */
/* MOBILE                                                     */
/* ========================================================= */


@media(max-width:640px){

    :root{

        --bsg-sticky-top:
            6px;

    }


    .am-marketly-home
    .am-header{

        width:
            calc(
                100% - 16px
            )
            !important;

        margin-top:
            6px
            !important;

        border-radius:
            13px
            !important;

    }


    .am-marketly-home
    .am-container,

    .am-marketly-home
    .am-footer-inner{

        width:
            calc(
                100% - 22px
            )
            !important;

    }


    .am4-hero{

        min-height:
            700px
            !important;

    }


    .am4-hero-inner{

        min-height:
            700px
            !important;

        padding-top:
            40px
            !important;

    }


    .am4-hero-copy{

        width:
            100%
            !important;

    }


    .am4-hero h1{

        font-size:
            clamp(
                44px,
                13vw,
                57px
            )
            !important;

    }


    .am4-category-dock{

        padding-left:
            10px
            !important;

        padding-right:
            10px
            !important;

    }


    .am4-featured-grid{

        gap:
            9px
            !important;

    }


    .am4-listing-media{

        height:
            148px
            !important;

    }


    .am4-popular-grid{

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

    }

}
