body { 
    background-color: #d3f4e9; 
    margin: 0; 
    font-family: Arial, sans-serif; 
     overflow-x: hidden;
} 

.container { 
    width: 1000px; 
    margin: auto; 
    transition: 0.5s; 
} 

header { 
    display: grid; 
    grid-template-columns: 1fr 50px; 
    margin-top: 50px; 
} 

header .shopping { 
    position: relative; 
    text-align: right; } 

header .shopping img { 
    width: 40px; 
} 

header .shopping span { 
    background: #1f6658; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    color: #fff; 
    position: absolute; top: -5px; 
    left: 80%; padding: 3px 10px; 
} 

.list { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    column-gap: 20px; row-gap: 20px; 
    margin-top: 50px; 
    } 
    
.list .item { 
    text-align: center; 
    background-color: #f2fbf8; 
    padding: 20px; 
    box-shadow: 0 50px 50px #757676; 
    letter-spacing: 1px;
     } 

.list .item img { 
    width: 100%; 
    height: 300px; 
    object-fit: cover; 
    }

.list .item .title { 
    font-weight: 600; 
    } 

.list .item .currency { 
    font-weight: 600; 
    margin: 10px;
} 
.list .item .price {
    margin: 10px; 
    } 

.list .item button { 
    background-color: #1f6658; 
    color: #fff; 
    width: 100%; 
    padding: 10px; 
    } 
    
/*cart styling*/ 
.cart { 
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100dvh;
    background-color: #227f6c;
    transition: right 0.5s;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    } 

.active .cart { 
     left: auto;
    right: 0;
    }

.active .container{ 
    transform: translateX(-200px); 
    }

.cart h1{ 
    color:#f6efef; 
    font-weight: 100; 
    margin: 0; 
    padding: 0 20px; 
    height: 80px; 
    display: flex; 
    align-items: center; 
        }

    .cart .checkOut{ 
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    background-color: #f6efef;

    } 
        
    .cart .checkOut div{ 
        background-color: #f6efef; 
        width: 100%; 
        height: 60px; 
        display: flex; 
        justify-content: center; 
        align-items: center; 
        font-weight: bold; 
        cursor: pointer; 
        font-size: large; 
    } 

    .cart .checkOut div:nth-child(2){ 
        background-color: #4b5856; 
        color: #fff; font-size: large; 
    } 

    .listCart { 
        flex: 1; 
        overflow-y: auto; 
        padding-right: 10px; 
    } 

    body.active { 
        overflow: hidden; 
    } 

    .shoppingCartContainer {
 /* Replace with actual parent container of .listCart */ 
        height: 100%; 
        overflow-y: auto; 
        padding-bottom: 100px;
    } 

    .listCart li{ 
        display: grid; 
        grid-template-columns: 100px repeat(3, 1fr); 
        color: #fff; 
        row-gap: 30px; 
        margin-bottom: 20px; 
    } 

.listCart li div{ 
    display: flex; 
    justify-content: center; 
    align-items: center; 
} 

.listCart li img{ 
    width: 90%; 
} 

.listCart li button{ 
    width: auto; 
    background-color: #f2fbf8; 
    border: none; 
} 

.listCart .count{ 
    margin: 0 10px; 
}



@media (max-width: 768px) {
 .container {
        width: 95%;
    }

    .cart {
        max-width: 100%;
    }

    .listCart li {
        grid-template-columns: 80px repeat(3, 1fr);
        row-gap: 15px;
    }

    .cart h1 {
        font-size: 1.2rem;
        padding: 0 10px;
    }

    .cart .checkOut div {
        font-size: 1rem;
        height: 50px;
    }

    .list .item img {
        height: 200px;
    }

    .list .item button {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .listCart li {
        grid-template-columns: 60px repeat(3, 1fr);
    }

    .cart h1 {
        font-size: 1rem;
    }

    .cart .checkOut div {
        font-size: 0.9rem;
        padding: 10px;
    }

    .list .item img {
        height: 150px;
    }

    .list .item button {
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    .container {
        width: 90%;
    }

    .list {
        grid-template-columns: repeat(2, 1fr); 
    }

    .cart {
        width: 400px;
    }

    .cart h1 {
        font-size: 26px;
    }

    .cart .checkOut div {
        font-size: 16px;
    }
}

