:root{
    --verde-bosque: #056124;
    --gris-oscuro: #303030;
    --verde-menta: #20ac25;
}

body{
    background-color: #f1f1f1;
}

/* CONTENEDOR DE BARRA DE BÚSQUEDA */
.base--form--container{
    box-sizing: border-box;
    padding: 20px;
    width: 500px;
    margin: auto;
}

.header--form--input{
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border-radius: 1rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #303030;
    border: 1px solid #20ac25;
}

.header--form--input::placeholder{
    color: #aaa;
}

.header--form--input:focus{
    box-shadow: 0 1px 6px var(--verde-menta);
}

/* --------------------------------- */
.store-page--container{
    box-sizing: border-box;
    width: 80%;
    display: flex;
    margin: 20px auto;
    gap: 30px;
}

/* ------ CATEGORIES CONTAINER ------ */
.filter-button{
    display: none;
    box-sizing: border-box;
    width: 50%;
    padding: 5px 15px;

    & .filter--span{
        display: flex;
        align-items: center;
        justify-content: center;
    }

    & .filter--span-img{
        width: 10%;

        & .filter-img{
            width: 20px;
        }
    }

    & .filter--span-text{
        flex: 1
    }
}

.background-categories-container{
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-color: #0006;
    transition: display .1s ease-in-out;
    z-index: 100;
}

.background-categories-container.show{
    display: block;
}

.categories-container{
    box-sizing: border-box;
    background-color: #fff;
    padding: 12px;
    width: 250px;
    max-height: 500px;
    border-radius: 8px;
    overflow-y: auto;
    
    & a{
        color: #303030;
    }
}

.categories-container::-webkit-scrollbar {
    width: 4px; 
}

.categories-container::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 10px; 
}

.categories-container.show{
    right: 0;
}

.categories--item{
    text-decoration: none;
    display: block;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    margin-bottom: 7px;

    & p{
        margin: 0;
    }  
}  

.categories--item:hover{
    background-color: #f9f9f9;
    border-top: 1px solid #20ac25;
    border-radius: 6px;
    box-shadow: 0 1px 4px #0005;
}
/* ----------------------------- */


/* -------- PRODUCT CONTAINER --------- */
.product-list-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    grid-auto-rows: 270px;
    gap: 15px;
    flex: 1;
}

.product-container{
    box-sizing: border-box;
    max-width: 280px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    background-color: #fff;
    border-radius: 8px;
}

.product--img-container{
    display: flex;
    height: 65%;
    justify-content: center;
    overflow-y: hidden;

    & img{
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
}

.product--info-container{
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 7px;
    text-align: center;
    height: 40%;

    & p{
        margin: 0;
    }

    & .product--info--price-container{
        display: flex;
        justify-content: space-between;
        color: #056124;
        font-weight: bolder;
    }
}

.product--name{
    font-size: 0.875rem;
    color: #303030;
    min-height: 30px;
}

.product--button{
    background-color: #056124;
    border: none;
    color: #fff;
    border-radius: 10px;
    padding: 6px;
    transition: background-color .3s ease;
}

.product--button:hover{
    background-color: #20ac25;
    cursor: pointer;
    transition: background-color .5s ease;
}

/* ----------------------------------- */


/* ----- NOTIFICATION ----- */
.notification-product-container{
    position: fixed;
    right: 0;
    bottom: 30px;
    background-color: var(--verde-menta);
    border-radius: 8px 0 0 8px;
    padding: 12px;
    gap: 8px;
    align-items: center;
    display: none;

    & p{
        color: #fff;
        margin: 0;
    }
}

.notification-product-container.show{
    display: flex;
}

/* ------------------------ */


/* ----------- MEDIA QUERIES ------------- */
@media (max-width: 1000px){
    .store-page--container{
        width: 90%;
        flex-direction: column;
    }

    .filter-button{
        box-sizing: border-box;
        display: flex;
        background-color: #fff;
        border-radius: 8px;
        border: none;
        padding: 8px;
    }

    .filter-button:hover{
        opacity: 0.8;
        cursor: pointer;
    }

    .categories-container{
        position: fixed;
        width: 300px;
        max-height: none;
        height: 100dvh;
        z-index: 1000;
        top: 0;
        right: -350px;
        transition: right 0.5s ease-in-out;
        border-radius: 0px;
    }

    body.no-scroll {
        overflow: hidden;
    }
}

@media (max-width: 768px){
    .filter-button{
        width: 70%;
    }

    .store-page--container{
        padding: 10px;
        width: 100%;
        /*flex-direction: column;*/
    }

    .product-list-container{
        justify-content: center;
    }

    .base--form--container{
        width: 100%;
    }
}

@media (max-width: 400px){
    .filter-button{
        width: 100%;
    }

    .product-list-container{
        grid-template-columns: 1fr;
        grid-auto-rows: 150px;
    }

    .product-container{
        flex-direction: row;
        max-width: none;
        gap: 20px;
    }

    .product--img-container{
        height: 100%;
        width: 65%;

        & img{
            max-width: 100%;
            max-height: 100%;
        }
    }

    .product--img-container img {
        object-fit: contain;
    }

    .product--info-container{
        text-align: left;
        height: 100%;

        & .price-text{
            display: none;
        }
    }
}
/* --------------------------------------- */