#fleaMarketDiscover {
    width: 100%;
    padding: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
}

#fleaMarketEntryContainer {
    width: 100%;
    height: auto;
    padding: 15px;
    box-sizing: border-box;
    background-color: rgb(244, 244, 244);
    border-radius: 15px;
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    overflow-x: visible; /* remove horizontal scroll */
    justify-content: space-between;
}

.fleaMarketEntry {
    flex: 0 0 32%;
    height: 400px;
    background-color: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.fleaMarketEntry p {
    font-size: 15px;
}

.fleaMarketEntryImage {
    position: relative;
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

#toysFleaMarketDiscover {
    width: 100%;
    padding: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    box-sizing: border-box;
}

.fleaMarketSUBEntry {
    flex: 0 0 23%; /* Default: 1/4th of the container */
    height: 400px;
    background-color: white;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    margin: 5px;
    box-sizing: border-box;
}


.fleaMarketSUBEntry p {
    font-size: 14px;
}

#popup {
    width: 80%;
    height: 80%;
    position: fixed;
    background-color: rgb(255, 255, 255);
    z-index: 1001;
    top: 10%;
    left: 10%;
    border-radius: 20px;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    box-sizing: border-box;
}

#popup p {
    cursor: pointer;
}

#popupShadow {
    display: none;
    width: 100%;
    height: 100%;
    position: fixed;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

#popupDisplayImage {
    width: 80%;
    height: 90%;
    margin-bottom: 20px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

#backHomeButton {
    height: 75px;
    width: 75px;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 90px;
    left: 20px;
    border-radius: 25%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* On smaller screens: change to grid layout */
@media screen and (max-width: 900px) {
    #fleaMarketEntryContainer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        overflow: visible;
    }

    .fleaMarketEntry {
        width: 100%; /* Let grid handle the size */
        height: auto;
    }

    #fleaMarketDiscover {
        padding: 15px;
        padding-top: 150px;

    }

    .fleaMarketSUBEntry {
        flex: 0 0 50%; /* 1/2 of container */
    }
}

@media screen and (max-width: 550px) {
    #fleaMarketEntryContainer {
        grid-template-columns: 1fr;
    }

    .fleaMarketSUBEntry {
        flex: 0 0 100%; /* Full width */
    }

    #toysFleaMarketDiscover {
        padding: 15px;
        padding-top: 150px;
    }

    #backHomeButton {
        width: 50px;
        height: 50px;
    }
}