/* ============================================
   QRMENUU — menu.css
   Public Menu Page (what customers see)
   Designed for mobile first — 390px width
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg:         #0d0d0d;
    --bg2:        #161616;
    --bg3:        #1f1f1f;
    --gold:       #f5a623;
    --gold-dim:   #c47f0f;
    --white:      #ffffff;
    --gray:       #888888;
    --gray-light: #cccccc;
    --border:     #2a2a2a;
    --font-head:  'Syne', sans-serif;
    --font-body:  'DM Sans', sans-serif;
    --radius:     14px;
}

html, body {
    background-color: var(--bg);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    max-width: 480px;       /* keeps it phone-width even on desktop */
    margin: 0 auto;
    overflow-x: hidden;
}

/* ---------- HEADER ---------- */
.menu-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px 24px;
    background: linear-gradient(180deg, #1a1a1a 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.restaurant-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold);
    margin-bottom: 14px;
    box-shadow: 0 0 20px rgba(245, 166, 35, 0.25);
}

.restaurant-name {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--white);
}

/* ---------- CATEGORY TABS ---------- */
.category-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
}

.category-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;      /* Firefox */
    -ms-overflow-style: none;   /* IE */
}

.category-tabs::-webkit-scrollbar {
    display: none;              /* Chrome/Safari */
}

.cat-tab {
    flex-shrink: 0;
    background: var(--bg3);
    color: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 18px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.cat-tab:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.cat-tab.active {
    background: var(--gold);
    color: #0d0d0d;
    border-color: var(--gold);
    font-weight: 700;
}

/* ---------- MAIN CONTENT ---------- */
.menu-main {
    padding: 20px 16px 40px;
}

/* Hidden category sections */
.hidden {
    display: none;
}

/* ---------- ITEMS LIST ---------- */
.items-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- SINGLE MENU ITEM ---------- */
.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.menu-item:hover {
    border-color: var(--border);
    transform: translateY(-1px);
}

/* Food photo */
.item-photo {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg3);
}

/* Item details — takes remaining space */
.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;   /* prevents text overflow */
}

/* When no photo, details take full width */
.item-details-full {
    width: 100%;
}

.item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.item-name {
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
    flex: 1;
}

.item-price {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    flex-shrink: 0;
}

.item-desc {
    font-size: 0.8rem;
    color: var(--gray);
    line-height: 1.5;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- EMPTY STATES ---------- */
.empty-cat,
.empty-menu {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

/* ---------- FOOTER ---------- */
.menu-footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--gray);
}

.menu-footer a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

/* ---------- RTL SUPPORT (Arabic) ---------- */
[dir="rtl"] .menu-header {
    direction: rtl;
}

[dir="rtl"] .category-tabs {
    direction: rtl;
}

[dir="rtl"] .menu-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .item-top {
    flex-direction: row-reverse;
}

[dir="rtl"] .item-name {
    text-align: right;
}

[dir="rtl"] .item-desc {
    text-align: right;
}

[dir="rtl"] .item-price {
    text-align: left;
}

/* ---------- INACTIVE PAGE (inactive.html styles reuse these) ---------- */
.inactive-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    text-align: center;
    gap: 16px;
}

.inactive-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.inactive-page h2 {
    font-family: var(--font-head);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
}

.inactive-page p {
    font-size: 0.9rem;
    color: var(--gray);
    max-width: 280px;
    line-height: 1.6;
}
