﻿.cart-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 30%;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 7000; /* Fourth in hierarchy */
    display: flex !important;
    flex-direction: column;
    visibility: hidden;
    opacity: 0;
}

    .cart-sidebar.open {
        transform: translateX(0);
        visibility: visible !important;
        opacity: 1 !important;
    }

.cart-sidebar-content,
.cart-sidebar-footer {
    display: block !important;
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 6999; /* Just below the sidebar */
    display: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

    .cart-sidebar-overlay.active {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 1000;
    }

@media (max-width: 768px) {
    .cart-sidebar {
        width: 80%;
    }
}

.cart-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .cart-sidebar-header h5 {
        margin: 0;
        font-size: 1.25rem;
        color: #000;
    }

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000;
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e0e0e0;
}

    .cart-sidebar-footer .total-label {
        color: #1e3a8a;
        font-weight: normal;
    }

.product-card {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 1rem;
    color: #000;
}

    .product-card p, .product-card span {
        margin: 0;
        padding: 0.25rem 0;
        color: #000;
        font-weight: normal;
    }

#total-sidebar, span{
    color: black;
}

.product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    max-width: 100%;
}

.quantity-btn {
    background: #f0f0f0;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: #000;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    color: #000;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff0000;
    cursor: pointer;
}

.checkout-btn {
    background-color: #000;
    color: #fff !important;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
}

    .checkout-btn.disabled {
        background-color: #ccc;
        cursor: not-allowed;
        color: #fff;
    }

/* SweetAlert2 Toaster (second-highest z-index) */
.swal2-container.swal2-toast {
    z-index: 9000 !important;
}

/* SweetAlert2 Alert (third-highest z-index) */
.swal2-container:not(.swal2-toast) {
    z-index: 8000 !important;
}

.text-center
{
    color:black;
}

