:root {
    --brand: #c0392b;
    --brand-dark: #922b21;
    --ink: #1c1c1c;
    --muted: #6b7280;
    --line: #eceff1;
    --bg: #f4f5f7;
    --card: #ffffff;
    --chip: #fff5f4;
    --radius: 12px;
    --shadow: 0 8px 28px rgba(28, 28, 28, 0.08);
    --font: "Poppins", system-ui, sans-serif;
    --topbar-h: 64px;
    --cat-h: 56px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + var(--cat-h) + 12px); }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--topbar-h);
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.topbar-inner {
    max-width: 920px;
    margin: 0 auto;
    height: 100%;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--ink);
}
.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    background: #111;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.35);
}
.brand-copy strong {
    display: block;
    font-size: 0.98rem;
    line-height: 1.15;
}
.brand-copy small {
    color: var(--muted);
    font-size: 0.72rem;
}
.topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.branch-chip {
    display: none;
    align-items: center;
    gap: 0.35rem;
    background: var(--chip);
    color: var(--brand-dark);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    max-width: 220px;
}
.branch-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (min-width: 640px) {
    .branch-chip { display: inline-flex; }
}
@media (min-width: 900px) {
    .branch-chip { max-width: none; }
}
.cart-toggle {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.flash {
    max-width: 920px;
    margin: 0.75rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    width: calc(100% - 2rem);
}
.flash-success { background: #e8f8ef; color: #166534; }
.flash-error { background: #fde8e8; color: #991b1b; }
.flash ul { margin: 0; padding-left: 1.1rem; }

/* Promo banners */
.promo-section {
    max-width: 920px;
    margin: 0.85rem auto 0;
    padding: 0 1rem;
    position: relative;
}
.promo-slider {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 160px;
    box-shadow: var(--shadow);
}
.promo-slide {
    display: none;
    min-height: 160px;
    background: var(--promo-bg);
    color: #fff;
    padding: 1.5rem 1.35rem;
    animation: fadeSlide 0.45s ease;
}
.promo-slide.is-active { display: block; }
.promo-label {
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.9;
}
.promo-slide h2 {
    margin: 0 0 0.4rem;
    font-size: clamp(1.35rem, 4vw, 1.85rem);
    font-weight: 700;
}
.promo-slide p { margin: 0; opacity: 0.92; max-width: 28rem; font-size: 0.92rem; }
.promo-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
}
.promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #cfd4da;
    cursor: pointer;
    padding: 0;
}
.promo-dot.is-active { background: var(--brand); }

/* Sticky categories */
.category-nav {
    position: sticky;
    top: var(--topbar-h);
    z-index: 30;
    background: rgba(244, 245, 247, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    margin-top: 0.75rem;
}
.category-nav-inner {
    max-width: 920px;
    margin: 0 auto;
    padding: 0.65rem 1rem;
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-chip {
    flex: 0 0 auto;
    text-decoration: none;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.category-chip.is-active,
.category-chip:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* Menu board — list rows like Blink */
.menu-board {
    max-width: 920px;
    margin: 0 auto;
    padding: 0.5rem 1rem 2rem;
}
.menu-block { padding-top: 1.1rem; }
.menu-block-head h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
}
.menu-list {
    display: grid;
    gap: 0.65rem;
}
.menu-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.85rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.menu-row:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.menu-row-media {
    width: 88px;
    height: 88px;
    border-radius: 10px;
    overflow: hidden;
    background: #e8eaed;
}
.menu-row-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.menu-row-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.menu-row-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}
.menu-row-top h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}
.price {
    color: var(--brand);
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.92rem;
}
.menu-row-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.btn-add {
    margin-top: auto;
    align-self: flex-start;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.btn-add:hover {
    background: var(--brand);
    color: #fff;
}
.empty-menu {
    text-align: center;
    color: var(--muted);
    padding: 3rem 1rem;
}

/* How it works */
.info-strip {
    background: var(--card);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 2rem 1rem;
}
.info-strip-inner {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.info-card {
    text-align: center;
    padding: 0.5rem;
}
.info-num {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--chip);
    color: var(--brand);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.info-card h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.info-card p { margin: 0; color: var(--muted); font-size: 0.85rem; }

main {
    flex: 1 0 auto;
}

/* Footer */
.site-footer {
    background: #1f1f1f;
    color: rgba(255,255,255,0.88);
    padding: 2.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
    margin-top: auto;
}
body:has(.cart-bar.is-visible) .site-footer {
    padding-bottom: calc(5.25rem + env(safe-area-inset-bottom));
}
.site-footer-inner {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.site-footer h3, .site-footer h4 { margin: 0 0 0.5rem; color: #fff; }
.site-footer p { margin: 0 0 0.35rem; font-size: 0.88rem; color: rgba(255,255,255,0.7); }
.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.footer-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}
.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
}
.social-link:hover { color: #d4af37; }
.footer-copy {
    margin-top: 0.5rem !important;
    font-size: 0.8rem !important;
    color: rgba(255,255,255,0.5) !important;
}

/* Sticky cart bar */
.cart-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: transparent;
    pointer-events: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s, transform 0.25s;
}
.cart-bar.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.cart-bar-btn {
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: none;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.95rem 1.15rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(192, 57, 43, 0.35);
}
.cart-bar-btn:hover { background: var(--brand-dark); }

/* Cart drawer */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 50;
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 100%);
    height: 100%;
    background: var(--card);
    z-index: 60;
    transform: translateX(105%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer-header, .cart-drawer-footer {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cart-drawer-footer {
    border-bottom: none;
    border-top: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
}
.cart-drawer-header h2 { margin: 0; font-size: 1.15rem; }
.icon-btn {
    border: none;
    background: transparent;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}
.cart-drawer-body { flex: 1; overflow: auto; padding: 1rem; }
.cart-empty { color: var(--muted); text-align: center; margin-top: 2rem; }
.cart-line { border-bottom: 1px solid var(--line); padding: 0.85rem 0; }
.cart-line-info { display: flex; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.cart-line-actions { display: flex; align-items: center; gap: 0.4rem; }
.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
}
.remove-btn {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--brand);
    cursor: pointer;
    font-size: 0.85rem;
}
.cart-subtotal { display: flex; justify-content: space-between; font-size: 1.05rem; }
.cart-checkout-btn, .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    text-decoration: none;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}
.cart-checkout-btn:hover, .btn-primary:hover { background: var(--brand-dark); }
.cart-checkout-btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* Checkout / success */
.checkout-page, .success-page {
    max-width: 920px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}
.checkout-grid {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 860px) {
    .checkout-grid { grid-template-columns: 1.2fr 0.8fr; align-items: start; }
}
.checkout-form-wrap, .checkout-summary, .success-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.checkout-form-wrap h1, .success-card h1 {
    margin: 0;
    font-size: 1.5rem;
}
.muted { color: var(--muted); }
.field-hint {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--muted);
}
.checkout-form { display: grid; gap: 0.9rem; margin-top: 1rem; }
.checkout-form label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.88rem; }
.checkout-form input, .checkout-form textarea {
    font: inherit;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
}
.fulfillment {
    border: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}
.fulfillment legend { font-weight: 600; margin-bottom: 0.4rem; }
.radio-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.payment-note { color: var(--muted); margin: 0.25rem 0; }
.checkout-summary h2 { margin: 0 0 1rem; font-size: 1.15rem; }
.checkout-summary ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.checkout-summary li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.92rem;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
}
.summary-row.total {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    font-size: 1.05rem;
    font-weight: 700;
}
.success-page { display: grid; place-items: center; min-height: calc(100vh - var(--topbar-h) - 80px); }
.success-card { max-width: 480px; width: 100%; text-align: center; }
.success-eyebrow {
    color: var(--brand);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
}
.order-number {
    font-size: 1.25rem;
    color: var(--ink);
    margin: 0.5rem 0 1rem;
    font-weight: 700;
}
.success-items { list-style: none; padding: 0; margin: 1rem 0; text-align: left; }
.success-items li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.success-card .btn-primary { margin-top: 0.85rem; }

@keyframes fadeSlide {
    from { opacity: 0.4; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 480px) {
    .menu-row { grid-template-columns: 72px 1fr; }
    .menu-row-media { width: 72px; height: 72px; }
}
