@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: transform .5s;
}

svg {
    width: 30px;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

header .icon-cart {
    position: relative;
}

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 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.listProduct .item {
    background-color: #eeeee6;
    padding: 20px;
    border-radius: 20px;
}

.listProduct .item img {
    width: 90%;
    filter: drop-shadow(0 50px 20px #0009);
}

.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;
    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: translate(-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;
}

.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 {
    overflow: auto;
}

.listCart .quantity span {
    display: inline-block;
    width: 25px;
    height: 25px;
    background-color: #eee;
    color: #555;
    border-radius: 50%;
}

.listCart .quantity span:nth-child(2) {
    background-color: transparent;
    color: #eee;
}

.listCart .item:nth-child(even) {
    background-color: #eee1;
}

.listCart::-webkit-scrollbar {
    width: 0;
}


@media screen and (max-width: 992px) {
    .listProduct{
        grid-template-columns: repeat(3, 1fr);
    }
}


@media screen and (max-width: 768px) {
    .listProduct{
        grid-template-columns: repeat(2, 1fr);
    }
}