﻿@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;1,14..32,400&display=swap');

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
    --red: #e74c3c;
    --red-dark: #c0392b;
    --red-light: #fce4ec;
    --red-mid: rgba(231,76,60,.12);
    --ink: #111111;
    --ink-2: #444444;
    --ink-3: #888888;
    --ink-4: #bbbbbb;
    --surface: #ffffff;
    --bg: #f7f7f7;
    --line: rgba(0,0,0,.07);
    --line-soft: rgba(0,0,0,.04);
    --green: #27ae60;
    --green-bg: #eafaf1;
    --amber: #f39c12;
    --amber-bg: #fff8e1;
    --blue: #2980b9;
    --blue-bg: #e8f4fd;
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 40px rgba(0,0,0,.14);
    --ease: cubic-bezier(.4, 0, .2, 1);
    --ease-out: cubic-bezier(0, 0, .2, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
    --nav-h: 68px;
    --top-h: 60px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    background: #e8e8e8;
    min-height: 100vh;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 60px rgba(0,0,0,.15);
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════
   PAGE ENTER ANIMATION
═══════════════════════════════════════════════ */
@keyframes page-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body > *:not(.bottom-nav):not(.toast) {
    animation: page-in .32s var(--ease-out) both;
}

/* ═══════════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════════ */
.top-bar {
    background: var(--surface);
    padding: 0 16px;
    height: var(--top-h);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255,255,255,.92);
}

    .top-bar h1 {
        font-size: 16px;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: -.3px;
    }

    .top-bar p {
        font-size: 11px;
        color: var(--ink-3);
        margin-top: 1px;
    }

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--ink-2);
    transition: background .15s var(--ease), transform .12s var(--ease);
    flex-shrink: 0;
}

    .icon-btn:active {
        background: var(--line);
        transform: scale(.92);
    }

/* ═══════════════════════════════════════════════
   OPEN STATUS BAR
═══════════════════════════════════════════════ */
.open-bar {
    background: var(--green-bg);
    margin: 8px 14px 0;
    border-radius: var(--r-sm);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: #1a7a40;
}

/* ═══════════════════════════════════════════════
   BANNER
═══════════════════════════════════════════════ */
.banner-wrap {
    padding: 12px 14px 8px;
    background: var(--bg);
}

.banner-slider {
    display: flex;
    gap: 0;
    border-radius: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .banner-slider::-webkit-scrollbar {
        display: none;
    }

.banner {
    min-width: 100%;
    height: 200px;
    border-radius: 0;
    padding: 18px 16px;
    scroll-snap-align: start;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s var(--ease);
}

    .banner:active {
        transform: scale(.98);
    }

    .banner::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(0,0,0,.15) 0%, transparent 60%);
        border-radius: inherit;
    }

    .banner h3 {
        font-size: 15px;
        color: #fff;
        font-weight: 600;
        line-height: 1.35;
        letter-spacing: -.2px;
        position: relative;
        z-index: 1;
    }

    .banner p {
        font-size: 11px;
        color: rgba(255,255,255,.75);
        margin-top: 4px;
        position: relative;
        z-index: 1;
    }

.banner-emoji {
    position: absolute;
    right: 12px;
    bottom: 8px;
    font-size: 58px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,.2));
    animation: float 3s ease-in-out infinite;
}


@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.banner-dots {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}

.banner-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #ddd;
    transition: all .35s var(--ease);
}

    .banner-dot.active {
        background: var(--red);
        width: 16px;
        border-radius: 3px;
    }

/* ═══════════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════════ */
.section-header {
    padding: 16px 14px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
}

    .section-header h2 {
        font-size: 15px;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: -.2px;
    }

    .section-header span {
        font-size: 12px;
        color: var(--red);
        font-weight: 500;
    }

/* ═══════════════════════════════════════════════
   RESTAURANT GRID
═══════════════════════════════════════════════ */
.rest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 6px 14px calc(var(--nav-h) + 16px);
    background: var(--bg);
}

.rest-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--r-md);
    transition: transform .18s var(--ease-spring);
    -webkit-tap-highlight-color: transparent;
}

    .rest-item:active {
        transform: scale(.93);
    }

.rest-logo-wrap {
    position: relative;
}

.rest-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    background: var(--bg);
    border: 1px solid var(--line-soft);
    overflow: hidden;
    transition: box-shadow .2s var(--ease);
    box-shadow: var(--shadow-xs);
}

.rest-item:hover .rest-logo {
    box-shadow: var(--shadow-md);
}

.rest-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    position: absolute;
    top: 5px;
    right: 5px;
    box-shadow: var(--shadow-xs);
}

.dot-open {
    background: var(--green);
}

.dot-busy {
    background: var(--amber);
}

.dot-closed {
    background: var(--red);
}

.rest-name {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ink-2);
    text-align: center;
    line-height: 1.3;
}

.rest-tag {
    font-size: 10px;
    color: var(--ink-4);
    text-align: center;
}

    .rest-tag.open {
        color: var(--green);
    }

    .rest-tag.closed {
        color: var(--red);
    }

/* ═══════════════════════════════════════════════
   BOTTOM NAV
═══════════════════════════════════════════════ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(255,255,255,.94);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
    display: flex;
    padding: 8px 0 env(safe-area-inset-bottom, 12px);
    z-index: 99;
    height: var(--nav-h);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s var(--ease-spring);
}

    .nav-item:active {
        transform: scale(.88);
    }

.nav-icon {
    font-size: 23px;
    color: var(--ink-4);
    position: relative;
    transition: color .2s var(--ease);
}

.nav-item.active .nav-icon {
    color: var(--red);
}

.nav-label {
    font-size: 10px;
    color: var(--ink-4);
    font-weight: 500;
    transition: color .2s var(--ease);
}

.nav-item.active .nav-label {
    color: var(--red);
}

.nav-item svg {
    stroke: var(--ink-4);
    transition: stroke .2s var(--ease);
}
.nav-item.active svg {
    stroke: var(--red);
}

/* ═══════════════════════════════════════════════
   CART BADGE
═══════════════════════════════════════════════ */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--red);
    color: #fff;
    font-size: 9px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid #fff;
    z-index: 1;
    animation: badge-pop .2s var(--ease-spring);
}

@keyframes badge-pop {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* ═══════════════════════════════════════════════
   LOADING
═══════════════════════════════════════════════ */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    gap: 14px;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--line);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    font-size: 13px;
    color: var(--ink-3);
}

/* ═══════════════════════════════════════════════
   ERROR
═══════════════════════════════════════════════ */
.error-box {
    margin: 16px;
    background: #fff0f0;
    border: 1px solid #fcc;
    border-radius: var(--r-md);
    padding: 16px;
    text-align: center;
}

    .error-box p {
        font-size: 13px;
        color: var(--red);
    }

/* ═══════════════════════════════════════════════
   TOAST
═══════════════════════════════════════════════ */

.toast {
    position: fixed;
    bottom: calc(var(--nav-h) + 80px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: rgba(20,20,20,.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease-out);
    white-space: nowrap;
    max-width: calc(100% - 48px);
    text-align: center;
    box-shadow: var(--shadow-md);
}
    .toast.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

/* ═══════════════════════════════════════════════
   CATEGORY TABS
═══════════════════════════════════════════════ */
.cat-tabs-wrap {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: var(--top-h);
    z-index: 99;
}

.cat-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

    .cat-tabs::-webkit-scrollbar {
        display: none;
    }

.cat-tab {
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 100px;
    white-space: nowrap;
    cursor: pointer;
    border: 1.5px solid var(--line);
    color: var(--ink-3);
    background: var(--surface);
    transition: all .18s var(--ease);
    font-family: 'Inter', sans-serif;
    letter-spacing: -.1px;
}

    .cat-tab:active {
        transform: scale(.95);
    }

    .cat-tab.active {
        background: var(--red);
        color: #fff;
        border-color: var(--red);
        box-shadow: 0 2px 8px rgba(231,76,60,.35);
    }

/* ═══════════════════════════════════════════════
   MENU
═══════════════════════════════════════════════ */
.menu-section {
    padding-bottom: calc(var(--nav-h) + 80px);
}

.menu-section-wrapper {
}

.menu-section-title {
    padding: 12px 14px 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--red);
    background: var(--bg);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.menu-item {
    background: var(--surface);
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    transition: background .15s var(--ease);
}

    .menu-item:active {
        background: var(--bg);
    }

@keyframes item-in {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--r-md);
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

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

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

    .menu-item-info h4 {
        font-size: 14px;
        font-weight: 600;
        color: var(--ink);
        margin-bottom: 3px;
        letter-spacing: -.2px;
    }

    .menu-item-info p {
        font-size: 12px;
        color: var(--ink-3);
        margin-bottom: 8px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

.menu-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-price {
    font-size: 15px;
    font-weight: 600;
    color: var(--red);
    letter-spacing: -.3px;
}

.unavailable-tag {
    font-size: 11px;
    color: var(--ink-4);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid var(--line);
}

/* ═══════════════════════════════════════════════
   ADD / QTY BUTTONS
═══════════════════════════════════════════════ */
.add-btn {
    width: 34px;
    height: 34px;
    background: var(--red);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    transition: transform .15s var(--ease-spring), box-shadow .15s var(--ease);
    box-shadow: 0 2px 8px rgba(231,76,60,.4);
}

    .add-btn:active {
        transform: scale(.88);
        box-shadow: none;
    }

.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg);
    border-radius: var(--r-sm);
    padding: 3px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: none;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--ink-2);
    box-shadow: var(--shadow-xs);
    transition: transform .12s var(--ease-spring), background .12s var(--ease);
    font-family: 'Inter', sans-serif;
}

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

    .qty-btn.minus {
        color: var(--red);
    }

.qty-num {
    font-size: 14px;
    font-weight: 600;
    min-width: 22px;
    text-align: center;
    color: var(--ink);
}

/* ═══════════════════════════════════════════════
   CART BOTTOM BAR (menu page)
═══════════════════════════════════════════════ */

.cart-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 68px;
    width: auto;
    max-width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
    background: var(--red);
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(231,76,60,.3);
    transition: opacity .3s var(--ease);
}

    .cart-bottom-bar.hidden {
        display: none;
    }

.cart-bar-left {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

    .cart-bar-left span:first-child {
        font-size: 11px;
        color: rgba(255,255,255,.75);
    }

    .cart-bar-left span:last-child {
        font-size: 15px;
        font-weight: 600;
        color: #fff;
    }

.cart-bottom-bar button {
    background: rgba(255,255,255,.22);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background .15s var(--ease);
    backdrop-filter: blur(4px);
}

    .cart-bottom-bar button:active {
        background: rgba(255,255,255,.32);
    }

/* ═══════════════════════════════════════════════
   CART PAGE
═══════════════════════════════════════════════ */
.cart-restaurant-section {
    background: var(--surface);
    margin-bottom: 10px;
    border-radius: var(--r-md);
    margin: 0 12px 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-restaurant-header {
    padding: 13px 14px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    background: var(--bg);
}

    .cart-restaurant-header h3 {
        font-size: 12px;
        font-weight: 600;
        color: var(--red);
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .cart-restaurant-header span {
        font-size: 12px;
        font-weight: 500;
        color: var(--ink-3);
    }

.cart-line-item {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line-soft);
    transition: background .15s var(--ease);
}

    .cart-line-item:last-of-type {
        border-bottom: none;
    }

    .cart-line-item:active {
        background: var(--bg);
    }

.cart-item-img {
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    background: var(--bg);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

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

.cart-line-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.cart-line-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--ink-2);
    transition: transform .12s var(--ease-spring);
    font-family: 'Inter', sans-serif;
}

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

    .cart-qty-btn.minus {
        color: var(--red);
    }

.cart-qty-num {
    font-size: 13px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

.cart-line-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    min-width: 68px;
    text-align: right;
}

.cart-subtotal-row {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    background: var(--bg);
    border-top: 1px solid var(--line-soft);
}

    .cart-subtotal-row span {
        font-size: 12px;
        color: var(--ink-3);
    }

    .cart-subtotal-row strong {
        font-size: 13px;
        font-weight: 600;
        color: var(--ink);
    }

.cart-grand-total {
    background: var(--surface);
    padding: 16px 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 12px 10px;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

    .cart-grand-total span {
        font-size: 14px;
        font-weight: 500;
        color: var(--ink-2);
    }

    .cart-grand-total strong {
        font-size: 18px;
        font-weight: 700;
        color: var(--red);
        letter-spacing: -.4px;
    }

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

    .empty-cart .empty-icon {
        font-size: 56px;
    }

    .empty-cart h3 {
        font-size: 17px;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: -.3px;
    }

    .empty-cart p {
        font-size: 13px;
        color: var(--ink-3);
    }

    .empty-cart button {
        margin-top: 8px;
        background: var(--red);
        color: #fff;
        border: none;
        padding: 13px 28px;
        border-radius: var(--r-md);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        box-shadow: 0 4px 14px rgba(231,76,60,.4);
        transition: transform .15s var(--ease-spring);
    }

        .empty-cart button:active {
            transform: scale(.96);
        }


.cart-checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 68px;
    width: auto;
    max-width: 430px;
    margin: 0 auto;
    box-sizing: border-box;
    background: var(--red);
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(231,76,60,.3);
}

    .cart-checkout-bar button {
        background: rgba(255,255,255,.22);
        color: #fff;
        border: none;
        padding: 10px 20px;
        border-radius: var(--r-sm);
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        font-family: 'Inter', sans-serif;
        transition: background .15s var(--ease);
    }

        .cart-checkout-bar button:active {
            background: rgba(255,255,255,.32);
        }

/* ═══════════════════════════════════════════════
   PHONE MODAL
═══════════════════════════════════════════════ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fade-in .2s var(--ease);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-sheet {
    position: relative;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 20px 20px 36px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: sheet-up .3s var(--ease-out);
    box-shadow: 0 -8px 40px rgba(0,0,0,.15);
}

@keyframes sheet-up {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.modal-handle {
    width: 36px;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
    margin: 0 auto 6px;
}

.modal-sheet h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.3px;
}

.modal-sheet p {
    font-size: 13px;
    color: var(--ink-3);
    margin-top: -6px;
}

.modal-sheet input {
    padding: 14px 16px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    font-size: 17px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
    color: var(--ink);
    background: var(--surface);
}

    .modal-sheet input:focus {
        border-color: var(--red);
        box-shadow: 0 0 0 3px rgba(231,76,60,.12);
    }

.modal-sheet button {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: var(--r-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: transform .15s var(--ease-spring), box-shadow .15s var(--ease);
    box-shadow: 0 4px 14px rgba(231,76,60,.4);
}

    .modal-sheet button:active {
        transform: scale(.97);
        box-shadow: none;
    }

    .modal-sheet button:disabled {
        background: var(--ink-4);
        box-shadow: none;
        cursor: not-allowed;
        transform: none;
    }

/* ═══════════════════════════════════════════════
   TOKEN CARD
═══════════════════════════════════════════════ */
.token-card {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    margin: 14px 14px 10px;
    border-radius: var(--r-lg);
    padding: 22px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 24px rgba(231,76,60,.4);
    position: relative;
    overflow: hidden;
}

    .token-card::before {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: rgba(255,255,255,.08);
    }

    .token-card::after {
        content: '';
        position: absolute;
        bottom: -20px;
        left: 60px;
        width: 70px;
        height: 70px;
        border-radius: 50%;
        background: rgba(255,255,255,.06);
    }

.token-card-left,
.token-card-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.token-card-right {
    align-items: flex-end;
}

.token-label {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
}

.token-number {
    font-size: 56px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    letter-spacing: -2px;
}

.token-timer {
    font-size: 30px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.5px;
}

    .token-timer.urgent {
        color: #ffd54f;
    }

    .token-timer.expired {
        color: rgba(255,255,255,.45);
    }

/* ═══════════════════════════════════════════════
   STATUS BANNER
═══════════════════════════════════════════════ */
.status-banner {
    margin: 0 14px 12px;
    padding: 13px 16px;
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -.1px;
    animation: slide-in .3s var(--ease-out);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-banner.placed {
    background: var(--blue-bg);
    color: var(--blue);
}

.status-banner.paid {
    background: var(--green-bg);
    color: var(--green);
}

.status-banner.preparing {
    background: var(--amber-bg);
    color: #b45309;
}

.status-banner.ready {
    background: var(--green-bg);
    color: #14532d;
}

.status-banner.expired {
    background: var(--red-light);
    color: #9f1239;
}

.status-banner.completed {
    background: var(--green-bg);
    color: #14532d;
}

/* ═══════════════════════════════════════════════
   RESTAURANT ORDER CARD
═══════════════════════════════════════════════ */
.rest-order-card {
    background: var(--surface);
    margin: 0 14px 12px;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line-soft);
}

.rest-order-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
}

    .rest-order-header h3 {
        font-size: 15px;
        font-weight: 600;
        color: var(--ink);
        letter-spacing: -.2px;
    }

.rest-order-amount {
    font-size: 14px;
    color: var(--red);
    font-weight: 600;
}

/* Progress Steps */
.progress-steps {
    padding: 18px 12px 14px;
    display: flex;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

    .progress-steps::before {
        content: '';
        position: absolute;
        top: 30px;
        left: calc(12.5% + 12px);
        right: calc(12.5% + 12px);
        height: 2px;
        background: var(--line);
        z-index: 0;
    }

.progress-line {
    position: absolute;
    top: 30px;
    left: calc(12.5% + 12px);
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--red-dark));
    z-index: 1;
    transition: width .5s var(--ease);
    max-width: calc(100% - 44px);
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 2;
    flex: 1;
    min-width: 0;
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    border: 2px solid var(--line);
    background: var(--surface);
    transition: all .3s var(--ease-spring);
}

    .step-circle.done {
        background: var(--red);
        border-color: var(--red);
        color: #fff;
        box-shadow: 0 2px 8px rgba(231,76,60,.4);
    }

    .step-circle.active {
        background: var(--surface);
        border-color: var(--red);
        color: var(--red);
        box-shadow: 0 0 0 4px rgba(231,76,60,.12);
    }

    .step-circle.pending {
        background: var(--surface);
        border-color: var(--line);
        color: var(--ink-4);
    }

.step-label {
    font-size: 9.5px;
    font-weight: 500;
    color: var(--ink-4);
    text-align: center;
    line-height: 1.3;
}

    .step-label.done {
        color: var(--red);
    }

    .step-label.active {
        color: var(--red);
        font-weight: 600;
    }

/* Order Items */
.rest-order-items {
    border-top: 1px solid var(--line-soft);
    padding: 12px 16px;
}

.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 13px;
    color: var(--ink-3);
}

    .order-item-row span:last-child {
        color: var(--ink);
        font-weight: 500;
    }

.pos-ref {
    padding: 8px 16px 14px;
    font-size: 11px;
    color: var(--ink-4);
}

    .pos-ref strong {
        color: var(--ink-3);
    }

.new-order-btn {
    width: 100%;
    background: var(--surface);
    color: var(--red);
    border: 1.5px solid var(--red);
    padding: 14px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all .18s var(--ease);
    letter-spacing: -.1px;
}

    .new-order-btn:active {
        background: var(--red-light);
        transform: scale(.98);
    }

/* ═══════════════════════════════════════════════
   NOTIFICATION BANNER
═══════════════════════════════════════════════ */
.notif-banner {
    margin: 0 14px 12px;
    padding: 13px 14px;
    background: var(--amber-bg);
    border-radius: var(--r-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(243,156,18,.2);
}

    .notif-banner p {
        font-size: 12px;
        color: #92400e;
        flex: 1;
        font-weight: 500;
    }

    .notif-banner button {
        background: var(--amber);
        color: #fff;
        border: none;
        padding: 7px 14px;
        border-radius: var(--r-sm);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        white-space: nowrap;
        font-family: 'Inter', sans-serif;
        transition: transform .12s var(--ease-spring);
    }

        .notif-banner button:active {
            transform: scale(.93);
        }

/* ═══════════════════════════════════════════════
   ORDERS TABS
═══════════════════════════════════════════════ */
.orders-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

    .orders-tabs::-webkit-scrollbar {
        display: none;
    }

.order-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 9px 16px;
    border-radius: var(--r-md);
    background: var(--bg);
    border: 1.5px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    min-width: 84px;
    transition: all .18s var(--ease);
}

    .order-tab:active {
        transform: scale(.95);
    }

    .order-tab.active {
        background: var(--red-light);
        border-color: var(--red);
    }

    .order-tab .tab-token {
        font-size: 17px;
        font-weight: 600;
        color: var(--ink-2);
        letter-spacing: -.3px;
    }

    .order-tab.active .tab-token {
        color: var(--red);
    }

    .order-tab .tab-status {
        font-size: 10px;
        color: var(--ink-4);
        font-weight: 500;
    }

    .order-tab.active .tab-status {
        color: var(--red);
    }

/* ═══════════════════════════════════════════════
   PREPARING ANIMATION
═══════════════════════════════════════════════ */
.preparing-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.preparing-dots {
    display: flex;
    gap: 5px;
}

    .preparing-dots span {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: rgba(255,255,255,.7);
        animation: dot-bounce .9s infinite ease-in-out;
    }

        .preparing-dots span:nth-child(2) {
            animation-delay: .15s;
        }

        .preparing-dots span:nth-child(3) {
            animation-delay: .3s;
        }

@keyframes dot-bounce {
    0%, 80%, 100% {
        transform: scale(.6);
        opacity: .5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.preparing-text {
    font-size: 11px;
    color: rgba(255,255,255,.8);
    font-weight: 500;
}

.ready-icon {
    font-size: 38px;
    animation: pop .4s var(--ease-spring);
}

@keyframes pop {
    from {
        transform: scale(0) rotate(-10deg);
    }

    70% {
        transform: scale(1.2) rotate(3deg);
    }

    to {
        transform: scale(1) rotate(0);
    }
}

/* ═══════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ═══════════════════════════════════════════════
   INDEX PAGE EXTRAS
═══════════════════════════════════════════════ */
.top-bar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-logo {
    width: 36px;
    height: 36px;
    background: var(--red);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(231,76,60,.3);
}

.open-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .6;
        transform: scale(.85);
    }
}

.banner-text {
    position: relative;
    z-index: 1;
}

.banner-item {
    position: relative;
    overflow: hidden;
    height: 160px;
    flex-shrink: 0;
    min-width: 100%;
    scroll-snap-align: start;
    border-radius: 16px;
    cursor: pointer;
}

.banner-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* ═══════════════════════════════════════════════
   MENU PAGE EXTRAS
═══════════════════════════════════════════════ */

/* Back button SVG icon */
.icon-btn svg {
    pointer-events: none;
}

/* Restaurant Hero */
.rest-hero {
    background: var(--surface);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line-soft);
    animation: page-in .3s var(--ease-out) both;
}

.rest-hero-logo {
    width: 56px;
    height: 56px;
    border-radius: var(--r-md);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line-soft);
}

    .rest-hero-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: var(--r-md);
    }

.rest-hero-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.rest-hero-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rest-hero-meta {
    font-size: 12px;
    color: var(--ink-3);
}

/* Status pill */
.rest-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--green);
}

    .rest-status-pill::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: currentColor;
        flex-shrink: 0;
    }



/* ═══════════════════════════════════════════════
   CART PAGE EXTRAS
═══════════════════════════════════════════════ */
.cart-page-content {
    padding: 12px 0 calc(var(--nav-h) + 80px);
}

.checkout-label {
    font-size: 11px;
    color: rgba(255,255,255,.75);
    font-weight: 500;
}

.checkout-amount {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
}

.phone-error {
    font-size: 12px;
    color: var(--red);
    font-weight: 500;
    margin-top: -4px;
}

.modal-icon {
    font-size: 36px;
    margin-bottom: -4px;
}

/* Cart restaurant sections spacing */
.cart-restaurant-section {
    margin: 0 12px 10px;
}

/* Grand total card */
.cart-grand-total {
    margin: 4px 12px 10px;
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line-soft);
}

/* ═══════════════════════════════════════════════
   ORDER STATUS PAGE EXTRAS
═══════════════════════════════════════════════ */
.order-content-wrap {
    padding-bottom: calc(var(--nav-h) + 20px);
}

.new-order-wrap {
    padding: 16px 14px;
}

/* Refresh icon animation */
.refresh-spinning {
    animation: spin .6s linear infinite;
}

/* Error box */
.order-error-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    gap: 12px;
    padding: 24px;
    text-align: center;
}

.order-error-icon {
    font-size: 56px;
}

.order-error-box h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -.3px;
}

.order-error-box p {
    font-size: 13px;
    color: var(--ink-3);
}

.order-error-box button {
    margin-top: 8px;
    background: var(--red);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 14px rgba(231,76,60,.4);
    transition: transform .15s var(--ease-spring);
}

    .order-error-box button:active {
        transform: scale(.96);
    }

/* ═══════════════════════════════════════════════
   LANGUAGE SWITCHER
═══════════════════════════════════════════════ */
.lang-switcher {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 20px;
    border: 1.5px solid var(--line);
    background: var(--bg);
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}

.lang-btn:hover {
    background: var(--red-mid);
    border-color: var(--red);
    color: var(--red);
}

.lang-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    overflow: hidden;
    min-width: 150px;
    z-index: 9999;
    animation: lang-drop .18s var(--ease-out) both;
}

@keyframes lang-drop {
    from { opacity: 0; transform: translateY(-6px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.lang-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--ink-2);
    cursor: pointer;
    text-align: left;
    transition: background .12s;
    gap: 8px;
}

.lang-option:hover,
.lang-option.active {
    background: var(--red-mid);
    color: var(--red);
}

/* ═══════════════════════════════════════════════
   HOW IT WORKS SLIDES
═══════════════════════════════════════════════ */
.banner-slider .hiw-slide {
    min-width: 100%;
    height: 180px;
    scroll-snap-align: start;
    flex-shrink: 0;
    border-radius: 16px;
    padding: 20px 20px 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: default;
}

/* Subtle grain overlay */
.hiw-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    border-radius: inherit;
    pointer-events: none;
}

.hiw-step-badge {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 32px;
    font-weight: 800;
    color: rgba(255,255,255,.15);
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.hiw-icon {
    font-size: 44px;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.25));
    animation: hiw-float 3s ease-in-out infinite;
    width: fit-content;
}

@keyframes hiw-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

.hiw-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.2px;
    margin-bottom: 3px;
}

.hiw-text p {
    font-size: 11.5px;
    color: rgba(255,255,255,.78);
    line-height: 1.4;
}

.hiw-progress {
    display: flex;
    gap: 5px;
    align-items: center;
}

.hiw-pip {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    transition: all .35s var(--ease);
}

.hiw-pip.active {
    background: #fff;
    width: 18px;
    border-radius: 3px;
}

/* RTL tweaks */
[dir="rtl"] .hiw-step-badge {
    right: auto;
    left: 16px;
}

[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}
