/* ============================================================
   WhatsApp Order Page — Public Mobile Menu & Themes v3.0
   Modern Consumer Food Ordering Experience
   ============================================================ */

/* ── Default Theme Tokens: Modern Emerald ──────────────────── */
:root {
    --theme-primary:        #08A879;
    --theme-primary-hover:  #068F66;
    --theme-primary-light:  rgba(8, 168, 121, 0.12);
    --theme-accent:         #10B981;
    --theme-bg:             #F6F8FB;
    --theme-surface:        #FFFFFF;
    --theme-surface-2:      #F8FAFC;
    --theme-text:           #0F172A;
    --theme-text-muted:     #64748B;
    --theme-text-light:     #94A3B8;
    --theme-border:         #E2E8F0;
    --theme-card-shadow:    0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    --theme-card-hover:     0 6px 16px rgba(0, 0, 0, 0.07);
    --theme-whatsapp:       #25D366;
    --theme-whatsapp-hover: #20BD5A;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Theme: Warm Sunset / Cafe ─────────────────────────────── */
.theme-warm-cafe {
    --theme-primary:        #B45309;
    --theme-primary-hover:  #92400E;
    --theme-primary-light:  rgba(180, 83, 9, 0.12);
    --theme-accent:         #D97706;
    --theme-bg:             #FBF9F5;
    --theme-surface:        #FFFFFF;
    --theme-surface-2:      #F5F0E8;
    --theme-text:           #292524;
    --theme-text-muted:     #78716C;
    --theme-text-light:     #A8A29E;
    --theme-border:         #E7E5E4;
}

/* ── Theme: Vibrant Bistro ─────────────────────────────────── */
.theme-vibrant-bistro {
    --theme-primary:        #DC2626;
    --theme-primary-hover:  #B91C1C;
    --theme-primary-light:  rgba(220, 38, 38, 0.12);
    --theme-accent:         #EA580C;
    --theme-bg:             #FAFAFA;
    --theme-surface:        #FFFFFF;
    --theme-surface-2:      #F4F4F5;
    --theme-text:           #18181B;
    --theme-text-muted:     #71717A;
    --theme-text-light:     #A1A1AA;
    --theme-border:         #E4E4E7;
}

/* ── Theme: Midnight Dark ──────────────────────────────────── */
.theme-midnight-dark {
    --theme-primary:        #3B82F6;
    --theme-primary-hover:  #2563EB;
    --theme-primary-light:  rgba(59, 130, 246, 0.15);
    --theme-accent:         #60A5FA;
    --theme-bg:             #090D16;
    --theme-surface:        #111827;
    --theme-surface-2:      #1F2937;
    --theme-text:           #F3F4F6;
    --theme-text-muted:     #9CA3AF;
    --theme-text-light:     #6B7280;
    --theme-border:         #1F2937;
    --theme-card-shadow:    0 4px 12px rgba(0, 0, 0, 0.35);
    --theme-card-hover:     0 8px 20px rgba(0, 0, 0, 0.5);
}

/* ── Theme: Pastel Bakery ──────────────────────────────────── */
.theme-pastel-bakery {
    --theme-primary:        #DB2777;
    --theme-primary-hover:  #BE185D;
    --theme-primary-light:  rgba(219, 39, 119, 0.12);
    --theme-accent:         #F472B6;
    --theme-bg:             #FFF7F9;
    --theme-surface:        #FFFFFF;
    --theme-surface-2:      #FDF2F4;
    --theme-text:           #374151;
    --theme-text-muted:     #6B7280;
    --theme-text-light:     #9CA3AF;
    --theme-border:         #FCE7F3;
}

/* ── Base Reset ────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    min-height: 100vh;
    padding-bottom: 110px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Desktop Shell Framing ─────────────────────────────────── */
.menu-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    background-color: var(--theme-bg);
}

.menu-container {
    width: 100%;
    max-width: 560px;
    background-color: var(--theme-surface);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.04);
}

@media (min-width: 600px) {
    .menu-shell {
        padding: 16px 0 32px;
    }
    .menu-container {
        border-radius: var(--radius-lg);
        overflow: hidden;
        border: 1px solid var(--theme-border);
    }
}

/* ── Header & Profile Banner ───────────────────────────────── */
.menu-header {
    position: relative;
    background-color: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

.menu-cover {
    height: 150px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-accent));
    background-size: cover;
    background-position: center;
    position: relative;
}

.menu-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.35) 100%);
}

.menu-profile {
    padding: 0 20px 20px;
    position: relative;
    margin-top: -48px;
}

.menu-avatar-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.menu-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    border: 3.5px solid var(--theme-surface);
    background-color: var(--theme-surface);
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* ── Status Badges ─────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 9999px;
    letter-spacing: 0.2px;
}

.status-badge-open {
    background: rgba(8, 168, 121, 0.12);
    color: var(--theme-primary);
    border: 1px solid rgba(8, 168, 121, 0.25);
}

.status-badge-open .status-dot {
    background-color: var(--theme-primary);
    animation: statusPulse 2s infinite;
}

.status-badge-closed {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.status-badge-closed .status-dot {
    background-color: #EF4444;
}

.status-badge-paused {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.status-badge-paused .status-dot {
    background-color: #F59E0B;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.9); }
}

.biz-name {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 6px;
    color: var(--theme-text);
    letter-spacing: -0.3px;
}

.biz-description {
    font-size: 13.5px;
    color: var(--theme-text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

.biz-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-text-muted);
}
.meta-chip svg {
    color: var(--theme-text-light);
}

.meta-chip.meta-chip-btn {
    cursor: pointer;
    border-color: var(--theme-primary-light);
    color: var(--theme-primary);
    transition: all 0.18s ease;
    font-family: inherit;
    background: var(--theme-surface-2);
}
.meta-chip.meta-chip-btn:hover {
    background: var(--theme-primary-light);
}

/* ── Sticky Micro-Header (Appears on Scroll) ───────────────── */
.menu-micro-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--theme-surface) 92%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--theme-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.menu-micro-header.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.micro-header-inner {
    max-width: 560px;
    margin: 0 auto;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.micro-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    min-width: 0;
}

.micro-header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--theme-border);
    flex-shrink: 0;
    background: var(--theme-surface-2);
}

.micro-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.micro-header-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--theme-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.micro-header-status {
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    margin-top: 1px;
}

.micro-header-status.status-open {
    color: #10B981;
}

.micro-header-status.status-closed {
    color: #EF4444;
}

.micro-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

.micro-header-status.status-open .micro-status-dot {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: microPulse 2s infinite;
}

@keyframes microPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.btn-micro-info {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 9999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-2);
    color: var(--theme-text);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.btn-micro-info:hover {
    background: var(--theme-primary-light);
    color: var(--theme-primary);
    border-color: var(--theme-primary-light);
}

/* ── Closed Store Notice Banner ────────────────────────────── */
.store-closed-banner {
    margin: 16px 18px;
    padding: 13px 16px;
    background: #FFF1F2;
    border: 1px solid #FECDD3;
    border-radius: var(--radius-md);
    color: #9F1239;
    font-size: 13.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.45;
}

/* ── Search Bar ────────────────────────────────────────────── */
.search-container {
    padding: 12px 18px;
    background-color: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
    position: sticky;
    top: 0;
    z-index: 25;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    padding: 10px 38px 10px 38px;
    font-size: 13.5px;
    color: var(--theme-text);
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.search-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
    background: var(--theme-surface);
}

.search-icon {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-text-light);
    pointer-events: none;
}

.search-clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--theme-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}
.search-clear-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* ── Sticky Category Navigation Tabs ───────────────────────── */
.category-tabs-nav {
    position: sticky;
    top: 57px;
    background-color: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
    z-index: 20;
    overflow-x: auto;
    white-space: nowrap;
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    scrollbar-width: none;
}

.category-tabs-nav::-webkit-scrollbar {
    display: none;
}

.cat-tab {
    padding: 7px 14px;
    border-radius: 9999px;
    font-size: 12.5px;
    font-weight: 700;
    background-color: var(--theme-surface-2);
    color: var(--theme-text-muted);
    text-decoration: none;
    border: 1px solid var(--theme-border);
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.cat-tab:hover {
    color: var(--theme-text);
    border-color: #CBD5E1;
}

.cat-tab.active {
    background-color: var(--theme-primary);
    color: #FFFFFF;
    border-color: var(--theme-primary);
    box-shadow: 0 2px 8px var(--theme-primary-light);
}

/* ── Content & Categories ──────────────────────────────────── */
.menu-content {
    padding: 16px 18px;
}

.category-section {
    margin-bottom: 30px;
    scroll-margin-top: 110px;
}

.category-header-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.category-header {
    font-size: 17px;
    font-weight: 800;
    color: var(--theme-text);
    letter-spacing: -0.2px;
}

.category-count {
    font-size: 11px;
    font-weight: 700;
    background: var(--theme-surface-2);
    color: var(--theme-text-muted);
    border: 1px solid var(--theme-border);
    padding: 1px 7px;
    border-radius: 9999px;
}

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

/* ── Product Cards ─────────────────────────────────────────── */
.product-card {
    background-color: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    display: flex;
    gap: 14px;
    box-shadow: var(--theme-card-shadow);
    transition: all 0.2s ease;
}

.product-card:hover {
    box-shadow: var(--theme-card-hover);
    border-color: #CBD5E1;
}

.product-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--theme-text);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-desc {
    font-size: 12.5px;
    color: var(--theme-text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
}

.product-price {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--theme-primary);
    white-space: nowrap;
}

.price-from {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--theme-text-muted);
}

.product-img-wrap {
    width: 92px;
    height: 92px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    flex-shrink: 0;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

/* ── Sold Out State ────────────────────────────────────────── */
.product-card.is-sold-out {
    opacity: 0.65;
    background: var(--theme-surface-2);
}

.badge-sold-out {
    display: inline-block;
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 9999px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sold-out {
    background: var(--theme-border);
    color: var(--theme-text-muted);
    border: none;
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: not-allowed;
}

/* ── Add Item & Quantity Stepper ───────────────────────────── */
.btn-add-item {
    background: var(--theme-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    padding: 7px 14px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.btn-add-item:hover {
    background: var(--theme-primary-hover);
    transform: translateY(-1px);
}

.btn-add-item:active {
    transform: scale(0.97);
}

.btn-customise-item {
    background: var(--theme-surface-2);
    color: var(--theme-primary);
    border: 1px solid var(--theme-primary);
}
.btn-customise-item:hover {
    background: var(--theme-primary-light);
}

.qty-control-inline {
    display: none;
    align-items: center;
    gap: 6px;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-sm);
    padding: 2px 4px;
}

.qty-control-inline.has-qty {
    display: flex;
}

.qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    color: var(--theme-text);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.qty-btn:hover {
    background-color: var(--theme-surface-2);
    border-color: #CBD5E1;
}

.qty-btn:active {
    transform: scale(0.92);
}

.qty-number {
    font-size: 13px;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    color: var(--theme-text);
}

/* ── Floating Bottom Cart Bar ──────────────────────────────── */
.cart-floating-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    background: var(--theme-primary);
    color: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 13px 18px;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 28px -4px rgba(8, 168, 121, 0.45);
    z-index: 40;
    cursor: pointer;
    animation: cartSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    transition: transform 0.15s, background-color 0.15s;
}

.cart-floating-bar:hover {
    background-color: var(--theme-primary-hover);
}

.cart-floating-bar:active {
    transform: translateX(-50%) scale(0.98);
}

.cart-floating-bar.visible {
    display: flex;
}

.cart-floating-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-floating-icon svg {
    width: 20px;
    height: 20px;
}

.cart-badge-count {
    background: rgba(255, 255, 255, 0.22);
    font-size: 12.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 9999px;
}

.cart-floating-total {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.2px;
}

.cart-floating-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
}

/* ── Cart & Customization Drawers ──────────────────────────── */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 50;
    align-items: flex-end;
    justify-content: center;
}

.cart-drawer-overlay.open {
    display: flex;
}

.cart-drawer {
    background-color: var(--theme-surface);
    border-radius: 22px 22px 0 0;
    width: 100%;
    max-width: 560px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    animation: drawerSlideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.drawer-drag-handle {
    width: 40px;
    height: 4px;
    border-radius: 9999px;
    background: #CBD5E1;
    margin: 10px auto 4px;
    flex-shrink: 0;
}

/* ── Store Details Drawer ──────────────────────────────────── */
.store-info-drawer {
    max-height: 82vh;
}

.store-info-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--theme-border);
    flex-shrink: 0;
    background: var(--theme-surface-2);
}

.store-info-body {
    padding: 16px 20px 24px;
}

.store-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.store-info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 14px;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-sm);
}

.info-row-icon {
    font-size: 18px;
    line-height: 1;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    flex-shrink: 0;
}

.info-row-content {
    flex: 1;
    min-width: 0;
}

.info-row-title {
    font-size: 13.5px;
    font-weight: 750;
    color: var(--theme-text);
}

.info-row-desc {
    font-size: 12.5px;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

.info-notice-banner {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: #FFF1F2;
    border: 1px solid #FECDD3;
    color: #9F1239;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4;
}

.drawer-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--theme-border);
    flex-shrink: 0;
}

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

.drawer-title-icon {
    color: var(--theme-primary);
    display: flex;
    align-items: center;
}

.drawer-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--theme-text);
}

.drawer-subtitle {
    font-size: 12.5px;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

.btn-close-drawer {
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--theme-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.btn-close-drawer:hover {
    background: var(--theme-border);
    color: var(--theme-text);
}

.drawer-body {
    padding: 18px 20px 24px;
    overflow-y: auto;
    flex: 1;
}

/* ── Cart Drawer Items ─────────────────────────────────────── */
.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--theme-border);
    gap: 12px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--theme-text);
}

.cart-item-unit-price {
    font-size: 12px;
    color: var(--theme-text-muted);
    margin-top: 2px;
}

.cart-item-options {
    font-size: 11.5px;
    color: var(--theme-text-muted);
    margin-top: 3px;
    line-height: 1.35;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.cart-item-subtotal {
    font-size: 14px;
    font-weight: 800;
    min-width: 55px;
    text-align: right;
    color: var(--theme-text);
}

/* ── Segmented Delivery / Pickup Tabs ──────────────────────── */
.order-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 18px;
    background: var(--theme-surface-2);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--theme-border);
}

.order-type-tabs.single-tab {
    grid-template-columns: 1fr;
}

.order-type-btn {
    border: none;
    background: transparent;
    padding: 9px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--theme-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.18s ease;
}

.order-type-btn:hover {
    color: var(--theme-text);
}

.order-type-btn.active {
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.order-type-btn.active svg {
    color: var(--theme-primary);
}

/* ── Checkout Form ─────────────────────────────────────────── */
.checkout-form .form-group {
    margin-bottom: 12px;
}

.checkout-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--theme-text);
}
.checkout-form label .req {
    color: #DC2626;
}
.checkout-form label .optional {
    color: var(--theme-text-light);
    font-weight: 500;
    font-size: 11px;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--theme-text);
    outline: none;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
    background: var(--theme-surface);
}

/* ── Summary Math ──────────────────────────────────────────── */
.cart-math {
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin: 16px 0;
}

.math-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--theme-text-muted);
}

.math-row.total-row {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--theme-text);
    border-top: 1px dashed var(--theme-border);
    padding-top: 8px;
    margin-top: 8px;
    margin-bottom: 0;
}

/* ── WhatsApp Order Button ─────────────────────────────────── */
.btn-whatsapp-order {
    width: 100%;
    background-color: var(--theme-whatsapp);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 15px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    transition: background-color 0.18s, transform 0.1s;
    letter-spacing: -0.1px;
}

.btn-whatsapp-order:hover {
    background-color: var(--theme-whatsapp-hover);
}

.btn-whatsapp-order:active {
    transform: scale(0.99);
}

.min-order-warning {
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    color: #92400E;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

/* ── Minimum Order Progress Card ───────────────────────────── */
.min-order-progress-card {
    margin: 12px 0 14px;
    padding: 12px 14px;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.min-order-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
}

.min-order-progress-label {
    color: var(--theme-text);
}

.min-order-progress-value {
    color: var(--theme-text-muted);
}

.min-order-progress-track {
    width: 100%;
    height: 7px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.min-order-progress-fill {
    height: 100%;
    background: #F59E0B;
    border-radius: 9999px;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}

.min-order-progress-card.is-reached .min-order-progress-fill {
    background: var(--theme-primary);
}

.min-order-progress-hint {
    font-size: 11.5px;
    color: var(--theme-text-muted);
    line-height: 1.35;
}

.min-order-progress-card.is-reached .min-order-progress-hint {
    color: var(--theme-primary);
    font-weight: 700;
}

.opt-choice-item {
    transition: border-color 0.18s ease, background-color 0.18s ease;
}

.opt-choice-item.is-selected {
    border-color: var(--theme-primary);
    background: var(--theme-primary-light);
}

/* ── Customization Drawer ──────────────────────────────────── */
.customization-drawer .drawer-body {
    padding-bottom: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.options-drawer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 18px;
    background: var(--theme-surface);
    border-top: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.modal-qty-stepper {
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-sm);
    padding: 3px 6px;
}

.btn-add-modal-cart {
    flex: 1;
    background: var(--theme-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-md);
    padding: 13px 18px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 12px var(--theme-primary-light);
    transition: background-color 0.15s, transform 0.1s;
}

.btn-add-modal-cart:hover {
    background: var(--theme-primary-hover);
}

.btn-add-modal-cart:active {
    transform: scale(0.99);
}

.opt-total-chip {
    background: rgba(255, 255, 255, 0.24);
    padding: 3px 9px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
}

.opt-group-box {
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.opt-group-header {
    padding: 11px 14px;
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.opt-group-title {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--theme-text);
}

.opt-group-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.opt-badge-required {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.opt-badge-optional {
    background: var(--theme-surface-2);
    color: var(--theme-text-muted);
    border: 1px solid var(--theme-border);
}

.opt-choice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-bottom: 1px solid var(--theme-border);
    cursor: pointer;
    transition: background-color 0.15s;
    user-select: none;
}

.opt-choice-item:last-child {
    border-bottom: none;
}

.opt-choice-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.opt-choice-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opt-choice-left input[type="radio"],
.opt-choice-left input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--theme-primary);
    cursor: pointer;
}

.opt-choice-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--theme-text);
}

.opt-choice-price {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--theme-primary);
}

/* ── Empty State & Footer ──────────────────────────────────── */
.menu-empty-state {
    text-align: center;
    padding: 56px 20px;
    color: var(--theme-text-muted);
}

.menu-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--theme-text-light);
}

.menu-empty-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--theme-text);
    margin-bottom: 6px;
}

.menu-empty-desc {
    font-size: 13.5px;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

.menu-footer {
    text-align: center;
    padding: 36px 14px 20px;
    font-size: 12px;
    color: var(--theme-text-light);
    border-top: 1px solid var(--theme-border);
    margin-top: 20px;
}

.footer-biz-name {
    font-weight: 700;
    color: var(--theme-text-muted);
    margin-bottom: 4px;
    font-size: 13px;
}

.footer-powered {
    font-size: 11.5px;
}

/* ── Utilities ─────────────────────────────────────────────── */
.font-mono {
    font-family: ui-monospace, 'SF Mono', monospace;
}

.font-bold {
    font-weight: 800;
}

/* ── Keyframe Animations ───────────────────────────────────── */
@keyframes cartSlideUp {
    from { opacity: 0; transform: translate(-50%, 25px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   Dietary & Allergen Badges (Public Menu)
   ══════════════════════════════════════════════════════════ */
.product-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin: 4px 0 6px;
}

.product-badges-wrap.is-compact {
    margin: 3px 0 4px;
    gap: 4px;
}

.dietary-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid var(--theme-border, #E2E8F0);
    background: var(--theme-surface, #FFFFFF);
    color: var(--theme-text, #0F172A);
    white-space: nowrap;
    letter-spacing: 0.1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.product-badges-wrap.is-compact .dietary-chip {
    font-size: 10px;
    padding: 2px 6px;
    gap: 3px;
}

.dietary-chip .chip-icon {
    font-size: 11px;
    line-height: 1;
    display: inline-block;
}

/* 🟢 Vegetarian */
.dietary-chip.badge-veg {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}

/* 🔴 Non-Veg */
.dietary-chip.badge-nonveg {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

/* 🌶️ Spicy Levels */
.dietary-chip.badge-spicy-mild {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #92400E;
}

.dietary-chip.badge-spicy-med {
    background: #FFF7ED;
    border-color: #FDBA74;
    color: #C2410C;
}

.dietary-chip.badge-spicy-hot {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #B91C1C;
    font-weight: 800;
}

/* 🌿 Vegan */
.dietary-chip.badge-allergen-vegan {
    background: #F0FDF4;
    border-color: #BBF7D0;
    color: #15803D;
}

/* ☪️ Halal */
.dietary-chip.badge-allergen-halal {
    background: #F0FDF4;
    border-color: #86EFAC;
    color: #166534;
}

/* 🌾 Gluten-Free */
.dietary-chip.badge-allergen-gf {
    background: #FFFBEB;
    border-color: #FDE68A;
    color: #854D0E;
}

/* 🥜 Contains Nuts */
.dietary-chip.badge-allergen-nuts {
    background: #FEF3C7;
    border-color: #FCD34D;
    color: #78350F;
}

/* Dark theme overrides */
.theme-midnight-dark .dietary-chip {
    background: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}
.theme-midnight-dark .dietary-chip.badge-veg {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34D399;
}
.theme-midnight-dark .dietary-chip.badge-nonveg {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: #F87171;
}
.theme-midnight-dark .dietary-chip.badge-spicy-mild,
.theme-midnight-dark .dietary-chip.badge-spicy-med,
.theme-midnight-dark .dietary-chip.badge-spicy-hot {
    background: rgba(249, 115, 22, 0.15);
    border-color: rgba(249, 115, 22, 0.35);
    color: #FB923C;
}
.theme-midnight-dark .dietary-chip.badge-allergen-vegan,
.theme-midnight-dark .dietary-chip.badge-allergen-halal {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.35);
    color: #4ADE80;
}
.theme-midnight-dark .dietary-chip.badge-allergen-gf,
.theme-midnight-dark .dietary-chip.badge-allergen-nuts {
    background: rgba(234, 179, 8, 0.15);
    border-color: rgba(234, 179, 8, 0.35);
    color: #FACC15;
}
