/* ── MenuLite Public Menu Styles ──────────────────────────────── */
:root {
    --brand:     #FF6B35;
    --bg-tint:   #FFF8F0;
    --text:      #1a1a2e;
    --text-muted:#666;
    --radius:    14px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-tint);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.menu-hero { position: relative; }

.menu-cover {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    filter: brightness(.7);
}
.menu-cover-placeholder {
    background: linear-gradient(135deg, var(--brand), #ff9a6c);
}

.menu-hero-content {
    position: absolute;
    bottom: -32px;
    left: 0; right: 0;
    text-align: center;
    padding: 0 1rem;
}

.menu-logo {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
}

.menu-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
    margin-top: 6px;
    margin-bottom: 4px;
}

.menu-branch-badge {
    display: inline-block;
    background: rgba(255,255,255,.9);
    color: var(--brand);
    font-size: .72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 4px;
}

.menu-address {
    color: rgba(255,255,255,.85);
    font-size: .72rem;
    display: flex; align-items: center; justify-content: center; gap: 4px;
}
.menu-address svg { flex-shrink: 0; }

/* ── Branch Switcher ────────────────────────────────────────────── */
.branch-switcher {
    background: #fff;
    padding: 48px 1rem 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.branch-switcher::-webkit-scrollbar { display: none; }

.branch-switcher-inner {
    display: flex;
    gap: 8px;
    width: max-content;
    margin: 0 auto;
}

.branch-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1.5px solid #e0e0e0;
    background: #fff;
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s;
}
.branch-pill.active,
.branch-pill:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* ── Category Nav ───────────────────────────────────────────────── */
.cat-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-top: 4px;
}
.cat-nav::-webkit-scrollbar { display: none; }

/* Push down after hero if no branch switcher */
.cat-nav:first-of-type { margin-top: 40px; }

.cat-nav-inner {
    display: flex;
    gap: 4px;
    padding: 0 1rem .5rem;
    width: max-content;
}

.cat-tab {
    background: none;
    border: none;
    padding: 8px 14px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .2s;
    position: relative;
}
.cat-tab::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; right: 0;
    height: 2px;
    background: var(--brand);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform .2s;
}
.cat-tab.active { color: var(--brand); font-weight: 700; }
.cat-tab.active::after { transform: scaleX(1); }
.cat-tab:hover { background: #fff3ee; color: var(--brand); }

/* ── Main Content ───────────────────────────────────────────────── */
.menu-main {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem 1rem 4rem;
}

.menu-section { margin-bottom: 2rem; }

.section-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .75rem;
    padding-left: 4px;
    border-left: 3px solid var(--brand);
    padding-left: 10px;
}

/* ── Item Cards ──────────────────────────────────────────────────── */
.items-grid { display: flex; flex-direction: column; gap: .65rem; }

.item-card {
    background: #fff;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem;
    cursor: pointer;
    transition: box-shadow .2s, transform .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
}
.item-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
    transform: translateY(-1px);
}
.item-card:active { transform: scale(.99); }
.item-card.item-unavailable { opacity: .55; }

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

.item-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

/* Veg/non-veg dot */
.tag-dot {
    width: 18px; height: 18px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem;
    flex-shrink: 0;
}
.tag-dot.veg    { border: 1.5px solid #2e7d32; color: #2e7d32; }
.tag-dot.nonveg { border: 1.5px solid #c62828; color: #c62828; }

.tag-badge {
    font-size: .62rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}
.tag-badge.bestseller { background: #fff9e6; color: #b7800a; }
.tag-badge.spicy      { background: #fff0ee; color: #c62828; }
.tag-badge.unavailable{ background: #f5f5f5; color: #999; }

.item-name {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
    color: var(--text);
}

.item-desc {
    font-size: .78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 6px;
}

.item-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand);
}

.item-img-wrap {
    flex-shrink: 0;
    width: 84px;
    height: 84px;
}
.item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ── Item Modal ──────────────────────────────────────────────────── */
.item-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1000;
    align-items: flex-end;
    backdrop-filter: blur(2px);
}
.item-modal-overlay.open { display: flex; }

.item-modal {
    background: #fff;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp .25s ease;
}

@media (min-width: 480px) {
    .item-modal-overlay { align-items: center; }
    .item-modal { border-radius: 24px; max-height: 80vh; margin: 1rem; width: calc(100% - 2rem); }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.item-modal-close {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(0,0,0,.1);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: .85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}

.item-modal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 24px 24px 0 0;
    display: block;
}

.item-modal-body { padding: 1.25rem 1.25rem 2rem; }

.item-modal-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.item-modal-name  { font-size: 1.2rem; font-weight: 800; margin-bottom: 8px; }
.item-modal-desc  { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.item-modal-price { font-size: 1.4rem; font-weight: 800; color: var(--brand); }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-menu { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: .5rem; }

/* ── Footer ──────────────────────────────────────────────────────── */
.menu-footer {
    text-align: center;
    padding: 1.5rem 1rem 5rem;  /* extra bottom so cart bar doesn't overlap */
    font-size: .72rem;
    color: #bbb;
    border-top: 1px solid #f0f0f0;
}
.menu-footer a { text-decoration: none; }

/* ── Add to Cart button (inside item modal) ──────────────────────── */
.btn-add-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 1rem;
    padding: .75rem;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .12s;
}
.btn-add-cart:active { transform: scale(.97); }
.btn-add-cart:disabled { background: #ccc; cursor: not-allowed; }

.modal-qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    background: #f8f8f8;
    border-radius: 12px;
    padding: .5rem .75rem;
}
.modal-qty-control .qty-label { font-size: .85rem; color: var(--text-muted); }
.modal-qty-stepper {
    display: flex;
    align-items: center;
    gap: 16px;
}
.modal-qty-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 2px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.modal-qty-btn:hover { background: var(--brand); color: #fff; }
.modal-qty-num { font-size: 1.1rem; font-weight: 800; min-width: 24px; text-align: center; }

/* ── Cart bar (fixed bottom strip) ──────────────────────────────── */
.cart-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--brand);
    color: #fff;
    padding: .75rem 1rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}
.cart-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-bar-icon { font-size: 1.2rem; }
.cart-bar-count {
    font-weight: 700;
    font-size: .9rem;
    background: rgba(255,255,255,.25);
    padding: 2px 10px;
    border-radius: 20px;
}
.cart-bar-btn {
    background: rgba(255,255,255,.2);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    padding: .45rem .85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s;
}
.cart-bar-btn:hover { background: rgba(255,255,255,.3); }
.cart-bar-arrow { font-size: .82rem; opacity: .85; }

/* ── Cart panel overlay ──────────────────────────────────────────── */
.cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 900;
    align-items: flex-end;
    backdrop-filter: blur(2px);
}
.cart-overlay.open { display: flex; }

.cart-panel {
    background: #fff;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: 24px 24px 0 0;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    animation: slideUp .25s ease;
}
@media (min-width: 520px) {
    .cart-overlay { align-items: center; }
    .cart-panel { border-radius: 24px; max-height: 85vh; margin: 1rem; width: calc(100% - 2rem); }
}

.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem .75rem;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.cart-panel-title { font-size: 1.1rem; font-weight: 800; }
.cart-panel-close {
    background: rgba(0,0,0,.08);
    border: none;
    border-radius: 50%;
    width: 32px; height: 32px;
    font-size: .85rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* ── Cart items list ─────────────────────────────────────────────── */
.cart-items {
    overflow-y: auto;
    flex: 1;
    padding: .75rem 1.25rem;
}
.cart-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid #f5f5f5;
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: .9rem; }
.cart-item-price { font-size: .82rem; color: var(--text-muted); }
.cart-item-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.cart-qty-btn {
    width: 30px; height: 30px;
    border-radius: 50%;
    border: 1.5px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s, color .15s;
}
.cart-qty-btn:hover { background: var(--brand); color: #fff; }
.cart-item-qty { font-weight: 700; min-width: 20px; text-align: center; }
.cart-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
    font-size: .9rem;
}

/* ── Checkout form ───────────────────────────────────────────────── */
.cart-checkout {
    border-top: 1px solid #f0f0f0;
    padding: 1rem 1.25rem 1.5rem;
    flex-shrink: 0;
}

.order-type-row {
    display: flex;
    gap: 8px;
    margin-bottom: .85rem;
}
.order-type-btn {
    flex: 1;
    padding: .55rem;
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    background: #fff;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .18s;
}
.order-type-btn.active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.checkout-field {
    margin-bottom: .65rem;
}
.checkout-field label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.checkout-field .optional { font-weight: 400; }
.checkout-field input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 9px;
    font-size: .9rem;
    outline: none;
    transition: border-color .15s;
}
.checkout-field input:focus { border-color: var(--brand); }

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1rem;
    margin: .75rem 0 .85rem;
    padding: .6rem .75rem;
    background: #f8f8f8;
    border-radius: 10px;
}
.cart-total-amount { color: var(--brand); font-size: 1.1rem; }

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: .85rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .18s, transform .12s;
}
.btn-whatsapp:hover  { background: #1ebe5d; }
.btn-whatsapp:active { transform: scale(.97); }

/* ── Search FAB ──────────────────────────────────────────────── */
.search-fab {
    position: fixed;
    bottom: 84px;
    right: 16px;
    z-index: 510;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    transition: transform .15s, box-shadow .15s;
}
.search-fab:active { transform: scale(.92); }

/* ── Search bar (expands at bottom) ─────────────────────────── */
.search-bar-wrap {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 520;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 16px rgba(0,0,0,.12);
    border-top: 1px solid #ececec;
}
@keyframes slideUpBar {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.search-bar-wrap.open { animation: slideUpBar .2s ease; }

.search-back-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); padding: 4px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    border: none; outline: none;
    font-size: .95rem;
    color: var(--text);
    background: transparent;
    padding: 4px 0;
    min-width: 0;
}
.search-input::placeholder { color: #bbb; }
.search-clear-btn {
    background: none; border: none; cursor: pointer;
    color: #aaa; font-size: .8rem;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #eee;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* ── No results message ─────────────────────────────────────── */
.search-no-results {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,.72);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: .88rem;
    z-index: 519;
    pointer-events: none;
    text-align: center;
}
