* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    width: 900px;
    max-width: 90vw;
    margin: auto;
    text-align: center;
    padding-top: 10px;
    transition: transform .5s;
}

.icon-cart img {
    width:30px;
    padding:8px;
    background: #fff;
    border-radius: 50%;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    width:150px;
    /* background-color: #171717; */
}

header .icon-cart {
    position: relative;
    margin-left: 30px;
    
}

header .icon-cart span {
    display: flex;
    width: 30px;
    height: 30px;
    background-color: red;
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    right: -20px;
}

.listProduct .item img {
    width: 90%;
    filter: drop-shadow(0 20px 20px #0009);
}

.listProduct {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.listProduct .item {
    /* background-color: #eeeee6; */
    /* padding: 20px; */
    border-radius: 20px;
}

.listProduct .item h2 {
    font-weight: 500;
    /* font-size: large; */
}

.listProduct .item .price {
    letter-spacing: 7px;
    /* font-size:small; */
}

.listProduct .item button {
    background-color: #353432;
    color: #eee;
    padding: 5px 10px;
    border-radius: 20px;
    margin-top: 10px;
    border:none;
    cursor:pointer;
}

.cartTab {
    width: 400px;
    background-color: #353432;
    color: #eee;
    position: fixed;
    /* top:0;
    right: 0;
    bottom: 0; these values are the same as inset below */
    inset: 0 -400px 0 auto;
    display: grid;
    grid-template-rows: 70px 1fr 70px;
    transition: .5s;
    z-index: 99999;
}

body.showCart .cartTab {
    inset: 0 0 0 auto;
}

body.showCart .container {
    transform: translateX(-250px);
}

.cartTab h1 {
    padding: 20px;
    margin: 0;
    font-weight: 300;
}

.cartTab .btn {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.cartTab .btn button {
    background-color: #e8bc0e;
    border: none;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    cursor: pointer;
    height: 50px;
}

.cartTab .btn .close {
    background-color: #eee;
}

.cartTab .listCart .item img {
    width: 100%;
}

.cartTab .listCart .item {
    display: grid;
    grid-template-columns:  70px 150px 50px 1fr;
    gap: 10px;
    text-align: center;
    align-items: center;
}

.listCart .quantity span {
    display: inline-block;
    width: 25px;
    height: 25px;
    background-color: #eee;
    color: #555;
    border-radius: 50%;
    cursor: pointer;
    padding: 3px;
}

.listCart .quantity span:nth-child(2) {
    background-color: transparent;
    color: #eee;
} 


.listCart .item:nth-child(even) {
    background-color: #eee1;
}

.listCart {
    overflow: auto;
}

.listCart::-webkit-scrollbar {
    width: 0;
}


/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    padding-top: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding-top: 20px;
    border-radius: 10px;
    /* width: 300px; */
    width: 400px;
    text-align: center;
}

#modalImage {
    width: 70%; 
    margin-bottom: 10px;
}

.close-modal {
    color: #fff;
    float: right;
    font-size: 24px;
    width:24px;
    border-radius: 50%;
    background-color: #333;
    margin-right: 15px;
    font-weight: bold;
    cursor: pointer;
}

@media screen and (max-width: 1149px) {
    .listProduct {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    }

}


/* @media screen and (max-width: 992px) {
    .listProduct {
        grid-template-columns: repeat(3, 1fr);
    }
} */
@media screen and (max-width: 420px) {
    .listProduct {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 400px) {
    .modal-content {
        width: 98vw;
    }
}