I am new to this type of code and wanted to grayscale the background image without effecting the overlay text
HTML CODE
<div class="top">   
            <div class="titleMain">
                <div class="titleMainText">
                    <h1>Check out our Store</h1>
                </div>
                <a href="*" class="storeButton">Shop</a>
            </div>
        </div>
CSS CODE
.top {
    padding-bottom: 500px;
    padding-top: 50px;
    border-bottom: 10px solid;
    background-image: url('../Images/46162.webp');
    background-repeat: no-repeat;
    background-size: cover;
}
.titleMain {
    margin-left: 5%;
    margin-right: 70%;
    margin-top: 5%;
    padding-bottom: 40px;
    font-size: xx-large;
    filter: none;
}
.titleMainText {
    margin-left: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-weight: bolder;
    color: black;
}
I wanted to grayscale the background image without effecting the text infront but can't find anything about it.