:root {
    --brand: #e23744;
    --brand-dark: #c01f2c;
    --brand-tint: #fdecef;
    --brand-contrast: #ffffff;
    --ink: #10181d;
    --ink-soft: #2f3a42;
    --muted: #67727c;
    --line: #ebedf1;
    --line-strong: #dde1e7;
    --bg: #f7f7f9;
    --card: #ffffff;
    --ok: #1a8a4f;
    --ok-tint: #e6f4ec;
    --warn: #b07d0a;
    --warn-tint: #fbf3df;
    --info: #2563c9;
    --info-tint: #e7eefb;
    --danger: #d22e3a;
    --r-lg: 20px;
    --r: 14px;
    --r-sm: 10px;
    --pill: 999px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 29, .06);
    --shadow: 0 2px 6px rgba(16, 24, 29, .06), 0 10px 24px rgba(16, 24, 29, .05);
    --shadow-lg: 0 12px 28px rgba(16, 24, 29, .12), 0 2px 8px rgba(16, 24, 29, .08);
    --t: .18s cubic-bezier(.4, 0, .2, 1);
    --maxw: 1140px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-size: 16px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: -.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { padding: 24px 0 80px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.tight { gap: 6px; }
.spacer { flex: 1; }

/* ---------- top bar ---------- */
.topbar {
    background: rgba(255, 255, 255, .9);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar .inner {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 62px;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 20px;
}
.brand {
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--brand);
    letter-spacing: -.03em;
}
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--ink-soft); padding: 8px 12px; border-radius: var(--r-sm); font-weight: 500; transition: background var(--t), color var(--t); }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; transition: transform var(--t), box-shadow var(--t); }
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.stat .n { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .9rem; }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: var(--pill);
    border: 1px solid var(--line-strong);
    background: var(--card);
    color: var(--ink);
    font-weight: 650;
    font-size: .95rem;
    cursor: pointer;
    transition: transform var(--t), background var(--t), box-shadow var(--t), border-color var(--t);
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { text-decoration: none; box-shadow: var(--shadow-sm); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 6px 16px rgba(226, 55, 68, .35); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--bg); box-shadow: none; }
.btn-outline { background: var(--card); }
.btn-danger { background: #fff; border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-paypal { background: #0070ba; border-color: #0070ba; color: #fff; }
.btn-paypal:hover { background: #005ea6; border-color: #005ea6; color: #fff; box-shadow: 0 6px 16px rgba(0, 112, 186, .35); }
.btn-paypal .pp-logo { color: #fff; }
.pp-logo { font-weight: 800; font-style: italic; letter-spacing: -.3px; color: #003087; }
.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 24px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- forms ---------- */
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=tel], input[type=url], select, textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color var(--t), box-shadow var(--t);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}
textarea { min-height: 90px; resize: vertical; }
.help { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.checkbox { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox input { width: auto; }
.field-error { color: var(--danger); font-size: .85rem; margin-top: 4px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 16px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 8px; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: var(--pill); font-size: .76rem; font-weight: 700; }
.badge-new { background: var(--brand-tint); color: var(--brand-dark); }
.badge-received { background: var(--info-tint); color: var(--info); }
.badge-in_progress { background: var(--warn-tint); color: var(--warn); }
.badge-done { background: var(--ok-tint); color: var(--ok); }
.badge-delivered { background: var(--ok-tint); color: var(--ok); }
.badge-cancelled { background: #f0f0f2; color: var(--muted); }
.badge-paid { background: var(--ok-tint); color: var(--ok); }
.badge-pending { background: var(--warn-tint); color: var(--warn); }
.badge-failed { background: #fde8e8; color: var(--danger); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--pill); background: var(--bg); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.chip-ok { background: var(--ok-tint); color: var(--ok); border-color: transparent; }

/* ---------- flash / alerts ---------- */
.alert { padding: 13px 16px; border-radius: var(--r-sm); margin-bottom: 16px; border: 1px solid transparent; font-size: .92rem; }
.alert-success { background: var(--ok-tint); color: var(--ok); border-color: #bfe2cd; }
.alert-error { background: #fde8e8; color: var(--danger); border-color: #f4c4c4; }
.alert-info { background: var(--info-tint); color: var(--info); border-color: #c5d8f5; }
.alert-warning { background: var(--warn-tint); color: var(--warn); border-color: #ecdcaf; }
.flash-stack { position: fixed; top: 74px; right: 16px; z-index: 80; max-width: 360px; }
.flash-stack .alert { box-shadow: var(--shadow-lg); animation: slideIn .25s ease; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 56px auto; }
.auth-wrap .brand { display: block; text-align: center; font-size: 2.2rem; margin-bottom: 10px; }

/* ---------- restaurant listing (home) ---------- */
.hero-banner {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 40px 32px;
    position: relative;
    overflow: hidden;
}
.hero-banner h1 { color: #fff; font-size: 2.2rem; margin-bottom: 6px; }
.hero-banner p { opacity: .95; margin: 0; font-size: 1.05rem; }
.resto-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.resto-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t); display: block; }
.resto-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.resto-cover { height: 150px; background: linear-gradient(135deg, #ffd9dd, var(--brand-tint)); background-size: cover; background-position: center; position: relative; }
.resto-body { padding: 16px; }
.resto-body h3 { margin: 0 0 4px; }
.resto-logo { position: absolute; left: 14px; bottom: -22px; height: 56px; width: 56px; border-radius: 14px; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow); background: #fff; }
.resto-cover:has(.resto-logo) + .resto-body { padding-top: 30px; }
.locbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- home address-search hero ---------- */
.home-hero {
    background:
        radial-gradient(1200px 400px at 80% -10%, rgba(255,255,255,.18), transparent),
        linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: var(--r-lg);
    padding: 64px 32px;
    text-align: center;
    box-shadow: var(--shadow);
}
.home-hero.compact { padding: 36px 32px; }
.home-hero-inner { max-width: 680px; margin: 0 auto; }
.home-hero h1 { color: #fff; font-size: 2.6rem; margin: 0 0 8px; letter-spacing: -.03em; }
.home-hero.compact h1 { font-size: 1.9rem; }
.home-hero p { opacity: .96; margin: 0 0 24px; font-size: 1.12rem; }
.home-hero.compact p { margin-bottom: 16px; font-size: 1rem; }

.addr-search { display: flex; gap: 10px; align-items: stretch; max-width: 620px; margin: 0 auto; }
.addr-field {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: #fff; border-radius: var(--pill); padding: 4px 6px 4px 16px;
    box-shadow: var(--shadow-lg);
}
.addr-icon { font-size: 1.1rem; flex: 0 0 auto; }
.addr-field input {
    flex: 1; border: none; outline: none; background: transparent; box-shadow: none;
    font-size: 1.02rem; padding: 12px 4px; color: var(--ink);
}
.addr-field input:focus { box-shadow: none; }
.addr-gps {
    flex: 0 0 auto; height: 42px; width: 42px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--bg); color: var(--brand); font-size: 1.25rem; line-height: 1;
    transition: background var(--t);
}
.addr-gps:hover { background: var(--brand-tint); }
.addr-search .btn-lg { border-radius: var(--pill); padding-left: 28px; padding-right: 28px; }
.addr-status { margin-top: 12px; font-size: .9rem; opacity: .95; min-height: 1.2em; }

/* address autocomplete dropdown */
.addr-field-wrap { flex: 1; position: relative; display: flex; }
.addr-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
    background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg);
    overflow: hidden; text-align: left; padding: 6px;
}
.addr-suggest-item {
    display: flex; align-items: center; gap: 10px; width: 100%; border: none; background: transparent;
    padding: 12px; border-radius: var(--r-sm); cursor: pointer; font: inherit; color: var(--ink); text-align: left;
    transition: background var(--t);
}
.addr-suggest-item:hover, .addr-suggest-item.active { background: var(--brand-tint); }
.addr-suggest-item .as-pin { flex: 0 0 auto; opacity: .75; }
.addr-suggest-item .as-label { flex: 1; font-size: .95rem; line-height: 1.3; color: var(--ink); }

/* ---------- restaurant hero ---------- */
.r-hero { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: var(--card); }
.r-hero .cover { height: 220px; background: linear-gradient(135deg, #ffd9dd, var(--brand-tint)); background-size: cover; background-position: center; }
.r-hero .hbody { padding: 20px 24px; display: flex; gap: 18px; align-items: flex-end; margin-top: -52px; position: relative; }
.r-logo { height: 84px; width: 84px; border-radius: 18px; object-fit: cover; background: #fff; border: 3px solid #fff; box-shadow: var(--shadow); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.info-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.info-pills .chip { background: #fff; }

/* ---------- sticky category nav ---------- */
.catnav { position: sticky; top: 62px; z-index: 30; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin: 16px 0 0; }
.catnav .inner { display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.catnav .inner::-webkit-scrollbar { display: none; }
.catnav a { white-space: nowrap; padding: 8px 16px; border-radius: var(--pill); font-weight: 650; color: var(--ink-soft); font-size: .92rem; transition: background var(--t), color var(--t); }
.catnav a:hover { background: var(--bg); text-decoration: none; }
.catnav a.active { background: var(--ink); color: #fff; }

/* ---------- menu / dishes ---------- */
.menu-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; margin-top: 20px; }
.menu-section { scroll-margin-top: 130px; margin-bottom: 28px; }
.menu-section h2 { margin-bottom: 12px; }
.dishes { display: grid; gap: 12px; }
.dish {
    display: flex; gap: 16px; padding: 16px; background: var(--card); border: 1px solid var(--line);
    border-radius: var(--r); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.dish:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-1px); }
.dish .d-info { flex: 1; min-width: 0; }
.dish .d-name { font-weight: 700; margin-bottom: 3px; }
.dish .d-desc { color: var(--muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish .d-price { font-weight: 700; margin-top: 8px; }
.dish .d-thumb { width: 104px; height: 104px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg); flex: 0 0 auto; position: relative; }
.dish .d-add { position: absolute; right: -8px; bottom: -8px; height: 34px; width: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--brand); font-weight: 700; }
.dish.is-unavailable { opacity: .5; pointer-events: none; }
.dish-thumb-fallback { display: flex; align-items: center; justify-content: center; font-size: 2rem; }

/* legacy menu-item (admin/manage) */
.menu-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.menu-item:last-child { border-bottom: none; }
.menu-item .thumb { width: 84px; height: 84px; border-radius: var(--r-sm); object-fit: cover; background: var(--bg); flex: 0 0 auto; }
.menu-item .info { flex: 1; }
.menu-item .price { font-weight: 700; white-space: nowrap; }

/* ---------- cart rail + drawer ---------- */
.cart-rail { position: sticky; top: 86px; }
.cart-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.cart-card .ch { padding: 18px 20px; border-bottom: 1px solid var(--line); font-weight: 700; }
.cart-card .cb { padding: 8px 20px; max-height: 50vh; overflow-y: auto; }
.cart-card .cf { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.cart-line { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line .cl-name { font-weight: 650; }
.cart-line .cl-ex { color: var(--muted); font-size: .82rem; }
.totals { margin-top: 12px; }
.totals .row { justify-content: space-between; padding: 5px 0; }
.totals .grand { font-weight: 800; font-size: 1.2rem; border-top: 2px solid var(--line); padding-top: 12px; margin-top: 8px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--pill); overflow: hidden; }
.qty button { width: 34px; height: 34px; border: none; background: #fff; cursor: pointer; font-size: 1.1rem; color: var(--brand); transition: background var(--t); }
.qty button:hover { background: var(--brand-tint); }
.qty .qn { min-width: 30px; text-align: center; font-weight: 700; }

.mobile-cart-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16,24,29,.08); display: none; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 29, .5); z-index: 90; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity var(--t); }
.modal-backdrop.open { opacity: 1; }
.modal { background: var(--card); border-radius: var(--r-lg) var(--r-lg) 0 0; width: 100%; max-width: 520px; max-height: 92vh; overflow: hidden; display: flex; flex-direction: column; transform: translateY(20px); transition: transform var(--t); }
.modal-backdrop.open .modal { transform: translateY(0); }
.modal .m-cover { height: 180px; background: linear-gradient(135deg, #ffd9dd, var(--brand-tint)); background-size: cover; background-position: center; flex: 0 0 auto; }
.modal .m-body { padding: 22px 24px; overflow-y: auto; }
.modal .m-foot { padding: 16px 24px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; }
.modal .m-close { position: absolute; top: 14px; right: 14px; height: 36px; width: 36px; border-radius: 50%; background: rgba(255,255,255,.95); border: none; cursor: pointer; font-size: 1.1rem; box-shadow: var(--shadow); z-index: 2; }
.modal .m-body h2 { padding-right: 40px; }
.opt-group { margin: 18px 0; }
.opt-group .og-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.opt-group .og-head .req { font-size: .75rem; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: var(--pill); }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 8px; cursor: pointer; transition: border-color var(--t), background var(--t); }
.opt:hover { border-color: var(--line-strong); }
.opt input { accent-color: var(--brand); }
.opt .o-name { flex: 1; }
.opt .o-price { color: var(--muted); font-size: .9rem; }

/* ---------- checkout (Shopify-style) ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 400px; gap: 28px; align-items: start; }
.summary { position: sticky; top: 86px; }
.radio-cards { display: grid; gap: 10px; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; transition: border-color var(--t), background var(--t), box-shadow var(--t); }
.radio-card:hover { border-color: var(--brand); }
.radio-card input { accent-color: var(--brand); }
.radio-card.sel, .radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); box-shadow: 0 0 0 1px var(--brand) inset; }
.radio-card .rc-title { font-weight: 650; }
.radio-card .rc-sub { color: var(--muted); font-size: .85rem; }
.step-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.step-h .n { height: 26px; width: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; }
.step-h h3 { margin: 0; }

/* ---------- order tracking stepper ---------- */
.track-steps { display: flex; gap: 8px; margin-top: 18px; }
.track-steps .ts { flex: 1; text-align: center; min-width: 64px; }
.track-steps .ts .bar { height: 6px; border-radius: var(--pill); background: var(--line); transition: background var(--t); }
.track-steps .ts.done .bar { background: var(--brand); }
.track-steps .ts .lab { margin-top: 7px; font-size: .8rem; color: var(--muted); }
.track-steps .ts.done .lab { color: var(--ink); font-weight: 600; }

/* order ticket (restaurant board) */
.ticket { border-left: 4px solid var(--line); }
.ticket.is-new { border-left-color: var(--brand); }
.ticket.is-received { border-left-color: var(--info); }
.ticket.is-in_progress { border-left-color: var(--warn); }
.ticket.is-done { border-left-color: var(--ok); }
.logo-img { height: 40px; width: 40px; border-radius: 10px; object-fit: cover; }

@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
    .menu-layout { grid-template-columns: 1fr; }
    .menu-layout .cart-rail { display: none; }
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-layout .summary { position: static; order: -1; }
    .mobile-cart-bar.has-items { display: block; }
}
@media (max-width: 860px) {
    .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    body { font-size: 15px; }
    .topbar .inner { height: 56px; gap: 8px; }
    .nav a { padding: 8px 9px; }
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
    .hide-mobile { display: none !important; }
    .card { padding: 18px; }
    h1 { font-size: 1.45rem; }
    .r-hero .cover { height: 150px; }
    .r-hero .hbody { padding: 16px; gap: 14px; }
    .r-logo { height: 64px; width: 64px; }
    .dish .d-thumb { width: 84px; height: 84px; }
    .modal { max-width: 100%; }
    .hero-banner { padding: 28px 22px; }
    .hero-banner h1 { font-size: 1.7rem; }
    .home-hero { padding: 40px 20px; }
    .home-hero h1 { font-size: 2rem; }
    .addr-search { flex-direction: column; }
    .addr-search .btn-lg { width: 100%; }
}

@media (min-width: 601px) {
    .modal-backdrop { align-items: center; }
    .modal { border-radius: var(--r-lg); }
}
