/* ==========================================
   KASA BREW — ONLINE ORDER
   Design System (Mobile-First)
   ========================================== */


/* ==========================================
   KEYFRAME ANIMATIONS
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(100%);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }

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

@keyframes scaleIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

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

    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.95);
    }

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

@keyframes progressPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(25, 116, 210, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(25, 116, 210, 0);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20%,
    60% {
        transform: translateX(-6px);
    }

    40%,
    80% {
        transform: translateX(6px);
    }
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ==========================================
   DESIGN TOKENS
   ========================================== */

:root {
    /* — Brand Colors — */
    --color-primary: #1974d2;
    --color-primary-dark: #1565b8;
    --color-primary-light: #e0f2fe;
    --color-primary-faint: rgba(25, 116, 210, 0.08);
    --color-primary-hover: #1565b8;
    --color-primary-rgb: 25, 116, 210;

    /* — Neutrals — */
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-raised: #ffffff;
    --color-surface-overlay: rgba(255, 255, 255, 0.96);
    --color-border: rgba(0, 0, 0, 0.15);
    --color-border-light: rgba(0, 0, 0, 0.08);
    --color-divider: #f0f0f0;

    /* — Text — */
    --color-text-primary: #111827;
    --color-text-secondary: #6b7280;
    --color-text-tertiary: #9ca3af;
    --color-text-inverse: #ffffff;
    --color-text-link: #1974d2;

    /* — Semantic — */
    --color-success: #16a34a;
    --color-success-bg: rgba(22, 163, 74, 0.08);
    --color-success-light: #dcfce7;
    --color-warning: #f59e0b;
    --color-warning-bg: rgba(245, 158, 11, 0.08);
    --color-warning-light: #fef3c7;
    --color-danger: #dc3545;
    --color-danger-bg: rgba(220, 53, 69, 0.08);
    --color-danger-light: #fee2e2;
    --color-info: #3b82f6;
    --color-info-bg: rgba(59, 130, 246, 0.08);

    /* — Loyalty Tiers — */
    --color-bronze: #cd7f32;
    --color-silver: #a8a9ad;
    --color-gold: #f2d06b;

    /* — Typography — */
    --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-md: 17px;
    --font-size-lg: 19px;
    --font-size-xl: 24px;
    --font-size-2xl: 30px;
    --font-size-3xl: 36px;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.7;
    --letter-spacing: 0.01em;

    /* — Spacing — */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* — Border Radius — */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-pill: 50px;
    --radius-full: 50%;

    /* — Shadows (flat design with subtle bottom bar backdrop) — */
    --shadow-xs: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-inner: none;
    --shadow-focus: 0 0 0 3px rgba(25, 116, 210, 0.15);
    --shadow-card: none;
    --shadow-card-hover: none;
    --shadow-bottom-nav: 0 -2px 10px rgba(0, 0, 0, 0.02);

    /* — Transitions — */
    --transition-fast: 0.15s ease-out;
    --transition-base: 0.25s ease-out;
    --transition-slow: 0.4s ease;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* — Z-Index — */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-tooltip: 600;

    /* — Layout — */
    --container-max: 480px;
    --container-padding: 16px;
    --bottom-nav-height: 64px;
    --header-height: 56px;
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================
   GLOBAL RESET & BASE
   ========================================== */

*,
::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    height: 100%;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    letter-spacing: var(--letter-spacing);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    font-size: inherit;
    color: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: var(--font-size-base);
    border: none;
    outline: none;
    background: none;
}

ul,
ol {
    list-style: none;
}

/* ==========================================
   LAYOUT SHELL
   ========================================== */

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background: var(--color-surface-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--color-border-light);
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 var(--container-padding);
}

.app-header__inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
}

.app-header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-md);
    color: var(--color-text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.app-header__logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.app-header__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
}

.app-header__back:active {
    background: var(--color-primary-faint);
}

.app-header__back svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-text-primary);
}

.app-header__title {
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    flex: 1;
    text-align: center;
}

.app-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.app-header__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
    position: relative;
}

.app-header__action-btn:active {
    background: var(--color-primary-faint);
}

.app-header__action-btn svg {
    width: 22px;
    height: 22px;
    stroke: var(--color-text-primary);
    fill: none;
    stroke-width: 1.8;
}

/* ==========================================
   SORT BUTTON WRAPPER
   ========================================== */
.sort-btn-wrapper {
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.category-list:not(.is-collapsed) ~ .sort-btn-wrapper {
    transform: translateY(0);
    opacity: 0;
    pointer-events: none;
}

/* ==========================================
   PAGE CONTENT
   ========================================== */

.app-content {
    flex: 1;
    padding-bottom: var(--space-4);
}

.page {
    animation: fadeIn 0.3s ease;
}

.page-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.page-section {
    padding: var(--space-6) 0;
}

.page-section+.page-section {
    border-top: 0.5px solid var(--color-border-light);
}

/* ==========================================
   BOTTOM NAVIGATION
   ========================================== */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: var(--color-surface-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 0.5px solid var(--color-border-light);
    padding-bottom: var(--safe-area-bottom);
    box-shadow: var(--shadow-bottom-nav);
}

.bottom-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--bottom-nav-height);
    max-width: var(--container-max);
    margin: 0 auto;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    min-width: 64px;
    color: var(--color-text-tertiary);
}

.bottom-nav__item.active {
    color: var(--color-primary);
}

.bottom-nav__item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
    transition: all var(--transition-fast);
}

.bottom-nav__item.active svg {
    stroke-width: 2.2;
}

.bottom-nav__label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    line-height: 1;
}

.bottom-nav__badge {
    position: absolute;
    top: 0;
    right: 10px;
    min-width: 18px;
    height: 18px;
    background: var(--color-danger);
    color: var(--color-text-inverse);
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: badgePop 0.3s var(--ease-spring);
    line-height: 1;
}

.bottom-nav__badge:empty,
.bottom-nav__badge[data-count="0"] {
    display: none;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

.text-xs {
    font-size: var(--font-size-xs);
}

.text-sm {
    font-size: var(--font-size-sm);
}

.text-base {
    font-size: var(--font-size-base);
}

.text-md {
    font-size: var(--font-size-md);
}

.text-lg {
    font-size: var(--font-size-lg);
}

.text-xl {
    font-size: var(--font-size-xl);
}

.text-2xl {
    font-size: var(--font-size-2xl);
}

.text-3xl {
    font-size: var(--font-size-3xl);
}

.font-normal {
    font-weight: var(--font-weight-normal);
}

.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.font-bold {
    font-weight: var(--font-weight-bold);
}

.text-primary {
    color: var(--color-text-primary);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

.text-brand {
    color: var(--color-primary);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.text-warning {
    color: var(--color-warning);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: -var(--space-3);
    margin-bottom: var(--space-6);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    line-height: 1;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

.btn--primary:hover {
    background: var(--color-primary-dark);
}

.btn--secondary {
    background: var(--color-primary-faint);
    color: var(--color-primary);
}

.btn--secondary:hover {
    background: rgba(var(--color-primary-rgb), 0.14);
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary-faint);
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-secondary);
}

.btn--ghost:hover {
    background: var(--color-primary-faint);
    color: var(--color-primary);
}

.btn--danger {
    background: var(--color-danger);
    color: var(--color-text-inverse);
}

.btn--danger:hover {
    background: #c82333;
}

.btn--success {
    background: var(--color-success);
    color: var(--color-text-inverse);
}

.btn--block {
    width: 100%;
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-md);
    border-radius: var(--radius-pill);
    min-height: 52px;
}

.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
}

.btn--icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn--icon svg {
    width: 20px;
    height: 20px;
}

.btn__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn--loading .btn__text {
    visibility: hidden;
}

.btn--loading .btn__spinner {
    position: absolute;
}

/* Google Sign In Button */
.btn--google {
    background: var(--color-surface);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    font-weight: var(--font-weight-medium);
}

.btn--google:hover {
    background: var(--color-bg);
    border-color: var(--color-text-tertiary);
}

.btn--google svg {
    width: 20px;
    height: 20px;
}

/* ==========================================
   CARDS
   ========================================== */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    overflow: hidden;
    transition: border-color var(--transition-base), transform var(--transition-base);
}

.card:hover {
    border-color: var(--color-border);
}

.card--interactive:active {
    transform: scale(0.98);
}

.card__body {
    padding: var(--space-4);
}

.card__image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--color-bg);
}

.card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-faint));
    font-size: 40px;
}

/* ==========================================
   PRODUCT CARDS
   ========================================== */

.product-card {
    background: transparent;
    border-radius: 0;
    border: none;
    overflow: visible;
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:active {
    transform: scale(0.97);
}

.product-card__image-wrapper {
    width: 100%;
    margin: 0;
    aspect-ratio: 1;
    position: relative;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-light), #f0f9ff);
    font-size: 36px;
}

.product-card__body {
    padding: var(--space-2) 0;
    flex-shrink: 0;
}

.product-card__name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-1);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__price {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.product-card__badge {
    position: absolute;
    top: var(--space-2);
    left: var(--space-2);
    padding: var(--space-1) var(--space-2);
    background: var(--color-danger);
    color: white;
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.product-card__favorite {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-card__favorite svg {
    width: 18px;
    height: 18px;
    stroke: #000;
    fill: none;
    stroke-width: 2;
    transition: all var(--transition-fast);
}

.product-card__favorite.active svg {
    stroke: var(--color-danger);
    fill: var(--color-danger);
}

/* ==========================================
   FORMS
   ========================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    min-height: 48px;
}

.form-input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.form-input::placeholder {
    color: var(--color-text-tertiary);
}

.form-input--error {
    border-color: var(--color-danger);
}

.form-error {
    font-size: var(--font-size-xs);
    color: var(--color-danger);
    margin-top: var(--space-1);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.form-helper {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-1);
}

.form-input-icon {
    position: relative;
}

.form-input-icon .form-input {
    padding-left: 44px;
}

.form-input-icon__icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-tertiary);
    pointer-events: none;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* Textarea */
textarea.form-input {
    min-height: 100px;
    resize: vertical;
}

/* Select */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ==========================================
   CATEGORY PILLS
   ========================================== */

.category-scroll {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding: var(--space-4) var(--container-padding);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

/* ---- Morphing Drag Handle ---- */
.menu-drag-handle {
    transition: height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                padding 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                margin 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    height: 20px;
    box-sizing: content-box;
    overflow: hidden;
}

.drag-handle-path {
    transition: d 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Drag Handle SVG animation */
.drag-handle-svg {
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Search Pill Button in category row - hidden by default, shown when collapsed */
.collapsed-search-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 18px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0,0,0,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #000;
    cursor: pointer;
    white-space: nowrap;
    z-index: 16;
    
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Show search pill only when categoryWrapper is in scrolled state (header search bar is covered) */
#categoryWrapper.is-scrolled .collapsed-search-btn {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

/* When scrolled past header: collapse the drag handle bar and morph into search pill */
.menu-drag-handle.is-scrolled {
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible;
}

.menu-drag-handle.is-scrolled .drag-handle-svg {
    opacity: 0;
    transform: scale(0.5);
}

.menu-drag-handle.is-peek .drag-handle-path {
    d: path("M 10 10 L 18 2 L 26 10");
    /* Up Chevron */
}

/* ---- Unified Category Mode (Morphs from Circle to Pill) ---- */
.category-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 16px var(--container-padding) 20px;
    height: 136px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    transition: height 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), padding 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(0);
    position: relative;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-list.is-collapsed {
    padding: 0 170px 0 var(--container-padding);
    height: 36px;
    transform: translateY(0);
    gap: 0;
    overflow: visible;
}

.category-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-width: 80px;
    height: 100px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    overflow: visible;
    z-index: 1;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.category-list.is-collapsed .category-item {
    min-width: 0;
    height: 36px;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 0;
    border: none;
    border-radius: 32px;
    overflow: visible;
}

.category-list.is-collapsed .category-item.active {
    width: max-content;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    background-color: transparent;
    color: var(--color-text-primary);
    border-radius: 0;
    position: relative;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: visible;
    z-index: 100;
    box-sizing: border-box;
}

/* ---- Two-layer crossfade ---- */
/* Circle view: visible by default, fades out when collapsed */
.category-view-circle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.2s ease;
}

.category-list.is-collapsed .category-view-circle {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    visibility: hidden;
}

/* Pill view: hidden by default, fades in when collapsed */
.category-view-pill {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    visibility: hidden;
}

.category-list.is-collapsed .category-view-pill {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.category-list.is-collapsed .category-item.active .category-view-pill {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    display: flex;
    z-index: 2;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    min-height: 36px;
    width: 130px;
    padding: 0 16px;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 18px;
    background-color: var(--color-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    box-sizing: border-box;
    visibility: visible;
    transition: opacity 0.15s ease 0.1s;
}

.category-list.is-collapsed .category-item.active .category-view-pill .category-label {
    line-height: 1;
    margin-top: 1px;
}

.category-list .dropdown-arrow {
    display: none;
}

.category-list.is-collapsed .category-item.active .dropdown-arrow {
    display: block;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

/* Circle Shapes */
.category-circle-shape {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-circle-shape img,
.category-circle-shape svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-circle-shape svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-tertiary);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-item:active {
    transform: scale(0.92);
}

.category-label {
    font-size: 11px;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-align: center;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-list.is-collapsed .category-label {
    font-size: 14px;
}

/* Active States */
.category-item.active .category-circle-shape {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1.5px var(--color-primary);
}

.category-list.is-collapsed .category-item.active {
    background: transparent;
}

.category-item.active .category-label {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.category-list.is-collapsed .category-item.active .category-label {
    color: var(--color-text-primary);
}

.category-pill__icon {
    font-size: 16px;
    line-height: 1;
}

/* ==========================================
   SEARCH BAR
   ========================================== */

.search-bar {
    position: relative;
    margin: var(--space-4) var(--container-padding);
}

.search-bar__input {
    width: 100%;
    padding: var(--space-3) var(--space-4) var(--space-3) 44px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    min-height: 44px;
}

.search-bar__input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.search-bar__icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-tertiary);
    pointer-events: none;
}

.search-bar__clear {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    display: none;
}

.search-bar__clear.visible {
    display: flex;
}

/* ==========================================
   PRODUCT GRID
   ========================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    padding: 0 var(--container-padding);
}

/* ==========================================
   CART ITEM
   ========================================== */

.cart-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    background: transparent;
    border-bottom: 0.5px solid var(--color-border-light);
}

.cart-item+.cart-item {
    margin-top: var(--space-3);
}

.cart-item__image {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    background: var(--color-bg);
    flex-shrink: 0;
}

.cart-item__image--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary-light), #f0f9ff);
    font-size: 28px;
}

.cart-item__details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item__name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-1);
}

.cart-item__meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-2);
}

.cart-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-item__price {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.cart-item__remove {
    color: var(--color-text-tertiary);
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

.cart-item__remove:hover {
    color: var(--color-danger);
}

/* Quantity Stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-border-light);
    border-radius: var(--radius-pill);
    padding: 4px;
}

.qty-stepper__btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
    background: var(--color-surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-fast);
    border: none;
}

.qty-stepper__btn:active {
    transform: scale(0.95);
}

.qty-stepper__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-stepper__value {
    font-weight: var(--font-weight-medium);
    width: 16px;
    text-align: center;
}



/* ==========================================
   ORDER TRACKER
   ========================================== */

.order-tracker {
    padding: var(--space-6) 0;
}

.order-tracker__steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.order-step {
    display: flex;
    gap: var(--space-4);
    position: relative;
    padding-bottom: var(--space-6);
}

.order-step:last-child {
    padding-bottom: 0;
}

.order-step__line {
    position: absolute;
    left: 13px;
    top: 28px;
    width: 2px;
    bottom: 0;
    background: var(--color-border);
    transition: background var(--transition-base);
}

.order-step:last-child .order-step__line {
    display: none;
}

.order-step.completed .order-step__line {
    background: var(--color-success);
}

.order-step__dot {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--color-border);
    background: var(--color-surface);
    transition: all var(--transition-base);
    z-index: 1;
}

.order-step.completed .order-step__dot {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.order-step.active .order-step__dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    animation: progressPulse 2s infinite;
}

.order-step__dot svg {
    width: 14px;
    height: 14px;
}

.order-step__content {
    flex: 1;
    padding-top: 2px;
}

.order-step__title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
}

.order-step.pending .order-step__title {
    color: var(--color-text-tertiary);
}

.order-step__time {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

/* ==========================================
   CHECKOUT SUMMARY
   ========================================== */

.content-card {
    background: var(--color-border-light);
    border-radius: var(--radius-lg);
    border: none;
    padding: var(--space-5);
}

.checkout-summary {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: var(--space-5);
}

.checkout-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.checkout-summary__row--total {
    border-top: 0.5px solid var(--color-border);
    margin-top: var(--space-2);
    padding-top: var(--space-3);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.checkout-summary__row--discount {
    color: var(--color-success);
}

/* ==========================================
   MODALS / SHEETS
   ========================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-bar__clear.visible {
    opacity: 1;
    visibility: visible;
}

.search-bar--dark {
    background: transparent;
    border: none;
    color: white;
}

.search-bar--dark .search-bar__input {
    color: white;
}

.search-bar--dark .search-bar__input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-bar--dark .search-bar__icon,
.search-bar--dark .search-bar__clear {
    color: rgba(255, 255, 255, 0.6);
}

.modal-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
    background: var(--color-surface);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
    padding-bottom: var(--safe-area-bottom);
}

.modal-sheet.active {
    transform: translateY(0);
}

.modal-sheet__handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-pill);
    margin: var(--space-3) auto var(--space-4);
}

.modal-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6) var(--space-4);
    border-bottom: 0.5px solid var(--color-border-light);
}

.modal-sheet__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.modal-sheet__close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast);
}

.modal-sheet__close:active {
    background: var(--color-bg);
}

.modal-sheet__body {
    padding: var(--space-6);
}

/* Center modal (desktop) */
.modal-center {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: var(--z-modal);
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    max-width: 420px;
    width: calc(100% - var(--space-8));
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s var(--ease-out-expo);
}

.modal-center.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

/* ==========================================
   TOASTS
   ========================================== */

.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: calc(100% - var(--space-8));
    max-width: var(--container-max);
    pointer-events: none;
}

.toast {
    background: var(--color-text-primary);
    color: var(--color-text-inverse);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: fadeInDown 0.3s var(--ease-out-expo);
    pointer-events: auto;
}

.toast--success {
    background: var(--color-success);
}

.toast--error {
    background: var(--color-danger);
}

.toast--warning {
    background: #b45309;
}

.toast__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast__message {
    flex: 1;
}

.toast__close {
    color: rgba(255, 255, 255, 0.7);
    padding: var(--space-1);
}

/* ==========================================
   BADGES & TAGS
   ========================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
}

.badge--primary {
    background: var(--color-primary-faint);
    color: var(--color-primary);
}

.badge--success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.badge--danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.badge--neutral {
    background: var(--color-bg);
    color: var(--color-text-secondary);
}

/* ==========================================
   FADING STATUS TEXT
   ========================================== */
.fading-status-container {
    position: relative;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}
.fading-text-1, .fading-text-2 {
    position: absolute;
    font-size: 20px;
    font-weight: 700;
}
.fading-text-1 {
    animation: fadeToggle1 6s infinite;
}
.fading-text-2 {
    animation: fadeToggle2 6s infinite;
}
@keyframes fadeToggle1 {
    0%, 40% { opacity: 1; }
    50%, 90% { opacity: 0; }
    100% { opacity: 1; }
}
@keyframes fadeToggle2 {
    0%, 40% { opacity: 0; }
    50%, 90% { opacity: 1; }
    100% { opacity: 0; }
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge--received {
    background: var(--color-info-bg);
    color: var(--color-info);
}

.status-badge--preparing {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.status-badge--ready {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-badge--delivering {
    background: var(--color-primary-faint);
    color: var(--color-primary);
}

.status-badge--completed {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.status-badge--cancelled {
    background: #f1f5f9;
    color: #64748b;
}

/* ==========================================
   PROMO CODE INPUT
   ========================================== */

.promo-input {
    display: flex;
    gap: var(--space-2);
}

.promo-input .form-input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.promo-input .btn {
    flex-shrink: 0;
}

.promo-applied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--color-success-light);
    border-radius: var(--radius-md);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.promo-applied__info {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-success);
}

/* ==========================================
   LOYALTY CARD
   ========================================== */

.loyalty-card {
    background: linear-gradient(135deg, var(--color-primary), #0d4f8b);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    color: white;
    position: relative;
    overflow: hidden;
}

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

.loyalty-card__tier {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: var(--space-1);
}

.loyalty-card__points {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.loyalty-card__label {
    font-size: var(--font-size-sm);
    opacity: 0.7;
}

.loyalty-card__progress {
    margin-top: var(--space-5);
}

.loyalty-card__progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.loyalty-card__progress-fill {
    height: 100%;
    background: var(--color-gold);
    border-radius: var(--radius-pill);
    transition: width 0.6s var(--ease-out-expo);
}

.loyalty-card__progress-text {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2);
    font-size: var(--font-size-xs);
    opacity: 0.7;
}

/* ==========================================
   TABS
   ========================================== */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 0.5px solid var(--color-border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.tab {
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-tertiary);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-panel.active {
    display: block;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.skeleton {
    background: linear-gradient(90deg, var(--color-bg) 25%, var(--color-border-light) 50%, var(--color-bg) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton--text {
    height: 14px;
    width: 80%;
    margin-bottom: var(--space-2);
}

.skeleton--title {
    height: 20px;
    width: 60%;
    margin-bottom: var(--space-3);
}

.skeleton--card {
    height: 200px;
    border-radius: var(--radius-lg);
}

.skeleton--circle {
    border-radius: var(--radius-full);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner--sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner--lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-16) var(--space-6);
    gap: var(--space-4);
}

.loading-screen__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

/* ==========================================
   EMPTY STATES
   ========================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6);
    text-align: center;
    flex: 1;
    min-height: 300px;
}

.empty-state__icon {
    font-size: 56px;
    margin-bottom: var(--space-4);
    opacity: 0.8;
}

.empty-state__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.empty-state__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    max-width: 280px;
}

/* ==========================================
   SCHEDULE PICKER
   ========================================== */

.schedule-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.schedule-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.schedule-option:active {
    transform: scale(0.98);
}

.schedule-option.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-faint);
}

.schedule-option__radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.schedule-option.selected .schedule-option__radio {
    border-color: var(--color-primary);
}

.schedule-option.selected .schedule-option__radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
}

.schedule-option__label {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.schedule-option__desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

/* ==========================================
   REFERRAL CARD
   ========================================== */

.referral-card {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1.5px dashed var(--color-primary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
}

.referral-card__code {
    display: inline-flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-6);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    letter-spacing: 0.08em;
    margin: var(--space-4) 0;
    border: 1px solid var(--color-border);
}

.referral-card__code-copy {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary-faint);
    color: var(--color-primary);
    transition: all var(--transition-fast);
}

.referral-card__code-copy:active {
    transform: scale(0.9);
}

/* ==========================================
   ADDRESS CARD
   ========================================== */

.address-card {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.address-card.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-faint);
}

.address-card__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-faint);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.address-card__icon svg {
    width: 20px;
    height: 20px;
}

.address-card__label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.address-card__text {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    line-height: var(--line-height-normal);
}

/* ==========================================
   ORDER HISTORY CARD
   ========================================== */

.order-card {
    padding: var(--space-4);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all var(--transition-base);
}

.order-card:active {
    transform: scale(0.98);
}

.order-card+.order-card {
    margin-top: var(--space-3);
}

.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-3);
}

.order-card__number {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.order-card__date {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.order-card__items {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
    line-height: var(--line-height-relaxed);
}

.order-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-3);
    border-top: 0.5px solid var(--color-border-light);
}

.order-card__total {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

/* ==========================================
   SUCCESS / ERROR PAGES
   ========================================== */

.result-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-6);
    text-align: center;
    min-height: calc(100dvh - var(--header-height, 56px) - 40px);
}

.result-page__icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    animation: bounceIn 0.6s var(--ease-spring);
}

.result-page__icon--success {
    background: var(--color-success-light);
    color: var(--color-success);
}

.result-page__icon--error {
    background: var(--color-danger-light);
    color: var(--color-danger);
}

.result-page__icon--pending {
    background: var(--color-warning-light);
    color: var(--color-warning);
}

.result-page__icon svg {
    width: 40px;
    height: 40px;
}

.result-page__title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-3);
}

.result-page__text {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
    max-width: 320px;
    line-height: var(--line-height-relaxed);
}

.result-page__order-number {
    display: inline-flex;
    align-items: center;
    padding: var(--space-3) var(--space-6);
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    letter-spacing: 0.03em;
    margin-bottom: var(--space-8);
}

.result-page__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    width: 100%;
    max-width: 320px;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: var(--space-1);
}

.gap-2 {
    gap: var(--space-2);
}

.gap-3 {
    gap: var(--space-3);
}

.gap-4 {
    gap: var(--space-4);
}

.gap-6 {
    gap: var(--space-6);
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.w-full {
    width: 100%;
}

/* ==========================================
   RESPONSIVE — TABLET (≥768px)
   ========================================== */

@media (min-width: 768px) {
    :root {
        --container-max: 640px;
        --container-padding: 24px;
        --header-height: 64px;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-4);
    }

    .modal-sheet {
        left: 50%;
        right: auto;
        max-width: 480px;
        transform: translateX(-50%) translateY(100%);
        border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    }

    .modal-sheet.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* ==========================================
   RESPONSIVE — DESKTOP (≥1024px)
   ========================================== */

@media (min-width: 1024px) {
    :root {
        --container-max: 960px;
        --container-padding: 32px;
        --header-height: 72px;
        --bottom-nav-height: 0px;
    }

    .bottom-nav {
        display: none;
    }

    .app-content {
        padding-bottom: var(--space-16);
    }

    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Desktop navigation in header */
    .desktop-nav {
        display: flex;
        align-items: center;
        gap: var(--space-6);
    }

    .desktop-nav__link {
        font-size: var(--font-size-sm);
        font-weight: var(--font-weight-medium);
        color: var(--color-text-secondary);
        transition: color var(--transition-fast);
        padding: var(--space-2) 0;
        position: relative;
    }

    .desktop-nav__link:hover,
    .desktop-nav__link.active {
        color: var(--color-primary);
    }

    .desktop-nav__link.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2px;
        background: var(--color-primary);
        border-radius: 1px;
    }

    /* Use center modals on desktop instead of sheets */
    .modal-sheet {
        top: 50%;
        bottom: auto;
        left: 50%;
        max-width: 480px;
        border-radius: var(--radius-xl);
        transform: translate(-50%, -50%) scale(0.95);
        opacity: 0;
        visibility: hidden;
        transition: all 0.25s var(--ease-out-expo);
    }

    .modal-sheet.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        visibility: visible;
    }

    .modal-sheet__handle {
        display: none;
    }

    /* Two-column checkout layout */
    .checkout-layout {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: var(--space-8);
        align-items: start;
    }
}

/* ==========================================
   RESPONSIVE — WIDE DESKTOP (≥1400px)
   ========================================== */

@media (min-width: 1400px) {
    :root {
        --container-max: 1200px;
    }

    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ==========================================
   ACCOUNT SECTION
   ========================================== */

.account-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-6) 0;
}

.account-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary), #0d4f8b);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.account-avatar img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.account-info__name {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.account-info__email {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.account-menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.account-menu__item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.account-menu__item:active {
    background: var(--color-bg);
}

.account-menu__item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--color-primary-faint);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-menu__item-icon svg {
    width: 20px;
    height: 20px;
}

.account-menu__item-label {
    flex: 1;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

.account-menu__item-arrow {
    color: var(--color-text-tertiary);
}

.account-menu__item-arrow svg {
    width: 18px;
    height: 18px;
}

.account-menu__item--danger {
    color: var(--color-danger);
}

.account-menu__item--danger .account-menu__item-icon {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

/* ==========================================
   GUEST PROMPT
   ========================================== */

.guest-prompt {
    padding: var(--space-6);
    background: linear-gradient(135deg, var(--color-primary-light), #f0f9ff);
    border-radius: var(--radius-xl);
    text-align: center;
    margin: var(--space-4) 0;
    border: 1px solid rgba(var(--color-primary-rgb), 0.15);
}

.guest-prompt__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.guest-prompt__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-5);
}

.menu-top-fade {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(to bottom, var(--color-bg) 10%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-top-fade.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================
   GLOBAL BOTTOM BAR (Menu, Cart, Checkout)
   ========================================== */

.global-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    transform: translateY(100%);
    transition: transform 0.35s var(--ease-out-expo);
    pointer-events: none;
    touch-action: none; /* Prevent scroll-chaining / rubber-banding on iOS */
}

.global-bottom-bar.visible {
    transform: translateY(0);
    pointer-events: auto;
}

.global-bottom-bar.modal-hidden {
    transform: translateY(150%) !important;
    pointer-events: none !important;
}

.global-bottom-bar__container {
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.12);
    padding: var(--space-5) var(--container-padding) calc(var(--safe-area-bottom) + var(--space-4));
}

.global-bottom-bar__summary-container {
    max-height: 30px;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out-expo), margin-bottom 0.35s var(--ease-out-expo), opacity 0.35s var(--ease-out-expo);
    margin-bottom: var(--space-3);
    opacity: 1;
}

.global-bottom-bar__summary-container.hidden {
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.global-bottom-bar__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.global-bottom-bar__summary-label {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
    flex: 1;
    text-align: left;
}

.global-bottom-bar__summary-items {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    flex: 1;
    text-align: center;
}

.global-bottom-bar__summary-value {
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xl);
    flex: 1;
    text-align: right;
}

.global-bottom-bar__btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    transition: background var(--transition-fast);
    min-height: 52px;
}

.global-bottom-bar__btn.centered {
    justify-content: center;
    gap: var(--space-2);
}

.global-bottom-bar__btn>* {
    transition: opacity 0.15s ease, filter 0.15s ease;
}

.global-bottom-bar__btn.is-updating>* {
    opacity: 0;
    filter: blur(4px);
}

.global-bottom-bar__btn:active {
    background: var(--color-primary-dark);
}

.global-bottom-bar__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   PRODUCT CARD — INLINE ADD BUTTON
   ========================================== */

.product-card__add {
    position: absolute;
    bottom: var(--space-2);
    right: var(--space-2);
    z-index: 3;
}

.product-card__add-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #000;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-spring);
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    line-height: 1;
}

.product-card__add-btn:active {
    transform: scale(0.9);
}

.product-card__add-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

.product-card__qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-pill);
    overflow: hidden;
    height: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    animation: stepperIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: right center;
}

@keyframes stepperIn {
    0% { transform: scaleX(0.4); opacity: 0.5; }
    100% { transform: scaleX(1); opacity: 1; }
}

.product-card__qty-stepper button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #000;
    font-size: 16px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.product-card__qty-stepper button:active {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(0.85);
}

.product-card__qty-stepper span {
    min-width: 24px;
    text-align: center;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: #000;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ==========================================
   PILL RADIO GROUP
   ========================================== */

.pill-radio-group {
    display: flex;
    gap: 0;
    background: var(--color-border-light);
    border-radius: var(--radius-pill);
    padding: 3px;
    border: none;
    position: relative;
    z-index: 1;
}

.pill-radio-group::before {
    content: '';
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: var(--color-primary);
    border-radius: var(--radius-pill);
    box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.25);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: -1;
}

.pill-radio-group[data-active="delivery"]::before {
    transform: translateX(0);
}

.pill-radio-group[data-active="pickup"]::before {
    transform: translateX(100%);
}

.pill-radio {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-secondary);
    text-align: center;
    cursor: pointer;
    transition: color 0.3s ease;
    border: none;
    background: transparent;
    font-family: inherit;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.pill-radio.active {
    color: white;
    font-weight: var(--font-weight-semibold);
}

.pill-radio:active {
    transform: scale(0.97);
}

/* ==========================================
   BOTTOM SHEET (generic)
   ========================================== */

.bottom-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-modal);
    background: var(--color-surface);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1), height 0.4s cubic-bezier(0.2, 0.9, 0.2, 1), max-height 0.4s cubic-bezier(0.2, 0.9, 0.2, 1), border-radius 0.4s cubic-bezier(0.2, 0.9, 0.2, 1);
    padding-bottom: calc(var(--safe-area-bottom) + var(--space-4));
}

.bottom-sheet.active {
    transform: translateY(0);
}

/* Checkout renders its sheets up front. Keep every inactive sheet completely
   out of the visual and interaction layers until it is explicitly opened. */
.bottom-sheet.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

.bottom-sheet__handle {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-pill);
    margin: var(--space-3) auto var(--space-2);
}

.bottom-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-5) var(--space-4);
}

.bottom-sheet__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
}

.bottom-sheet__close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
}

.bottom-sheet__close:active {
    background: var(--color-bg);
}

.bottom-sheet__body {
    padding: 0 var(--space-5) var(--space-4);
}



/* ==========================================
   CONTACT DETAILS — READ ONLY
   ========================================== */

.contact-readonly {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.contact-readonly__row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

.contact-readonly__row svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.contact-readonly__edit {
    margin-top: var(--space-2);
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    padding: var(--space-1) 0;
    font-family: inherit;
}

/* ==========================================
   ORDER TYPE INLINE ROW
   ========================================== */

.order-type-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) 0;
}

.order-type-row__label {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.order-type-row__change {
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    font-family: inherit;
    padding: var(--space-1) var(--space-2);
}

/* ==========================================
   VOUCHER BUTTON
   ========================================== */

.voucher-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    transition: border-color var(--transition-fast);
}

.voucher-btn:active {
    border-color: var(--color-primary);
}

.voucher-btn svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-tertiary);
}

/* Adjust content padding when bottom bar is visible */
.app-content.has-bottom-bar {
    padding-bottom: 120px;
}

.app-content.has-floating-bar {
    padding-bottom: 100px;
}

/* ==========================================
   EMPTY STATE SVG ICON
   ========================================== */

.empty-state__icon--svg {
    width: 56px;
    height: 56px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-4);
    opacity: 0.6;
}

.empty-state__icon--svg svg {
    width: 100%;
    height: 100%;
}

/* Form select (dropdown) for bottom sheets */
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    min-height: 48px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    font-family: inherit;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--color-primary);
    outline: none;
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {

    .app-header,
    .toast-container,
    .global-bottom-bar {
        display: none !important;
    }

    body {
        background: white;
    }
}

/* ==========================================
   CART OVERLAY (SLIDE PANEL)
   ========================================== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-overlay);
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s 0.4s;
}

.cart-overlay.active {
    visibility: visible;
    pointer-events: none;
    transition: visibility 0s 0s;
}

/* Menu Header Contents Toggle (when cart is active) */
.default-header-content {
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

body.page-cart .default-header-content {
    opacity: 0;
    pointer-events: none;
}

.cart-header-content {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body.page-cart .cart-header-content {
    opacity: 1;
    pointer-events: auto;
}

/* White Area Slide */
.cart-overlay .cart-scroll-area {
    transform: translateY(100vh);
    transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.4s ease;
    box-shadow: 0 0 0 rgba(62, 136, 255, 0);
}

.cart-overlay.active .cart-scroll-area {
    transform: translateY(0);
    box-shadow: 0 -24px 80px rgba(62, 136, 255, 0.25);
}

/* ==========================================
   HEADER BACK BUTTON
   ========================================== */
.header-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(51, 51, 51, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-back-btn:active {
    background-color: #3f3f42;
    transform: scale(0.95);
}

/* ==========================================
   DELIVERY MAP SEARCH FULL SCREEN & RESULTS
   ========================================== */

/* Override Google Maps Autocomplete styles globally to fix 404 font and polish UI */
.pac-container {
    font-family: inherit !important;
    border-radius: var(--radius-xl) !important;
    border: 1px solid var(--color-border) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1) !important;
    background-color: var(--color-surface) !important;
    padding: 8px 0 !important;
    margin-top: 8px !important;
}

.pac-container * {
    font-family: inherit !important;
}

.pac-item {
    padding: 16px var(--space-5) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    color: var(--color-text-secondary) !important;
    border-top: none !important;
    border-bottom: 0.5px solid var(--color-border) !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease, padding-left 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
}

.pac-item:hover,
.pac-item.pac-item-selected {
    background-color: var(--color-surface-hover, #f3f4f6) !important;
    padding-left: calc(var(--space-5) + 4px) !important;
}

.pac-item:last-child {
    border-bottom: none !important;
}

.pac-item:hover,
.pac-item.pac-item-selected {
    background-color: #f9fafb !important;
}

.pac-item-query {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--color-text) !important;
    margin-right: 6px !important;
}

.pac-item>span:not(.pac-item-query):not(.pac-icon) {
    display: inline-block;
    opacity: 0.8;
}

.pac-icon {
    display: block !important;
    width: 20px !important;
    height: 20px !important;
    margin-right: 14px !important;
    margin-top: 0 !important;
    flex-shrink: 0 !important;
    background-image: none !important;
    background-color: var(--color-primary, #2563eb) !important;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>') !important;
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg>') !important;
    -webkit-mask-size: contain !important;
    mask-size: contain !important;
    -webkit-mask-repeat: no-repeat !important;
    mask-repeat: no-repeat !important;
    -webkit-mask-position: center !important;
    mask-position: center !important;
}

/* Hide Google Watermark */
.pac-container::after {
    display: none !important;
}

.pac-logo::after {
    display: none !important;
}

@media (max-width: 768px) {
    .pac-container {
        position: fixed !important;
        /* Let Google Maps set the 'top' property dynamically via inline styles */
        left: 0 !important;
        width: 100vw !important;
        box-sizing: border-box;
        border-radius: 0 !important;
        border: none !important;
        border-top: 0.5px solid var(--color-border) !important;
        box-shadow: none !important;
        z-index: 999999 !important;
        background-color: var(--color-surface) !important;
        padding-top: 8px !important;
        padding-bottom: 24px !important;
        margin-top: 0 !important;
    }

    .pac-item {
        padding: 16px var(--space-4) !important;
    }

    .pac-item-query {
        font-size: 16px !important;
    }
}

/* ==========================================
   PRODUCT PAGE OVERLAY (SLIDE UP)
   ========================================== */
.product-page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s 0.4s;
}

.product-page-overlay.active {
    visibility: visible;
    pointer-events: none;
    transition: visibility 0s 0s;
}

.product-page-scroll-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-surface);
    border-radius: 24px 24px 0 0;
    /* Sleek rounded top corners while sliding */
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    overflow-y: auto;
    overflow-x: hidden;
}

.product-page-overlay.active .product-page-scroll-area,
.product-page-overlay.active .product-page__bottom-bar {
    transform: translateY(0);
}

.product-page__header {
    position: absolute;
    /* Absolute so it floats naturally over the image */
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 10;
    pointer-events: none;
}

.product-page__back {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    pointer-events: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.product-page__back:active {
    transform: scale(0.92);
}

.product-page__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* Reduce the padding to just enough to clear the bottom bar (~90px) */
    padding-bottom: calc(var(--safe-area-bottom) + 90px);
    background: var(--color-surface);
    /* Keep the background continuous to avoid a "void" effect */
}

.product-page__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    /* More compact image so user doesn't have to scroll as much */
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.product-page__image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
    pointer-events: none;
}

.product-page__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-page__content {
    padding: var(--space-6) var(--container-padding);
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: 24px 24px 0 0;
    margin-top: -24px;
    /* Overlap the image for a sleek native look */
    position: relative;
    z-index: 2;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05);
}

.variant-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Compact spacing between variants */
}

.variant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.variant-row:active {
    background: #f9fafb;
    transform: scale(0.98);
}

.variant-row.selected {
    background: rgba(var(--color-primary-rgb), 0.08);
    /* Highlight effect */
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.1);
}

.variant-row__title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.variant-row.selected .variant-row__title {
    color: var(--color-primary);
}

.variant-row__desc {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.variant-row.selected .variant-row__desc {
    color: var(--color-primary);
}

.product-page__bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4) var(--container-padding);
    padding-bottom: calc(var(--space-4) + var(--safe-area-bottom));
    background: var(--color-surface);
    border-top: 0.5px solid var(--color-border-light);
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: auto;
}
/* Addon Checkbox Styles */
.addon-row.selected .addon-checkbox {
    background: var(--color-primary);
    border-color: var(--color-primary) !important;
}
.addon-row.selected .addon-checkbox svg {
    opacity: 1 !important;
}
.addon-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.addon-checkbox svg {
    opacity: 0;
    transition: opacity 0.2s;
}

/* ==========================================
   ONGOING ORDER BANNER
   ========================================== */
.ongoing-order-banner {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 16px);
    left: var(--container-padding);
    right: var(--container-padding);
    z-index: 45; /* Under global bottom bar z-index 50 */
    transform: translateY(150%);
    transition: transform 0.35s var(--ease-out-expo), bottom 0.35s var(--ease-out-expo);
    pointer-events: none;
    max-width: var(--container-max);
    margin: 0 auto;
}
.ongoing-order-banner.visible {
    transform: translateY(0);
    pointer-events: auto;
    opacity: 1;
}
body.page-cart .ongoing-order-banner {
    opacity: 0;
    pointer-events: none;
    transform: translateY(150%);
}
/* When global bottom bar is visible, we push the banner up. 
   Global bottom bar height is roughly 80-100px. We'll use bottom to animate. */
.ongoing-order-banner.stacked {
    bottom: calc(var(--safe-area-bottom) + 104px); 
}
.ongoing-order-banner__container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--color-text-primary);
    border-radius: 100px;
    padding: 12px 20px 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0,0,0,0.02);
    cursor: pointer;
    border: 0.5px solid rgba(0, 0, 0, 0.1);
}
.ongoing-order-banner__content {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ongoing-order-banner__pulse {
    width: 8px;
    height: 8px;
    background: #34d399; /* Green */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse-green 1.5s infinite;
}
@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
