/*==================================
        CART OVERLAY
===================================*/

.cart-overlay{

    position: fixed;

    top: 0;

    left: 0;

    width: 100%;

    height: 100%;

    background: rgba(0,0,0,.5);

    opacity: 0;

    visibility: hidden;

    transition: .3s;

    z-index: 9998;

}

/*==================================
        CART SIDEBAR
===================================*/

.cart-sidebar{

    position: fixed;

    top: 0;

    right: -420px;

    width: 400px;

    max-width: 100%;

    height: 100vh;

    background: #fff;

    box-shadow: -10px 0 30px rgba(0,0,0,.15);

    transition: .35s ease;

    z-index: 9999;

    display: flex;

    flex-direction: column;

}

/* OPEN STATE */

.cart-sidebar.active{

    right: 0;

}

.cart-overlay.active{

    opacity: 1;

    visibility: visible;

}

/* HEADER */

.cart-header{

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 20px;

    border-bottom: 1px solid #eee;

}

.cart-header h2{

    color: var(--primary);

}

#closeCart{

    border: none;

    background: none;

    font-size: 30px;

    cursor: pointer;

}

/* ITEMS */

.cart-items{

    flex: 1;

    overflow-y: auto;

    padding: 20px;

}

/* FOOTER */

.cart-footer{

    padding: 20px;

    border-top: 1px solid #eee;

}

.cart-footer h3{

    margin-bottom: 20px;

    color: var(--primary);

}

.checkout-btn{

    width: 100%;

    padding: 15px;

    border: none;

    border-radius: 10px;

    background: #25D366;

    color: white;

    font-size: 17px;

    cursor: pointer;

    transition: .3s;

}

.checkout-btn:hover{

    background: #1da851;

}

/* MOBILE */

@media(max-width:768px){

    .cart-sidebar{

        width:100%;

    }

}

/*==================================
        CART ITEMS
==================================*/

.cart-items{

    flex:1;

    overflow-y:auto;

    padding:20px;

}

.cart-item{

    background:#fff;

    border:1px solid #ececec;

    border-radius:16px;

    padding:15px;

    margin-bottom:20px;

    box-shadow:0 8px 18px rgba(0,0,0,.06);

    transition:.3s;

}

.cart-item:hover{

    transform:translateY(-3px);

    box-shadow:0 12px 25px rgba(0,0,0,.08);

}

.cart-product-image{

    width:100%;

    height:220px;

    object-fit:cover;

    border-radius:12px;

    margin-bottom:15px;

    background:#f5f5f5;

}

.cart-item-details h4{

    font-size:18px;

    color:#6b0f1a;

    margin-bottom:10px;

    line-height:1.4;

}

.cart-price{

    font-size:24px;

    font-weight:700;

    color:#c89b3c;

    margin-bottom:18px;

}

/*==================================
      QUANTITY
==================================*/

.quantity-controls{

    display:flex;

    align-items:center;

    justify-content:center;

    gap:15px;

    margin-bottom:18px;

}

.quantity-controls button{

    width:38px;

    height:38px;

    border:none;

    border-radius:10px;

    background:#6b0f1a;

    color:#fff;

    font-size:20px;

    cursor:pointer;

    transition:.3s;

}

.quantity-controls button:hover{

    background:#8b1323;

}

.quantity{

    font-size:18px;

    font-weight:700;

    min-width:25px;

    text-align:center;

}

/*==================================
      REMOVE BUTTON
==================================*/

.remove-btn{

    width:100%;

    border:none;

    background:#f5f5f5;

    color:#d11a2a;

    padding:12px;

    border-radius:10px;

    cursor:pointer;

    font-weight:600;

    transition:.3s;

}

.remove-btn:hover{

    background:#ffe8e8;

}

/*==================================
      TOTAL
==================================*/

.cart-footer{

    padding:20px;

    border-top:1px solid #e5e5e5;

    background:#fff;

}

.cart-footer h3{

    color:#6b0f1a;

    margin-bottom:18px;

    font-size:28px;

}

.checkout-btn{

    width:100%;

    padding:16px;

    border:none;

    border-radius:12px;

    background:#25D366;

    color:#fff;

    font-size:18px;

    font-weight:600;

    cursor:pointer;

    transition:.3s;

}

.checkout-btn:hover{

    background:#1fb85a;

}

/*==================================
        CHECKOUT MODAL
==================================*/

.checkout-modal{

    position:fixed;

    top:0;

    left:0;

    width:100%;

    height:100%;

    background:rgba(0,0,0,.6);

    display:none;

    justify-content:center;

    align-items:center;

    z-index:10000;

}

.checkout-modal.active{

    display:flex;

}

.checkout-box{

    width:90%;

    max-width:500px;

    background:#fff;

    border-radius:18px;

    padding:30px;

    box-shadow:0 20px 50px rgba(0,0,0,.2);

    animation:popup .3s ease;

}

.checkout-box h2{

    text-align:center;

    color:#6b0f1a;

    margin-bottom:25px;

}

.checkout-box input,

.checkout-box textarea{

    width:100%;

    padding:14px;

    margin-bottom:15px;

    border:1px solid #ddd;

    border-radius:10px;

    outline:none;

    font-size:15px;

    font-family:"Poppins",sans-serif;

}

.checkout-box textarea{

    resize:none;

    height:100px;

}

.checkout-box input:focus,

.checkout-box textarea:focus{

    border-color:#6b0f1a;

}

.checkout-actions{

    display:flex;

    gap:15px;

    margin-top:20px;

}

.checkout-actions button{

    flex:1;

    padding:14px;

    border:none;

    border-radius:10px;

    cursor:pointer;

    font-size:16px;

    font-weight:600;

    transition:.3s;

}

#cancelCheckout{

    background:#e5e5e5;

    color:#333;

}

#cancelCheckout:hover{

    background:#d5d5d5;

}

#placeOrder{

    background:#25D366;

    color:#fff;

}

#placeOrder:hover{

    background:#1fb85a;

}

@keyframes popup{

    from{

        transform:scale(.8);

        opacity:0;

    }

    to{

        transform:scale(1);

        opacity:1;

    }

}