/* ==========================================================================
   assets/css/cart.css - Dedicated Cart Page Styles (Mobile & Desktop)
   Naseer Foods Multi-Branch Food System
   ========================================================================== */

/* Page Background & Wrapper */
.cart-screen-wrapper {
    background: radial-gradient(circle at 12% 10%, rgba(255, 235, 235, 0.85) 0%, transparent 45%),
                radial-gradient(circle at 88% 18%, rgba(254, 243, 199, 0.65) 0%, transparent 40%),
                radial-gradient(circle at 50% 60%, rgba(255, 241, 242, 0.75) 0%, transparent 50%),
                radial-gradient(circle at 82% 90%, rgba(254, 226, 226, 0.7) 0%, transparent 45%),
                #F8FAFC;
    min-height: 100vh;
    padding: 20px 0 120px 0;
    font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
}

/* Mobile: hide desktop navbar & footer so it behaves like native mobile app */
@media (max-width: 991px) {
    .announcement-bar,
    .navbar-wrapper,
    header.navbar-wrapper,
    .nav-actions,
    .nav-cart-btn,
    .cart-badge-count,
    .mobile-bottom-nav,
    .main-footer,
    body:has(.cart-screen-wrapper) .announcement-bar,
    body:has(.cart-screen-wrapper) .navbar-wrapper,
    body:has(.cart-screen-wrapper) .main-footer {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .cart-screen-wrapper {
        padding: 10px 0 130px 0 !important;
    }

    .cart-screen-container {
        max-width: 580px;
        margin: 0 auto;
        padding: 0 12px;
    }

    .cart-desktop-breadcrumb {
        display: none !important;
    }

    .cart-layout-grid {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .cart-main-col, .cart-sidebar-col {
        display: contents;
    }

    .cart-items-card { 
        order: 1;
        padding: 10px 14px !important;
        border-radius: 18px !important;
    }
    .cart-coupon-promo-card { order: 2; }
    .cart-bill-details-card { order: 3; }
    .cart-suggestions-section { order: 4; }

    .cart-desk-checkout-btn-box {
        display: none !important;
    }

    .cart-sticky-checkout-bar {
        display: block !important;
    }

    /* Mobile item row layout - No overflow, perfect fit */
    .cart-item-row {
        display: grid !important;
        grid-template-columns: 66px 1fr auto !important;
        gap: 10px !important;
        align-items: center !important;
        padding: 12px 0 !important;
    }

    .cart-item-thumb {
        width: 66px !important;
        height: 66px !important;
        min-width: 66px !important;
        border-radius: 12px !important;
    }

    .cart-item-content {
        min-width: 0 !important;
        overflow: hidden !important;
    }

    .cart-item-title-row {
        gap: 5px !important;
        margin-bottom: 2px !important;
    }

    .cart-item-title {
        font-size: 0.92rem !important;
        line-height: 1.25 !important;
        white-space: normal !important;
    }

    .cart-item-portion {
        font-size: 0.7rem !important;
        margin: 1px 0 3px 0 !important;
    }

    .cart-item-tag-pill {
        font-size: 0.62rem !important;
        padding: 1px 6px !important;
        margin-bottom: 3px !important;
    }

    .cart-item-price {
        font-size: 0.98rem !important;
        font-weight: 800 !important;
    }

    .cart-item-actions {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        flex-shrink: 0 !important;
    }

    .cart-qty-pill {
        padding: 3px 6px !important;
        gap: 6px !important;
    }

    .qty-minus-btn, .qty-plus-btn {
        font-size: 0.88rem !important;
        padding: 0 3px !important;
    }

    .qty-number {
        font-size: 0.82rem !important;
        min-width: 14px !important;
    }

    .btn-trash-icon {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        font-size: 0.82rem !important;
    }
}

/* Desktop: spacious 2-column layout & full navigation */
@media (min-width: 992px) {
    .cart-screen-wrapper {
        padding: 0 0 60px 0;
    }

    .cart-screen-container {
        max-width: 1240px;
        margin: 0 auto;
        padding: 0 20px;
    }

    .cart-app-header {
        display: none !important;
    }

    .cart-desktop-breadcrumb {
        display: block !important;
    }

    .cart-layout-grid {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 32px;
        align-items: start;
    }

    .cart-sidebar-col {
        position: sticky;
        top: 96px;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .cart-sticky-checkout-bar {
        display: none !important;
    }

    .cart-desk-checkout-btn-box {
        display: block !important;
        margin-top: 18px;
    }

    .suggestions-slider {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
        overflow-x: visible !important;
    }

    .suggestion-card {
        min-width: 0 !important;
        width: 100% !important;
    }
}

/* Desktop Breadcrumb Header - Compact Height */
.cart-desktop-breadcrumb {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    padding: 14px 0 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 18px;
}

.cd-breadcrumb-links {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #94A3B8;
    margin-bottom: 4px;
}

.cd-breadcrumb-links a {
    color: #CBD5E1;
    text-decoration: none;
    transition: color 0.2s;
}

.cd-breadcrumb-links a:hover {
    color: #FF1E38;
}

.cd-breadcrumb-links i {
    font-size: 0.65rem;
    color: #64748B;
}

.cd-breadcrumb-links .active {
    color: #F8FAFC;
    font-weight: 700;
}

.cd-header-headline h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #FFFFFF;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.cd-header-headline p {
    font-size: 0.8rem;
    color: #94A3B8;
    margin: 0;
    line-height: 1.2;
}

/* 1. Mobile App Bar Header */
.cart-app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.cart-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-back-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F172A;
    box-shadow: 0 6px 18px -3px rgba(15, 23, 42, 0.06);
    text-decoration: none;
    font-size: 0.95rem;
    transition: transform 0.2s, background 0.2s;
}

.btn-back-circle:hover {
    color: #E50914;
    background: #FFFFFF;
}

.cart-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-title-row h1 {
    font-size: 1.3rem;
    font-weight: 900;
    color: #0F172A;
    margin: 0;
}

.cart-count-pill {
    background: rgba(255, 241, 242, 0.9);
    border: 1px solid rgba(255, 228, 230, 0.95);
    color: #E50914;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2.5px 9px;
    border-radius: 99px;
}

.cart-from-sub {
    font-size: 0.74rem;
    color: #64748B;
    margin-top: 1px;
    display: block;
    font-weight: 500;
}

.btn-clear-cart-red {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(254, 226, 226, 0.85);
    color: #EF4444;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-clear-cart-red:hover {
    background: #FEF2F2;
    border-color: #EF4444;
}

/* 2. Cart Items Card */
.cart-items-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
    padding: 8px 18px;
    margin-bottom: 20px;
}

.cart-item-row {
    display: grid;
    grid-template-columns: 78px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(241, 245, 249, 0.9);
}

.cart-item-row:last-child {
    border-bottom: none;
}

.cart-item-thumb {
    width: 78px;
    height: 78px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
    background: #F8FAFC;
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-content {
    display: flex;
    flex-direction: column;
}

.cart-item-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.diet-icon-box {
    width: 14px;
    height: 14px;
    min-width: 14px;
    min-height: 14px;
    border: 1.5px solid;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
    background: #FFFFFF;
}

.diet-icon-box.nonveg-red {
    border-color: #E50914;
}

.diet-icon-box.nonveg-red .diet-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    background: #E50914;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.diet-icon-box.veg-green {
    border-color: #16A34A;
}

.diet-icon-box.veg-green .diet-dot {
    width: 6px;
    height: 6px;
    min-width: 6px;
    min-height: 6px;
    background: #16A34A;
    border-radius: 50%;
    display: block;
    flex-shrink: 0;
}

.cart-item-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.cart-item-portion {
    font-size: 0.75rem;
    color: #64748B;
    margin: 2px 0;
    font-weight: 500;
}

.cart-item-tag-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 4px;
}

.cart-item-tag-pill.tag-red {
    background: #FEF2F2;
    color: #E50914;
    border: 1px solid #FEE2E2;
}

.cart-item-tag-pill.tag-orange {
    background: #FFFBEB;
    color: #D97706;
    border: 1px solid #FEF3C7;
}

.cart-item-tag-pill.tag-pink {
    background: #FDF2F8;
    color: #DB2777;
    border: 1px solid #FCE7F3;
}

.cart-item-price {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0F172A;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-qty-pill {
    display: flex;
    align-items: center;
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    border-radius: 99px;
    padding: 5px 10px;
    gap: 8px;
}

.qty-minus-btn, .qty-plus-btn {
    background: none;
    border: none;
    color: #E50914;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.qty-number {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0F172A;
    min-width: 16px;
    text-align: center;
}

.btn-trash-icon {
    background: #F1F5F9;
    border: none;
    color: #94A3B8;
    font-size: 0.95rem;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-trash-icon:hover {
    background: #FEE2E2;
    color: #EF4444;
}

/* 3. Apply Coupon Promo Card */
.cart-coupon-promo-card {
    background: #FFFFFF;
    border: 1.5px solid #F1F5F9;
    border-radius: 18px;
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.cart-coupon-promo-card:hover {
    border-color: #E50914;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(229, 9, 20, 0.08);
}

.coupon-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coupon-icon-red {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FF3B56 0%, #E50914 100%);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.coupon-text-box h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.coupon-text-box p {
    font-size: 0.76rem;
    color: #64748B;
    margin: 2px 0 0 0;
}

.coupon-card-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-pink-ticket {
    background: #FEF2F2;
    color: #E50914;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.78rem;
}

.chevron-arrow {
    color: #94A3B8;
    font-size: 0.85rem;
}

/* 4. Bill Details Card */
.cart-bill-details-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.04);
    margin-bottom: 20px;
}

.bill-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.bill-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bill-header-title h3 {
    font-size: 1.08rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.btn-save-more-pill {
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    color: #92400E;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    cursor: pointer;
}

.bill-lines-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bill-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.bill-label {
    color: #64748B;
    font-weight: 500;
}

.bill-value {
    color: #0F172A;
    font-weight: 700;
}

.strikethrough-fee {
    text-decoration: line-through;
    color: #94A3B8;
    margin-right: 6px;
    font-size: 0.82rem;
}

.bill-divider-dashed {
    height: 1px;
    border-top: 1.5px dashed #E2E8F0;
    margin: 16px 0;
}

.bill-grand-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.grand-label {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0F172A;
}

.grand-value {
    font-size: 1.45rem;
    font-weight: 900;
    color: #E50914;
}

.bill-savings-banner {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #065F46;
    font-size: 0.82rem;
    font-weight: 600;
}

.savings-badge-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10B981;
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.74rem;
    font-weight: 800;
}

/* Desktop Checkout CTA in sidebar */
.btn-desk-checkout-cta {
    width: 100%;
    background: #E50914;
    color: #FFFFFF;
    border: none;
    padding: 15px 24px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.28);
    transition: background 0.2s, transform 0.2s;
}

.btn-desk-checkout-cta:hover {
    background: #B91C1C;
    transform: translateY(-2px);
}

.cart-guarantee-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.76rem;
    color: #64748B;
    margin-top: 10px;
    text-align: center;
}

/* 5. You May Also Like Section */
.cart-suggestions-section {
    margin-top: 24px;
}

.suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.suggestions-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.suggestions-title h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0;
}

.suggestions-see-all {
    font-size: 0.82rem;
    color: #E50914;
    text-decoration: none;
    font-weight: 700;
}

.suggestions-slider {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.suggestion-card {
    min-width: 160px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
    transition: transform 0.2s;
}

.suggestion-card:hover {
    transform: translateY(-2px);
}

.suggestion-img-box {
    width: 100%;
    height: 110px;
    background: #F1F5F9;
}

.suggestion-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-info {
    padding: 10px 12px;
}

.suggestion-info h5 {
    font-size: 0.86rem;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sugg-price {
    font-size: 0.95rem;
    font-weight: 900;
    color: #E50914;
}

.btn-sugg-add {
    background: #FEF2F2;
    border: 1px solid #FEE2E2;
    color: #E50914;
    font-size: 0.74rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sugg-add:hover {
    background: #E50914;
    color: #FFF;
}

/* 6. Sticky Bottom Checkout Bar (Mobile) */
.cart-sticky-checkout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid #E2E8F0;
    padding: 12px 18px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 999;
}

.sticky-bar-container {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sticky-price-box {
    display: flex;
    flex-direction: column;
}

.sticky-total-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0F172A;
}

.sticky-items-sub {
    font-size: 0.75rem;
    color: #64748B;
}

.btn-proceed-checkout-red {
    background: #E50914;
    color: #FFFFFF;
    border: none;
    padding: 13px 24px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.3);
}
