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


body {
    font-family: "Poppins", serif;
    margin: 0;
}

.container {
    width: 850px;
    max-width: 90vw;
    margin: auto;
    text-align: center;
    padding-top: 1rem;
    transition: transform 0.3s;
    position: relative;
}

svg {
    width: 2rem;
    cursor: pointer;
    transition: all 0.3s;
}

svg:hover {
    transform: scale(1.8);
    font-weight: bold;
    color: #555;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 1.4rem;
    padding-inline: 12%;
    background: hsl(210, 73%, 64%);
    box-shadow: 0 3px 10px black;
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    transition: all 0.5s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

header .icon_card {
    position: relative;
}

header .icon_card span {
    display: flex;
    width: 1.4rem;
    height: 1.4rem;
    background-color: rgb(226, 61, 61);
    justify-content: center;
    align-items: center;
    color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 40%;
    right: -1rem;
}

.listProduct .item img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    filter: drop-shadow(-20px 20px 20px #0009);
    border-radius: 1rem;
}

.listProduct {
    margin-top: 5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.listProduct .item {
    background-color: #eeeee6;
    padding: 1rem;
    border-radius: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

.listProduct .item h2 {
    font-weight: 500;
    font-size: large;
    margin-bottom: 0;
}

.listProduct .item .price {
    font-size: medium;
    letter-spacing: 0.2rem;
}

.listProduct .item button {
    background-color: #065dce;
    color: #eee;
    height: 3.5rem;
    padding: 5px 10px;
    border-radius: .5rem;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.cardTab {
    width: 400px;
    background-color: #353432;
    color: #eee;
    position: fixed;
    inset: 0 -400px 0 auto;
    display: grid;
    grid-template-rows: 70px 1fr 70px;
    transition: all 0.3s;
}

body.showCard .cardTab {
    inset: 0 0 0 auto;
}

body.showCard .container {
    transform: translateX(-60px);
}

.cardTab h1 {
    padding: 1rem;
    margin: 0;
    font-weight: 300;
    border-bottom: 1px solid #fff;
}

.cardTab .btn {
    padding-inline: 2rem;
    height: 3.5rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(2, 1fr);
    z-index: 9;
    border-top: 1px solid #fff;
}

.cardTab .btn button {
    margin-top: 1rem;
    background-color: #e8bc0e;
    border: none;
    font-weight: 600;
    font-family: "Poppins";
    cursor: pointer;
    border-radius: 0.5rem;
}

.cardTab .btn .close {
    background: linear-gradient(to right, #eee, #e8bc0e);
}

.cardTab .listCard .item img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}

.cardTab .listCard .item {
    display: grid;
    grid-template-columns: 115px 130px 60px 1fr;
    text-align: center;
    align-items: center;
}

.cardTab .listCard .quantity span {
    display: inline-block;
    width: 25px;
    height: 20px;
    background-color: #eee;
    color: #555;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.3rem;
    padding-bottom: 0.7rem;
}

.cardTab .listCard .quantity span:nth-child(2) {
    background-color: transparent;
    color: #eee;
    border-radius: unset;
    border-bottom: 2px solid #eee;
}

.cardTab .listCard .item:nth-child(even) {
    background-color: #0001;
}

.cardTab .listCard {
    overflow-y: scroll;
}

.cardTab .listCard::-webkit-scrollbar {
    width: 0;
}

@media(max-width: 850px) {
    .listProduct {
        grid-template-columns: repeat(3, 1fr);
    }

    .cardTab .listCard .item img {
        width: 120px;
        height: 120px;
    }

    header{
        left: 0%;
        right: 0%;
        padding-inline: 5%;
    }
}

@media(max-width:550px) {
    .listProduct {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cardTab .listCard .item img {
        width: 100px;
        height: 100px;
    }
}

@media(max-width: 425px) {
    .cardTab {
        width: 95vw;
    }

    .cardTab .listCard .item img {
        width: 80px;
        height: 80px;
    }

    .cardTab .listCard .item {
        grid-template-columns: 100px 120px 65px 1fr;
    }
}

@media(max-width: 375px) {
    .listProduct {
        grid-template-columns: repeat(1, 1fr);
    }

    .cardTab .listCard .item {
        grid-template-columns: 80px 120px 50px 1fr;
    }
}