/* ===== MENU STYLES - برجر كينج Fast Food ===== */

:root {
    --primary: #DA291C;
    --primary-dark: #B71C1C;
    --primary-light: #FF5252;
    --accent: #FF8C00;
    --accent-light: #FFC72C;
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #222240;
    --bg-section: #16213e;
    --text: #e0e0e0;
    --text-light: #9e9e9e;
    --text-muted: #6b6b80;
    --border: #2a2a45;
    --border-light: #3a3a55;
    --success: #4CAF50;
    --info: #00A6ED;
    --warning: #FFC72C;
    --font: 'Tajawal', sans-serif;
    --font-display: 'Bebas Neue', cursive;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-full: 50px;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    padding-top: 130px;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== HEADER ===== */
.menu-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}
.header-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    color: var(--text);
    transition: var(--transition);
}
.header-back:hover { background: var(--primary); color: #fff; }
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1.1rem;
}
.header-name {
    font-size: 1.1rem;
    font-weight: 800;
}
.header-status {
    font-size: 0.7rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-status i { font-size: 0.5rem; }
.header-cart-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    border-radius: 50%;
    color: var(--text);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.header-cart-btn:hover { background: var(--primary); color: #fff; }
.header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 5px;
    border: 2px solid var(--bg);
}
.header-info {
    display: flex;
    gap: 20px;
    padding: 8px 16px;
    background: var(--bg-card);
    font-size: 0.75rem;
    color: var(--text-light);
}
.header-info i { color: var(--accent); }

/* ===== PROMO BANNER ===== */
.promo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #1a1a2e;
    font-size: 0.8rem;
    font-weight: 500;
}
.promo-icon { font-size: 1rem; }
.promo-text { flex: 1; }
.promo-text strong { font-weight: 800; }
.promo-close {
    background: none;
    border: none;
    color: #1a1a2e;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
}
.promo-close:hover { opacity: 1; }

/* ===== CATEGORIES ===== */
.categories-section {
    position: sticky;
    top: 130px;
    z-index: 90;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.categories-scroll {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-tab {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cat-tab:hover {
    border-color: var(--accent);
    color: var(--text);
}
.cat-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(218,41,28,0.3);
}
.cat-tab-icon {
    font-size: 1rem;
    line-height: 1;
}
.cat-tab-count {
    padding: 1px 6px;
    background: rgba(255,255,255,0.15);
    border-radius: 8px;
    font-size: 0.7rem;
}
.cat-tab.active .cat-tab-count {
    background: rgba(0,0,0,0.15);
}

/* ===== MENU ITEMS ===== */
.menu-section {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
}
.menu-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.menu-section-title {
    font-size: 1.3rem;
    font-weight: 800;
}
.menu-section-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.menu-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.menu-loading i { font-size: 2rem; display: block; margin-bottom: 10px; }
.menu-items-grid {
    display: grid;
    gap: 12px;
}

/* ===== MENU ITEM CARD ===== */
.menu-item-card {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}
.menu-item-card:hover {
    border-color: var(--border-light);
    background: var(--bg-card-hover);
}
.menu-item-card.unavailable {
    opacity: 0.5;
}
.menu-item-img-wrap {
    width: 120px;
    min-height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}
.menu-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.menu-item-card:hover .menu-item-img-wrap img {
    transform: scale(1.05);
}
.menu-item-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 2rem;
}
.menu-item-info {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}
.menu-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.menu-item-name-en {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    direction: ltr;
    text-align: right;
}
.menu-item-desc {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 8px;
    flex: 1;
}
.menu-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}
.menu-item-price {
    font-weight: 800;
    color: var(--accent);
    font-size: 1.1rem;
}
.menu-item-old-price {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-right: 6px;
}
.menu-item-add-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.menu-item-add-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}
.menu-item-add-btn.added {
    background: var(--success);
}

/* ===== CART OVERLAY ===== */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.cart-overlay.open { opacity: 1; visibility: visible; }

/* ===== CART DRAWER ===== */
.cart-drawer {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--bg);
    border-left: 1px solid var(--border);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.4);
}
.cart-drawer.open { left: 0; }
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}
.cart-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-header h3 i { color: var(--accent); }
.cart-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-light);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}
.cart-close:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== CART ITEMS ===== */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.cart-empty i { font-size: 3rem; display: block; margin-bottom: 15px; color: var(--border); }
.cart-empty p { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-light); }
.cart-empty span { font-size: 0.85rem; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    animation: slideIn 0.3s ease;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.cart-item-img-wrap {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}
.cart-item-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-size: 0.85rem;
    font-weight: 700;
}
.cart-item-price {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
}
.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
}
.cart-qty-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.cart-qty-num {
    min-width: 24px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
}

/* ===== CART FOOTER ===== */
.cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}
.cart-summary {
    margin-bottom: 12px;
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}
.cart-total-row {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}
.cart-order-type {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.order-type-btn {
    flex: 1;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.order-type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.order-type-btn:hover:not(.active) {
    border-color: var(--accent);
}
.table-input-group {
    margin-bottom: 10px;
}
.table-input-group label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.table-input-group label i { color: var(--accent); }
.table-input-group input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: var(--transition);
}
.table-input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,140,0,0.1);
}
.remember-table {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    margin-bottom: 10px;
}
.remember-table input[type="checkbox"] {
    accent-color: var(--accent);
}
.skip-table-btn {
    width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 6px;
}
.skip-table-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255,140,0,0.05);
}
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checkout-btn-direct {
    background: var(--success);
}
.checkout-btn-direct:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(76,175,80,0.3);
}
.checkout-btn-whatsapp {
    background: #25D366;
}
.checkout-btn-whatsapp:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}
.checkout-btn {
    width: 100%;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}
.checkout-btn:hover {
    background: #1DA851;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}

/* ===== FLOATING CART ===== */
.cart-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.3s ease;
}
.cart-fab-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(218,41,28,0.4);
    transition: var(--transition);
    position: relative;
}
.cart-fab-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}
.cart-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #1a1a2e;
    font-size: 0.7rem;
    font-weight: 800;
    border-radius: 12px;
    padding: 0 6px;
    border: 2px solid var(--bg);
}
.cart-fab-info {
    text-align: right;
}
.cart-fab-count {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
}
.cart-fab-total {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--accent);
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    min-width: 200px;
}
.toast.toast-success { border-color: var(--success); }
.toast.toast-error { border-color: var(--primary); }
.toast.toast-info { border-color: var(--info); }
.toast i { font-size: 1.1rem; }
.toast.toast-success i { color: var(--success); }
.toast.toast-error i { color: var(--primary); }
.toast.toast-info i { color: var(--info); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (min-width: 768px) {
    .menu-items-grid {
        grid-template-columns: 1fr 1fr;
    }
    .menu-item-card {
        flex-direction: column;
    }
    .menu-item-img-wrap {
        width: 100%;
        height: 180px;
    }
    .menu-item-img-placeholder {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .menu-item-img-wrap {
        width: 100px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .cat-tab {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    .menu-section-title {
        font-size: 1.1rem;
    }
}

/* ===== Responsive Enhancements ===== */
@media(max-width:1024px){
    .app-header{padding:8px 12px}
    .header-content{gap:8px}
    .menu-content{padding:8px 12px}
}

@media(max-width:768px){
    .app-header{padding:6px 10px}
    .restaurant-name{font-size:1rem}
    .search-bar{padding:6px 10px}
    .menu-items-grid{grid-template-columns:1fr;gap:8px}
    .cart-drawer{width:100%}
}

@media(max-width:480px){
    body{font-size:14px}
    .restaurant-name{font-size:0.9rem}
    .menu-section-title{font-size:1rem}
    .menu-item-card{padding:8px}
    .menu-item-name{font-size:0.85rem}
    .menu-item-price{font-size:0.9rem}
    .menu-item-add-btn{width:28px;height:28px;font-size:0.8rem}
    .cart-item{padding:8px}
    .cart-item-name{font-size:0.8rem}
    .categories-scroll{padding:6px 0}
    .cat-tab{padding:6px 12px;font-size:0.75rem}
}

@media(min-width:1400px){
    .menu-items-grid{grid-template-columns:1fr 1fr 1fr}
    .menu-content{padding:20px 40px;max-width:1400px;margin:0 auto}
}

@media(min-width:1800px){
    .menu-items-grid{grid-template-columns:1fr 1fr 1fr 1fr}
}
