/* READMENU — core menu storefront styles.
 * Extracted from the inline <style> in menu/index.php so browsers can cache it.
 * Per-shop values (--theme-color, --theme-ink) stay inline in the page :root.
 * Do not add PHP here — this file is served as a static asset.
 */
        /* Dark mode CSS variable overrides */
        .dark-mode {
            --ui-border: #2a2a40;
            --ui-surface: #1a1a2e;
            --ui-surface-muted: #22223a;
            --ui-text-soft: #9ca3af;
            --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
            --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
            --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
            --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
        }

        /* Clean UI baseline + accessibility */
        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: 2px solid var(--theme-color);
            outline-offset: 2px;
        }

        .cart-field-label {
            display: block;
            margin-top: 10px;
            margin-bottom: 6px;
            font-size: 12px;
            font-weight: 700;
            color: var(--ui-text-soft);
            letter-spacing: 0.2px;
            text-transform: uppercase;
        }

        .cart-customer-form input,
        .cart-customer-form select,
        .cart-customer-form textarea,
        .coupon-input-row input {
            width: 100%;
            min-height: 44px;
            border: 1.5px solid var(--ui-border);
            border-radius: var(--ui-radius-sm);
            background: var(--ui-surface);
            color: var(--text, #222);
            padding: 11px 14px;
            font-size: 14px;
            transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
        }

        .cart-customer-form input::placeholder,
        .cart-customer-form textarea::placeholder,
        .coupon-input-row input::placeholder {
            color: #9aa1ad;
        }

        .cart-customer-form input:focus,
        .cart-customer-form select:focus,
        .cart-customer-form textarea:focus,
        .coupon-input-row input:focus {
            border-color: var(--theme-color);
            box-shadow: 0 0 0 3px var(--theme-light);
        }

        .cart-order-type {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 4px;
        }

        .order-type-option {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-height: 44px;
            border: 1.5px solid var(--ui-border);
            border-radius: var(--ui-radius-sm);
            background: var(--ui-surface-muted);
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            cursor: pointer;
            user-select: none;
            transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .order-type-option:hover {
            border-color: var(--theme-color);
            color: var(--theme-color);
            background: color-mix(in srgb, var(--theme-color) 5%, white);
        }

        .order-type-option input {
            accent-color: var(--theme-color);
        }

        .order-type-option.selected {
            border-color: var(--theme-color, #4361ee);
            color: var(--theme-color, #4361ee);
            background: color-mix(in srgb, var(--theme-color, #4361ee) 8%, white);
            box-shadow: 0 0 0 1px var(--theme-color, #4361ee);
        }

        .dark-mode .order-type-option.selected {
            background: color-mix(in srgb, var(--theme-color, #4361ee) 15%, #1a1a2e);
            color: var(--theme-color, #6b8aff);
        }

        .btn-checkout,
        .btn-clear-cart {
            min-height: 48px;
            font-weight: 700;
            border-radius: 14px;
            letter-spacing: 0.2px;
            transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .btn-checkout:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 20px color-mix(in srgb, var(--theme-color) 30%, transparent);
        }

        .dark-mode .cart-customer-form input,
        .dark-mode .cart-customer-form select,
        .dark-mode .cart-customer-form textarea,
        .dark-mode .coupon-input-row input {
            background: #222638;
            border-color: #3b4058;
            color: #e7e9f3;
        }

        .dark-mode .cart-field-label {
            color: #b8bfd3;
        }

        .dark-mode .order-type-option {
            background: #23283b;
            border-color: #3b4058;
            color: #d6daea;
        }

        /* Motion system (clean + subtle) */
        @keyframes uiFadeUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes uiPopIn {
            from { opacity: 0; transform: scale(0.96); }
            to { opacity: 1; transform: scale(1); }
        }

        .menu-header-content {
            animation: uiFadeUp .5s ease both;
        }

        .product-card {
            animation: uiFadeUp .35s ease both;
            transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
            will-change: transform;
        }

        .product-card:hover {
            transform: translateY(-3px);
        }

        .add-to-cart-btn,
        .btn-checkout,
        .btn-clear-cart,
        .btn-checkout-contact,
        .btn-checkout-track,
        .cart-item-remove {
            transition: transform .18s ease, box-shadow .2s ease, opacity .2s ease;
        }

        .add-to-cart-btn:hover,
        .btn-checkout:hover,
        .btn-clear-cart:hover,
        .btn-checkout-contact:hover,
        .btn-checkout-track:hover {
            transform: translateY(-1px);
        }

        .cart-drawer {
            transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease;
        }

        .product-modal-content,
        .voice-modal-content,
        .checkout-container {
            animation: uiPopIn .24s ease both;
        }

        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }
        /* Happy Hour badge on product card */
        .hh-badge { background: linear-gradient(135deg, #ff6b35, #f7931e) !important; }
        .hh-price { color: #ff6b35 !important; font-weight: 700; }
        /* Secondary currency (dual price display like RedBox - side by side) */
        .secondary-price { display: inline; font-size: 13px; color: #888; font-weight: 600; margin-left: 6px; letter-spacing: 0.2px; }
        .dark-mode .secondary-price { color: #aaa; }
        .price-old .secondary-price { font-size: 12px; color: inherit; margin-left: 4px; }
        /* Gallery count badge */
        .gallery-count { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.7); color: #fff; padding: 3px 8px; border-radius: 12px; font-size: 11px; display: flex; align-items: center; gap: 4px; }
        /* Auto-slideshow dot indicators on product card */
        .card-slide-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; padding: 4px 8px; background: rgba(0,0,0,0.45); border-radius: 999px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: none; z-index: 2; }
        .card-slide-dots span { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: width .3s ease, background .3s ease; }
        .card-slide-dots span.active { width: 14px; border-radius: 3px; background: #fff; }
        .product-image picture > img { transition: opacity .35s ease; }
        /* Fallback "no image" placeholder — works across ALL templates
           so when an image fails to load (404, broken URL, blocked CDN)
           the card still shows a clean visual instead of empty white space. */
        .no-image-placeholder {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
            color: #9ca3af;
            font-size: 38px;
            border-radius: inherit;
            z-index: 0;
        }
        .dark-mode .no-image-placeholder {
            background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
            color: #4b5563;
        }
        .product-image-placeholder { background: transparent; }
        /* PRICE BREAKDOWN under modal price (e.g. Small $2.75 + 10g Protein $0.80 = $3.55) */
        .modal-price-breakdown { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 10px; padding: 8px 10px; background: rgba(0,0,0,0.04); border-radius: 10px; font-size: 13px; line-height: 1.3; color: #555; }
        .dark-mode .modal-price-breakdown { background: rgba(255,255,255,0.06); color: #cfcfcf; }
        .modal-price-breakdown .bd-line { display: inline-flex; align-items: center; gap: 5px; }
        .modal-price-breakdown .bd-name { color: #777; }
        .dark-mode .modal-price-breakdown .bd-name { color: #aaa; }
        .modal-price-breakdown .bd-val { color: #333; font-weight: 600; }
        .dark-mode .modal-price-breakdown .bd-val { color: #f0f0f0; }
        .modal-price-breakdown .bd-plus, .modal-price-breakdown .bd-eq { font-weight: 700; color: #999; padding: 0 1px; }
        .modal-price-breakdown .bd-total .bd-name { color: #222; font-weight: 700; }
        .dark-mode .modal-price-breakdown .bd-total .bd-name { color: #fff; }
        .modal-price-breakdown .bd-total .bd-val { color: #c0392b; font-weight: 800; }
        /* Cart line breakdown */
        .cart-item-breakdown { font-size: 11px; color: var(--gray-400); margin: 3px 0; line-height: 1.4; }
        .cart-item-breakdown .bd-plus, .cart-item-breakdown .bd-eq { color: #999; font-weight: 700; padding: 0 2px; }
        .cart-item-breakdown strong { color: #c0392b; }
        /* Availability label */
        .availability-label { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #e67e22; background: #fef3e3; padding: 2px 8px; border-radius: 6px; margin-bottom: 4px; }
        /* Gallery in modal */
        .modal-gallery { position: relative; }
        .modal-gallery > img { width: 100%; height: 300px; object-fit: cover; display: block; }
        @media (min-width: 769px) {
            .modal-gallery { height: 100%; display: flex; flex-direction: column; }
            .modal-gallery > img { flex: 1; height: auto; min-height: 400px; object-fit: cover; }
        }
        @media (max-width: 768px) {
            .modal-gallery > img { height: 260px; }
        }
        @media (max-width: 480px) {
            .modal-gallery > img { height: 220px; }
        }
        .gallery-nav { position: absolute; top: 50%; transform: translateY(-60%); background: rgba(0,0,0,0.5); color: #fff; border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 2; font-size: 14px; transition: background 0.2s; }
        .gallery-nav:hover { background: rgba(0,0,0,0.8); }
        .gallery-prev { left: 8px; }
        .gallery-next { right: 8px; }
        .gallery-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; }
        .gallery-dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; transition: background 0.2s; }
        .gallery-dot.active { background: var(--theme-color); }
        .gallery-thumbs { display: flex; gap: 6px; padding: 4px 8px 8px; overflow-x: auto; }
        .gallery-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: 0.6; transition: all 0.2s; }
        .gallery-thumb.active { border-color: var(--theme-color); opacity: 1; }
        .gallery-thumb:hover { opacity: 1; }
        /* Share buttons */
        .share-btn { display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;color:#fff;font-size:14px;border:none;cursor:pointer;text-decoration:none;transition:transform .2s,opacity .2s; }
        .share-btn:hover { transform:scale(1.1);opacity:0.9; }

        /* Voice Search Button */
        .voice-search-btn {
            position: absolute;
            right: 10px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--gray-400);
            font-size: 18px;
            cursor: pointer;
            padding: 8px;
            border-radius: 50%;
            transition: all 0.2s;
        }
        .voice-search-btn:hover { color: var(--theme-color); background: var(--theme-light); }
        .voice-search-btn.listening { color: #e74c3c; animation: pulse 1s infinite; }
        @keyframes pulse { 0%, 100% { transform: translateY(-50%) scale(1); } 50% { transform: translateY(-50%) scale(1.1); } }
        .search-box { position: relative; }
        .search-box input { padding-right: 45px; }

        /* Dietary Filters */
        .dietary-filters { margin-top: 10px; }
        .dietary-filter-toggle {
            background: var(--bg, #fff);
            border: 1px solid var(--gray-200);
            border-radius: 20px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            color: var(--text, #333);
            transition: all 0.2s;
        }
        .dark-mode .dietary-filter-toggle { background: #2a2a3e; border-color: #444; color: #eee; }
        .dietary-filter-toggle:hover { border-color: var(--theme-color); color: var(--theme-color); }
        .dietary-filter-toggle.active { background: var(--theme-color); color: #fff; border-color: var(--theme-color); }
        .dietary-filter-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 10px;
            padding: 12px;
            background: var(--bg, #fff);
            border-radius: 12px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.08);
        }
        .dark-mode .dietary-filter-chips { background: #2a2a3e; }
        .dietary-chip { display: inline-block; }
        .dietary-chip input { display: none; }
        .dietary-chip span {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            background: var(--chip-color, #eee)15;
            color: var(--chip-color, #666);
            border: 1px solid var(--chip-color, #ddd)40;
            cursor: pointer;
            transition: all 0.2s;
        }
        .dietary-chip:hover span { background: var(--chip-color, #eee)25; }
        .dietary-chip input:checked + span {
            background: var(--chip-color, var(--theme-color));
            color: #fff;
            border-color: var(--chip-color, var(--theme-color));
        }
        .clear-filters-btn {
            background: #f0f0f0;
            border: none;
            padding: 6px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            color: #888;
            cursor: pointer;
        }
        .dark-mode .clear-filters-btn { background: #333; color: #aaa; }
        .clear-filters-btn:hover { background: #e74c3c; color: #fff; }

        /* Product Share Buttons */
        .product-share-row {
            display: flex;
            gap: 6px;
            margin-top: 8px;
            justify-content: flex-start;
        }
        .product-share-btn {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            color: #fff;
            transition: transform 0.2s;
        }
        .product-share-btn:hover { transform: scale(1.1); }
        .product-share-btn.fb { background: #1877f2; }
        .product-share-btn.tw { background: #1da1f2; }
        .product-share-btn.wa { background: #25d366; }
        .product-share-btn.tg { background: #0088cc; }
        .product-share-btn.copy { background: #666; }

        /* Voice Ordering Modal */
        .voice-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.7);
            z-index: 12000;
            align-items: center;
            justify-content: center;
        }
        .voice-modal.active { display: flex; }
        .voice-modal-content {
            background: var(--bg, #fff);
            border-radius: 20px;
            padding: 40px;
            text-align: center;
            max-width: 360px;
            width: 90%;
        }
        .dark-mode .voice-modal-content { background: #2a2a3e; color: #eee; }
        .voice-icon {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--theme-color), var(--theme-hover));
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 36px;
            color: #fff;
            margin-bottom: 20px;
        }
        .voice-icon.listening { animation: pulse 1s infinite; }
        .voice-text { font-size: 16px; color: var(--text, #333); margin-bottom: 8px; }
        .dark-mode .voice-text { color: #eee; }
        .voice-transcript { font-size: 20px; font-weight: 700; min-height: 30px; margin-bottom: 20px; color: var(--theme-color); }
        .voice-hint { font-size: 13px; color: var(--gray-400); }

        /* Recommendations Grid */
        .recommendations-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }
        .recommendation-card {
            background: var(--bg, #f8f9fa);
            border-radius: 10px;
            padding: 10px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .dark-mode .recommendation-card { background: #2a2a3e; }
        .recommendation-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
        .recommendation-card img {
            width: 50px;
            height: 50px;
            border-radius: 8px;
            object-fit: cover;
        }
        .recommendation-info { flex: 1; overflow: hidden; }
        .recommendation-info h5 {
            font-size: 13px;
            font-weight: 600;
            margin: 0 0 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .recommendation-info .rec-price {
            font-size: 12px;
            color: var(--theme-color);
            font-weight: 700;
        }
        .recommendation-add {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--theme-color);
            color: #fff;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
        }
        @media (max-width: 480px) {
            .recommendations-grid { grid-template-columns: 1fr; }
        }

        /* ============ Checkout Page ============ */
        .checkout-page {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(165deg, #f0f4ff 0%, #e8ecf7 40%, #f5f3ff 100%);
            z-index: 10000;
            overflow-y: auto;
            overflow-x: hidden;
            align-items: flex-start;
            justify-content: center;
            padding: 20px;
            -webkit-overflow-scrolling: touch;
            width: 100vw;
            box-sizing: border-box;
        }
        .checkout-page * { box-sizing: border-box; }
        .dark-mode .checkout-page { background: linear-gradient(165deg, #13142b 0%, #181a32 40%, #1a1530 100%); }
        .checkout-container {
            width: 100%;
            max-width: 560px;
            min-width: 0;
            margin: 0 auto;
            padding-bottom: 40px;
            animation: checkoutSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        @media (min-width: 900px) {
            .checkout-container { max-width: 620px; }
            .khqr-card { max-width: 100%; }
        }
        @keyframes checkoutSlideUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .checkout-header {
            text-align: center;
            padding: 28px 0 20px;
        }
        .checkout-success-icon {
            width: 76px;
            height: 76px;
            border-radius: 50%;
            background: linear-gradient(135deg, #10b981, #059669);
            color: #fff;
            font-size: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            box-shadow: 0 12px 32px rgba(16,185,129,0.25);
            animation: checkoutPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
            position: relative;
        }
        .checkout-success-icon::after {
            content: '';
            position: absolute;
            inset: -6px;
            border-radius: 50%;
            border: 2px solid rgba(16,185,129,0.15);
            animation: checkoutRing 0.8s 0.3s ease both;
        }
        @keyframes checkoutPop {
            0% { transform: scale(0) rotate(-20deg); opacity: 0; }
            60% { transform: scale(1.15) rotate(5deg); }
            100% { transform: scale(1) rotate(0); opacity: 1; }
        }
        @keyframes checkoutRing {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }
        .checkout-header h2 {
            font-size: 26px;
            font-weight: 800;
            margin: 0;
            color: var(--text, #111827);
            letter-spacing: -0.5px;
        }
        .dark-mode .checkout-header h2 { color: #f3f4f6; }
        .checkout-order-num {
            font-size: 13px;
            color: #9ca3af;
            margin-top: 6px;
            font-weight: 500;
            letter-spacing: 0.2px;
        }

        /* Checkout step indicator */
        .checkout-steps {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            margin: 0 auto 22px;
            max-width: 260px;
        }
        .checkout-step {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 12px;
            font-weight: 600;
            color: #c0c5d0;
            transition: color 0.3s ease;
        }
        .checkout-step.active { color: var(--theme-color, var(--primary)); }
        .checkout-step.done { color: #10b981; }
        .checkout-step-num {
            width: 26px; height: 26px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 12px; font-weight: 700;
            background: #e8eaef; color: #9ca3af;
            transition: all 0.3s ease;
        }
        .checkout-step.active .checkout-step-num {
            background: var(--theme-color, var(--primary));
            color: #fff;
            box-shadow: 0 3px 10px color-mix(in srgb, var(--theme-color, var(--primary)) 30%, transparent);
        }
        .checkout-step.done .checkout-step-num {
            background: #10b981; color: #fff;
        }
        .dark-mode .checkout-step-num { background: #2d3050; color: #6b7280; }
        .dark-mode .checkout-step.active .checkout-step-num { background: var(--theme-color, var(--primary)); color: #fff; }
        .checkout-step-line {
            width: 32px; height: 2px;
            background: #e5e7eb;
            margin: 0 6px;
            border-radius: 2px;
            transition: background 0.3s ease;
        }
        .checkout-step-line.done { background: #10b981; }
        .dark-mode .checkout-step-line { background: #2d3050; }

        /* Checkout delivery fields (labels-above + trailing icon) */
        .co-fields { display: flex; flex-direction: column; gap: 14px; }
        .co-field { display: flex; flex-direction: column; gap: 6px; }
        .co-field-label {
            font-size: 12.5px; font-weight: 600; color: #6b7280;
            padding-left: 2px; letter-spacing: 0.1px;
        }
        .dark-mode .co-field-label { color: #9ca3af; }
        .co-input-wrap { position: relative; display: flex; align-items: center; }
        .co-input {
            width: 100%; padding: 14px 44px 14px 16px;
            border: 1.5px solid #e5e7eb; border-radius: 14px;
            font-size: 15px; outline: none; background: #fff;
            color: var(--text, #1f2937); transition: border-color .2s, box-shadow .2s;
        }
        .co-input:focus { border-color: var(--theme-color, var(--primary)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color, var(--primary)) 14%, transparent); }
        .dark-mode .co-input { background: #1e2038; border-color: #2d3050; color: #e5e7eb; }
        .co-select { appearance: none; -webkit-appearance: none; cursor: pointer; }
        .co-field-icon {
            position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
            font-size: 16px; color: #9ca3af; pointer-events: none; display: flex;
        }
        .co-share-btn {
            width: 100%; padding: 13px; border: 1.5px solid var(--theme-color, var(--primary));
            background: #fff; color: var(--theme-color, var(--primary)); border-radius: 14px;
            cursor: pointer; font-size: 14px; font-weight: 600;
            display: flex; align-items: center; justify-content: center; gap: 7px;
            transition: background .2s, color .2s;
        }
        .co-share-btn:hover { background: color-mix(in srgb, var(--theme-color, var(--primary)) 8%, #fff); }
        .dark-mode .co-share-btn { background: transparent; }

        /* Checkout card system */
        .checkout-card {
            background: #fff;
            border-radius: 20px;
            padding: 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
            animation: checkoutCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
        }
        .checkout-card:nth-child(2) { animation-delay: 0.06s; }
        .checkout-card:nth-child(3) { animation-delay: 0.12s; }
        .checkout-card:nth-child(4) { animation-delay: 0.18s; }
        .checkout-card:nth-child(5) { animation-delay: 0.24s; }
        .checkout-card:nth-child(6) { animation-delay: 0.30s; }
        @keyframes checkoutCardIn {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .dark-mode .checkout-card { background: #1e2038; border-color: rgba(255,255,255,0.05); box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
        .checkout-card-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--text, #1f2937);
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
            letter-spacing: -0.1px;
        }
        .checkout-card-title i {
            font-size: 16px;
            opacity: 0.65;
        }
        .dark-mode .checkout-card-title { color: #e5e7eb; }
        .checkout-card-icon {
            width: 36px; height: 36px;
            border-radius: 10px;
            display: inline-flex; align-items: center; justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
        }

        .checkout-qr-section {
            background: #fff;
            border-radius: 20px;
            padding: 28px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            text-align: center;
            border: 1px solid rgba(0,0,0,0.04);
        }
        .dark-mode .checkout-qr-section { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-qr-section h3 {
            font-size: 16px;
            font-weight: 700;
            margin: 0 0 18px;
            color: var(--text, #1f2937);
            letter-spacing: -0.1px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        .dark-mode .checkout-qr-section h3 { color: #e5e7eb; }
        .checkout-qr-wrapper {
            background: #fff;
            border-radius: 16px;
            padding: 18px;
            display: inline-block;
            border: 2px solid #f0f1f5;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }
        .checkout-qr-img {
            max-width: 240px;
            width: 100%;
            border-radius: 8px;
        }
        .checkout-total, .checkout-total-standalone {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 0;
            margin-top: 12px;
            border-top: 1px dashed #e5e7eb;
        }
        .dark-mode .checkout-total, .dark-mode .checkout-total-standalone { border-color: #3b4058; }
        .checkout-total span, .checkout-total-standalone span {
            font-size: 15px;
            font-weight: 600;
            color: #6b7280;
        }
        .dark-mode .checkout-total span, .dark-mode .checkout-total-standalone span { color: #9ca3af; }
        .checkout-total strong, .checkout-total-standalone strong {
            font-size: 24px;
            font-weight: 800;
            color: var(--theme-color, var(--primary));
            letter-spacing: -0.3px;
        }
        .checkout-total-standalone {
            background: #fff;
            border-radius: 20px;
            padding: 22px 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04);
            border-top: none;
            border: 1px solid rgba(0,0,0,0.04);
        }
        .dark-mode .checkout-total-standalone { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-qr-hint {
            font-size: 12px;
            color: #9ca3af;
            margin-top: 10px;
        }

        /* ABA PayWay / KHQR Card styles — REDESIGN v2 */
        .khqr-card {
            background: #ffffff;
            border-radius: 24px;
            overflow: hidden;
            box-shadow:
                0 24px 48px -12px rgba(227, 24, 55, 0.18),
                0 8px 24px -8px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(255, 255, 255, 0.6) inset;
            width: min(100%, 380px);
            max-width: 380px;
            margin: 0 auto 16px;
            border: 1px solid rgba(227, 24, 55, 0.06);
            position: relative;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }
        .khqr-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 0% 0%, rgba(227, 24, 55, 0.04), transparent 40%),
                        radial-gradient(circle at 100% 100%, rgba(196, 18, 48, 0.03), transparent 40%);
            pointer-events: none;
            z-index: 0;
        }
        .khqr-card > * { position: relative; z-index: 1; }
        .khqr-card-header {
            background:
                linear-gradient(135deg, #e31837 0%, #c41230 100%),
                linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
            padding: 18px 24px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }
        .khqr-card-header::before {
            content: '';
            position: absolute;
            top: -40px; left: -40px;
            width: 120px; height: 120px;
            background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
            border-radius: 50%;
            pointer-events: none;
        }
        .khqr-card-header::after {
            content: '';
            position: absolute;
            top: -30px; right: -30px;
            width: 100px; height: 100px;
            background: radial-gradient(circle, rgba(255,255,255,0.12), transparent 70%);
            border-radius: 50%;
            pointer-events: none;
        }
        .khqr-card-header .khqr-logo {
            font-size: 24px;
            font-weight: 900;
            color: #fff;
            letter-spacing: 4px;
            text-transform: uppercase;
            font-family: 'Inter', Arial, sans-serif;
            text-shadow: 0 1px 2px rgba(0,0,0,0.15);
            position: relative;
            z-index: 1;
        }
        .khqr-card-header .khqr-logo span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px; height: 28px;
            background: #fff;
            color: #e31837;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 900;
            margin: 0 2px;
            vertical-align: middle;
            box-shadow: 0 2px 4px rgba(0,0,0,0.15);
        }
        .khqr-card-header .khqr-logo-img {
            position: relative;
            z-index: 1;
            height: 30px;
            width: auto;
            max-width: 140px;
            object-fit: contain;
            filter: drop-shadow(0 1px 2px rgba(0,0,0,0.18));
        }
        .khqr-card-header .khqr-logo-img.aba { height: 26px; }
        .khqr-card-body {
            padding: 26px 26px 8px;
            background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
        }
        .khqr-merchant-name {
            font-size: 13px;
            color: #6b7280;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .khqr-merchant-name::before {
            content: '';
            width: 6px; height: 6px;
            background: #10b981;
            border-radius: 50%;
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
            animation: khqrLiveDot 1.6s ease-in-out infinite;
        }
        @keyframes khqrLiveDot {
            0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); }
            50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
        }
        .khqr-amount-row {
            display: flex;
            align-items: baseline;
            justify-content: center;
            gap: 10px;
            margin: 4px 0 8px;
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(227, 24, 55, 0.04), rgba(196, 18, 48, 0.06));
            border-radius: 14px;
            border: 1px solid rgba(227, 24, 55, 0.08);
        }
        .khqr-amount {
            font-size: 36px;
            font-weight: 800;
            color: #0f172a;
            letter-spacing: -1px;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        .khqr-currency {
            font-size: 14px;
            font-weight: 700;
            color: #e31837;
            background: #fff;
            padding: 4px 10px;
            border-radius: 8px;
            border: 1px solid rgba(227, 24, 55, 0.12);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .khqr-divider {
            border: none;
            height: 0;
            margin: 18px 0 6px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .khqr-divider::before {
            content: '';
            position: absolute;
            left: -10px; right: -10px;
            top: 50%;
            border-top: 2px dashed #e5e7eb;
            transform: translateY(-50%);
        }
        .khqr-divider::after {
            content: '';
            position: absolute;
            left: -16px;
            top: 50%;
            width: 24px; height: 24px;
            background: #f3f4f6;
            border-radius: 50%;
            transform: translateY(-50%);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
        }
        .khqr-divider .khqr-divider-right {
            position: absolute;
            right: -16px;
            top: 50%;
            width: 24px; height: 24px;
            background: #f3f4f6;
            border-radius: 50%;
            transform: translateY(-50%);
            box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
        }
        .khqr-qr-area {
            text-align: center;
            padding: 8px 26px 22px;
            position: relative;
        }
        .khqr-qr-wrapper {
            display: inline-block;
            position: relative;
            background: #fff;
            padding: 14px;
            border-radius: 18px;
            box-shadow:
                0 0 0 1px rgba(15, 23, 42, 0.05),
                0 4px 16px rgba(15, 23, 42, 0.08);
        }
        .khqr-qr-wrapper::before {
            content: '';
            position: absolute;
            inset: -2px;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(227, 24, 55, 0.4), rgba(196, 18, 48, 0.4));
            z-index: -1;
            opacity: 0;
            transition: opacity 0.3s;
        }
        .khqr-qr-wrapper:hover::before { opacity: 0.6; }
        .khqr-qr-wrapper canvas,
        .khqr-qr-wrapper img {
            display: block;
            border-radius: 10px;
            max-width: min(240px, calc(100vw - 96px));
            height: auto !important;
        }
        .khqr-qr-center-logo {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 48px; height: 48px;
            background: linear-gradient(135deg, #fff, #f8fafc);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow:
                0 4px 12px rgba(0,0,0,0.18),
                0 0 0 3px #fff;
            font-size: 22px;
            font-weight: 800;
            color: #0f172a;
        }
        .khqr-card-footer {
            padding: 0 26px 22px;
            text-align: center;
        }
        .khqr-status {
            background: linear-gradient(135deg, #fef3c7, #fde68a);
            color: #92400e;
            border-radius: 14px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 18px;
            font-size: 14px;
            font-weight: 700;
            border: 1px solid rgba(245, 158, 11, 0.2);
            box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
        }
        .khqr-status.confirmed {
            background: linear-gradient(135deg, #d1fae5, #a7f3d0);
            color: #065f46;
            border-color: rgba(16, 185, 129, 0.25);
            box-shadow: 0 2px 12px rgba(16, 185, 129, 0.18);
        }
        .khqr-status.expired {
            background: linear-gradient(135deg, #fef2f2, #fecaca);
            color: #dc2626;
            border-color: rgba(220, 38, 38, 0.2);
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
        }
        /* "Open in ABA Mobile" deeplink button — phones only, shown by renderAbaQr() */
        .khqr-deeplink-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            width: 100%;
            margin-top: 14px;
            padding: 13px 18px;
            border-radius: 14px;
            background: linear-gradient(135deg, #0072bc, #005a94);
            color: #fff;
            font-size: 15px;
            font-weight: 700;
            text-decoration: none;
            box-shadow: 0 6px 18px rgba(0, 114, 188, 0.32);
            transition: transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.2s ease;
            -webkit-tap-highlight-color: transparent;
        }
        .khqr-deeplink-btn:active {
            transform: scale(0.97);
            box-shadow: 0 3px 10px rgba(0, 114, 188, 0.28);
        }
        .khqr-deeplink-btn img {
            height: 20px;
            width: auto;
            display: block;
            background: #fff;
            border-radius: 4px;
            padding: 2px 4px;
        }

        .khqr-hint {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            line-height: 1.5;
        }
        .khqr-hint::before {
            content: '\1F4F1';
            font-size: 14px;
        }

        /* Loading state — refined */
        .khqr-loading {
            text-align: center;
            padding: 56px 24px;
            background: linear-gradient(180deg, #fff, #fafbfc);
        }
        .khqr-loading-spinner {
            width: 56px; height: 56px;
            margin: 0 auto 18px;
            position: relative;
        }
        .khqr-loading-spinner::before,
        .khqr-loading-spinner::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 3px solid transparent;
        }
        .khqr-loading-spinner::before {
            border-top-color: #e31837;
            border-right-color: #e31837;
            animation: khqrSpin 0.9s cubic-bezier(0.4, 0.0, 0.2, 1) infinite;
        }
        .khqr-loading-spinner::after {
            border-bottom-color: rgba(227, 24, 55, 0.2);
            border-left-color: rgba(227, 24, 55, 0.2);
            animation: khqrSpin 1.4s cubic-bezier(0.4, 0.0, 0.2, 1) infinite reverse;
        }
        @keyframes khqrSpin { to { transform: rotate(360deg); } }
        .khqr-loading-title {
            font-size: 15px;
            font-weight: 700;
            color: #0f172a;
            margin: 0 0 4px;
        }
        .khqr-loading-sub {
            font-size: 13px;
            color: #94a3b8;
            margin: 0;
        }

        /* Error state — friendly redesign */
        .khqr-error {
            text-align: center;
            padding: 36px 28px 28px;
            background: linear-gradient(180deg, #fff, #fafbfc);
        }
        .khqr-error-icon {
            width: 68px; height: 68px;
            margin: 0 auto 18px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #fef2f2, #fee2e2);
            border: 2px solid rgba(239, 68, 68, 0.15);
            color: #ef4444;
            font-size: 30px;
            box-shadow: 0 8px 24px -4px rgba(239, 68, 68, 0.18);
            position: relative;
        }
        .khqr-error-icon::after {
            content: '';
            position: absolute;
            inset: -6px;
            border-radius: 50%;
            border: 2px dashed rgba(239, 68, 68, 0.2);
            animation: khqrErrorRing 8s linear infinite;
        }
        @keyframes khqrErrorRing { to { transform: rotate(360deg); } }
        .khqr-error-title {
            font-size: 16px;
            font-weight: 700;
            color: #0f172a;
            margin: 0 0 6px;
        }
        .khqr-error-msg {
            font-size: 13px;
            color: #64748b;
            margin: 0 0 18px;
            line-height: 1.5;
            max-width: 280px;
            margin-left: auto;
            margin-right: auto;
        }
        .khqr-error-retry {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: linear-gradient(135deg, #e31837, #c41230);
            color: #fff;
            border: none;
            padding: 11px 28px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 0 6px 16px rgba(227, 24, 55, 0.25);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            font-family: inherit;
        }
        .khqr-error-retry:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 22px rgba(227, 24, 55, 0.3);
        }
        .khqr-error-retry:active { transform: translateY(0); }
        .khqr-error-retry i { font-size: 13px; }

        .method-opt-icon.aba {
            background: linear-gradient(135deg, #e31837 0%, #c41230 100%);
            color: #fff;
        }
        /* Dark mode */
        .dark-mode .khqr-card {
            background: #1a1a2e;
            box-shadow: 0 24px 48px -12px rgba(227, 24, 55, 0.3), 0 8px 24px -8px rgba(0,0,0,0.5);
            border-color: rgba(227, 24, 55, 0.2);
        }
        .dark-mode .khqr-card-body { background: linear-gradient(180deg, #1a1a2e 0%, #16162b 100%); }
        .dark-mode .khqr-merchant-name { color: #94a3b8; }
        .dark-mode .khqr-amount { color: #f1f5f9; }
        .dark-mode .khqr-amount-row {
            background: linear-gradient(135deg, rgba(227, 24, 55, 0.12), rgba(196, 18, 48, 0.18));
            border-color: rgba(227, 24, 55, 0.2);
        }
        .dark-mode .khqr-currency { background: #0f0f1f; color: #fca5a5; border-color: rgba(227, 24, 55, 0.3); }
        .dark-mode .khqr-divider::before { border-color: #2d2d44; }
        .dark-mode .khqr-divider::after,
        .dark-mode .khqr-divider .khqr-divider-right { background: #0d0d1a; box-shadow: inset 0 2px 4px rgba(0,0,0,0.4); }
        .dark-mode .khqr-qr-area { background: linear-gradient(180deg, #16162b, #1a1a2e); }
        .dark-mode .khqr-qr-wrapper { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
        .dark-mode .khqr-status { background: rgba(245, 158, 11, 0.15); color: #fcd34d; border-color: rgba(245, 158, 11, 0.25); }
        .dark-mode .khqr-status.confirmed { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.3); }
        .dark-mode .khqr-status.expired { background: rgba(220, 38, 38, 0.15); color: #fca5a5; border-color: rgba(220, 38, 38, 0.3); }
        .dark-mode .khqr-loading,
        .dark-mode .khqr-error { background: linear-gradient(180deg, #1a1a2e, #16162b); }
        .dark-mode .khqr-loading-title,
        .dark-mode .khqr-error-title { color: #f1f5f9; }
        .dark-mode .khqr-loading-sub,
        .dark-mode .khqr-error-msg { color: #94a3b8; }
        .dark-mode .khqr-error-icon {
            background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(220, 38, 38, 0.22));
            border-color: rgba(239, 68, 68, 0.3);
        }
        #abaQrContainer canvas, #abaQrContainer img { border-radius: 10px; }

        /* Awaiting payment pulse */
        .awaiting-pulse {
            display: inline-block;
            width: 10px; height: 10px;
            border-radius: 50%;
            background: #f59e0b;
            margin-right: 8px;
            animation: awaitPulse 1.5s ease-in-out infinite;
            vertical-align: middle;
        }
        .awaiting-pulse.confirmed { background: #10b981; animation: none; }
        @keyframes awaitPulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.4; transform: scale(0.8); }
        }

        /* Timer countdown for payment */
        .payment-timer {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #fef3c7;
            color: #92400e;
            padding: 6px 14px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            margin-top: 10px;
        }
        .dark-mode .payment-timer { background: #2d2400; color: #fbbf24; }

        .checkout-upload-section {
            background: #fff;
            border-radius: 20px;
            padding: 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
        }
        .dark-mode .checkout-upload-section { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-upload-section h3 {
            font-size: 16px;
            font-weight: 700;
            margin: 0 0 6px;
            color: var(--text, #1f2937);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .dark-mode .checkout-upload-section h3 { color: #e5e7eb; }
        .checkout-upload-hint {
            font-size: 12px;
            color: #9ca3af;
            margin: 0 0 14px;
        }
        .checkout-method-summary {
            background: #fff;
            border-radius: 20px;
            padding: 22px 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
            font-size: 14px;
        }
        .dark-mode .checkout-method-summary { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-method-summary .summary-title {
            font-size: 15px;
            font-weight: 700;
            color: var(--text, #1f2937);
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .dark-mode .checkout-method-summary .summary-title { color: #e5e7eb; }
        .checkout-recap-toggle {
            margin-left: auto;
            display: inline-flex;
            align-items: center;
            gap: 3px;
            background: none;
            border: 0;
            cursor: pointer;
            font: inherit;
            font-size: 13px;
            font-weight: 700;
            color: var(--theme-color, var(--primary));
            padding: 2px 4px;
        }
        .checkout-recap-toggle i { font-size: 15px; }
        .checkout-method-summary .line {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            padding: 10px 0;
            border-bottom: 1px solid #f3f4f6;
        }
        .checkout-method-summary .line:last-child { border-bottom: none; }
        .checkout-method-summary .line span { color: #6b7280; font-size: 13px; }
        .checkout-method-summary .line strong { color: var(--text, #1f2937); font-weight: 700; font-size: 14px; }
        .dark-mode .checkout-method-summary .line { border-color: rgba(255,255,255,0.06); }
        .dark-mode .checkout-method-summary .line span { color: #9ca3af; }
        .dark-mode .checkout-method-summary .line strong { color: #e5e7eb; }

        /* Order item row in checkout */
        .checkout-item-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            border-bottom: 1px solid #f3f4f6;
        }
        .dark-mode .checkout-item-row { border-color: rgba(255,255,255,0.06); }
        .checkout-item-thumb {
            width: 44px; height: 44px;
            border-radius: 10px;
            background: #f3f4f6;
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0; overflow: hidden;
        }
        .dark-mode .checkout-item-thumb { background: #2d3050; }
        .checkout-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
        .checkout-item-info { flex: 1; min-width: 0; }
        .checkout-item-name { font-size: 14px; font-weight: 600; color: var(--text,#1f2937); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .dark-mode .checkout-item-name { color: #e5e7eb; }
        .checkout-item-meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
        .checkout-item-price { font-weight: 700; font-size: 14px; color: var(--text,#1f2937); flex-shrink: 0; }
        .dark-mode .checkout-item-price { color: #e5e7eb; }

        .checkout-methods-section {
            background: #fff;
            border-radius: 20px;
            padding: 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
        }
        .dark-mode .checkout-methods-section { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-methods-section h3 {
            font-size: 17px;
            font-weight: 800;
            margin: 0 0 18px;
            color: var(--text, #222);
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .checkout-methods-section h3 .method-icon {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            color: #fff;
            flex-shrink: 0;
        }
        .dark-mode .checkout-methods-section h3 { color: #eee; }
        .checkout-method-group { margin-bottom: 20px; }
        .checkout-method-group:last-child { margin-bottom: 0; }
        .checkout-method-label {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 14px;
            font-weight: 700;
            color: var(--text, #1f2937);
            margin-bottom: 12px;
            letter-spacing: -0.1px;
        }
        .checkout-method-label .label-icon {
            width: 34px;
            height: 34px;
            border-radius: 10px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            color: #fff;
            flex-shrink: 0;
        }
        .checkout-method-label .label-icon.delivery-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .checkout-method-label .label-icon.payment-icon { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
        .dark-mode .checkout-method-label { color: #e5e7eb; }
        .checkout-method-option {
            display: flex;
            align-items: center;
            gap: 14px;
            border: 1.5px solid #e5e7eb;
            border-radius: 14px;
            padding: 14px 16px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            background: transparent;
        }
        .checkout-method-option:last-child { margin-bottom: 0; }
        .checkout-method-option .method-opt-icon {
            width: 44px;
            height: 44px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            flex-shrink: 0;
            transition: all .25s ease;
        }
        .checkout-method-option .method-opt-icon.grab { background: #00b14f12; color: #00b14f; }
        .checkout-method-option .method-opt-icon.vet { background: #e8451512; color: #e84515; }
        .checkout-method-option .method-opt-icon.jt { background: #d4202012; color: #d42020; }
        .checkout-method-option .method-opt-icon.bank { background: #3b82f612; color: #3b82f6; }
        .checkout-method-option .method-opt-icon.cod { background: #16a34a12; color: #16a34a; }
        .checkout-method-option .method-opt-icon.qr { background: #8b5cf612; color: #8b5cf6; }
        .checkout-method-option .method-opt-icon img.method-logo-img {
            max-width: 70%;
            max-height: 70%;
            object-fit: contain;
        }
        .checkout-method-option .method-opt-icon.aba-logo { background: #fff; border: 1px solid #eaeef3; }
        .checkout-method-option .method-opt-icon.bakong-logo { background: #fff; border: 1px solid #eaeef3; }
        .checkout-method-option .method-opt-info {
            flex: 1;
            min-width: 0;
        }
        .checkout-method-option .method-opt-info .method-name {
            font-size: 14px;
            font-weight: 700;
            color: var(--text, #1f2937);
            line-height: 1.3;
        }
        .checkout-method-option .method-opt-info .method-desc {
            font-size: 12px;
            color: #9ca3af;
            margin-top: 2px;
            line-height: 1.3;
        }
        .checkout-method-option .method-radio {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 2px solid #d1d5db;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all .2s ease;
        }
        .checkout-method-option .method-radio::after {
            content: '';
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--theme-color, var(--primary));
            transform: scale(0);
            transition: transform .2s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .checkout-method-option input[type="radio"] {
            position: absolute;
            opacity: 0;
            width: 0;
            height: 0;
        }
        .checkout-method-option:hover {
            border-color: var(--theme-color, var(--primary));
            background: color-mix(in srgb, var(--theme-color, var(--primary)) 3%, white);
            transform: translateY(-1px);
        }
        .checkout-method-option:has(input:checked) {
            border-color: var(--theme-color, var(--primary));
            background: color-mix(in srgb, var(--theme-color, var(--primary)) 5%, white);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color, var(--primary)) 8%, transparent);
        }
        .checkout-method-option:has(input:checked) .method-opt-icon {
            transform: scale(1.05);
        }
        .checkout-method-option:has(input:checked) .method-radio {
            border-color: var(--theme-color, var(--primary));
        }
        .checkout-method-option:has(input:checked) .method-radio::after {
            transform: scale(1);
        }
        .dark-mode .checkout-method-option {
            border-color: #2d3050;
            background: rgba(255,255,255,0.02);
        }
        .dark-mode .checkout-method-option .method-opt-info .method-name { color: #e5e7eb; }
        .dark-mode .checkout-method-option .method-opt-info .method-desc { color: #6b7280; }
        .dark-mode .checkout-method-option .method-radio { border-color: #4b5563; }
        .dark-mode .checkout-method-option:hover {
            border-color: var(--theme-color, var(--primary));
            background: rgba(255,255,255,0.04);
        }
        .dark-mode .checkout-method-option:has(input:checked) {
            border-color: var(--theme-color, var(--primary));
            background: rgba(255,255,255,0.06);
        }
        .checkout-upload-area {
            border: 2px dashed #d1d5db;
            border-radius: 16px;
            padding: 28px 20px;
            text-align: center;
            cursor: pointer;
            transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
            background: #fafbfc;
            min-height: 110px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
        }
        .dark-mode .checkout-upload-area { background: rgba(255,255,255,0.02); border-color: #2d3050; }
        .checkout-upload-area:hover {
            border-color: var(--theme-color, var(--primary));
            background: color-mix(in srgb, var(--theme-color, var(--primary)) 4%, white);
            transform: translateY(-1px);
        }
        .dark-mode .checkout-upload-area:hover { background: rgba(255,255,255,0.04); }
        #uploadPlaceholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: #9ca3af;
        }
        #uploadPlaceholder i {
            font-size: 36px;
            color: #d1d5db;
            transition: all .25s ease;
        }
        .checkout-upload-area:hover #uploadPlaceholder i { color: var(--theme-color, var(--primary)); transform: translateY(-2px); }
        .dark-mode #uploadPlaceholder i { color: #4b5563; }
        #uploadPlaceholder span {
            font-size: 14px;
            font-weight: 600;
        }
        #uploadPlaceholder small {
            font-size: 11px;
            color: #c0c5d0;
        }
        #uploadPreview {
            position: relative;
            width: 100%;
        }
        #proofPreviewImg {
            max-width: 100%;
            max-height: 250px;
            border-radius: 8px;
            object-fit: contain;
        }
        .btn-change-photo {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: rgba(0,0,0,0.65);
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: 6px 14px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
            backdrop-filter: blur(4px);
            transition: background 0.2s;
        }
        .btn-change-photo:hover { background: rgba(0,0,0,0.8); }
        .checkout-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-top: 4px;
        }
        .btn-confirm-payment {
            width: 100%;
            padding: 16px;
            font-size: 15px;
            font-weight: 700;
            border-radius: 14px;
            border: none;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            letter-spacing: 0.2px;
            position: relative;
            overflow: hidden;
        }
        .btn-confirm-payment::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
            pointer-events: none;
        }
        .btn-confirm-payment:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(0,0,0,0.15);
        }
        .btn-confirm-payment:active:not(:disabled) {
            transform: translateY(0);
        }
        .btn-confirm-payment:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }
        .btn-skip-payment {
            width: 100%;
            padding: 13px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 14px;
            background: transparent;
            border: 1.5px solid #e5e7eb;
            color: #6b7280;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .dark-mode .btn-skip-payment { border-color: #2d3050; color: #9ca3af; }
        .btn-skip-payment:hover { background: #f9fafb; border-color: #d1d5db; transform: translateY(-1px); }
        .dark-mode .btn-skip-payment:hover { background: rgba(255,255,255,0.03); }
        .checkout-status {
            margin-top: 14px;
            padding: 14px 18px;
            border-radius: 14px;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            animation: checkoutCardIn 0.3s ease both;
        }
        .checkout-status-success {
            background: linear-gradient(135deg, #ecfdf5, #d1fae5);
            color: #065f46;
            border: 1px solid #a7f3d0;
        }
        .dark-mode .checkout-status-success { background: #0d3320; color: #6ee7b7; border-color: #065f46; }
        .checkout-status-error {
            background: linear-gradient(135deg, #fef2f2, #fee2e2);
            color: #991b1b;
            border: 1px solid #fca5a5;
        }
        .dark-mode .checkout-status-error { background: #3a1414; color: #fca5a5; border-color: #7f1d1d; }

        /* Checkout contact buttons (WhatsApp / Telegram) */
        .checkout-contact-section {
            background: #fff;
            border-radius: 20px;
            padding: 20px 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
            text-align: center;
        }
        .dark-mode .checkout-contact-section { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .checkout-contact-hint {
            font-size: 13px;
            color: #9ca3af;
            margin: 0 0 12px;
            font-weight: 500;
        }
        .checkout-contact-btns {
            display: flex;
            gap: 10px;
            justify-content: center;
        }
        .btn-checkout-contact {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 22px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
            color: #fff;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            border: none;
            cursor: pointer;
            flex: 1;
            justify-content: center;
        }
        .btn-checkout-contact:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
        .btn-checkout-contact.whatsapp { background: linear-gradient(135deg, #25d366, #128c7e); }
        .btn-checkout-contact.telegram { background: linear-gradient(135deg, #0088cc, #0077b5); }
        .btn-checkout-contact i { font-size: 17px; }

        /* Telegram order tracking */
        .checkout-track-section {
            background: #fff;
            border-radius: 20px;
            padding: 18px 24px;
            margin-bottom: 14px;
            box-shadow: 0 2px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
            border: 1px solid rgba(0,0,0,0.04);
            text-align: center;
        }
        .dark-mode .checkout-track-section { background: #1e2038; border-color: rgba(255,255,255,0.05); }
        .btn-checkout-track {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 11px 24px;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            text-decoration: none;
            color: #fff;
            background: linear-gradient(135deg, #0088cc, #0077b5);
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .btn-checkout-track:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,136,204,0.3); }
        .btn-checkout-track i { font-size: 16px; }
        .checkout-track-hint {
            font-size: 11px;
            color: #9ca3af;
            margin-top: 6px;
        }

        /* Checkout footer branding */
        .checkout-footer-brand {
            text-align: center;
            margin-top: 16px;
            font-size: 11px;
            color: #c0c5d0;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }
        .dark-mode .checkout-footer-brand { color: #4b5563; }

        /* Track order button (inline in checkout) */
        .btn-track-order {
            background: none;
            border: 2px solid var(--theme-color, #2563eb);
            color: var(--theme-color, #2563eb);
            padding: 10px 22px;
            border-radius: 12px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .btn-track-order:hover {
            background: var(--theme-color, #2563eb);
            color: #fff;
            transform: translateY(-1px);
            box-shadow: 0 4px 16px color-mix(in srgb, var(--theme-color, #2563eb) 30%, transparent);
        }
        .dark-mode .btn-track-order { border-color: var(--theme-color, #60a5fa); color: var(--theme-color, #60a5fa); }
        .dark-mode .btn-track-order:hover { background: var(--theme-color, #60a5fa); color: #111; }

        @media (max-width: 768px) {
            .modal-gallery > img { height: 260px; }
            .gallery-thumb { width: 48px; height: 48px; }
            .checkout-page {
                padding: 14px;
                align-items: stretch;
            }
            .checkout-container { max-width: 100%; }
            .checkout-header { padding: 18px 0 12px; }
            .checkout-card,
            .checkout-qr-section,
            .checkout-upload-section,
            .checkout-total-standalone,
            .checkout-method-summary,
            .checkout-methods-section,
            .checkout-contact-section,
            .checkout-track-section {
                padding: 18px;
                border-radius: 16px;
            }
            #waitlistModal .card,
            #feedbackModal .card {
                width: calc(100% - 24px) !important;
                max-width: 420px !important;
            }
        }

        @media (max-width: 480px) {
            .modal-gallery > img { height: 210px; }
            .gallery-nav {
                width: 32px;
                height: 32px;
                font-size: 12px;
            }
            .checkout-page { padding: 8px; }
            .checkout-container { width: 100%; max-width: 100%; }
            .checkout-order-num { font-size: 12px; }
            .checkout-header h2 { font-size: 22px; }
            .checkout-success-icon { width: 64px; height: 64px; font-size: 28px; }
            .checkout-qr-img { max-width: 200px; }
            .khqr-card { width: 100%; max-width: calc(100vw - 16px); border-radius: 18px; }
            .khqr-card-header { padding: 14px 16px; }
            .khqr-card-body { padding: 20px 16px 6px; }
            .khqr-merchant-name { justify-content: flex-start; text-align: left; overflow-wrap: anywhere; }
            .khqr-amount-row { padding: 12px 14px; justify-content: flex-start; }
            .khqr-amount { font-size: 32px; }
            .khqr-qr-area { padding: 8px 14px 18px; }
            .khqr-qr-wrapper { padding: 8px; max-width: 100%; }
            .khqr-qr-wrapper canvas,
            .khqr-qr-wrapper img { max-width: min(230px, calc(100vw - 72px)); }
            .khqr-card-footer { padding: 0 14px 18px; }
            .khqr-status { width: 100%; padding: 12px 14px; }
            .khqr-hint { padding: 0 8px; }
            .checkout-card, .checkout-method-summary, .checkout-methods-section,
            .checkout-contact-section, .checkout-track-section,
            .checkout-qr-section, .checkout-upload-section {
                padding: 16px;
                border-radius: 14px;
            }
            .checkout-method-option { padding: 12px 14px; }
            .checkout-contact-btns { flex-direction: column; }
            .checkout-steps { max-width: 220px; }
            .checkout-step-line { width: 22px; }
            #waitlistModal .card,
            #feedbackModal .card {
                width: calc(100% - 16px) !important;
            }
            #waitlistModal .card .card-body,
            #feedbackModal .card .card-body {
                padding: 18px !important;
            }
        }

        /* ============ Search Autocomplete ============ */
        .search-autocomplete {
            position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
            background: var(--bg, #fff); border: 1px solid var(--gray-200, #e5e7eb);
            border-radius: 0 0 14px 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.12);
            max-height: 320px; overflow-y: auto; display: none;
        }
        .search-autocomplete.active { display: block; }
        .search-ac-item {
            display: flex; align-items: center; gap: 12px; padding: 10px 14px;
            cursor: pointer; transition: background 0.15s; text-decoration: none; color: inherit;
        }
        .search-ac-item:hover, .search-ac-item.focused { background: var(--theme-light, #f0f7ff); }
        .search-ac-item img {
            width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
        }
        .search-ac-item .ac-placeholder {
            width: 40px; height: 40px; border-radius: 8px; background: var(--gray-100, #f3f4f6);
            display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gray-300);
        }
        .search-ac-item .ac-info { flex: 1; min-width: 0; }
        .search-ac-item .ac-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .search-ac-item .ac-name mark { background: var(--theme-light, #fef3c7); color: inherit; border-radius: 2px; padding: 0 1px; }
        .search-ac-item .ac-category { font-size: 11px; color: var(--gray-400); }
        .search-ac-item .ac-price { font-size: 13px; font-weight: 700; color: var(--theme-color, var(--primary)); white-space: nowrap; }
        .search-ac-empty { padding: 20px; text-align: center; color: var(--gray-400); font-size: 13px; }

        /* ============ Order Tracking ============ */
        .order-track-page {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 10000;
            background: var(--bg, #fff); overflow-y: auto; display: none;
            animation: slideInUp 0.3s ease;
        }
        @keyframes slideInUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
        .order-track-container { max-width: 480px; margin: 0 auto; padding: 24px 16px; }
        .ot-header { text-align: center; margin-bottom: 24px; }
        .ot-header h2 { font-size: 20px; font-weight: 800; margin: 0 0 4px; }
        .ot-header .ot-num { font-size: 13px; color: var(--gray-400); }
        .ot-steps { display: flex; flex-direction: column; gap: 0; margin-bottom: 24px; }
        .ot-step {
            display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; position: relative;
        }
        .ot-step::before {
            content: ''; position: absolute; left: 17px; top: 42px; bottom: -14px;
            width: 2px; background: var(--gray-200, #e5e7eb);
        }
        .ot-step:last-child::before { display: none; }
        .ot-step .ot-dot {
            width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100, #f3f4f6);
            display: flex; align-items: center; justify-content: center; font-size: 14px;
            color: var(--gray-400); flex-shrink: 0; z-index: 1; transition: all 0.3s;
        }
        .ot-step.active .ot-dot { background: var(--theme-color, #3b82f6); color: white; box-shadow: 0 0 0 4px rgba(59,130,246,0.15); }
        .ot-step.done .ot-dot { background: #10b981; color: white; }
        .ot-step.done::before { background: #10b981; }
        .ot-step .ot-label { font-size: 14px; font-weight: 600; color: var(--gray-400); }
        .ot-step.active .ot-label, .ot-step.done .ot-label { color: var(--text, #111); }
        .ot-step .ot-desc { font-size: 12px; color: var(--gray-400); margin-top: 2px; }
        .ot-eta {
            background: var(--theme-light, #eff6ff); border-radius: 14px; padding: 16px;
            text-align: center; margin-bottom: 20px;
        }
        .ot-eta .eta-time { font-size: 28px; font-weight: 800; color: var(--theme-color, #3b82f6); }
        .ot-eta .eta-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
        .ot-refresh { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--gray-400); cursor: pointer; margin-bottom: 20px; }
        .ot-refresh:hover { color: var(--theme-color); }
        .ot-actions { display: flex; flex-direction: column; gap: 10px; }
        .btn-track-close {
            background: var(--gray-100, #f3f4f6); color: var(--text, #333); border: none;
            padding: 12px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: 14px; width: 100%;
        }

        /* ============ Reorder Section ============ */
        .reorder-section { margin-bottom: 24px; }
        .reorder-section .section-title { display: flex; align-items: center; gap: 8px; }
        .reorder-card {
            background: var(--bg, #fff); border: 1px solid var(--gray-200, #e5e7eb); border-radius: 14px;
            padding: 14px; display: flex; align-items: center; gap: 14px; cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s; margin-bottom: 10px;
        }
        .reorder-card:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
        .reorder-card .rc-icon {
            width: 44px; height: 44px; border-radius: 12px;
            background: linear-gradient(135deg, var(--theme-color, #3b82f6), var(--theme-color, #3b82f6));
            display: flex; align-items: center; justify-content: center; color: white; font-size: 18px; flex-shrink: 0;
        }
        .reorder-card .rc-info { flex: 1; min-width: 0; }
        .reorder-card .rc-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
        .reorder-card .rc-meta { font-size: 11px; color: var(--gray-400); }
        .reorder-card .rc-action { font-size: 12px; font-weight: 600; color: var(--theme-color); white-space: nowrap; }

        /* ============ Estimated Wait Time ============ */
        .est-wait-badge {
            display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
            padding: 6px 12px; border-radius: 20px; background: #fef3c7; color: #92400e;
            margin-bottom: 12px;
        }
        .est-wait-badge i { font-size: 13px; }

        /* ============ Add-to-Cart Animation ============ */
        @keyframes flyToCart {
            0% { transform: translate(0, 0) scale(1); opacity: 1; }
            100% { transform: translate(var(--fly-x, 50px), var(--fly-y, -200px)) scale(0.15); opacity: 0; }
        }
        .fly-to-cart {
            position: fixed; z-index: 99999; pointer-events: none;
            width: 60px; height: 60px; border-radius: 50%;
            background-size: cover; background-position: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.25);
            animation: flyToCart 0.6s cubic-bezier(0.2, 1, 0.3, 1) forwards;
        }
        .cart-fab.bounce { animation: cartBounce 0.4s ease; }
        @keyframes cartBounce { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
        .cart-fab-count {
            transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .cart-fab-count.pop { transform: scale(1.4); }

        /* Page Loader */
        .page-loader {
            position: fixed; inset: 0; z-index: 99999;
            background: var(--ui-surface, #fff);
            display: flex; align-items: center; justify-content: center;
            transition: opacity 0.4s ease, visibility 0.4s ease;
        }
        .dark-mode .page-loader { background: #181a2e; }
        .page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
        .loader-content { display: flex; flex-direction: column; align-items: center; gap: 16px; }
        .loader-spinner {
            width: 38px; height: 38px;
            border: 3px solid var(--ui-border, #e8eaef);
            border-top-color: var(--theme-color, #4361ee);
            border-radius: 50%;
            animation: loaderSpin 0.65s linear infinite;
        }
        .dark-mode .loader-spinner { border-color: #333a52; border-top-color: var(--theme-color, #4361ee); }
        @keyframes loaderSpin { to { transform: rotate(360deg); } }
        .loader-text {
            font-family: var(--font);
            font-size: 13px; font-weight: 500; color: var(--ui-text-soft, #6b7280);
            letter-spacing: 0.3px;
        }

        /* Improved skeleton shimmer */
        .skeleton-card {
            border-radius: var(--ui-radius, 16px);
            overflow: hidden;
            background: var(--ui-surface, #fff);
            box-shadow: var(--shadow-xs);
        }
        .dark-mode .skeleton-card { background: #1e2134; }
        .skeleton-img {
            background: linear-gradient(110deg, #f0f0f0 30%, #e0e0e0 50%, #f0f0f0 70%);
            background-size: 200% 100%;
            animation: skeletonShimmer 1.4s ease-in-out infinite;
        }
        .dark-mode .skeleton-img {
            background: linear-gradient(110deg, #252840 30%, #2d3050 50%, #252840 70%);
            background-size: 200% 100%;
        }
        .skeleton-line {
            background: linear-gradient(110deg, #f0f0f0 30%, #e0e0e0 50%, #f0f0f0 70%);
            background-size: 200% 100%;
            animation: skeletonShimmer 1.4s ease-in-out infinite;
            border-radius: 6px;
        }
        .dark-mode .skeleton-line {
            background: linear-gradient(110deg, #252840 30%, #2d3050 50%, #252840 70%);
            background-size: 200% 100%;
        }
        /* PWA install prompt banner */
        .pwa-install-banner {
            position: fixed;
            left: 12px; right: 12px;
            bottom: calc(12px + env(safe-area-inset-bottom));
            z-index: 9600;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 16px;
            background: var(--ui-surface, #fff);
            color: var(--ui-text, #111);
            border: 1px solid var(--ui-border, rgba(0,0,0,.08));
            box-shadow: 0 18px 48px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);
            transform: translateY(140%);
            opacity: 0;
            transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .25s;
            max-width: 520px;
            margin: 0 auto;
        }
        .pwa-install-banner.is-visible { transform: translateY(0); opacity: 1; }
        .pwa-install-banner .pib-icon {
            width: 40px; height: 40px;
            border-radius: 12px;
            display: inline-grid; place-items: center;
            background: rgba(231,76,60,.10);
            color: var(--primary, #e74c3c);
            font-size: 18px;
            flex-shrink: 0;
        }
        .pwa-install-banner .pib-body { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
        .pwa-install-banner .pib-body strong { font-size: 14.5px; font-weight: 700; }
        .pwa-install-banner .pib-body span { font-size: 12.5px; color: var(--ui-text-soft, #6b7280); margin-top: 2px; }
        .pwa-install-banner .pib-install {
            background: var(--primary, #e74c3c);
            color: #fff;
            border: none;
            padding: 9px 16px;
            border-radius: 999px;
            font-weight: 700;
            font-size: 13.5px;
            cursor: pointer;
            flex-shrink: 0;
            transition: transform .18s ease, box-shadow .18s;
            box-shadow: 0 6px 16px rgba(231,76,60,.3);
        }
        .pwa-install-banner .pib-install:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(231,76,60,.36); }
        .pwa-install-banner .pib-close {
            background: transparent;
            border: none;
            font-size: 22px;
            line-height: 1;
            padding: 4px 8px;
            color: var(--ui-text-soft, #9ca3af);
            cursor: pointer;
            border-radius: 10px;
            flex-shrink: 0;
        }
        .pwa-install-banner .pib-close:hover { background: rgba(0,0,0,.05); color: var(--ui-text, #111); }
        .dark-mode .pwa-install-banner { background: #1e2134; color: #e5e7eb; border-color: rgba(255,255,255,.08); }
        .dark-mode .pwa-install-banner .pib-body span { color: #9ca3af; }
        .dark-mode .pwa-install-banner .pib-close:hover { background: rgba(255,255,255,.08); color: #fff; }
        .pwa-install-banner .pib-icon svg {
            width: 20px;
            height: 20px;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }
        @media (max-width: 640px) {
            html.ecom-has-mobile-bar .pwa-install-banner {
                bottom: calc(92px + env(safe-area-inset-bottom));
                left: 12px;
                right: 12px;
                z-index: 9450;
                gap: 9px;
                padding: 10px 11px;
                border-radius: 18px;
                max-width: none;
            }
            html.ecom-has-mobile-bar .pwa-install-banner .pib-icon {
                width: 34px;
                height: 34px;
                border-radius: 11px;
            }
            html.ecom-has-mobile-bar .pwa-install-banner .pib-body strong { font-size: 13px; }
            html.ecom-has-mobile-bar .pwa-install-banner .pib-body span {
                font-size: 11.5px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            html.ecom-has-mobile-bar .pwa-install-banner .pib-install {
                padding: 8px 13px;
                font-size: 12.5px;
            }
            html.ecom-has-mobile-bar .pwa-install-banner .pib-close {
                padding: 3px 6px;
                font-size: 20px;
            }
        }
        @media (prefers-reduced-motion: reduce) {
            .pwa-install-banner { transition: opacity .2s; transform: none !important; }
        }

        /* AI Chatbot bubble + panel */
        .ai-chat-bubble {
            position: fixed;
            right: 16px;
            bottom: calc(90px + env(safe-area-inset-bottom));
            z-index: 9500;
            width: 56px; height: 56px;
            border-radius: 50%;
            border: none;
            cursor: pointer;
            background: linear-gradient(135deg, #8b5cf6, #ec4899);
            color: #fff;
            font-size: 22px;
            display: grid; place-items: center;
            box-shadow: 0 14px 32px rgba(139, 92, 246, .35), 0 4px 10px rgba(236, 72, 153, .18);
            transition: transform .22s cubic-bezier(.22,1,.36,1), opacity .2s;
        }
        .ai-chat-bubble:hover { transform: translateY(-2px) scale(1.04); }
        .ai-chat-bubble.is-hidden { opacity: 0; pointer-events: none; transform: scale(.5); }
        .ai-chat-panel {
            position: fixed;
            right: 16px;
            bottom: calc(16px + env(safe-area-inset-bottom));
            z-index: 9510;
            width: min(360px, calc(100vw - 32px));
            height: min(500px, calc(100vh - 120px));
            height: min(500px, calc(100dvh - 120px));
            background: var(--ui-surface, #fff);
            border-radius: 20px;
            overflow: hidden;
            display: flex; flex-direction: column;
            box-shadow: 0 24px 60px rgba(0,0,0,.22), 0 8px 20px rgba(0,0,0,.1);
            transform: translateY(20px) scale(.96);
            opacity: 0;
            pointer-events: none;
            transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .22s;
            border: 1px solid var(--ui-border, rgba(0,0,0,.08));
        }
        .ai-chat-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
        .ai-chat-panel .aicp-head {
            padding: 14px 16px;
            background: linear-gradient(135deg, #8b5cf6, #ec4899);
            color: #fff;
            display: flex; align-items: center; justify-content: space-between;
        }
        .ai-chat-panel .aicp-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
        .ai-chat-panel .aicp-ico {
            width: 32px; height: 32px; border-radius: 10px;
            background: rgba(255,255,255,.18);
            display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
        }
        .ai-chat-panel .aicp-title strong { display: block; font-size: 14.5px; line-height: 1.2; }
        .ai-chat-panel .aicp-title small { font-size: 11.5px; opacity: .88; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
        .ai-chat-panel .aicp-close {
            background: rgba(255,255,255,.18); color: #fff; border: 0;
            width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
            font-size: 20px; line-height: 1;
        }
        .ai-chat-panel .aicp-close:hover { background: rgba(255,255,255,.28); }
        .ai-chat-panel .aicp-msgs {
            flex: 1; overflow-y: auto; padding: 16px 14px; background: var(--ui-bg, #f8f9fc);
            display: flex; flex-direction: column; gap: 10px;
            scrollbar-width: thin;
        }
        .ai-chat-panel .aicp-msg { display: flex; }
        .ai-chat-panel .aicp-bubble {
            max-width: 82%;
            padding: 9px 13px;
            border-radius: 16px;
            font-size: 13.5px;
            line-height: 1.5;
            word-wrap: break-word;
        }
        .ai-chat-panel .aicp-ai .aicp-bubble {
            background: #fff;
            color: var(--ui-text, #111);
            border-bottom-left-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,.05);
        }
        .ai-chat-panel .aicp-you { justify-content: flex-end; }
        .ai-chat-panel .aicp-you .aicp-bubble {
            background: linear-gradient(135deg, #8b5cf6, #ec4899);
            color: #fff;
            border-bottom-right-radius: 4px;
        }
        .ai-chat-panel .aicp-loading .aicp-bubble {
            animation: aicpPulse 1.2s ease-in-out infinite;
        }
        @keyframes aicpPulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
        .ai-chat-panel .aicp-form {
            padding: 10px 12px;
            border-top: 1px solid var(--ui-border, rgba(0,0,0,.08));
            display: flex; gap: 8px; align-items: center;
            background: var(--ui-surface, #fff);
        }
        .ai-chat-panel .aicp-input {
            flex: 1; border: 1px solid var(--ui-border, #e5e7eb); border-radius: 999px;
            padding: 10px 14px; font-size: 13.5px;
            outline: none; transition: border-color .2s, box-shadow .2s;
            background: var(--ui-bg, #f8f9fc); color: var(--ui-text, #111);
        }
        .ai-chat-panel .aicp-input:focus { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.18); background: #fff; }
        .ai-chat-panel .aicp-send {
            width: 38px; height: 38px; border-radius: 50%; border: 0;
            background: linear-gradient(135deg, #8b5cf6, #ec4899);
            color: #fff; cursor: pointer; font-size: 15px;
            display: grid; place-items: center;
            transition: transform .15s;
        }
        .ai-chat-panel .aicp-send:hover:not(:disabled) { transform: scale(1.08); }
        .ai-chat-panel .aicp-send:disabled { opacity: .5; cursor: wait; }
        .dark-mode .ai-chat-panel { background: #1e2134; border-color: rgba(255,255,255,.08); }
        .dark-mode .ai-chat-panel .aicp-msgs { background: #141626; }
        .dark-mode .ai-chat-panel .aicp-ai .aicp-bubble { background: #2a2d45; color: #e5e7eb; }
        .dark-mode .ai-chat-panel .aicp-form { background: #1e2134; border-color: rgba(255,255,255,.08); }
        .dark-mode .ai-chat-panel .aicp-input { background: #2a2d45; color: #e5e7eb; border-color: rgba(255,255,255,.08); }
        @media (max-width: 480px) {
            .ai-chat-panel { right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: calc(100vw - 16px); height: calc(100vh - 80px); height: calc(100dvh - 80px); }
            .ai-chat-bubble { right: 16px; bottom: calc(102px + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
        }
        @media (prefers-reduced-motion: reduce) {
            .ai-chat-panel, .ai-chat-bubble { transition: opacity .2s; }
        }

        @keyframes skeletonShimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* Flaticon uicons base sizing */
        .fi { font-size: inherit; line-height: 1; vertical-align: -0.125em; }

        /* Required-options gate: highlight required group/variants when user
           tries to quick-add a product that needs choices first. */
        .addon-group-required .addon-group-pill-req {
            box-shadow: 0 0 0 0 rgba(239, 68, 68, .55);
        }
        .addon-group-error {
            outline: 2px solid #ef4444;
            outline-offset: 4px;
            border-radius: 12px;
            animation: addonShake 0.5s ease;
        }
        .required-pulse {
            animation: requiredPulse 1.4s ease;
        }
        @keyframes requiredPulse {
            0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); }
            60%  { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
            100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
        }
        @keyframes addonShake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-6px); }
            75% { transform: translateX(6px); }
        }
        @media (prefers-reduced-motion: reduce) {
            .required-pulse, .addon-group-error { animation: none; }
        }
    