/* ─── Reset / globals ────────────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    background: #faf7f5;
    overflow-x: hidden;
    color: #1f2433;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui,
                 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }

.menu-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 14px 80px;
}

/* ─── Hero header ────────────────────────────────────────── */
.menu-header {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.18), transparent 60%),
        linear-gradient(135deg, #C0392B 0%, #8B2C2C 100%);
    color: #fff;
    border-radius: 18px;
    margin-bottom: 14px;
    box-shadow: 0 10px 28px -10px rgba(192,57,43,.55);
    overflow: hidden;
}
.menu-header::after {
    content: '';
    position: absolute;
    right: -40px; bottom: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,.10), transparent 70%);
    pointer-events: none;
}
.menu-header img {
    width: 56px; height: 56px;
    background: #fff;
    padding: 6px;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.menu-header h1 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 2px;
    font-weight: 800;
    line-height: 1.1;
}
.menu-subtitle {
    font-size: 13px;
    opacity: .92;
    margin-top: 3px;
    font-weight: 500;
}

/* ─── States ─────────────────────────────────────────────── */
.menu-loading, .menu-empty, .menu-error {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
}
.menu-error { color: #c0392b; }

/* ─── Sticky category pill bar ───────────────────────────── */
.menu-tabs {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 14px;
    margin: 0 -14px 16px;
    background: rgba(250,247,245,.92);
    backdrop-filter: saturate(160%) blur(10px);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid rgba(0,0,0,.06);
    scrollbar-width: none;
}
.menu-tabs::-webkit-scrollbar { display: none; }

.menu-tab {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 7px 16px;
    border: 1.5px solid transparent;
    background: #fff;
    color: #4a5568;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.15;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
    font-family: inherit;
}
.menu-tab .menu-tab-ar {
    font-size: 11px;
    font-weight: 500;
    opacity: .7;
    direction: rtl;
    margin-top: 1px;
}
.menu-tab:hover { color: #C0392B; }
.menu-tab:active { transform: scale(.96); }
.menu-tab.active {
    background: linear-gradient(135deg, #C0392B, #A02A1F);
    color: #fff;
    box-shadow: 0 6px 14px -4px rgba(192,57,43,.55);
}
.menu-tab.active .menu-tab-ar { opacity: 1; }

/* ─── Section heading ────────────────────────────────────── */
.menu-section { margin-bottom: 24px; }
.menu-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 0 2px;
}
.menu-section-en {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #1f2433;
    letter-spacing: .5px;
    position: relative;
    padding-bottom: 4px;
}
.menu-section-en::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 32px; height: 3px;
    background: #C0392B;
    border-radius: 2px;
}
.menu-section-ar {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #4a5568;
    direction: rtl;
}

/* ─── Item list (mobile = horizontal cards) ──────────────── */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.menu-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.05);
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: transform .15s, box-shadow .2s;
}
.menu-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0,0,0,.08);
}
.menu-item-img {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    object-fit: cover;
    background: #f0eeec;
    display: block;
}
.menu-item-body {
    padding: 10px 12px;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}
.menu-item-name-en {
    font-size: 15px;
    font-weight: 700;
    color: #1f2433;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-item-name-ar {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    direction: rtl;
    text-align: right;
    line-height: 1.25;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-item-prices {
    list-style: none;
    padding: 0;
    margin: 0;
    border-top: 1px dashed rgba(0,0,0,.08);
    padding-top: 5px;
}
.menu-item-prices li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    font-size: 12px;
    line-height: 1.2;
}
.menu-wrap-type {
    color: #6b7280;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
    flex: 1 1 auto;
}
.menu-wrap-type-ar {
    font-size: 10.5px;
    color: #9aa0ab;
    margin-top: 1px;
    direction: rtl;
}
.menu-wrap-price {
    font-weight: 800;
    color: #C0392B;
    font-size: 13px;
    white-space: nowrap;
    background: #fff5f3;
    padding: 3px 8px;
    border-radius: 999px;
}

/* ─── Tablet+ (≥600px): grid of vertical cards, auto-fill ─ */
@media (min-width: 600px) {
    .menu-page { padding: 20px 22px 80px; max-width: 1100px; }
    .menu-header { padding: 22px 24px; }
    .menu-header img { width: 64px; height: 64px; }
    .menu-header h1 { font-size: 26px; }

    .menu-section-en { font-size: 22px; }
    .menu-section-ar { font-size: 19px; }

    .menu-grid {
        display: grid;
        /* auto-fill so single-item sections don't leave huge gaps;
           cards stay 200–260px wide and wrap naturally. */
        grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
        justify-content: start;
        gap: 14px;
    }
    .menu-item { flex-direction: column; }
    .menu-item-img {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }
    .menu-item-body {
        padding: 12px 14px 14px;
        justify-content: flex-start;
    }
    .menu-item-name-en { font-size: 16px; white-space: normal; }
    .menu-item-name-ar { font-size: 15px; white-space: normal; }
    .menu-item-prices li { font-size: 13px; }
    .menu-wrap-price { font-size: 14px; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.menu-footer {
    margin-top: 36px;
    text-align: center;
    font-size: 13px;
    color: #94a0b1;
    padding-top: 18px;
    border-top: 1px solid rgba(0,0,0,.06);
}
