.cart-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%; /* Wider slider */
    max-width: 600px; /* Maximum width for larger screens */
    height: 100%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    z-index: 9999;
}

/* Active state to show cart slider */
.cart-slider.active {
    transform: translateX(0);
}

/* Cart Items */
.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
}

.cart-item-details h4 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button,
.cart-item-quantity input {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    padding: 5px 10px;
    cursor: pointer;
}

.cart-item-quantity input {
    width: 50px;
    text-align: center;
    border-radius: 4px;
}

.remove-item {
    background-color: #ff4c4c;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 3px;
    margin-top: 9px;
}

/* Coupon and Total Section at the bottom */
.coupon-section {
    display: flex;
    /* flex-direction: column; */
    align-items: center;
    margin-top: 20px;
    width: 100%;
}

.coupon-section input {
    padding: 10px;
    width: 100%;
    max-width: 300px; /* Limit input width */
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.coupon-section button {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    max-width: 300px;
    margin-left: 26px;
    
}

.coupon-section button:hover {
    background-color: #45a049;
}

/* Totals Section */
.totals {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
    font-weight: bold;
    width: 100%;
}

.subtotal, .total {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 300px;
    margin: 10px 0;
}

/* Close Button for Cart */
.close-cart {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #333;
}

.close-cart:hover {
    color: #ff4c4c;
}
.checkout-section {
    margin-top: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.checkout-btn:hover {
    background-color: #0056b3;
}
/* Mobile Specific Styles */
@media screen and (max-width: 767px) {
    .cart-slider {
        width: 100%;
        max-width: 100%;
        padding: 15px;
    }

    /* Adjust cart item layout for mobile */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px;
    }

    .cart-item img {
        width: 50px;
        height: 50px;
    }

    .cart-item-details h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .cart-item-quantity {
        margin-top: 5px;
    }

    .coupon-section input {
        max-width: 90%;
    }

    .coupon-section button {
        max-width: 90%;
    }

    .totals .subtotal, .totals .total {
        font-size: 14px;
    }
}

/* Tablet Specific Styles */
@media screen and (max-width: 1024px) {
    .cart-slider {
        width: 80%;
    }

    .cart-item {
        padding: 10px 15px;
    }

    .cart-item-details h4 {
        font-size: 16px;
    }
}