img{
    vertical-align: inherit;
}

.createitem {
    padding-top: 50px;
    padding-bottom: 50px;
    padding-left: 50px;
}

.login {
    padding-left: 16px;
}

.main_list{
    list-style: none;
    color: black;
    margin: 0;
    padding: 12px;
}

.main_container{
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    margin-top: -260px;
    position: relative;
    z-index: 2; /* Make sure it sits above the carousel */
}

.main-list-title{
    color: white;
    text-shadow:
            -1px -1px 0 black,
            1px -1px 0 black,
            -1px  1px 0 black,
            1px  1px 0 black;
}

.grid-container {
    display: grid;
    list-style: none;
    color: black;
    gap: 32px;
    justify-content: start;
    grid-template-columns:  repeat(auto-fill, 300px);
    margin: 0;
    padding: 12px;

}

.item-row {
    width: 300px;
    min-width: 300px;
    height: 400px;
    margin: 16px;
    background: white;
    border-radius: 2px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;

    position: relative;
}

/* Overlay for out-of-stock items */
.item-row.out-of-stock::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(128, 128, 128, 0.5); /* semi-transparent grey */
    z-index: 1;
}

/* Optional: lower the content's z-index to sit under the overlay */
.item-row.out-of-stock * {
    position: relative;
    z-index: 0;
}

.post-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.row-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.row-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.row-footer{
    height: 20px;
    font-size: 16px;
    margin-top: 8px;
}

.row-title{
    color: black;
    font-weight: bold;
    display: inline-block;
    max-width: 100%;
    /*
                text-overflow: ellipsis;*/
    /*    white-space: nowrap;*/
    overflow: hidden;
    max-lines: 2;
    white-space: normal;
    font-size: 12px;
}

.scroll-arrow-left{
    width: 50px;
    height: 50px;
    background: lightgray;
    position: absolute;
    top: 140px;
    left: -20px;
    border-radius: 50%;
    opacity: 0.8;
    cursor: pointer;
    z-index: 1000;
}

.scroll-arrow-right{
    width: 50px;
    height: 50px;
    background: lightgray;
    position: absolute;
    top: 140px;
    right: -20px;
    border-radius: 50%;
    opacity: 0.8;
    cursor: pointer;
    z-index: 1000;
}

.scrollmenu {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.scrollmenu::-webkit-scrollbar {
    display: none; /* Hide scrollbar for WebKit */
}

.mobile-overlay{
    display: none;
}

#mobile-nav-panel{
    display:  none;
}


#myCarousel{
    margin: auto;
    width: 100%;
    height: 750px;
    position: relative;
    z-index: 1;
}

#carousel-img{
    height: 750px;
    width:100%;
    object-fit:cover;
}

/*.fade-bottom {
    display: block;
    width: 100%;
    height: auto;

    -webkit-mask-image: linear-gradient(to bottom, black 20%, transparent 95%);
    mask-image: linear-gradient(to bottom, black 20%, transparent 95%);

    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}*/
.fade-bottom {
    display: block;
    width: 100%;
    height: auto;

    /* Apply gradient mask */
    -webkit-mask-image: linear-gradient(to bottom, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 70%, transparent 100%);

    /* Ensure full support */
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

@media only screen and (max-width: 767px) {

    .main_container{
        margin-top: 0;
        position: relative;
    }

/*    .grid-container{
        display: grid;
        grid-template-columns:  repeat(auto-fill, 160px);
        max-width:400px;
    }*/

    .grid-container{
        display: block;
        margin-right: 12px;

    }

    .main-list-title{
        color: black;
        text-shadow: none;
    }

    .row-title{
        font-size: 12px;
        height: 20px;
    }


    .item-row{
        width: calc(100% - 16px);
        height: 300px;
        padding: 10px;
    }

    #myCarousel{
        display: none;
    }

    .scroll-arrow-left {
        display: none !important;
    }

    .scroll-arrow-right{
        display: none !important;
    }

    .scrollmenu.dragging {
        cursor: grabbing;
        user-select: none;
    }
    .scrollmenu {
        cursor: grab;
    }
    #mobile-overlay {
        position: fixed;
        display: none;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 998;
    }

    #mobile-nav-panel {
        display: block;
        position: fixed;
        top: 0;
        left: -250px; /* hidden by default */
        width: 250px;
        height: 100vh;
        background: white;
        box-shadow: 2px 0 5px rgba(0,0,0,0.3);
        transition: left 0.3s ease;
        z-index: 999;
        padding: 20px;
    }

    #mobile-nav-panel ul {
        list-style: none;
        padding: 0;
    }

    #mobile-nav-panel ul li {
        margin-bottom: 20px;
    }

    #mobile-nav-panel.open {
        left: 0;
    }

    #mobile-overlay.show {
        display: block;
    }

}