/* Catalog atmosphere only; approved product and filter surfaces stay intact. */
body[data-page="market"] #main {
    position: relative;
    isolation: isolate;
}

body[data-page="market"] .site-header {
    position: relative;
    z-index: 1;
}

body[data-page="market"] #main::before {
    content: "";
    position: absolute;
    inset: -81px 0 auto;
    height: min(calc(100% + 81px), clamp(760px, 66vw, 1000px));
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(90deg, rgba(10, 11, 18, .68), rgba(10, 11, 18, .4) 48%, rgba(10, 11, 18, .26)),
        url("img/cs2-ancient-v1.webp");
    background-size: 100% 100%, cover;
    background-position: center top;
    background-repeat: no-repeat;
    mask-image: linear-gradient(transparent, #000 12%, #000 56%, transparent);
}

@media (max-width: 767px) {
    body[data-page="market"] #main::before {
        inset-block-start: -69px;
        height: min(calc(100% + 69px), 900px);
        background-image:
            linear-gradient(90deg, rgba(10, 11, 18, .74), rgba(10, 11, 18, .48)),
            url("img/cs2-ancient-v1.webp");
        background-size: 100% 100%, auto 100%;
        background-position: center top, 70% top;
        mask-image: linear-gradient(transparent, #000 10%, #000 58%, transparent);
    }
}

/* Keep the footer operative clear of the final product row and pagination. */
body[data-page="market"] .market-page {
    padding-bottom: 180px;
}

/* Protect reading contrast over the brighter stone and foliage. */
body[data-page="market"] .catalog-categories,
body[data-page="market"] .catalog-info {
    background: rgba(10, 11, 18, .86);
}

@media (max-width: 767px) {
    body[data-page="market"] .market-page {
        padding-bottom: 140px;
    }
}
