/* ==================== */
/* Offcanvas Cart Styles */
/* ==================== */

/* Main Cart Container */
#cartOffcanvas {
    width: 400px;
    max-width: 100vw;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}


/* Cart Header - Lighter Red */
#cartOffcanvas .offcanvas-header {
    xbackground-color: #c62828; /* Lighter red */
    color: white;
    padding: 1rem 1rem;
    border-bottom: 1px solid #bbb;
}

/* Green Buttons using bg-success */

.complete-order-btn,
.order-success-card .card-header {
    background-color: var(--bs-success) !important; /* Bootstrap success green */
    border-color: var(--bs-success) !important;
    color: white !important;
}

/* Hover states for green buttons */

.complete-order-btn:hover {
    background-color: #1e7e34 !important; /* Slightly darker green */
    border-color: #1e7e34 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Success message card */
.order-success-card {
    border-color: var(--bs-success) !important;
}

/* Redeem code section */
.redeem-code {
    border-color: var(--bs-success) !important;
}

/* Keep all other styles the same */
.cart-count-badge {
    background-color: #c62828;
    color: white;
    
}

/* Quantity Input Group - Square with Dark Gray Outline */
.quantity-input-group {
    width: 120px;
    margin: 0.5rem 0;
    border-radius: 0 !important; /* Remove rounding */
}

.quantity-input-group .btn {
    background-color: #f8f9fa;
    color: #495057; /* Dark gray text */
    border: 0px solid #495057 !important; /* Dark gray outline */
    padding: 0.25rem 0.5rem;
    
    transition: all 0.2s ease;
}

.quantity-input-group .btn:hover {
    background-color: #e9ecef;
}

.quantity-input-group .form-control {
    background-color: white;
    color: #212529;
    border: 0px solid #495057 !important; /* Dark gray outline */

    text-align: center;
    font-weight: 500;
    border-left: none !important;
    border-right: none !important;
}

/* Delete Button - Red with Square Corners */
.remove-item {
    background-color: #c62828 !important; /* Lighter red */
    color: white !important;
    border: none !important;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item:hover {
    background-color: #b71c1c !important; /* Slightly darker red */
    transform: scale(1.05);
}

.remove-item i {
    font-size: 0.9rem;
}

#cartOffcanvas .offcanvas-title {
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

#cartOffcanvas .btn-close {
    filter: invert(1);
    opacity: 0.8;
    transition: transform 0.2s ease;
}

#cartOffcanvas .btn-close:hover {
    transform: rotate(90deg);
    opacity: 1;
}

/* Cart Body Structure */
.offcanvas-body {
    display: flex;
    flex-direction: column;
    padding: 0;
    height: calc(100% - 56px);
}
.price-tag {
    color: #333 !important; /* Lighter red */
    font-size: 0.95rem; /* Slightly reduced */
    font-weight: 600;
}
/* Cart Items Container */
.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f9f9f9;
}

/* Individual Cart Items */
.cart-item {
    background-color: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 1rem;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.cart-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.cart-item h6 {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #444;
}

.cart-item .text-muted {
    color: #777 !important;
}

/* Quantity Controls */
.quantity-input-group {
    width: 120px;
    margin: 0.5rem 0;
}

.quantity-input-group .btn {
    background-color: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.quantity-input-group .btn:hover {
    background-color: #e0e0e0;
}

.quantity-input-group .form-control {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
    text-align: center;
    font-weight: 500;
}

/* Remove Item Button */
.remove-item {
    background-color: transparent;
    color: #8B0000;
    border: none;
    padding: 0.25rem;
    transition: all 0.2s ease;
}

.remove-item:hover {
    color: #6d0000;
    transform: scale(1.1);
}

/* Item Total Price */
.item-total {
    color: #8B0000;
    font-size: 1.1rem;
}

/* Cart Footer Section */
.cart-footer {
    background-color: white;
    border-top: 1px solid #e0e0e0;
    padding: 1.25rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.03);
}

.cart-totals {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #eee;
}

.cart-totals div {
    padding: 0.25rem 0;
    color: #555;
}

.cart-totals hr {
    border-color: #e0e0e0;
    margin: 0.75rem 0;
}



.continue-shopping {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* =================== */
/* Checkout Form Styles */
/* =================== */
.checkout-form-container {
    background-color: white;
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
    display: none;
}

.checkout-form-container .form-control {
    background-color: white;
    border: 1px solid #ddd;
    color: #333;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.checkout-form-container .form-control:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 0.25rem rgba(139, 0, 0, 0.1);
}

.checkout-form-container label {
    color: #555;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

/* Delivery Options */
.delivered-by-container {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e0e0e0;
}

.pickup-point-selector select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    color: #333;
}

/* Complete Order Button */
.complete-order-btn {
    background-color: #28a745;
    border: none;
    padding: 0.75rem;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
}

.complete-order-btn:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.back-to-cart {
    background-color: transparent;
    color: #555;
    border: 1px solid #ddd;
    padding: 0.75rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.back-to-cart:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Order Success Message */
.order-success-card {
    background-color: white;
    border: 1px solid #28a745;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.order-success-card .card-header {
    background-color: #28a745;
    color: white;
    font-weight: 500;
    padding: 1rem;
}

.redeem-code {
    background-color: #f9f9f9;
    border: 1px dashed #28a745;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: center;
}

.redeem-code h5 {
    color: #555;
    margin-bottom: 0.5rem;
}

.redeem-code h2 {
    color: #8B0000;
    font-weight: 600;
}

/* Cart Badge */
.cart-count-badge {
    background-color: #8B0000;
    color: white;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Loading State */
.cart-loading {
    position: relative;
}

.cart-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Empty Cart State */
.empty-cart-message {
    text-align: center;
    padding: 2rem 0;
}

.empty-cart-message i {
    font-size: 3rem;
    color: #8B0000;
    margin-bottom: 1rem;
}

.empty-cart-message p {
    color: #777;
    margin-bottom: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    #cartOffcanvas {
        width: 100%;
    }
    
    .cart-item {
        padding: 0.75rem;
    }
    
    .cart-item img {
        width: 60px;
        height: 60px;
    }
    
    .checkout-form-container {
        padding: 1rem;
    }
}