/* ══════════════════════════════════════════════════════
   DESIGN TOKENS — Standalone decoupled tokens
══════════════════════════════════════════════════════ */
:root {
    --brand-yellow: #F8CB46;
    --brand-yellow2: #fde047;
    --brand-green: #0C831F;
    --brand-green-lt: #f0fdf4;
    --brand-dark: #0f172a;
    --brand-gray: #475569;
    --brand-muted: #94a3b8;
    --brand-border: #e2e8f0;
    --brand-bg: #f8fafc;
    --app-max: 1400px;
    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 8px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-float: 0 12px 32px rgba(12, 131, 31, 0.28), 0 4px 8px rgba(12, 131, 31, 0.15);
    --ease: cubic-bezier(0.25, 1, 0.5, 1);
    --spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --text-primary: #111827;
    --text-secondary: #6b7280;
}

/* ── RESET ───────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--brand-bg);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    color: var(--brand-dark);
    overflow-x: hidden;
}

@media (max-width: 767px) {
    ::-webkit-scrollbar {
        display: none;
    }
    * {
        scrollbar-width: none;
    }
}

@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    ::-webkit-scrollbar-track {
        background: transparent;
    }
    ::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }
    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }
}

.app-container {
    width: 100%;
    max-width: var(--app-max);
    background: #fff;
    min-height: 100svh;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.04);
    overflow-x: hidden;
}

/* ── APP HEADER (Print Builder Style) ────────────────── */
.app-header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid var(--brand-border);
}

.app-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border-bottom-color: transparent;
}

.site-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    -webkit-backface-visibility: hidden;
    will-change: transform;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.site-logo:active {
    opacity: 0.72;
    transform: scale(0.95);
}

/* Desktop header wrap */
.desktop-header-wrap {
    display: none;
    align-items: center;
    gap: 20px;
    padding: 12px 32px;
    width: 100%;
}

/* Page title bar under desktop logo row */
.desktop-page-header {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 8px 32px 10px;
    background: var(--brand-bg);
    border-top: 1px solid var(--brand-border);
}

.desktop-page-header h1 {
    font-size: 0.98rem;
    font-weight: 900;
    margin: 0;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Mobile Blinkit-style header */
.mobile-blinkit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 14px 4px;
    background: linear-gradient(180deg, #fde047 0%, #fff 100%);
}

.blinkit-loc-block {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.blinkit-brand-sub {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin-bottom: -2px;
}

.blinkit-eta-main {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.blinkit-loc-sub {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* Mobile page title bar */
.page-title-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 10px;
    background: var(--brand-bg);
}

.page-title-bar h1 {
    font-size: 0.98rem;
    font-weight: 900;
    margin: 0;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 768px) {
    .desktop-header-wrap, .desktop-page-header {
        display: flex;
    }
}

/* Common Header UI Components */
.back-btn {
    background: #f1f5f9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: var(--brand-dark);
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.14s, transform 0.14s;
}

.back-btn:active, .back-btn:hover {
    background: #e2e8f0;
    transform: scale(0.9);
}

.profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: transform 0.15s;
}

.profile-btn:active {
    transform: scale(0.92);
}

.profile-btn img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--brand-border);
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.profile-btn i {
    font-size: 0.75rem;
    color: var(--brand-muted);
    pointer-events: none;
}

.dropdown-menu.profile-menu {
    border: 1px solid var(--brand-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13) !important;
    padding: 6px !important;
    min-width: 192px;
}

.profile-menu .dropdown-header {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--brand-dark);
    padding: 4px 10px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-menu .dropdown-header small {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--brand-muted);
    margin-top: 1px;
}

.profile-menu .dropdown-item {
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.84rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-dark);
    transition: background 0.14s;
    text-decoration: none;
}

.profile-menu .dropdown-item:hover {
    background: var(--brand-bg);
}

.profile-menu .dropdown-item i {
    font-size: 1.05rem;
    flex-shrink: 0;
}

.profile-menu .dropdown-item.text-danger {
    color: #ef4444 !important;
}

.profile-menu .dropdown-item.text-success {
    color: var(--brand-green) !important;
}

.profile-menu .dropdown-item.close-item {
    color: var(--brand-muted) !important;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

/* ── ANIMATIONS & UTILS ──────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease-out both; }

@keyframes shimmer {
    to { background-position: -200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e9edf2 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}

/* ── MAIN CONTENT ────────────────────────────────────── */
.app-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 0 30px;
}

/* ── BOTTOM NAVIGATION ───────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max);
    background: #fff;
    border-top: 1px solid var(--brand-border);
    display: flex;
    justify-content: space-around;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
    z-index: 1040;
}
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--brand-muted);
    text-decoration: none;
    font-size: 0.58rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.18s;
    width: 58px;
    overflow: hidden;
}
.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nav-item i {
    font-size: 1.38rem;
    transition: transform 0.18s var(--spring);
}
.nav-item.active {
    color: var(--brand-green);
}
.nav-item.active i {
    transform: scale(1.12);
}
.nav-item:active i {
    transform: scale(0.82);
}

/* ── CART PAGE STYLES ────────────────────────────────── */

/* ── COMPACT ITEM LAYOUT (Blinkit Style) ── */
.cart-item-price-row {
    display: flex;
    align-items: flex-end; /* Locks the + / - buttons to the bottom of the text stack */
    justify-content: space-between;
    margin-top: 2px;
    gap: 12px;
}
.price-stack {
    display: flex;
    flex-direction: column;
    gap: 1px; /* Ultra-tight gap to save vertical space */
}
.cart-item-price {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}
.cart-item-orig-price {
    text-decoration: line-through;
    font-size: 0.72rem;
    color: var(--brand-muted);
    line-height: 1;
}
.cart-ps-per-copy {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1;
}

/* ── Right-aligned Action Area ── */
.action-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.cart-item-subtotal-calc {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1;
    text-align: right;
    white-space: nowrap;
}
.cart-item-subtotal-calc span {
    font-weight: 800;
    color: var(--brand-green);
    font-size: 0.86rem;
}

/* ── Interactive Quantity Controls ── */
.cart-qty-ctrl {
    display: inline-flex;
    align-items: center;
    background: #f0fdf4; 
    border: 1px solid #16a34a; 
    border-radius: 8px;
    overflow: hidden;
    height: 32px; 
    box-shadow: 0 1px 2px rgba(22, 163, 74, 0.08);
}
.cart-qty-ctrl button {
    background: none;
    border: none;
    color: #16a34a;
    font-size: 0.95rem;
    font-weight: 800;
    width: 32px; 
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* Springy feel for taps */
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s;
}
.cart-qty-ctrl button:active { 
    transform: scale(0.85); 
    background: #dcfce7;
}
.cart-qty-ctrl button:disabled { 
    opacity: 0.45; 
    cursor: not-allowed; 
    transform: none;
}
.cart-qty-ctrl .qty-val {
    color: #15803d;
    font-size: 0.86rem;
    font-weight: 800;
    min-width: 26px;
    text-align: center;
    user-select: none;
}

.cart-page-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 10px 0 10px;
}

.cart-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    padding: 14px 16px 6px;
}

.cart-item-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 12px 12px 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    position: relative;
}
.cart-item-img {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
}
.cart-item-img-placeholder {
    width: 68px;
    height: 68px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1.6rem;
}
.cart-item-info {
    flex: 1;
    min-width: 0;
    position: relative; /* Added to constrain text */
}
.cart-item-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 1px;
}
.cart-item-meta {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cart-del-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.1rem;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    border-radius: 6px;
    opacity: 0.7;
    transition: opacity 0.15s;
    z-index: 10;
}
.cart-del-btn:hover { opacity: 1; }

/* Add this to prevent printset text from overlapping the red cross */
.cart-ps-title {
    flex: 1;
    min-width: 0;
    position: relative;
    padding-right: 22px; 
}

.cart-ps-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    position: relative;
}
.cart-ps-header {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.cart-ps-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-green);
    font-size: 1.35rem;
    flex-shrink: 0;
}
.cart-ps-title {
    flex: 1;
    min-width: 0;
}
.cart-ps-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-ps-id {
    font-size: 0.7rem;
    color: var(--text-secondary);
}
.cart-ps-config {
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px 10px;
    margin-bottom: 8px;
    font-size: 0.76rem;
    color: var(--text-secondary);
    width: fit-content;
    display: flex; /* Kept as flex so items wrap if needed on tiny screens */
    flex-wrap: wrap;
    gap: 4px 12px;
}
/* On mobile */
@media (max-width: 480px) {
    .cart-ps-config {
        width: auto;
    }
}
.cart-ps-config span { display: flex; align-items: center; gap: 4px; }
.cart-ps-config i   { font-size: 0.9rem; color: var(--brand-green); }
/* ── Horizontal Scrollable Addons ── */
.cart-ps-addons-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    margin-left: -4px; /* Align visual edge */
    margin-right: -4px;
}
.cart-ps-addons {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox hide scrollbar */
    -ms-overflow-style: none; /* IE hide scrollbar */
    padding: 0 4px;
    flex: 1;
}
.cart-ps-addons::-webkit-scrollbar {
    display: none; /* Chrome/Safari hide scrollbar */
}
.cart-ps-addon-chip {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 2px 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0; /* Critical: Prevents the chips from squishing together */
    white-space: nowrap; /* Keeps text on one line */
}

/* ── Fading Scroll Arrows ── */
.addon-scroll-btn {
    border: none;
    color: var(--text-secondary, #6b7280);
    font-size: 1rem;
    cursor: pointer;
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.addon-scroll-btn:active { color: var(--text-primary); }
.addon-scroll-btn.left {
    left: 0;
    /* Soft white fade gradient so chips disappear smoothly underneath */
    background: linear-gradient(to right, rgba(255,255,255,1) 60%, rgba(255,255,255,0));
    padding-right: 12px;
}
.addon-scroll-btn.right {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 60%, rgba(255,255,255,0));
    padding-left: 12px;
}

.cart-ps-addon-changed {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.74rem;
    color: #92400e;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
}

/* ── Premium Free Delivery Banner (GIF Layout) ── */
.free-del-banner {
    margin: 0 12px 10px;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.free-del-banner.achieved {
    background: #f0fdf4; /* Soft green when unlocked */
    border-color: #bbf7d0;
}

.free-del-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* The Strict Clipping Window */
.free-del-gif-wrap {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden; /* This hides the edges of the scaled image */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The Zoomed Image */
.free-del-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Adjust this number! 1.0 is normal. 1.4 is zoomed in 40% */
    transform: scale(1.2); 
    transform-origin: center center;
}

.free-del-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.free-del-title {
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.2;
}

.free-del-title strong {
    font-weight: 800;
    color: var(--brand-green);
}

.free-del-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.free-del-banner.achieved .free-del-subtitle {
    color: #166534; /* Darker green for saved text */
    font-weight: 600;
}

.free-del-bar-track {
    background: #e2e8f0;
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
    width: 100%;
}

.free-del-banner.achieved .free-del-bar-track {
    background: #dcfce7; /* Lighter green track when full */
}

.free-del-bar-fill {
    background: var(--brand-green);
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.bill-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.bill-card-title {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.bill-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.86rem;
    color: var(--text-primary);
    padding: 4px 0;
}
.bill-row.free-del { color: var(--brand-green); font-weight: 600; }
.bill-row.saving   { color: var(--brand-green); font-size: 0.8rem; }
.bill-divider {
    border: none;
    border-top: 1.5px dashed var(--brand-green);
    margin: 8px 0;
}
.bill-row.total {
    font-size: 1rem;
    font-weight: 800;
}

.delivery-addr-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex;
    gap: 10px;
    align-items: center;
}
.delivery-addr-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f0fdf4;
    color: var(--brand-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.delivery-addr-info { flex: 1; min-width: 0; }
.delivery-addr-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--brand-green);
    letter-spacing: 0.03em;
}
.delivery-addr-line {
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.delivery-addr-eta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

/* Add this new rule */
.delivery-addr-eta.out-zone {
    color: #ef4444; /* Red color */
    font-weight: 700;
}

.delivery-addr-change {
    background: none;
    border: 1.5px solid var(--brand-green);
    color: var(--brand-green);
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 11px;
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}
.delivery-addr-change:active {
    background: var(--brand-green);
    color: #fff;
}
.delivery-addr-guest {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 12px 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    font-size: 0.84rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 14px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 4px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.12s;
}
.payment-option:not(.disabled):active { background: #f8fafc; }
.payment-option.disabled { cursor: not-allowed; opacity: 0.55; }
.payment-option + .payment-option {
    border-top: 1px solid #f1f5f9;
}
.payment-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s;
}
.payment-radio.selected {
    border-color: var(--brand-green);
}
.payment-radio.selected::after {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-green);
}
.payment-option-info { flex: 1; min-width: 0; }
.payment-option-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
}
.payment-option-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}
.payment-icons { display: flex; gap: 4px; align-items: center; }
.payment-icons img {
    height: 20px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}
.payment-coming-soon {
    background: #fef3c7;
    color: #92400e;
    font-size: 0.64rem;
    font-weight: 700;
    border-radius: 5px;
    padding: 2px 6px;
    letter-spacing: 0.03em;
}

/* ── PLACE ORDER BUTTON (Standard Flow & Green) ──────────────────────── */
.place-order-bar {
    /* Removed fixed positioning so it sits directly after the payment section */
    position: relative; 
    margin: 20px auto 30px;
    width: calc(100% - 24px);
    max-width: 656px;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.place-order-bar.visible {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}

.place-order-btn {
    width: 100%;
    background: var(--brand-green); /* Changed to green */
    color: #fff;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 800;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    /* Added deep green shadow to make it pop and not look flat */
    box-shadow: 0 8px 24px rgba(12, 131, 31, 0.28), 0 2px 8px rgba(12, 131, 31, 0.15);
    transition: transform 0.15s, box-shadow 0.15s;
}

.place-order-btn:active { 
    transform: scale(0.97); 
    box-shadow: 0 4px 12px rgba(12, 131, 31, 0.20);
}

/* ── Disabled Place Order Button (Out of Zone) ── */
.place-order-btn.disabled-zone {
    background: #ef4444; /* Red color for error state */
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.28), 0 2px 8px rgba(239, 68, 68, 0.15);
    cursor: not-allowed;
}
.place-order-btn.disabled-zone:active {
    transform: none; /* Remove click shrink effect so it feels locked */
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.28), 0 2px 8px rgba(239, 68, 68, 0.15);
}

.place-order-btn .pob-left  { display: flex; flex-direction: column; align-items: flex-start; }
.place-order-btn .pob-count { font-size: 0.72rem; font-weight: 600; opacity: 0.85; }
.place-order-btn .pob-total { font-size: 1rem; font-weight: 800; }
.place-order-btn .pob-right { display: flex; align-items: center; gap: 5px; font-size: 0.9rem; }

/* ── Premium Empty Cart State ── */
.cart-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px 40px; /* Reduced top padding to balance the image */
}
.empty-cart-img {
    width: 200px; /* Nice focal size for mobile */
    height: auto;
    object-fit: contain;
    margin-bottom: 24px;
    mix-blend-mode: multiply; /* Helps hide white backgrounds if it's a jpeg */
}
.cart-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}
.cart-empty-state p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ── Dual Button Layout (Compact & Side-by-Side) ── */
.empty-cart-actions {
    display: flex;
    flex-direction: row; /* Forces them side-by-side */
    gap: 10px; /* Tight gap */
    width: 100%;
    max-width: 340px; /* Slightly wider to fit two buttons */
    justify-content: center;
}
.empty-btn {
    flex: 1; /* Both buttons take exactly 50% of the space */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 10px; /* Tighter radius */
    padding: 10px 8px; /* Super compact padding */
    font-size: 0.82rem; /* Compact font size */
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
    white-space: nowrap; /* Prevents text from breaking into two lines */
    border: none;
}
.empty-btn:active {
    transform: scale(0.94);
}
.empty-btn.primary {
    background: var(--brand-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 131, 31, 0.2);
}
.empty-btn.primary:active {
    background: #15803d;
    box-shadow: 0 2px 6px rgba(12, 131, 31, 0.15);
}
/* Colorful Secondary Button using your Brand Yellow */
.empty-btn.secondary {
    background: var(--brand-yellow); 
    color: var(--brand-dark);
    box-shadow: 0 4px 12px rgba(248, 203, 70, 0.25);
}
.empty-btn.secondary:active {
    background: #eab308;
    box-shadow: 0 2px 6px rgba(248, 203, 70, 0.15);
}

.cart-skeleton-card {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 10px;
    padding: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex;
    gap: 12px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SWEETALERT 2 OVERRIDES (Location Picker & Toasts)
═══════════════════════════════════════════════════════════════════════════ */

/* ── LOCATION PICKER MODAL ───────────────────────────────────────── */
.swal2-popup.loc-picker-popup {
    border-radius: 24px !important;
    padding: 0 !important;
    overflow: hidden !important;
    max-width: 380px !important;
    width: 94vw !important;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.16), 0 10px 24px rgba(0, 0, 0, 0.06) !important;
    font-family: 'DM Sans', sans-serif !important;
}

div.loc-picker-html {
    margin: 0 !important;
    padding: 0 !important;
}

.loc-picker-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--brand-bg);
    border-bottom: 1px solid var(--brand-border);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--brand-dark);
    letter-spacing: -0.02em;
}

.loc-picker-list {
    max-height: 62vh;
    overflow-y: auto;
    padding: 0;
}

.loc-picker-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 15px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-bottom: 1px solid #f8fafc;
}

.loc-picker-item:last-child {
    border-bottom: none;
}

.loc-picker-item:active,
.loc-picker-item:hover {
    background: var(--brand-bg);
}

.loc-picker-item.active {
    background: var(--brand-green-lt);
}

.loc-picker-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: var(--brand-gray);
    transition: all 0.2s var(--ease);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.loc-picker-icon-wrap i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.loc-picker-item.active .loc-picker-icon-wrap {
    background: var(--brand-green);
    border-color: var(--brand-green);
    color: #fff;
    box-shadow: 0 4px 12px rgba(12, 131, 31, 0.25);
    transform: scale(1.05);
}

.loc-picker-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.loc-picker-text strong {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--brand-dark);
    display: block;
}

.loc-picker-text span {
    font-size: 0.78rem;
    color: var(--brand-gray);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.loc-picker-text .loc-picker-sub {
    font-size: 0.71rem;
    color: var(--brand-muted);
    font-weight: 400;
}

.loc-picker-check {
    font-size: 1.15rem;
    color: var(--brand-green);
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
    animation: popIn 0.3s var(--spring) both;
}

.loc-picker-manage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--brand-green);
    text-decoration: none;
    border-top: 1px solid var(--brand-border);
    transition: background 0.15s;
    background: #fff;
}

.loc-picker-manage:hover {
    background: var(--brand-green-lt);
}

.loc-picker-manage i {
    font-size: 1.1rem;
}

button.loc-picker-close-btn {
    color: var(--brand-muted) !important;
    font-size: 2.0rem !important;
    top: 14px !important;
    right: 14px !important;
    transition: color 0.15s, transform 0.15s !important;
}

button.loc-picker-close-btn:hover {
    color: var(--brand-dark) !important;
    transform: scale(1.1) !important;
}

button.loc-picker-close-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* ── COMPACT TOAST NOTIFICATIONS ─────────────────────────────────── */
div.qc-toast-popup {
    width: auto !important;
    min-height: auto !important;
    padding: 8px 16px 8px 12px !important;
    border-radius: 50px !important;
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    margin-bottom: 80px !important; /* Above bottom nav */
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

div.qc-toast-popup .swal2-icon {
    margin: 0 !important;
    font-size: 12px !important;
    width: 2em !important;
    height: 2em !important;
    min-width: 2em !important;
}

h2.qc-toast-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    font-family: inherit !important;
    letter-spacing: 0.01em !important;
}

/* ── MICRO-INTERACTIONS & ANIMATIONS ── */

/* Number Pop when +/- is pressed */
@keyframes qtyPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.35); color: #16a34a; }
    100% { transform: scale(1); }
}
.qty-pop {
    animation: qtyPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Green flash on the subtotal text */
@keyframes subtotalFlash {
    0% { background-color: transparent; }
    30% { background-color: rgba(22, 163, 74, 0.15); border-radius: 4px; }
    100% { background-color: transparent; }
}
.subtotal-flash {
    animation: subtotalFlash 0.5s ease-out;
}

/* Smooth shrink and fade when an item is deleted */
.card-removing {
    opacity: 0 !important;
    transform: scale(0.92) !important;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1) !important;
    pointer-events: none;
}
/* ── Visual Limits Feedback ── */
.cart-qty-ctrl button.capped {
    opacity: 0.45;
    color: var(--brand-muted, #94a3b8);
    cursor: not-allowed;
}
.cart-qty-ctrl button.capped:active {
    transform: none;
    background: none;
}
.cart-limit-msg {
    font-size: 0.65rem;
    color: #ef4444; 
    font-weight: 700;
    text-align: right;
    margin-top: -2px; 
}

/* ── PREMIUM REMOVE CONFIRMATION MODAL ── */
.swal2-popup.premium-rm-popup {
    border-radius: 24px !important;
    padding: 24px 20px 20px !important;
    width: 88vw !important;
    max-width: 340px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12) !important;
    font-family: 'DM Sans', sans-serif !important;
}

.premium-rm-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.premium-rm-modal .rm-icon {
    width: 52px;
    height: 52px;
    background: #fef2f2; 
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.premium-rm-modal h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 0 0 6px 0;
    letter-spacing: -0.01em;
}

.premium-rm-modal p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Side-by-side Button Layout */
.swal2-actions.premium-rm-actions {
    margin-top: 24px !important;
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
    justify-content: space-between !important;
}

.premium-rm-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, background 0.15s;
    font-family: inherit;
}

.premium-rm-btn:active {
    transform: scale(0.96);
}

.premium-rm-btn.cancel {
    background: #f1f5f9;
    color: var(--text-primary);
}

.premium-rm-btn.cancel:active {
    background: #e2e8f0;
}

.premium-rm-btn.confirm {
    background: #ef4444;
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.premium-rm-btn.confirm:active {
    background: #dc2626;
}
/* ── PREMIUM CHECKOUT MODAL (Mirrors Remove Item) ── */
.premium-chk-icon {
    width: 52px;
    height: 52px;
    background: var(--brand-green-lt);
    color: var(--brand-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 16px;
}

/* Identical to premium-rm-btn, but green */
.premium-chk-btn {
    flex: 1;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, background 0.15s;
    font-family: inherit;
}
.premium-chk-btn:active { transform: scale(0.96); }
.premium-chk-btn.cancel { background: #f1f5f9; color: var(--text-primary); }
.premium-chk-btn.cancel:active { background: #e2e8f0; }
.premium-chk-btn.confirm { background: var(--brand-green); color: #fff; box-shadow: 0 4px 12px rgba(12, 131, 31, 0.2); }
.premium-chk-btn.confirm:active { background: #15803d; }

/* A clean inner box for the address so it stays left-aligned while the modal is centered */
.chk-address-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    text-align: left;
    width: 100%;
    margin-top: 10px;
}