/* ============================================================
   GharSe Customer App, Capacitor-Ready Design System
   ============================================================ */

/* Safe area variables (iPhone notch / Android cutout) */
:root {
    --green: #2E7D32;
    --green-d: #1B5E20;
    --green-light: #4CAF50;
    --green-pale: #E8F5E9;
    --gold: #F9A825;
    --gold-light: #FFF8E1;
    --orange: #E65100;
    --bg: #F5F7F5;
    --card: #FFFFFF;
    --text: #111111;
    --text-2: #555555;
    --text-3: #AAAAAA;
    --border: #EDEDED;
    --red: #D32F2F;
    --shadow-sm: 0 1px 6px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
    --radius: 18px;
    --radius-sm: 12px;
    --radius-pill: 100px;
    --nav-h: 68px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    /* Safe areas for Capacitor */
    --sat: env(safe-area-inset-top, 0px);
    --sar: env(safe-area-inset-right, 0px);
    --sab: env(safe-area-inset-bottom, 0px);
    --sal: env(safe-area-inset-left, 0px);
}

/* ── RESET + NATIVE FEEL ──────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    height: 100%;
    overscroll-behavior: none;
    scroll-behavior: smooth;
}

body {
    height: 100%;
    min-height: 100%;
    /* Desktop: dark surround so the app looks phone-framed */
    background: #111;
    font-family: var(--font);
    color: var(--text);
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
    padding-top: var(--sat);
    user-select: none;
    -webkit-user-select: none;
    /* Centre the app column */
    display: flex;
    justify-content: center;
}

/* Allow text selection only in inputs/forms */
input,
textarea,
[contenteditable] {
    user-select: text;
    -webkit-user-select: text;
}

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

#app {
    width: 100%;
    max-width: 430px;
    height: 100%;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    background: var(--bg);
    position: relative;
    isolation: isolate;
}

/* ── SCREEN ──────────────────────────────────────────────── */
.screen {
    min-height: 100%;
    padding-bottom: calc(var(--nav-h) + var(--sab) + 20px);
}

.screen.no-nav {
    padding-bottom: calc(var(--sab) + 20px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

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

    to {
        transform: translateY(0);
    }
}

.screen {
    animation: fadeIn 0.2s ease;
}

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    height: calc(var(--nav-h) + var(--sab));
    padding-bottom: var(--sab);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    cursor: pointer;
    color: var(--text-3);
    font-size: 10px;
    font-weight: 600;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: var(--font);
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
}

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

.nav-item.active svg {
    stroke: var(--green);
}

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

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
    padding: 14px 16px 12px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-title {
    font-size: 19px;
    font-weight: 700;
}

.topbar-back {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
    color: var(--green);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.topbar-back svg {
    width: 22px;
    height: 22px;
    stroke: var(--green);
    fill: none;
}

.topbar-back:active {
    background: var(--green-pale);
}

/* ── HOME HERO ───────────────────────────────────────────── */
.home-hero {
    background: linear-gradient(145deg, #1a5c1e 0%, #2E7D32 60%, #388E3C 100%);
    padding: 20px 20px 24px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.home-hero::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.hero-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-bottom: 8px;
}

.hero-location svg {
    width: 12px;
    height: 12px;
    fill: rgba(255, 255, 255, 0.8);
}

.hero-brand {
    font-size: 36px;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: -1.5px;
    line-height: 1;
    margin-bottom: 4px;
}

.hero-brand span {
    color: var(--gold);
}

.hero-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    margin-bottom: 16px;
}

.hero-tagline-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 16px;
}

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-wrap {
    margin: 16px 0 0;
}

.search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.search-inner svg {
    width: 18px;
    height: 18px;
    stroke: var(--text-3);
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.search-inner input {
    border: none;
    outline: none;
    font-size: 14px;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text);
    background: transparent;
    width: 100%;
}

.search-inner input::placeholder {
    color: var(--text-3);
}

/* ── CATEGORY CHIPS ──────────────────────────────────────── */
.categories-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 20px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.cat-chip {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 600;
    background: var(--card);
    color: var(--text-2);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cat-chip.active {
    background: var(--green);
    color: white;
    border-color: var(--green);
}

.cat-chip:active {
    transform: scale(0.94);
}

/* ── GUARANTEE BANNER ────────────────────────────────────── */
.guarantee-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #FFF8E1, #FFECB3);
    border: 1px solid #FFE082;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 20px 0;
    box-shadow: 0 4px 12px rgba(255, 160, 0, 0.12);
}

.guarantee-banner .gb-icon {
    font-size: 24px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(230, 81, 0, 0.2));
}

.guarantee-banner .gb-text {
    font-size: 12px;
    color: #5D4037;
    line-height: 1.4;
}

.guarantee-banner .gb-text strong {
    font-size: 14px;
    color: #E65100;
    font-weight: 900;
    display: block;
    margin-bottom: 2px;
    letter-spacing: -0.2px;
}

/* ── SECTION HEADERS ─────────────────────────────────────── */
.section {
    padding: 0 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
}

.section-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    cursor: pointer;
}

/* ── FEATURED SCROLL ─────────────────────────────────────── */
.featured-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 0 20px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.featured-card {
    flex-shrink: 0;
    width: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.12s;
}

.featured-card:active {
    transform: scale(0.96);
}

.featured-card-img {
    height: 130px;
    background: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
}

.featured-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-card-body {
    padding: 10px 12px 12px;
}

.featured-card-name {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ── CHEF CARDS ──────────────────────────────────────────── */
.chef-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.12s;
}

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

.chef-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--green-pale);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chef-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.chef-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chef-kitchen {
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 6px;
}

.chef-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.chef-rating {
    font-size: 12px;
    font-weight: 700;
}

.chef-time {
    font-size: 11px;
    color: var(--text-2);
}

.chef-chevron {
    color: var(--text-3);
    flex-shrink: 0;
}

.chef-chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ── CHEF PROFILE ────────────────────────────────────────── */
.chef-profile-banner {
    height: 200px;
    background: linear-gradient(135deg, #1a5c1e 0%, #2E7D32 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.chef-profile-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chef-profile-avatar {
    position: absolute;
    bottom: -24px;
    left: 20px;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid white;
    background: var(--green-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.chef-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── DISH CARDS ──────────────────────────────────────────── */
.dish-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s;
}

.dish-card:active {
    transform: scale(0.99);
}

.dish-img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--green-pale);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: relative;
}

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

.dish-img-count {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 6px;
}

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

.dish-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.3;
}

.dish-desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.dish-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--green);
}

/* ── ADD / QTY CONTROLS ──────────────────────────────────── */
.btn-add {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    transition: background 0.12s, transform 0.1s;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.35);
}

.btn-add:active {
    background: var(--green-d);
    transform: scale(0.9);
}

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

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--green-pale);
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--green);
    transition: all 0.1s;
}

.qty-btn:active {
    background: var(--green);
    color: white;
    transform: scale(0.9);
}

.qty-num {
    font-size: 16px;
    font-weight: 800;
    min-width: 18px;
    text-align: center;
    color: var(--green);
}

/* ── CART FAB ────────────────────────────────────────────── */
/* Cart FAB pop animation kept for bounce effect */
@keyframes fab-pop {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.06);
    }

    50% {
        transform: scale(0.97);
    }

    70% {
        transform: scale(1.03);
    }

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

.cart-fab.pop {
    animation: fab-pop 0.38s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ── PILLS / BADGES ──────────────────────────────────────── */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
}

.pill-green {
    background: var(--green-pale);
    color: var(--green-d);
}

.pill-gold {
    background: var(--gold-light);
    color: #B8860B;
}

.pill-gray {
    background: var(--bg);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.badge-new {
    background: var(--green);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
}

.badge-delivery {
    background: var(--green-pale);
    color: var(--green-d);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
}

.badge-closed {
    background: #FFEBEE;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--green);
    color: white;
    box-shadow: 0 2px 12px rgba(46, 125, 50, 0.3);
}

.btn-primary:active {
    background: var(--green-d);
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    font-weight: 500;
    color: var(--text);
    background: var(--card);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

select.form-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* ── TABS ────────────────────────────────────────────────── */
.tabs {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.15s;
}

.tab.active {
    background: var(--card);
    color: var(--green);
    box-shadow: var(--shadow-sm);
}

/* ── AUTH ────────────────────────────────────────────────── */
.auth-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #1a5c1e 0%, #2E7D32 50%, #388E3C 100%);
}

.auth-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 28px 40px;
    text-align: center;
}

.auth-logo {
    font-size: 52px;
    font-weight: 900;
    color: white;
    letter-spacing: -2px;
}

.auth-logo span {
    color: var(--gold);
}

.auth-tagline {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
}

.auth-form-wrap {
    background: var(--card);
    border-radius: 28px 28px 0 0;
    padding: 28px 24px calc(28px + var(--sab));
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

/* ── LOGO LOADER (UI_SPINNER) ──────────────────────────────── */
.logo-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto;
}

@keyframes morphCorners {
    0% {
        border-radius: 50%;
        transform: scale(0.92);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    100% {
        border-radius: 10px;
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    }
}

@keyframes splashBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    45% {
        transform: translateY(-10px) scale(1.08);
    }

    65% {
        transform: translateY(-4px) scale(0.96);
    }
}

@keyframes splashFade {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(0.97);
    }

    50% {
        opacity: 1;
        transform: scale(1.03);
    }
}

@keyframes dotPulse {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

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

/* Small inline spinner fallback (used in search input) */
.spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 40px auto;
}

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

/* Google Material Design Spinner */
.md-spinner {
    width: 44px;
    height: 44px;
    animation: md-rotate 2s linear infinite;
}

.md-spinner .path {
    stroke: var(--green);
    stroke-linecap: round;
    animation: md-dash 1.5s ease-in-out infinite;
}

@keyframes md-rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes md-dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ── SKELETON SHIMMER (UberEats-style) ──────────────────────── */
/* Single reusable class. Apply to any element you want to shimmer. */
/* A white highlight sweeps left-to-right over a grey base.         */
.sk {
    background: #E8E8E8;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.sk::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent         0%,
        rgba(255,255,255,0.65) 50%,
        transparent         100%
    );
    transform: translateX(-100%);
    animation: sk-sweep 1.6s ease-in-out infinite;
}

@keyframes sk-sweep {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ── NATIVE IMAGE LOADING ─────────────────────────────────── */
/* All images start invisible. The JS load listener fades them to opacity:1    */
/* the instant src is decoded - even cached images. No blank-then-pop flicker. */
#app img {
    opacity: 0;
    transition: opacity 0.28s ease;
}

/* Placeholder backgrounds on every image container so there's always          */
/* a visible shape while the image loads - never a blank white gap.            */
.featured-card-img,
.dish-img,
.cart-item-img,
.cart-more-img,
.browse-card-banner,
.gallery-img {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

.chef-avatar {
    background: #E8F5E9; /* green tint, matches GharSe brand */
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-icon {
    font-size: 52px;
    margin-bottom: 14px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: var(--text-2);
}

/* ── TOAST NOTIFICATIONS ─────────────────────────────────── */
#toast-container {
    position: fixed;
    top: calc(16px + var(--sat));
    /* Same centering as popup overlays */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 390px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: white;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
}

.toast.success {
    background: rgba(27, 94, 32, 0.95);
}

.toast.error {
    background: rgba(183, 28, 28, 0.95);
}

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

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

/* ── MODAL / GALLERY ─────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    /* Clamp to the app column, not full viewport width on desktop */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: flex-end;
    animation: overlayIn 0.2s ease;
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--card);
    border-radius: 24px 24px 0 0;
    padding: 20px 20px 0;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

    to {
        transform: translateY(0);
    }
}

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

.gallery-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

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

.gallery-img {
    flex-shrink: 0;
    width: 240px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--green-pale);
}

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

/* ── BROWSE CARDS ────────────────────────────────────────── */
.browse-card {
    background: white;
    border-radius: 18px;
    overflow: visible;
    margin-bottom: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}

.browse-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.browse-card-banner {
    position: relative;
    height: 150px;
    background-size: cover;
    background-position: center;
    background-color: #2E7D32;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.browse-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12) 0%, rgba(0, 0, 0, 0.52) 100%);
}

.browse-card-status {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.browse-card-avatar {
    position: absolute;
    bottom: -22px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid white;
    background: #E8F5E9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.browse-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.browse-card-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 16px;
}

.browse-card-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.browse-card-sub {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
}

.browse-card-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
    padding-top: 4px;
}

.browse-meta-pill {
    background: var(--green-pale);
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ── CART ITEMS ──────────────────────────────────────────── */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

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

.cart-item-img {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--green-pale);
    flex-shrink: 0;
}

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

.cart-item-name {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.cart-item-price {
    font-size: 13px;
    color: var(--text-2);
}

/* ── CART MORE ITEMS (upsell row) ───────────────────────── */
.cart-more-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cart-more-item:last-child {
    border-bottom: none;
}

.cart-more-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--green-pale);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

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

/* ── CHECKOUT STICKY BAR ─────────────────────────────────── */
.checkout-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: white;
    padding: 12px 20px calc(12px + var(--sab));
    border-top: 1px solid var(--border);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

/* ── ORDER STATUS STEPS ──────────────────────────────────── */
.status-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.status-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.status-dot.done {
    background: var(--green);
    color: white;
}

.status-dot.active {
    background: var(--gold);
    color: white;
    animation: pulse 1.5s infinite;
}

.status-dot.pending {
    background: var(--border);
    color: var(--text-3);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(249, 168, 37, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(249, 168, 37, 0);
    }
}

/* ── LOADING WRAP ────────────────────────────────────────── */
.loading-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

/* ── DISH POPUP SLIDER DOTS ─────────────────────────────── */
.dp-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s;
    cursor: pointer;
}

.dp-dot-active {
    width: 18px;
    border-radius: 3px;
    background: white;
}

/* ── UTILITY ─────────────────────────────────────────────── */
.hidden {
    display: none !important;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 360px) {
    .hero-brand {
        font-size: 30px;
    }

    .featured-card {
        width: 175px;
    }

    .dish-img {
        width: 78px;
        height: 78px;
    }
}

/* ══ READS (BLOG) ════════════════════════════════════════════ */

/* ── Index hero ─────────────────────────────────────────── */
.reads-hero {
    background: linear-gradient(145deg, #0d1f0f 0%, #1a3a1e 55%, #1B5E20 100%);
    padding: 20px 20px 28px;
    position: relative;
    overflow: hidden;
}

.reads-hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
}

.reads-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.reads-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    background: rgba(249, 168, 37, 0.15);
    border: 1px solid rgba(249, 168, 37, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
}

.reads-hero-title {
    font-size: 34px;
    font-weight: 900;
    color: white;
    letter-spacing: -1.2px;
    line-height: 1;
    margin-bottom: 8px;
}

.reads-hero-sub {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.55;
    max-width: 300px;
}

/* ── Article index cards ─────────────────────────────────── */
.reads-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.reads-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
}

.reads-card-hero {
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 14px 16px;
    position: relative;
}

.reads-card-emoji {
    font-size: 52px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.reads-card-cat {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.35);
    padding: 3px 9px;
    border-radius: 20px;
}

.reads-card-body {
    padding: 18px 18px 20px;
}

.reads-card-meta {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.reads-card-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    line-height: 1.25;
    letter-spacing: -0.4px;
    margin-bottom: 10px;
}

.reads-card-sub {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.55;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.reads-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.reads-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    color: white;
    font-size: 13px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.reads-author-avatar--sm {
    width: 40px;
    height: 40px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
}

.reads-author-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.reads-author-role {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

/* ── Article detail: topbar ──────────────────────────────── */
.art-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px 10px 8px;
}

/* ── Article hero ────────────────────────────────────────── */
.art-hero {
    padding: 32px 22px 36px;
    position: relative;
    overflow: hidden;
}

.art-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.art-hero-emoji {
    font-size: 56px;
    margin-bottom: 18px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
    line-height: 1;
}

.art-hero-cat {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
}

.art-hero-title {
    font-size: 26px;
    font-weight: 900;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.6px;
    margin-bottom: 14px;
}

.art-hero-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
    margin-bottom: 24px;
    font-style: italic;
}

.art-hero-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Article typography ──────────────────────────────────── */
.art-body {
    padding: 32px 22px 24px;
    background: white;
}

.art-lead {
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.7;
    margin-bottom: 28px;
    letter-spacing: -0.1px;
    /* First letter drop-cap */
    position: relative;
}

.art-lead::first-letter {
    font-size: 3.6em;
    font-weight: 900;
    float: left;
    line-height: 0.75;
    margin-right: 6px;
    margin-top: 8px;
    color: var(--green);
}

.art-p {
    font-size: 16px;
    line-height: 1.8;
    color: #2a2a2a;
    margin-bottom: 22px;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.art-h2 {
    font-size: 20px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -0.4px;
    margin: 36px 0 16px;
    padding-top: 4px;
    border-top: 3px solid var(--green);
    display: inline-block;
    line-height: 1.3;
}

.art-pullquote {
    margin: 32px 0;
    padding: 20px 22px;
    border-left: 4px solid var(--gold);
    background: var(--gold-light);
    border-radius: 0 14px 14px 0;
    font-size: 17px;
    font-style: italic;
    font-weight: 600;
    color: #6B4A00;
    line-height: 1.6;
    letter-spacing: -0.1px;
}

/* ── Article footer / related ────────────────────────────── */
.art-footer {
    padding: 28px 22px 48px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

/* ── Article visual / fact cards ─────────────────────────── */
.art-visual-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #F0FFF4, #E8F5E9);
    border: 1.5px solid #C8E6C9;
    border-radius: 18px;
    padding: 18px 18px;
    margin: 28px 0;
}

.art-visual-emoji {
    font-size: 36px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.art-visual-content {
    flex: 1;
    min-width: 0;
}

.art-visual-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 5px;
}

.art-visual-text {
    font-size: 14px;
    font-weight: 500;
    color: #1B5E20;
    line-height: 1.55;
}

/* ── Author photo ────────────────────────────────────────── */
.reads-author-photo {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.reads-author-photo--hero {
    width: 42px;
    height: 42px;
    border: 2.5px solid rgba(255, 255, 255, 0.7);
}

/* ── Category section headers ────────────────────────────── */
.reads-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 0 14px;
}

.reads-section-header:first-child {
    margin-top: 4px;
}

.reads-section-cat {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
}