/* Colors */
:root {
    --color-primary-white: aliceblue;
    --color-primary-dark: #aabfec;
    --color-primary-blue: aliceblue;
    --color-primary-light: #597692;
    --color-text-dark: aliceblue;
}

#products-container {
    margin-inline: auto;
    max-width: 1600px;
    width: 100%;
    padding: 0 20px; 
}

#products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px; 
    padding: 50px;
}

.product {
    width: 100%; 
    max-width: 24rem; 
    box-sizing: border-box;
}

.product-card {
    width: 100%; 
    height: 36rem;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    color: var(--color-primary-white);
    box-shadow: 0 10px 30px 5px rgba(0, 0, 0, 0.2);
}

.product-card img {
    position: absolute;
    object-fit: cover;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0.9;
    transition: opacity .2s ease-out;
}

.product-card h2 {
    position: absolute;
    inset: auto auto 30px 30px;
    margin: 0;
    transition: inset .3s .3s ease-out;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: normal;
    text-transform: uppercase;
    text-shadow: darkslategray 0px 0px 10px;
}

.product-card p, .product-card a, .product-card .cart-button {
    position: absolute;
    opacity: 0;
    max-width: 80%;
    transition: opacity .3s ease-out;
}

.product-card p {
    inset: auto auto 100px 30px;
}

.product-card .product-price {
    inset: auto auto 26px 30px;
    background-color: aliceblue;
    color: #2B3444;
    border-radius: 7px;
    padding: 12px;
}

.product-card .discounted-price {
    inset: auto auto 26px 30px;
    background-color: red;
    font-weight: bold;
    color: #2B3444;
    border-radius: 7px;
    padding: 12px;
}

.product-card .cart-button{
    inset: auto auto 39px 132px;
    background-color: aliceblue;
    cursor: pointer;
    border-radius: 7px;
    padding: 15px;
    outline: none;
    font-weight: 600;
    border: 0;
    color: #2B3444;
}

.product-card .cart-button:hover {
    transition: all .1s ease;
    color: #150e0e;
    background-color: #b0b0b2;
}

.product-card a {
    inset: auto auto 40px 185px;
    color: #2B3444;
    text-decoration: none;
}

.product-card:hover h2 {
    inset: auto auto 140px 30px;
    transition: inset .3s ease-out;
}

.product-card:hover p, .product-card:hover a, .product-card:hover .cart-button {
    opacity: 1;
    transition: opacity .5s .1s ease-in;
}

.product-card:hover img {
    transition: opacity .3s ease-in;
    opacity: 1;
}

.material-symbols-outlined {
    vertical-align: middle;
}

 /* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
    padding-top: 60px;
}
.modal-content {
    background-color: #325169;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
}

.modal-content label{
    display: block;
    margin: 10px 0 5px;
}

.modal-content input {
    width: 100%;
    padding: 8px;
    margin: 5px 0 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensure the width includes padding and border */
}

.modal-content select{
    width: 100%;
    padding: 8px;
    margin: 5px 0 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensure the width includes padding and border */
}
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/*FILTER*/

#filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background-color: var(--color-primary-light);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#filter-form label {
    font-family: 'Roboto', sans-serif;
    color: var(--color-text-dark);
    margin-right: 5px;
    white-space: nowrap;
}

#filter-form select,
#filter-form input {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
}

#filter-form input[type="number"] {
    width: 100px;
}

#filter-form button {
    padding: 5px 15px;
    background-color: aliceblue;
    color: #325169;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

#filter-form button:hover {
    background-color: #aabfec;
}

/* Responsive Design */
@media (max-width: 600px) {
    #filter-form {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }

    #filter-form label {
        margin-right: 0;
        margin-bottom: 5px;
    }

    #filter-form select,
    #filter-form input,
    #filter-form button {
        width: 100%;
        margin-bottom: 10px;
    }

    #filter-form button {
        margin-top: 10px;
    }
}
