@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

body {
    font-family: "Poppins", sans-serif;
    margin: 0;
}
.container {
    width: 900px;
    max-width: 90vw;
    margin: auto;
    text-align: center;
    padding-top: 10px;
    transition: trasnform .5s;
}
svg {
    width: 40px;
    height: 40px;
}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}
header .title {
    font-weight: 500;
}
header .icon-cart {
    position: relative;
}
header .icon-cart span {
    display: flex;
    width: 25px;
    height: 25px;
    background-color: red;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    right: -40%;
}
.listProduct .item img {
    width: 90%;
    filter: drop-shadow(0 50px 20px rgba(0, 0, 0, 0.300));

}
.listProduct {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.listProduct .item {
    background-color: #eeeee6;
    padding: 30px;
    border-radius: 20px;
}
.listProduct .item h2 {
    font-weight: 500;
    font-size: large;
}
.listProduct .item .price{
    letter-spacing: 5px;
    font-size: small;
}
.listProduct .item button {
    background-color: #353535;
    color: white;
    border-radius: 20px;
    padding: 5px 10px;
    margin-top: 10px;
    border: none;
    cursor: pointer;
}
.cartTab {
    width: 400px;
    background-color: #353535;
    color: white;
    position: fixed;
    inset: 0 -400px 0 auto;
    display: grid;
    grid-template-rows: 70px 1fr 70px;
    transition: .5s;
}
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: "Poppins", sans-serif;
    font-weight: 500;
    cursor: pointer;
}
.cartTab .btn .close {
    background-color: white;
}
.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: white;
    color: #555;
    border-radius: 50%;
    cursor: pointer;
}
.listCart .quantity span:nth-child(2) {
    background-color: transparent;
    color: white;
}
.listCart .item:nth-child(even) {
    background-color: #eee1;
}
.listCart {
    overflow: auto;
}
.listCart::-webkit-scrollbar {
    width: 0;
}
@media screen and (max-width: 900px) {
    .listProduct {
        grid-template-columns: repeat(2, 1fr);
    }
    .cartTab {
        width: 100%;
        inset: 0 -100% 0 auto;
    }
    body.showCart .cartTab {
        inset: 0 0 0 auto;
    }
    body.showCart .container {
        transform: translateX(-50%);
    }
}
@media screen and (max-width: 600px) {
    .listProduct {
        grid-template-columns: 1fr;
    }
    .cartTab {
        width: 100%;
        inset: 0 -100% 0 auto;
    }
    body.showCart .cartTab {
        inset: 0 0 0 auto;
    }
    body.showCart .container {
        transform: translateX(-50%);
    }
}