/**
 * WAVE Platform — Global Styles
 * Version 1 | Food Delivery Platform for Tanzania
 *
 * Design tokens and reusable utility classes.
 * Bootstrap 5 handles grid and components; this file adds WAVE identity.
 */

/* ============================================================
   CSS Variables (Theme-ready)
   ============================================================ */
:root {
    /* Brand — Deep Teal (structure) + Coral/Orange (action & energy) */
    --wave-primary: #034E61;
    --wave-primary-dark: #023A48;
    --wave-primary-light: #E3F1F4;
    --wave-primary-rgb: 3, 78, 97;
    --wave-accent: #F86848;
    --wave-accent-dark: #E04F30;
    --wave-accent-light: #FFE8E2;
    --wave-accent-rgb: 248, 104, 72;
    --wave-text: #142428;
    --wave-text-muted: #5A6B6E;
    --wave-bg: #F6F9F9;
    --wave-white: #FFFFFF;
    --wave-border: #D5E2E4;
    --wave-shadow-sm: 0 1px 3px rgba(3, 78, 97, 0.06);
    --wave-shadow: 0 6px 20px rgba(3, 78, 97, 0.10);
    --wave-shadow-lg: 0 12px 36px rgba(3, 78, 97, 0.14);
    --wave-shadow-accent: 0 8px 24px rgba(248, 104, 72, 0.28);
    --wave-radius: 12px;
    --wave-radius-lg: 16px;
    --wave-radius-xl: 24px;
    --wave-navbar-height: 72px;
    --wave-transition: 0.22s ease;
    --wave-font: 'DM Sans', system-ui, -apple-system, sans-serif;

    /* Bootstrap: teal for structure links; coral used via WAVE button classes */
    --bs-primary: var(--wave-primary);
    --bs-primary-rgb: var(--wave-primary-rgb);
    --bs-link-color: var(--wave-primary);
    --bs-link-hover-color: var(--wave-accent);
    --bs-focus-ring-color: rgba(var(--wave-accent-rgb), 0.28);
}

/* ============================================================
   Base
   ============================================================ */
html {
    overflow-x: hidden;
}

body {
    font-family: var(--wave-font);
    color: var(--wave-text);
    background-color: var(--wave-bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

::selection {
    background: rgba(var(--wave-accent-rgb), 0.22);
    color: var(--wave-text);
}

/* ============================================================
   Typography
   ============================================================ */
.text-wave-primary { color: var(--wave-primary) !important; }
.text-wave-accent { color: var(--wave-accent) !important; }
.text-wave-muted { color: var(--wave-text-muted) !important; }
.bg-wave-primary { background-color: var(--wave-primary) !important; }
.bg-wave-accent { background-color: var(--wave-accent) !important; }
.bg-wave-light { background-color: var(--wave-bg) !important; }

/* ============================================================
   Buttons — Coral = primary actions, Teal = outline / structure
   ============================================================ */
.btn-wave-primary,
.btn-wave-accent {
    background-color: var(--wave-accent);
    border-color: var(--wave-accent);
    color: var(--wave-white);
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: var(--wave-radius);
    transition: transform var(--wave-transition), box-shadow var(--wave-transition), background-color var(--wave-transition);
    box-shadow: 0 4px 14px rgba(var(--wave-accent-rgb), 0.28);
}

.btn-wave-primary:hover,
.btn-wave-primary:focus,
.btn-wave-accent:hover,
.btn-wave-accent:focus {
    background-color: var(--wave-accent-dark);
    border-color: var(--wave-accent-dark);
    color: var(--wave-white);
    transform: translateY(-1px);
    box-shadow: var(--wave-shadow-accent);
}

.btn-wave-primary:active,
.btn-wave-accent:active {
    transform: translateY(0);
}

.btn-wave-orange {
    background-color: #F59E0B;
    border-color: #F59E0B;
    color: #fff;
    font-weight: 700;
    padding: 0.7rem 1.35rem;
    border-radius: 12px;
    transition: var(--wave-transition);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.28);
}

.btn-wave-orange:hover,
.btn-wave-orange:focus {
    background-color: #D97706;
    border-color: #D97706;
    color: #fff;
}

.btn-wave-teal:hover,
.btn-wave-teal:focus {
    background-color: var(--wave-primary-dark);
    border-color: var(--wave-primary-dark);
    color: var(--wave-white);
}

.btn-wave-outline {
    background-color: transparent;
    border: 2px solid var(--wave-primary);
    color: var(--wave-primary);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border-radius: var(--wave-radius);
    transition: var(--wave-transition);
}

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

.btn-wave-outline-accent {
    background-color: transparent;
    border: 2px solid var(--wave-accent);
    color: var(--wave-accent);
    font-weight: 700;
    padding: 0.625rem 1.5rem;
    border-radius: var(--wave-radius);
    transition: var(--wave-transition);
}

.btn-wave-outline-accent:hover {
    background-color: var(--wave-accent);
    color: var(--wave-white);
}

/* Align Bootstrap primary with coral action color */
.btn-primary {
    --bs-btn-bg: var(--wave-accent);
    --bs-btn-border-color: var(--wave-accent);
    --bs-btn-hover-bg: var(--wave-accent-dark);
    --bs-btn-hover-border-color: var(--wave-accent-dark);
    --bs-btn-active-bg: var(--wave-accent-dark);
    --bs-btn-active-border-color: var(--wave-accent-dark);
    --bs-btn-disabled-bg: var(--wave-accent);
    --bs-btn-disabled-border-color: var(--wave-accent);
}

.btn-outline-primary {
    --bs-btn-color: var(--wave-primary);
    --bs-btn-border-color: var(--wave-primary);
    --bs-btn-hover-bg: var(--wave-primary);
    --bs-btn-hover-border-color: var(--wave-primary);
    --bs-btn-hover-color: var(--wave-white);
    --bs-btn-active-bg: var(--wave-primary-dark);
    --bs-btn-active-border-color: var(--wave-primary-dark);
    --bs-btn-active-color: var(--wave-white);
}

.text-primary { color: var(--wave-primary) !important; }
.bg-primary { background-color: var(--wave-primary) !important; }
.border-primary { border-color: var(--wave-primary) !important; }
.border-wave-accent { border-color: var(--wave-accent) !important; }

.form-control:focus,
.form-select:focus {
    border-color: var(--wave-accent);
    box-shadow: 0 0 0 0.25rem rgba(var(--wave-accent-rgb), 0.18);
}

.form-check-input:checked {
    background-color: var(--wave-accent);
    border-color: var(--wave-accent);
}

.nav-pills .nav-link.active,
.page-link {
    color: var(--wave-primary);
}

.page-item.active .page-link {
    background-color: var(--wave-accent);
    border-color: var(--wave-accent);
    color: var(--wave-white);
}

.progress {
    background-color: var(--wave-accent-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar,
.bg-wave-primary.progress-bar,
.progress-bar.bg-wave-primary {
    background-color: var(--wave-accent) !important;
}

/* ============================================================
   Cards
   ============================================================ */
.wave-card {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    box-shadow: var(--wave-shadow-sm);
    transition: transform var(--wave-transition), box-shadow var(--wave-transition), border-color var(--wave-transition);
}

.wave-card:hover {
    box-shadow: var(--wave-shadow);
    border-color: rgba(var(--wave-accent-rgb), 0.35);
}

.wave-card-accent {
    border-top: 3px solid var(--wave-accent);
}

/* ============================================================
   Navbar
   ============================================================ */
.wave-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--wave-border);
    min-height: var(--wave-navbar-height);
    box-shadow: var(--wave-shadow-sm);
    position: sticky;
}

.wave-navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--wave-accent);
    pointer-events: none;
}

.wave-navbar.navbar {
    position: sticky;
}

.wave-logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
    text-decoration: none;
}

.wave-logo span {
    color: var(--wave-accent);
}

.wave-brand {
    line-height: 1;
}

.wave-logo-img {
    display: block;
    object-fit: contain;
    border-radius: 50%;
    flex-shrink: 0;
}

.wave-logo-img-sm { width: 32px; height: 32px; }
.wave-logo-img-md { width: 40px; height: 40px; }
.wave-logo-img-lg { width: 56px; height: 56px; }

.wave-wordmark {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
    line-height: 1;
}

.wave-wordmark .text-wave-accent {
    color: var(--wave-accent) !important;
}

.wave-nav-link {
    color: var(--wave-text);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--wave-transition);
    text-align: center;
}

.wave-nav-link:hover,
.wave-nav-link.active {
    color: var(--wave-accent);
    background-color: var(--wave-accent-light);
}

.wave-navbar-links {
    align-items: center;
}

@media (min-width: 992px) {
    .wave-navbar .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
        align-items: center;
        width: 100%;
        gap: 0.5rem;
    }

    .wave-navbar-links {
        position: static;
        left: auto;
        transform: none;
        flex: 1 1 auto;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }

    .wave-navbar-actions {
        margin-left: 0;
        flex-shrink: 0;
    }
}

@media (max-width: 991.98px) {
    .wave-navbar-links {
        width: 100%;
        align-items: stretch;
        text-align: center;
    }

    .wave-navbar-links .nav-link {
        width: 100%;
    }

    .wave-navbar-actions {
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--wave-border);
    }

    .wave-navbar-actions .btn {
        flex: 1 1 auto;
    }
}

/* ============================================================
   Hero Section
   ============================================================ */
.wave-hero {
    background-color: var(--wave-primary-light);
    padding: 4rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.wave-hero::before,
.wave-hero::after {
    display: none;
}

.wave-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.wave-hero-title .text-wave-accent {
    color: var(--wave-accent) !important;
}

.wave-hero-title .text-wave-primary {
    color: var(--wave-primary) !important;
}

.wave-search-box {
    background: var(--wave-white);
    border: 2px solid var(--wave-border);
    border-radius: var(--wave-radius-xl);
    padding: 0.5rem;
    box-shadow: var(--wave-shadow);
    transition: var(--wave-transition);
}

.wave-search-box:focus-within {
    border-color: var(--wave-accent);
    box-shadow: 0 0 0 4px rgba(var(--wave-accent-rgb), 0.16);
}

.wave-search-box .form-control {
    border: none;
    box-shadow: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.wave-search-box .form-control:focus {
    box-shadow: none;
}

.wave-search-divider {
    width: 1px;
    height: 32px;
    background: var(--wave-border);
    align-self: center;
}

/* ============================================================
   Category Pills
   ============================================================ */
.wave-category-card {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: var(--wave-transition);
    cursor: pointer;
    text-decoration: none;
    color: var(--wave-text);
    display: block;
}

.wave-category-card:hover {
    border-color: var(--wave-accent);
    box-shadow: 0 8px 22px rgba(var(--wave-accent-rgb), 0.16);
    transform: translateY(-3px);
    color: var(--wave-primary);
}

.wave-category-icon {
    width: 48px;
    height: 48px;
    background: var(--wave-accent-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    font-size: 1.25rem;
    color: var(--wave-accent);
}

/* ============================================================
   Restaurant Cards
   ============================================================ */
.wave-restaurant-card {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    overflow: hidden;
    transition: var(--wave-transition);
    height: 100%;
}

.wave-restaurant-card:hover {
    box-shadow: var(--wave-shadow-lg);
    transform: translateY(-4px);
    border-color: rgba(var(--wave-accent-rgb), 0.4);
}

.wave-restaurant-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.wave-restaurant-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--wave-accent);
    color: var(--wave-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(var(--wave-accent-rgb), 0.35);
}

.wave-rating {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.wave-rating i {
    color: #FBBF24;
}

/* ============================================================
   Stats Section
   ============================================================ */
.wave-stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.wave-stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wave-primary);
    line-height: 1;
}

.wave-stat-label {
    color: var(--wave-text-muted);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* ============================================================
   How It Works
   ============================================================ */
.wave-step-card {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    padding: 2rem 1.5rem;
    height: 100%;
    position: relative;
}

.wave-step-number {
    width: 40px;
    height: 40px;
    background-color: var(--wave-accent);
    color: var(--wave-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(var(--wave-accent-rgb), 0.3);
}

.wave-step-icon {
    font-size: 2rem;
    color: var(--wave-accent);
    margin-bottom: 1rem;
}

/* ============================================================
   CTA Section
   ============================================================ */
.wave-cta {
    background-color: var(--wave-primary);
    border-radius: var(--wave-radius-xl);
    padding: 3rem 2rem;
    color: var(--wave-white);
    position: relative;
    overflow: hidden;
    box-shadow: var(--wave-shadow-lg);
    border-bottom: 6px solid var(--wave-accent);
}

.wave-cta::before {
    display: none;
}

/* ============================================================
   Footer
   ============================================================ */
.wave-footer {
    background: var(--wave-white);
    border-top: 1px solid var(--wave-border);
    padding: 4rem 0 2rem;
}

.wave-footer-link {
    color: var(--wave-text-muted);
    text-decoration: none;
    transition: var(--wave-transition);
}

.wave-footer-link:hover {
    color: var(--wave-accent);
}

.wave-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wave-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--wave-text-muted);
    transition: var(--wave-transition);
    text-decoration: none;
}

.wave-social-link:hover {
    background: var(--wave-accent);
    color: var(--wave-white);
    transform: translateY(-2px);
}

/* ============================================================
   Section Headers
   ============================================================ */
.wave-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.wave-section-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 4px;
    margin-top: 0.65rem;
    border-radius: 999px;
    background-color: var(--wave-accent);
}

.wave-section-subtitle {
    color: var(--wave-text-muted);
    font-size: 1.0625rem;
}

/* ============================================================
   Status Badges (reusable)
   ============================================================ */
.badge-wave-success { background-color: #DCFCE7; color: #166534; }
.badge-wave-warning { background-color: #FEF3C7; color: #92400E; }
.badge-wave-danger { background-color: #FEE2E2; color: #991B1B; }
.badge-wave-info { background-color: var(--wave-primary-light); color: var(--wave-primary); }
.badge-wave-accent { background-color: var(--wave-accent-light); color: var(--wave-accent-dark); }

/* ============================================================
   Responsive Utilities
   ============================================================ */
@media (max-width: 767.98px) {
    .wave-hero {
        padding: 2.5rem 0 3rem;
    }

    .wave-search-box {
        border-radius: var(--wave-radius-lg);
        flex-direction: column;
    }

    .wave-search-divider {
        width: 100%;
        height: 1px;
    }

    .wave-restaurant-card .card-img-top {
        height: 160px;
    }
}

/* Portal layout */
.portal-body {
  background: var(--wave-bg);
  min-height: 100vh;
}
.portal-sidebar {
  width: 240px; background: var(--wave-white); border-right: 1px solid var(--wave-border);
  min-height: 100vh; position: sticky; top: 0; flex-shrink: 0; z-index: 40;
}
.portal-sidebar .portal-link {
  color: var(--wave-text); border-radius: 10px; padding: .65rem .9rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: var(--wave-transition);
}
.portal-sidebar .portal-link:hover {
  background: var(--wave-accent-light); color: var(--wave-accent-dark);
}
.portal-sidebar .portal-link.active {
  background: var(--wave-primary-light); color: var(--wave-primary);
  border-left-color: var(--wave-accent);
  font-weight: 700;
}
.portal-topbar {
  height: 64px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--wave-border);
  position: sticky; top: 0; z-index: 20;
}
.portal-topbar::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background-color: var(--wave-accent); pointer-events: none;
}
.portal-main { min-width: 0; }
.portal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 35;
}
.portal-backdrop.show { display: block; }
@media (max-width: 991.98px) {
  .portal-sidebar {
    position: fixed; left: -280px; top: 0; bottom: 0; z-index: 40;
    transition: left .2s ease; box-shadow: var(--wave-shadow-lg);
    width: min(280px, 86vw);
  }
  .portal-sidebar.open { left: 0; }
  .portal-topbar .portal-user-name { display: none; }
  .portal-topbar .page-title-text {
    max-width: 40vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Responsive helpers */
.img-fluid, img { max-width: 100%; height: auto; }
.table-responsive { -webkit-overflow-scrolling: touch; }
.kitchen-board .kitchen-column { min-height: 120px; }
@media (max-width: 991.98px) {
  .kitchen-board > [class*="col-"] { margin-bottom: .25rem; }
}
@media (max-width: 767.98px) {
  .order-stepper {
    display: flex;
    overflow-x: auto;
    gap: .75rem;
    padding-bottom: .5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .order-step {
    flex: 0 0 auto;
    min-width: 7.5rem;
    scroll-snap-align: start;
    text-align: center;
    display: block;
  }
  .order-step-dot { margin-bottom: .35rem; }
  .wave-hero { padding: 2.5rem 0 3rem; }
  .wave-hero-title { font-size: 1.85rem; }
}
.wave-card {
  background: #fff; border: 1px solid var(--wave-border);
  border-radius: var(--wave-radius); box-shadow: var(--wave-shadow-sm);
}
.bg-wave-accent { background-color: var(--wave-accent) !important; color: #fff !important; }

/* Count badges (cart / notifications) — brand coral instead of generic red */
.badge.rounded-pill.bg-danger,
.js-notif-badge,
.wave-count-badge {
  background-color: var(--wave-accent) !important;
  border: 0;
}

/* Order tracking stepper */
.order-stepper {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .5rem;
}
.order-step {
  text-align: center;
  position: relative;
  color: var(--wave-text-muted);
  font-size: .75rem;
  font-weight: 600;
}
.order-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #E2E8F0; color: #64748B; margin-bottom: .35rem;
  font-size: .75rem;
}
.order-step.is-done .order-step-dot {
  background: var(--wave-primary); color: #fff;
}
.order-step.is-current .order-step-dot {
  background-color: var(--wave-accent); color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--wave-accent-rgb), 0.2);
}
.order-step.is-current .order-step-label { color: var(--wave-accent); }
.order-step.is-done { color: var(--wave-text); }
@media (max-width: 767.98px) {
  .order-stepper {
    display: flex;
    overflow-x: auto;
    gap: .75rem;
    padding-bottom: .5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none;
  }
  .order-step {
    flex: 0 0 auto;
    min-width: 7.5rem;
    scroll-snap-align: start;
    text-align: center;
    display: block;
  }
  .order-step-dot { margin-bottom: .35rem; }
}

/* Ratings */
.star-rating { display: flex; gap: .25rem; }
.star-btn {
  border: 0; background: transparent; color: #F59E0B;
  font-size: 1.35rem; padding: 0; line-height: 1; cursor: pointer;
}

/* Notifications */
.notification-row.is-unread { background: var(--wave-accent-light); border-left: 3px solid var(--wave-accent); }
.notification-row:hover { background: #F8FAFC; }

/* Kitchen display */
.kitchen-column {
  background: #EEF2F7;
  border-radius: var(--wave-radius);
  min-height: 70vh;
  padding: .75rem;
}
.kitchen-column-head {
  font-weight: 700;
  font-size: .95rem;
  padding: .5rem .65rem;
  margin-bottom: .75rem;
}
.kitchen-ticket {
  background: #fff;
  border: 1px solid var(--wave-border);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: .75rem;
  box-shadow: var(--wave-shadow-sm);
}
.kitchen-ticket.is-new { border-left: 4px solid var(--wave-accent); }
.kitchen-ticket.is-overdue { border-left: 4px solid #DC2626; background: #FEF2F2; }
.kitchen-timer { font-variant-numeric: tabular-nums; font-size: .85rem; }

/* Wizard / application steps */
.badge.text-bg-primary {
  background-color: var(--wave-accent) !important;
}
.badge.text-bg-success {
  background-color: var(--wave-primary) !important;
}

/* Auth cards */
.wave-auth-wrap .wave-card {
  border-top: 3px solid var(--wave-accent);
  box-shadow: var(--wave-shadow);
}

/* Soft dual-tone alert accents */
.alert-info {
  border-left: 4px solid var(--wave-primary);
}
.alert-warning {
  border-left: 4px solid var(--wave-accent);
}

/* Menu item photos */
.menu-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.menu-item-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.menu-item-photo {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: #E2E8F0;
}
.menu-item-body { padding: .9rem 1rem 1rem; }
.menu-item-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}
.menu-manage-thumb,
.cart-item-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: #E2E8F0;
}

.wave-cart-qty-form {
  margin: 0;
}
@media (max-width: 575.98px) {
  .menu-item-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .menu-item-photo { height: 120px; }
}

/* ============================================================
   Google Maps
   ============================================================ */
.wave-map {
  width: 100%;
  height: 280px;
  border-radius: var(--wave-radius);
  border: 1px solid var(--wave-border);
  background: #E8F0F2;
  overflow: hidden;
}
.wave-map--lg { height: 360px; }
.wave-map--sm { height: 220px; }
.wave-map-hint {
  font-size: .85rem;
  color: var(--wave-text-muted);
  margin-top: .5rem;
  margin-bottom: 0;
}
.wave-map-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  color: var(--wave-text-muted);
  font-size: .9rem;
}

/* ============================================================
   Customer App UI (screens matching provided designs)
   ============================================================ */
.customer-app-body {
    background: var(--wave-bg);
}

.customer-app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--wave-border);
    height: 62px;
    display: flex;
    align-items: center;
}

.customer-topbar-logo .wave-logo-img {
    width: 32px;
    height: 32px;
}

.customer-topbar-subtitle {
    padding-left: 2px;
    white-space: nowrap;
}

.customer-app-topbar .container {
    max-width: 1180px;
}

.customer-topbar-actions {
    gap: 8px !important;
    flex-shrink: 0;
}

.customer-topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F3F5F7;
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.15rem;
    transition: background var(--wave-transition), color var(--wave-transition);
}

.customer-topbar-icon-btn:hover {
    background: rgba(var(--wave-accent-rgb), 0.12);
    color: var(--wave-accent);
}

.customer-topbar-icon-btn .badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2em 0.35em;
}

.customer-topbar-profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    border: 2px solid rgba(var(--wave-accent-rgb), 0.25);
    text-decoration: none;
    flex-shrink: 0;
}

.customer-topbar-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.customer-topbar-profile:hover {
    border-color: var(--wave-accent);
}

.customer-app-main {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

.customer-app-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

/* -------------------------
   Home (CUS-002)
   ------------------------- */
.wave-home-hero {
    margin-top: 6px;
}

.wave-home-hero-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.wave-home-greeting {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
}

.wave-emoji-dot {
    color: var(--wave-accent);
    font-size: 1.25rem;
    line-height: 1;
}

.wave-home-hero-right {
    flex: 0 0 auto;
}

.wave-promo-card {
    border-radius: var(--wave-radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: var(--wave-shadow);
    background: linear-gradient(135deg, var(--wave-primary) 0%, #0B6B75 100%);
    display: flex;
    align-items: stretch;
    min-height: 160px;
}

.wave-promo-card--hero {
    width: min(440px, 90vw);
}

.wave-promo-card-body {
    padding: 18px 18px 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    flex: 1 1 auto;
}

.wave-promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    letter-spacing: -0.01em;
    background: rgba(248, 104, 72, 0.16);
    padding: 7px 12px;
    border-radius: 999px;
}

.wave-promo-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.wave-promo-btn {
    align-self: flex-start;
}

.wave-promo-card-visual {
    width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
}

.wave-promo-card-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wave-promo-illustration {
    width: 76px;
    height: 76px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.wave-home-search {
    margin-top: 18px;
}

.wave-home-searchbar {
    display: flex;
    align-items: center;
    background: var(--wave-white);
    border: 2px solid var(--wave-border);
    border-radius: 18px;
    box-shadow: var(--wave-shadow-sm);
    padding: 10px 10px 10px 14px;
    gap: 10px;
}

.wave-home-search-icon {
    color: var(--wave-primary);
    font-size: 1.1rem;
}

.wave-home-search-btn {
    border-radius: 14px;
    padding: 10px 12px;
    min-width: 52px;
}

.wave-home-categories {
    margin-top: 8px;
}

.wave-categories-block {
    width: 100%;
}

.wave-categories-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}

.wave-categories-row::-webkit-scrollbar {
    height: 0;
}

.wave-cat-tile {
    flex: 0 0 auto;
    width: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--wave-text);
    scroll-snap-align: start;
    transition: transform var(--wave-transition);
}

.wave-cat-tile:hover {
    transform: translateY(-2px);
    color: var(--wave-primary);
}

.wave-cat-tile-media {
    width: 78px;
    height: 78px;
    border-radius: 18px;
    background: #F1F3F5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
}

.wave-cat-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.wave-cat-tile-label {
    font-weight: 700;
    font-size: 0.84rem;
    line-height: 1.1;
    text-align: center;
    color: #1f2937;
}

.wave-cat-tile--more .wave-cat-tile-media {
    background: #F1F3F5;
}

.wave-cat-tile-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.wave-cat-tile-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7280;
    display: block;
}

@media (min-width: 768px) {
    .wave-cat-tile,
    .wave-cat-tile-media {
        width: 86px;
    }

    .wave-cat-tile-media {
        height: 86px;
        border-radius: 20px;
    }

    .wave-categories-row {
        gap: 22px;
    }
}

.wave-home-section {
    margin-top: 26px;
}

.wave-home-section-title {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    color: var(--wave-primary);
}

.wave-home-section-link {
    color: var(--wave-accent);
    font-weight: 700;
}

.wave-restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 168px), 1fr));
    gap: 14px;
}

.wave-restaurant-tile {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius);
    overflow: hidden;
    box-shadow: var(--wave-shadow-sm);
    transition: transform var(--wave-transition), box-shadow var(--wave-transition), border-color var(--wave-transition);
}

.wave-restaurant-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--wave-shadow);
    border-color: rgba(var(--wave-accent-rgb), 0.35);
}

.wave-restaurant-tile-media {
    position: relative;
    height: 110px;
    overflow: hidden;
}

.wave-restaurant-tile-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wave-restaurant-tile-logo {
    position: absolute;
    left: 12px;
    top: -18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: var(--wave-shadow-sm);
    z-index: 2;
}

.wave-restaurant-tile-body {
    position: relative;
    padding: 1.35rem 12px 14px;
}

.wave-restaurant-like {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wave-accent);
    box-shadow: var(--wave-shadow-sm);
}

.wave-restaurant-tile-body {
    padding: 12px 12px 14px;
}

.wave-restaurant-tile-rating {
    color: #FBBF24;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.wave-menu-reco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: 14px;
}

.wave-menu-reco-card {
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius);
    overflow: hidden;
    box-shadow: var(--wave-shadow-sm);
}

.wave-menu-reco-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.wave-menu-reco-body {
    padding: 12px;
}

.wave-line-clamp-1 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.wave-plus-pill {
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: rgba(var(--wave-accent-rgb), 0.14);
    color: var(--wave-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.wave-home-promos-3up {
    margin-top: 18px;
}

.wave-promo-mini {
    height: 140px;
    border-radius: var(--wave-radius-lg);
    padding: 18px 16px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: var(--wave-shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.wave-promo-mini--with-image {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
}

.wave-promo-mini--with-image img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 16px;
    flex-shrink: 0;
}

.wave-promo-mini--green { background: linear-gradient(135deg, #0F766E 0%, #0B5A53 100%); }
.wave-promo-mini--blue { background: linear-gradient(135deg, #0B7285 0%, #085A69 100%); }
.wave-promo-mini--cream { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); }
.wave-promo-mini-title { font-weight: 900; font-size: 1.1rem; letter-spacing: -0.02em; }

/* -------------------------
   Restaurant details (CUS-003)
   ------------------------- */
.wave-resto-page {
    position: relative;
    padding-top: 12px;
    padding-bottom: 24px;
}

.wave-resto-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.wave-resto-main {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--wave-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--wave-shadow-sm);
}

.wave-resto-hero {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: #0a3b45;
}

.wave-resto-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wave-resto-hero-actions {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.28) 0%, transparent 42%);
}

.wave-resto-hero-actions-right {
    display: flex;
    gap: 8px;
}

.wave-resto-circle-btn {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.96);
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    font-size: 1.05rem;
    cursor: pointer;
}

.wave-resto-circle-btn:hover {
    color: var(--wave-primary);
    background: #fff;
}

.wave-resto-sheet {
    position: relative;
    background: #fff;
    padding: 0 22px 28px;
}

.wave-resto-identity {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding-top: 8px;
}

.wave-resto-logo-wrap {
    width: 84px;
    height: 84px;
    margin-top: -42px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--wave-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    flex-shrink: 0;
    padding: 8px;
}

.wave-resto-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.wave-resto-identity-body {
    min-width: 0;
    flex: 1;
    padding-top: 14px;
}

.wave-resto-name {
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
    line-height: 1.15;
    color: #111827;
}

.wave-resto-verified {
    color: #0EA5E9;
    font-size: 1rem;
    vertical-align: 2px;
}

.wave-resto-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.wave-resto-meta .bi-star-fill {
    color: #F59E0B;
    font-size: 0.82rem;
}

.wave-resto-dot { opacity: 0.7; }

.wave-resto-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wave-resto-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.wave-resto-badge--open { background: #E7F7EF; color: #0B8F55; }
.wave-resto-badge--closed { background: #FEE2E2; color: #B91C1C; }
.wave-resto-badge--muted {
    background: #F3F4F6;
    color: #6b7280;
    border: 1px solid #E5E7EB;
}
.wave-resto-badge--delivery {
    background: rgba(var(--wave-primary-rgb), 0.1);
    color: var(--wave-primary);
}

.wave-resto-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--wave-border);
    border-radius: 16px;
    background: #FAFBFC;
}

.wave-resto-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
}

.wave-resto-stat > .bi {
    color: var(--wave-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.wave-resto-stat-label {
    font-size: 0.74rem;
    color: #9ca3af;
    line-height: 1.1;
}

.wave-resto-stat-value {
    font-size: 0.92rem;
    font-weight: 800;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wave-resto-stat--link {
    position: relative;
    padding-right: 16px;
}

.wave-resto-stat-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.85rem;
}

.wave-resto-cats {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin-top: 20px;
    padding-bottom: 2px;
    border-bottom: 1px solid #EEF2F4;
    -webkit-overflow-scrolling: touch;
}

.wave-resto-cats::-webkit-scrollbar { height: 0; }

.wave-resto-cat {
    flex: 0 0 auto;
    min-width: 72px;
    border: 0;
    background: transparent;
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #9ca3af;
    cursor: pointer;
    position: relative;
}

.wave-resto-cat-icon { font-size: 1.25rem; line-height: 1; }
.wave-resto-cat-label { font-size: 0.8rem; font-weight: 700; }
.wave-resto-cat.is-active { color: var(--wave-primary); }
.wave-resto-cat.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--wave-primary);
}

.wave-resto-menu-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0 14px;
}

.wave-resto-toolbar-btn {
    border: 0;
    background: transparent;
    color: #1f2937;
    font-weight: 800;
    font-size: 0.98rem;
    padding: 0;
    cursor: pointer;
}

.wave-resto-toolbar-btn .bi {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: 2px;
}

.wave-resto-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wave-menu-item {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #EEF2F4;
    border-radius: 16px;
    background: #fff;
    transition: border-color var(--wave-transition), box-shadow var(--wave-transition);
}

.wave-menu-item:hover {
    border-color: rgba(var(--wave-primary-rgb), 0.22);
    box-shadow: 0 8px 20px rgba(3, 78, 97, 0.06);
}

.wave-menu-item-media {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 14px;
    overflow: hidden;
    background: #F3F4F6;
    flex-shrink: 0;
}

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

.wave-menu-bestseller {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #F97316;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.35);
}

.wave-menu-item-body { min-width: 0; }

.wave-menu-item-name {
    font-weight: 800;
    color: #111827;
    font-size: 1rem;
    line-height: 1.2;
}

.wave-menu-item-desc {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 0.84rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wave-menu-item-rating {
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
}

.wave-menu-item-rating .bi-star-fill {
    color: #F59E0B;
    font-size: 0.72rem;
}

.wave-menu-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    min-width: 110px;
}

.wave-menu-item-price {
    font-weight: 900;
    color: #111827;
    font-size: 0.98rem;
    white-space: nowrap;
}

.wave-menu-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid var(--wave-primary);
    background: #fff;
    color: var(--wave-primary);
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--wave-transition), color var(--wave-transition);
}

.wave-menu-add-btn:hover {
    background: rgba(var(--wave-primary-rgb), 0.08);
    color: var(--wave-primary);
}

.wave-menu-qty {
    display: inline-flex;
    align-items: center;
    height: 38px;
    border: 1.5px solid var(--wave-primary);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.wave-menu-qty-btn {
    width: 36px;
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--wave-primary);
    font-weight: 900;
    font-size: 1.05rem;
    cursor: pointer;
}

.wave-menu-qty-btn:hover {
    background: rgba(var(--wave-primary-rgb), 0.08);
}

.wave-menu-qty-val {
    min-width: 26px;
    text-align: center;
    font-weight: 900;
    color: var(--wave-primary);
    font-size: 0.95rem;
}

.wave-resto-aside {
    position: sticky;
    top: 78px;
}

.wave-resto-aside-card {
    background: #fff;
    border: 1px solid var(--wave-border);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--wave-shadow-sm);
}

.wave-resto-aside-title {
    font-weight: 900;
    font-size: 1.05rem;
    margin-bottom: 14px;
    color: var(--wave-primary);
}

.wave-resto-aside-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: #374151;
    font-size: 0.92rem;
}

.wave-resto-aside-row .bi {
    color: var(--wave-primary);
    margin-top: 2px;
}

.wave-resto-aside-cart {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--wave-border);
}

.wave-resto-aside-hint {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #F8FAFB;
    color: #6b7280;
    font-size: 0.88rem;
}

.wave-resto-cartbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    padding: 0 16px;
    pointer-events: none;
}

/* Keep addon cart modals above mobile chrome / cart bar and fully tappable */
.wave-addon-modal {
    z-index: 1080;
}
.wave-addon-modal .modal-dialog {
    margin: 0.75rem;
    max-width: calc(100% - 1.5rem);
}
.wave-addon-modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
}
.wave-addon-modal-footer .btn {
    min-height: 44px;
    touch-action: manipulation;
}

.wave-resto-cartbar-inner {
    pointer-events: auto;
    max-width: 1180px;
    margin: 0 auto;
    background: var(--wave-primary);
    color: #fff;
    border-radius: 18px;
    padding: 12px 12px 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 14px 34px rgba(3, 78, 97, 0.35);
}

.wave-resto-cartbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.wave-resto-cart-icon {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.wave-resto-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    color: var(--wave-primary);
    font-size: 0.68rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.wave-resto-cart-count {
    font-size: 0.82rem;
    font-weight: 700;
    opacity: 0.95;
}

.wave-resto-cart-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.wave-resto-cart-totals strong { font-size: 0.95rem; }

.wave-resto-cart-was {
    font-size: 0.78rem;
    opacity: 0.65;
    text-decoration: line-through;
}

.wave-resto-cart-saved {
    font-size: 0.68rem;
    font-weight: 800;
    background: #FFEDD5;
    color: #C2410C;
    border-radius: 999px;
    padding: 2px 7px;
}

.wave-resto-cart-cta {
    flex-shrink: 0;
    background: #0B6B75;
    color: #fff;
    text-decoration: none;
    font-weight: 800;
    border-radius: 12px;
    padding: 12px 16px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.wave-resto-cart-cta:hover {
    color: #fff;
    background: #095861;
}

/* Desktop: sidebar cart, hide floating bar */
@media (min-width: 992px) {
    .wave-resto-cartbar--mobile { display: none; }
}

/* Tablet / phone: stack layout, keep interactive bottom cart */
@media (max-width: 991.98px) {
    .wave-resto-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .wave-resto-aside { display: none; }

    .wave-resto-main {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    .wave-resto-hero {
        height: clamp(200px, 42vw, 260px);
        border-radius: 0;
        margin: 0 -16px;
        width: calc(100% + 32px);
    }

    .wave-resto-sheet {
        margin-top: -28px;
        border-radius: 28px 28px 0 0;
        padding: 0 4px 28px;
        box-shadow: 0 -8px 28px rgba(3, 78, 97, 0.08);
        background: #fff;
        position: relative;
        z-index: 1;
    }
}

@media (max-width: 575.98px) {
    .wave-resto-stats {
        grid-template-columns: 1fr;
    }

    .wave-menu-item {
        grid-template-columns: 78px minmax(0, 1fr);
        grid-template-areas:
            "media body"
            "media side";
        gap: 10px;
        padding: 12px;
    }

    .wave-menu-item-media {
        grid-area: media;
        width: 78px;
        height: 78px;
    }

    .wave-menu-item-body { grid-area: body; }

    .wave-menu-item-side {
        grid-area: side;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: 0;
        width: 100%;
    }
}

/* -------------------------
   Checkout (CUS-004)
   ------------------------- */
.wave-page-title {
    font-weight: 950;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
}

.wave-checkout-page {
    padding-top: 10px;
    padding-bottom: 28px;
}

.wave-checkout-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(min(100%, 280px), 0.9fr);
    gap: 22px;
    align-items: start;
    background: #fff;
    border: 1px solid var(--wave-border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: var(--wave-shadow-sm);
}

.wave-checkout-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.wave-checkout-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F3F5F7;
    color: var(--wave-primary);
    text-decoration: none;
}

.wave-checkout-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #111827;
}

.wave-checkout-secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #0B8F55;
    font-weight: 700;
    font-size: 0.88rem;
}

.wave-checkout-step {
    margin-bottom: 22px;
}

.wave-checkout-step-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.wave-checkout-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--wave-primary);
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wave-checkout-step-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: #111827;
}

.wave-checkout-address {
    display: block;
    border: 1.5px solid var(--wave-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color var(--wave-transition), box-shadow var(--wave-transition);
}

.wave-checkout-address.is-selected {
    border-color: var(--wave-primary);
    box-shadow: 0 0 0 3px rgba(var(--wave-primary-rgb), 0.1);
}

.wave-checkout-address-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.wave-checkout-default {
    background: rgba(var(--wave-primary-rgb), 0.12);
    color: var(--wave-primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

.wave-checkout-edit {
    color: var(--wave-primary);
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
}

.wave-checkout-address-body {
    color: #4b5563;
    font-size: 0.92rem;
    margin-bottom: 8px;
}

.wave-checkout-address-phone {
    color: #6b7280;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wave-checkout-add-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1.5px dashed rgba(var(--wave-primary-rgb), 0.45);
    border-radius: 14px;
    padding: 14px;
    color: var(--wave-primary);
    font-weight: 800;
    text-decoration: none;
    background: rgba(var(--wave-primary-rgb), 0.03);
}

.wave-checkout-add-address:hover {
    background: rgba(var(--wave-primary-rgb), 0.07);
    color: var(--wave-primary);
}

.wave-checkout-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--wave-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

.wave-checkout-option.is-selected {
    border-color: var(--wave-primary);
    background: rgba(var(--wave-primary-rgb), 0.03);
}

.wave-checkout-option-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--wave-primary-rgb), 0.1);
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.wave-checkout-fee {
    font-weight: 800;
    color: #111827;
}

.wave-checkout-fee.is-free {
    color: #0B8F55;
}

.wave-checkout-option input,
.wave-checkout-pay input {
    accent-color: var(--wave-primary);
    width: 18px;
    height: 18px;
}

.wave-checkout-save-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #EAF8EF;
    color: #166534;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.9rem;
    margin-top: 4px;
}

.wave-checkout-save-banner .bi {
    color: #16A34A;
    margin-top: 2px;
}

.wave-checkout-pay {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1.5px solid var(--wave-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
}

.wave-checkout-pay.is-selected {
    border-color: var(--wave-primary);
}

.wave-checkout-pay-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F3F5F7;
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
    font-weight: 900;
    font-size: 0.72rem;
}

.wave-checkout-pay-icon--mm {
    background: #FFF1E8;
    color: #EA580C;
    font-size: 1.15rem;
}

.wave-checkout-pay-icon--nmb {
    background: #FEE2E2;
    color: #B91C1C;
}

.wave-checkout-pay-panel {
    margin: -2px 0 12px;
    padding: 12px 14px 14px;
    border: 1px solid var(--wave-border);
    border-top: 0;
    border-radius: 0 0 14px 14px;
    background: #FAFBFC;
}

.wave-checkout-card-logos,
.wave-nmb-badge {
    display: inline-flex;
    gap: 4px;
}

.wave-card-logo,
.wave-nmb-badge {
    font-size: 0.65rem;
    font-weight: 900;
    padding: 3px 6px;
    border-radius: 4px;
    background: #EEF2F7;
    color: #1f2937;
}

.wave-nmb-badge {
    background: #FEE2E2;
    color: #B91C1C;
}

.wave-checkout-input,
.wave-checkout-notes {
    border-radius: 12px;
    border-color: var(--wave-border);
    padding: 0.75rem 0.9rem;
}

.wave-checkout-notes-wrap {
    border: 1px solid var(--wave-border);
    border-radius: 14px;
    overflow: hidden;
}

.wave-checkout-notes {
    border: 0;
    border-radius: 0;
    resize: vertical;
    min-height: 96px;
    box-shadow: none !important;
}

.wave-checkout-notes-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px 10px;
    background: #FAFBFC;
    border-top: 1px solid #EEF2F4;
}

.wave-checkout-pci {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border: 1px solid var(--wave-border);
    border-radius: 14px;
    padding: 14px;
    background: #FAFBFC;
}

.wave-pci-badge {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--wave-primary);
    border: 1px solid rgba(var(--wave-primary-rgb), 0.35);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
}

.wave-checkout-aside {
    position: sticky;
    top: 78px;
}

.wave-checkout-summary {
    border: 1px solid var(--wave-border);
    border-radius: 18px;
    padding: 18px;
    background: #FAFBFC;
}

.wave-checkout-summary-title {
    font-size: 1.1rem;
    font-weight: 900;
}

.wave-checkout-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
}

.wave-checkout-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wave-checkout-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #E5E7EB;
    flex-shrink: 0;
}

.wave-checkout-coupon {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--wave-border);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.wave-checkout-coupon .bi-tag {
    color: var(--wave-primary);
    margin-right: 4px;
}

.wave-checkout-coupon-panel {
    margin-bottom: 12px;
}

.wave-checkout-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
    margin-top: 4px;
}

.wave-checkout-total-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
    color: #4b5563;
}

.wave-checkout-total-row--grand {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--wave-border);
    font-size: 1.05rem;
    font-weight: 900;
    color: #111827;
}

.wave-fee-strike {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 6px;
}

.wave-fee-free {
    color: #0B8F55;
    font-weight: 800;
}

.wave-checkout-save-banner--summary {
    margin: 12px 0 14px;
}

.wave-checkout-place {
    padding: 0.85rem 1rem;
    font-weight: 800;
    border-radius: 12px;
}

.wave-checkout-legal {
    margin-top: 12px;
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.4;
}

.wave-checkout-legal a {
    color: #2563EB;
    text-decoration: none;
}

.wave-checkout-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px;
    margin-top: 22px;
    padding: 8px 4px 0;
}

.wave-checkout-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wave-checkout-trust-item > .bi {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #F1F3F5;
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .wave-checkout-shell {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .wave-checkout-aside {
        position: static;
        order: 2;
    }
}

@media (max-width: 575.98px) {
    .wave-checkout-pci {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Legacy option pills (unused on CUS-004) */
.wave-option-pill {
    flex: 1 1 200px;
    border-radius: 16px;
    padding: 14px 16px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(3,78,97,0.25);
}

.wave-option-pill--active {
    background: rgba(3,78,97,0.95);
}

.wave-option-pill--disabled {
    background: rgba(100,116,139,0.25);
    color: rgba(255,255,255,0.85);
    opacity: 0.7;
}

/* -------------------------
   Live Tracking (CUS-006)
   ------------------------- */
.wave-live-page {
    max-width: 1100px;
}

.wave-live-back {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F3F5F7;
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.wave-live-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.7fr);
    gap: 18px;
    align-items: center;
    background: linear-gradient(135deg, #E8F4F7 0%, #F7FBFC 55%, #FFFFFF 100%);
    border: 1px solid rgba(var(--wave-primary-rgb), 0.12);
    border-radius: 24px;
    padding: 22px 24px;
    margin-bottom: 18px;
    overflow: hidden;
}

.wave-live-eyebrow {
    color: #0B8F55;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.wave-live-headline {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #111827;
    margin: 0 0 8px;
}

.wave-live-eta {
    color: #4b5563;
    font-size: 1rem;
    margin-bottom: 18px;
}

.wave-live-eta strong {
    color: var(--wave-primary);
    font-weight: 900;
}

.wave-live-stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    position: relative;
}

.wave-live-stepper::before {
    content: "";
    position: absolute;
    left: 12%;
    right: 12%;
    top: 18px;
    height: 3px;
    background: #D9E4E8;
    z-index: 0;
}

.wave-live-step {
    text-align: center;
    position: relative;
    z-index: 1;
    color: #9ca3af;
}

.wave-live-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #D9E4E8;
    color: #9ca3af;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.wave-live-step.is-done .wave-live-step-dot,
.wave-live-step.is-current .wave-live-step-dot {
    background: var(--wave-primary);
    border-color: var(--wave-primary);
    color: #fff;
}

.wave-live-step.is-current .wave-live-step-dot {
    box-shadow: 0 0 0 5px rgba(var(--wave-primary-rgb), 0.16);
}

.wave-live-step-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: #6b7280;
}

.wave-live-step.is-done .wave-live-step-label,
.wave-live-step.is-current .wave-live-step-label {
    color: #111827;
}

.wave-live-step-time {
    display: block;
    font-size: 0.72rem;
    color: #9ca3af;
    min-height: 1em;
}

.wave-live-hero-visual {
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.wave-live-hero-visual img {
    width: min(240px, 100%);
    height: auto;
    max-height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(3, 78, 97, 0.22));
}

.wave-live-map-card {
    margin-bottom: 18px;
}

.wave-live-map-shell {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--wave-border);
    background: #EEF2F4;
    min-height: 340px;
}

.wave-live-map {
    width: 100%;
    height: 360px;
    min-height: 340px;
}

.wave-live-map--fallback {
    display: block;
}

.wave-live-map-svg {
    width: 100%;
    height: 100%;
    display: block;
    min-height: 340px;
}

.wave-live-map-pin {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 8px 12px 8px 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    max-width: min(260px, 70%);
    z-index: 2;
}

.wave-live-map-pin img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.wave-live-map-pin--resto {
    top: 18px;
    left: 18px;
}

.wave-live-map-pin--rider {
    bottom: 28%;
    left: 42%;
}

.wave-live-eta-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 3;
    background: rgba(3, 78, 97, 0.94);
    color: #fff;
    border-radius: 16px;
    padding: 10px 14px;
    min-width: 140px;
    box-shadow: 0 10px 24px rgba(3, 78, 97, 0.28);
}

.wave-rider-eta {
    background: #f4fafb;
    border: 1px solid var(--wave-border, #e5e7eb);
    border-radius: 14px;
    padding: 12px 14px;
}

.wave-live-map-controls {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.wave-live-map-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--wave-primary);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wave-live-map-hint {
    margin: 8px 4px 0;
    color: #6b7280;
    font-size: 0.85rem;
}

.wave-live-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--wave-border);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: var(--wave-shadow-sm);
}

.wave-live-details-label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9ca3af;
    margin-bottom: 12px;
}

.wave-live-resto-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--wave-border);
    flex-shrink: 0;
}

.wave-live-pin-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(var(--wave-primary-rgb), 0.1);
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wave-live-call-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(var(--wave-primary-rgb), 0.1);
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.wave-live-footer-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    background: #F5F7F9;
    border: 1px solid var(--wave-border);
    border-radius: 20px;
    padding: 16px 18px;
    flex-wrap: wrap;
}

.wave-live-rider-block {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.wave-live-rider-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wave-live-rider-avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E5E7EB;
    color: #6b7280;
    font-size: 1.3rem;
}

.wave-live-rider-tag {
    background: rgba(var(--wave-primary-rgb), 0.12);
    color: var(--wave-primary);
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
}

.wave-live-help-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width: 991.98px) {
    .wave-live-hero {
        grid-template-columns: 1fr;
    }

    .wave-live-hero-visual {
        order: -1;
    }

    .wave-live-hero-visual img {
        max-height: 140px;
    }

    .wave-live-details {
        grid-template-columns: 1fr;
    }

    .wave-live-map-pin--rider {
        left: 18px;
        bottom: 18px;
    }
}

@media (max-width: 575.98px) {
    .wave-live-stepper {
        gap: 4px;
    }

    .wave-live-step-label {
        font-size: 0.72rem;
    }

    .wave-live-map {
        height: 280px;
        min-height: 280px;
    }

    .wave-live-footer-card {
        flex-direction: column;
        align-items: stretch;
    }

    .wave-live-help-block {
        justify-content: space-between;
    }
}

.wave-track-hero {
    background: linear-gradient(135deg, rgba(3,78,97,0.08) 0%, rgba(248,104,72,0.07) 100%);
    border: 1px solid rgba(3,78,97,0.14);
}

.wave-track-hero-title {
    font-weight: 950;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
}

/* -------------------------
   Landing (CUS-001)
   ------------------------- */
.wave-landing-hero {
    padding: 3.2rem 0 2.2rem;
}

.wave-landing-title {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 950;
    letter-spacing: -0.03em;
    line-height: 1.05;
    color: var(--wave-primary);
}

.wave-landing-visual {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wave-landing-circle {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 20%, rgba(var(--wave-accent-rgb), 0.18) 0%, rgba(3,78,97,0.88) 45%, rgba(3,78,97,1) 100%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -53%);
}

.wave-landing-food {
    position: relative;
    width: min(420px, 90%);
    border-radius: 30px;
    box-shadow: var(--wave-shadow-lg);
    border: 10px solid rgba(255, 255, 255, 0.16);
}

.wave-landing-fast-badge {
    position: absolute;
    right: 8%;
    bottom: 12%;
    background: rgba(248, 104, 72, 0.95);
    color: #fff;
    padding: 12px 14px;
    border-radius: 18px;
    box-shadow: 0 10px 26px rgba(var(--wave-accent-rgb), 0.26);
    border: 1px solid rgba(255,255,255,0.25);
}

.wave-landing-promo-block {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.wave-landing-delivery-banner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    min-height: 220px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--wave-shadow);
    background: var(--wave-primary);
}

.wave-landing-delivery-left {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 28px 24px 28px 18px;
    background: linear-gradient(135deg, #023A48 0%, var(--wave-primary) 55%, #0B6B75 100%);
    color: #fff;
    z-index: 1;
}

.wave-landing-delivery-left::after {
    content: "";
    position: absolute;
    top: -20%;
    right: -48px;
    width: 96px;
    height: 140%;
    background: inherit;
    background-color: var(--wave-primary);
    border-radius: 50%;
    box-shadow: 28px 0 0 0 #EEF2F4;
    z-index: 0;
    pointer-events: none;
}

.wave-landing-delivery-rider {
    width: min(168px, 36vw);
    height: auto;
    max-height: 170px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.25));
    flex-shrink: 0;
}

.wave-landing-delivery-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.wave-landing-delivery-title {
    font-size: clamp(1.55rem, 3.2vw, 2.15rem);
    font-weight: 950;
    letter-spacing: 0.02em;
    line-height: 1.05;
    text-transform: uppercase;
}

.wave-landing-delivery-sub {
    margin-top: 6px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
}

.wave-landing-delivery-cta {
    display: inline-flex;
    align-items: center;
}

.wave-landing-delivery-right {
    position: relative;
    background: #EEF2F4;
    min-height: 220px;
}

.wave-landing-map-svg {
    width: 100%;
    height: 100%;
    display: block;
    min-height: 220px;
}

.wave-landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 18px;
    margin-top: 22px;
}

.wave-landing-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
}

.wave-landing-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #F1F3F5;
    color: var(--wave-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wave-landing-feature-title {
    font-weight: 800;
    color: #1f2937;
    line-height: 1.2;
}

.wave-landing-feature-desc {
    margin-top: 3px;
    color: var(--wave-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

@media (max-width: 991.98px) {
    .wave-landing-delivery-banner {
        grid-template-columns: 1fr;
    }

    .wave-landing-delivery-left::after {
        display: none;
    }

    .wave-landing-delivery-right {
        min-height: 160px;
    }

    .wave-landing-map-svg {
        min-height: 160px;
    }
}

@media (max-width: 575.98px) {
    .wave-landing-delivery-left {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 22px 18px;
    }

    .wave-landing-delivery-rider {
        width: 140px;
        max-height: 130px;
        align-self: center;
    }
}

.wave-track-hero-img {
    width: 84px;
    height: 84px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--wave-shadow);
    flex-shrink: 0;
}

.wave-rider-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--wave-primary-light);
}

.wave-restaurant-info-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    margin: -28px 0 16px;
    position: relative;
    z-index: 2;
}

.wave-restaurant-info-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: var(--wave-shadow-sm);
    flex-shrink: 0;
}

.wave-restaurant-info-body {
    min-width: 0;
}

.wave-login-visuals {
    display: grid;
    gap: 14px;
}

.wave-login-rider-img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 20px;
}

.wave-login-gift-img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.wave-active-order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    box-shadow: var(--wave-shadow-sm);
    padding: 14px 16px;
}

.wave-active-order-card:hover {
    border-color: var(--wave-primary);
}

/* Order Again */
.wave-order-again-section {
    padding-bottom: 1.5rem;
}

.wave-order-again-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.wave-order-again-card {
    flex: 0 0 min(280px, 82vw);
    scroll-snap-align: start;
    background: var(--wave-white);
    border: 1px solid var(--wave-border);
    border-radius: var(--wave-radius-lg);
    box-shadow: var(--wave-shadow-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wave-order-again-top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.wave-order-again-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: #E8F0F2;
    flex-shrink: 0;
}

.wave-order-again-meta {
    min-width: 0;
}

.wave-reorder-btn {
    font-weight: 700;
    border-radius: 12px;
    padding: 0.65rem 1rem;
}

/* -------------------------
   Auth/Login extras
   ------------------------- */
.wave-login-hero-title {
    font-weight: 950;
    letter-spacing: -0.02em;
    color: var(--wave-primary);
    line-height: 1.05;
}

.wave-login-hero {
    border-radius: var(--wave-radius-xl);
    padding: 26px 22px;
    background: radial-gradient(circle at 0% 0%, rgba(var(--wave-accent-rgb),0.18) 0%, rgba(3,78,97,0.08) 40%, rgba(3,78,97,0.03) 100%);
}

.wave-login-perk {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wave-login-perk-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(var(--wave-accent-rgb),0.14);
    color: var(--wave-accent-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 auto;
}

.wave-login-gift {
    background: linear-gradient(135deg, var(--wave-primary) 0%, #0B6B75 100%);
    border-radius: var(--wave-radius-lg);
    padding: 18px;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.08);
}

.wave-login-gift-icon {
    width: 52px;
    height: 52px;
    border-radius: 20px;
    background: rgba(248,104,72,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #fff;
}

.wave-login-card {
    border-top: 3px solid var(--wave-accent);
}

.wave-camera-field {
    background: var(--wave-white, #fff);
    border: 1px solid var(--wave-border, #e5e7eb);
    border-radius: var(--wave-radius-lg, 16px);
    padding: 14px;
    height: 100%;
}

.wave-camera-preview-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: #0f172a;
}

.wave-camera-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wave-camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.wave-camera-placeholder i {
    font-size: 2rem;
}

.wave-camera-modal {
    background: #0b1220;
    color: #fff;
}

.wave-camera-stage {
    position: relative;
    background: #000;
    min-height: 280px;
}

.wave-camera-stage video {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    background: #000;
}

.wave-camera-stage video.is-mirrored {
    transform: scaleX(-1);
}

.wave-camera-status {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.wave-camera-status.is-error {
    background: rgba(185, 28, 28, 0.9);
}

@media (max-width: 575.98px) {
    .wave-camera-stage video {
        max-height: none;
        height: calc(100vh - 180px);
    }
}

/* ============================================================
   Device layouts — phones, tablets, laptops, desktops
   ============================================================ */
@media (max-width: 1199.98px) {
    .wave-resto-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    }
}

@media (max-width: 991.98px) {
    /* Keep the restaurant page single-column after the tablet rule above.
       This rule must follow the max-width: 1199.98px declaration. */
    .wave-resto-layout { grid-template-columns: minmax(0, 1fr); }
    .wave-resto-main,
    .wave-resto-sheet { width: 100%; min-width: 0; }

    .wave-home-hero-inner { flex-direction: column; }
    .wave-promo-card--hero { width: 100%; max-width: 100%; }
    .wave-menu-row-price { width: min(150px, 38%); }
    .customer-app-topbar .customer-topbar-subtitle { display: none; }
    .wave-live-eta-chip { max-width: calc(100% - 88px); }
}

@media (max-width: 767.98px) {
    .portal-topbar { height: auto; min-height: 56px; padding-top: 6px; padding-bottom: 6px; }
    .table { font-size: 0.9rem; }
    .wave-home-greeting { font-size: 1.55rem; }
    .wave-checkout-top { flex-wrap: wrap; }
    .wave-resto-cartbar-inner { flex-wrap: wrap; }
    .wave-resto-cart-cta { width: 100%; text-align: center; }
    .wave-live-map-pin--resto,
    .wave-live-map-pin--rider {
        max-width: min(220px, calc(100% - 24px));
    }
    .wave-live-map-pin--resto { top: 12px; left: 12px; }
}

@media (max-width: 575.98px) {
    .customer-app-container { padding: 0 12px; }
    .wave-resto-hero { margin-inline: -12px; width: calc(100% + 24px); }
    .wave-restaurant-cover { height: 230px; }
    .wave-menu-row { flex-direction: row; }
    .wave-menu-row img { width: 74px; }
    .wave-menu-row-price { width: auto; min-width: 0; }
    .customer-app-topbar .wave-wordmark { display: none; }
    .customer-topbar-icon-btn,
    .customer-topbar-profile img {
        width: 36px;
        height: 36px;
    }
    .btn-wave-primary,
    .btn-wave-accent {
        padding: 0.55rem 1.1rem;
    }
    .wave-live-eta-chip {
        left: 10px;
        bottom: 10px;
        padding: 8px 10px;
        min-width: 0;
    }
    .wave-camera-field { padding: 12px; }
}

@media (max-width: 379.98px) {
    .wave-restaurant-grid,
    .wave-menu-reco-grid {
        grid-template-columns: 1fr;
    }
    .customer-app-topbar .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* —— UI states: flash, empty, loading —— */
.wave-flash {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.wave-flash .btn-close {
    margin-left: auto;
    padding: 0.65rem;
}

.wave-empty {
    text-align: center;
    padding: 2.25rem 1.25rem;
    border: 1px dashed rgba(15, 23, 42, 0.12);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.9);
}

.wave-empty--compact {
    padding: 1.25rem 1rem;
}

.wave-empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(13, 148, 136, 0.1);
    color: var(--wave-teal, #0d9488);
    font-size: 1.35rem;
}

.wave-empty-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.wave-empty-message {
    margin: 0.35rem auto 0;
    max-width: 28rem;
    color: var(--wave-muted, #64748b);
    font-size: 0.925rem;
}

form.is-submitting {
    pointer-events: none;
}

button.is-loading,
.btn.is-loading {
    position: relative;
    opacity: 0.92;
}

.wave-btn-spinner {
    vertical-align: -0.1em;
}

.wave-page-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--wave-muted, #64748b);
    font-size: 0.925rem;
}

.wave-inline-busy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Delivery handoff OTP / QR */
.wave-delivery-otp-card {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 55%, #14b8a6 100%);
    color: #fff;
    border-radius: 1.1rem;
    padding: 1.25rem 1.35rem;
    text-align: center;
    box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.wave-delivery-otp-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    opacity: 0.9;
}

.wave-delivery-qr-wrap {
    width: 196px;
    height: 196px;
    background: #fff;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    padding: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.wave-delivery-qr,
.wave-delivery-qr-img {
    display: block;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    object-fit: contain;
}

.wave-delivery-qr img,
.wave-delivery-qr canvas {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto !important;
}

.wave-delivery-otp-fallback {
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.wave-delivery-otp-fallback-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    font-weight: 600;
}

.wave-delivery-otp-code {
    font-size: clamp(1.75rem, 6vw, 2.35rem);
    font-weight: 800;
    letter-spacing: 0.35em;
    margin: 0.2rem 0 0.35rem;
    font-variant-numeric: tabular-nums;
    padding-left: 0.35em;
}

.wave-delivery-otp-hint {
    font-size: 0.9rem;
    opacity: 0.92;
    max-width: 28rem;
    margin-inline: auto;
}

.wave-rider-qr-reader {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 0.85rem;
    background: #0f172a;
}

.wave-rider-qr-reader video {
    width: 100% !important;
    border-radius: 0.85rem;
}

.wave-handoff-fallback {
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 0.75rem;
}

.wave-handoff-fallback summary {
    cursor: pointer;
    color: #0f766e;
    list-style: none;
}

.wave-handoff-fallback summary::-webkit-details-marker {
    display: none;
}



