﻿/* ============================================
   COMPLETE CART REDESIGN - FIXED STRUCTURE
   Based on your exact HTML
   This WILL fix the overlap issue
============================================ */

/* ========================================
   RESET - Clear all conflicting styles
======================================== */
/*.cart-modal * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}*/

/* ========================================
   CART MODAL - Main Container
======================================== */
/*.cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 100vw;
    height: 100dvh;
    background: #ffffff;
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);*/
    /* CRITICAL: Flex container for proper layout */
    /*display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .cart-modal.active {
        transform: translateX(0);
    }*/

/* ========================================
   CART HEADER - Fixed at top
======================================== */
/*.cart-header {*/
    /* Fixed section - never scrolls */
    /*flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #2563eb;
    color: white;
    border-bottom: 2px solid #1d4ed8;
}

.cart-icon {
    font-size: 28px;
}

.cart-header h2 {
    font-size: 24px;
    font-weight: 700;
    flex: 1;
    color: white;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

    .close-cart:hover {
        background: rgba(255, 255, 255, 0.2);
    }*/

/* ========================================
   VOUCHER BANNER - Fixed below header
======================================== */
/*.voucher-banner {*/
    /* Fixed section - never scrolls */
    /*flex: 0 0 auto;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 2px solid #f59e0b;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.voucher-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.voucher-icon {
    font-size: 28px;
}

.voucher-text strong {
    font-size: 15px;
    color: #92400e;
    display: block;
    font-weight: 700;
    margin-bottom: 2px;
}

.voucher-text p {
    font-size: 13px;
    color: #78350f;
    margin: 0;
}

.voucher-banner-btn {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

    .voucher-banner-btn:hover {
        background: #d97706;
        transform: translateY(-1px);
    }*/

/* ========================================
   CART CONTENT - Scrollable middle section
======================================== */
/*.cart-content {*/
    /* This is the key container */
    /*flex: 1 1 auto;
    min-height: 0;*/ /* CRITICAL for flex scrolling */

    /*display: flex;
    flex-direction: column;
    overflow: hidden;*/ /* Prevent this from scrolling */
/*}*/

/* ========================================
   CART ITEMS - THE SCROLLABLE AREA ✅
======================================== */
/*.cart-items {*/
    /* THIS SCROLLS - everything else is fixed */
    /*flex: 1 1 auto;
    min-height: 0;*/ /* CRITICAL */

    /*overflow-y: auto;
    overflow-x: hidden;*/
    /* THE FIX: Use flexbox with gap */
    /*display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding: 20px;
    background: #f8fafc;
}*/

/* Smooth scrolling */
/*.cart-items {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}*/

    /* Custom scrollbar */
    /*.cart-items::-webkit-scrollbar {
        width: 8px;
    }

    .cart-items::-webkit-scrollbar-track {
        background: #e2e8f0;
    }

    .cart-items::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

        .cart-items::-webkit-scrollbar-thumb:hover {
            background: #94a3b8;
        }*/

/* ========================================
   EMPTY CART STATE
======================================== */
/*.empty-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.6;
}

    .empty-cart::before {
        content: "🛒";
        font-size: 64px;
        display: block;
        margin-bottom: 16px;
        opacity: 0.5;
    }*/

/* ========================================
   CART ITEM CARD - NO OVERLAP ✅
======================================== */
/*.cart-item-card {*/
    /* Remove ALL margins - gap handles spacing */
    /*margin: 0 !important;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;*/
    /* Prevent overlap */
    /*isolation: isolate;
    position: relative;
    width: 100%;
}

    .cart-item-card:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
    }*/

/* ========================================
   CART ITEM STRUCTURE
======================================== */
/*.cart-item-main {
    margin-bottom: 12px;
}

.cart-item-header {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.cart-item-qty {
    background: #3b82f6;
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
    line-height: 1;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}*/

/* ========================================
   DISCOUNT BADGE
======================================== */
/*.cart-item-discount {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #fbbf24;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 13px;
}

.discount-icon {
    font-size: 16px;
}

.discount-label {
    flex: 1;
    color: #92400e;
    font-weight: 600;
}

.discount-amount {
    color: #dc2626;
    font-weight: 700;
}*/

/* ========================================
   CART ITEM ACTIONS
======================================== */
/*.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
}*/

/* ========================================
   QUANTITY CONTROLS
======================================== */
/*.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 6px;
}

.cart-qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

    .cart-qty-btn:hover {
        background: #e2e8f0;
        border-color: #cbd5e1;
    }

    .cart-qty-btn:active {
        transform: scale(0.95);
    }

.cart-qty-display {
    min-width: 32px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}*/

/* ========================================
   ACTION BUTTONS
======================================== */
/*.cart-action-buttons {
    display: flex;
    gap: 8px;
}

.cart-action-btn {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid;
    background: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.cart-remove-btn {
    border-color: #fca5a5;
    color: #dc2626;
}

    .cart-remove-btn:hover {
        background: #fee2e2;
        border-color: #f87171;
    }*/

/* ========================================
   CART SUMMARY - Fixed at bottom ✅
======================================== */
/*.cart-summary {*/
    /* Fixed section - never scrolls */
    /*flex: 0 0 auto;
    border-top: 3px solid #e2e8f0;
    padding: 20px;
    background: white;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

.cart-total {
    margin-bottom: 20px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 15px;
}

.cart-total-label {
    color: #64748b;
    font-weight: 500;
}

.cart-total-amount {
    font-weight: 700;
    color: #1e293b;
}

.cart-total-row.subtotal {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 10px;
    font-size: 16px;
}

.cart-total-row.final-total {
    border-top: 2px solid #e2e8f0;
    padding-top: 14px;
    margin-top: 10px;
    font-size: 20px;
}

    .cart-total-row.final-total .cart-total-label {
        font-size: 20px;
        color: #1e293b;
        font-weight: 700;
    }

    .cart-total-row.final-total .cart-total-amount {
        font-size: 26px;
        color: #2563eb;
        font-weight: 800;
    }*/

/* ========================================
   DISCOUNT ROWS
======================================== */
/*.discount-amount-row {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    margin: 10px -10px;
    padding: 10px !important;
    border-radius: 10px;
    border: 2px solid #fca5a5;
}

    .discount-amount-row .cart-total-label {
        color: #991b1b;
        font-weight: 700;
    }

    .discount-amount-row .discount-amount {
        color: #dc2626;
        font-size: 17px;
        font-weight: 800;
    }

.voucher-discount-row {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    margin: 10px -10px;
    padding: 10px !important;
    border-radius: 10px;
    border: 2px solid #fbbf24;
}*/

/* ========================================
   CHECKOUT ACTIONS
======================================== */
/*.checkout-actions {
    display: flex;
    gap: 12px;
}

.empty-cart-btn {
    flex: 1;
    padding: 14px;
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

    .empty-cart-btn:hover {
        background: #fee2e2;
        transform: translateY(-1px);
    }

.checkout-btn {
    flex: 2;
    padding: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

    .checkout-btn:hover {
        background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    }

    .checkout-btn:active {
        transform: translateY(0);
    }*/

/* ========================================
   MODAL OVERLAY
======================================== */
/*.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

    .cart-modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }*/

/* ========================================
   HIDE BOTTOM NAV
======================================== */
/*body:has(.cart-modal.active) .bottom-nav {
    display: none !important;
}*/

/* ========================================
   MOBILE RESPONSIVE
======================================== */
/*@media (max-width: 767px) {
    .cart-modal {
        width: 100%;
    }

    .cart-header {
        padding: 16px;
    }

        .cart-header h2 {
            font-size: 20px;
        }

    .voucher-banner {
        padding: 12px 16px;
    }

    .cart-items {
        padding: 16px;
        gap: 14px !important;
    }

    .cart-item-card {
        padding: 14px;
    }

    .cart-summary {
        padding: 16px;
    }

    .cart-total-row {
        font-size: 14px;
        padding: 8px 0;
    }

        .cart-total-row.final-total {
            font-size: 18px;
        }

            .cart-total-row.final-total .cart-total-amount {
                font-size: 22px;
            }

    .checkout-actions {
        flex-direction: column;
        gap: 10px;
    }

    .empty-cart-btn,
    .checkout-btn {
        width: 100%;
    }

    .cart-qty-btn {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .cart-items {
        padding: 12px;
        gap: 12px !important;
    }

    .cart-item-card {
        padding: 12px;
    }

    .cart-qty-btn {
        width: 28px;
        height: 28px;
    }
}*/

/* ========================================
   Z-INDEX MANAGEMENT
======================================== */
/*.cart-modal-overlay {
    z-index: 1000;
}

.cart-modal {
    z-index: 1001;
}

.fullscreen-vouchers-modal {
    z-index: 1002;
}*/

/* ========================================
   ACCESSIBILITY
======================================== */
/*@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

button:focus-visible,
input:focus-visible {
    outline: 3px solid #3b82f6;
    outline-offset: 2px;
}*/
