/* ========================================================
   وصلة — تصميم مخصص لتطبيق طلب الأكل
   الخط: Cairo (عناوين) + Tajawal (نص)
   ======================================================== */

:root {
    --bg: #FFF8EF;
    --surface: #FFFFFF;
    --ink: #201C16;
    --muted: #8A8578;
    --primary: #FF6A1A;      /* برتقالي مانجو حيوي */
    --primary-dark: #E24E00;
    --secondary: #0B6E4F;    /* أخضر أعشاب طازة */
    --accent: #FFC93C;       /* أصفر تنبيهات/تقييم */
    --danger: #D7263D;
    --border: #EDE4D3;
    --radius-lg: 22px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px -12px rgba(32, 28, 22, 0.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}
/* الاتجاه بيتحدد حسب dir بتاع <html> (اللي بيتحط ديناميكيًا حسب اللغة المختارة)
   بدل ما يكون rtl ثابت، عشان صفحات اللغة الإنجليزية تظهر LTR صح */
html[dir="rtl"] body { direction: rtl; }
html[dir="ltr"] body { direction: ltr; }

h1, h2, h3, h4, .display {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.01em;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- الهيدر ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    max-width: 1180px;
    margin: 0 auto;
    gap: 16px;
}
.logo {
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 26px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}
.logo span { color: var(--secondary); }
.header-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 600;
    font-size: 15px;
}
.header-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ink);
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -10px;
    inset-inline-end: -14px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lang-switch {
    border-inline-start: 1px solid var(--border);
    padding-inline-start: 14px;
    opacity: .85;
}
.lang-switch:hover { opacity: 1; color: var(--primary-dark); }
/* ============ جرس الإشعارات ============ */
.notif-bell-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.notif-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 19px;
    color: var(--ink);
    position: relative;
    padding: 4px;
    display: flex;
    align-items: center;
}
.notif-badge {
    position: absolute;
    top: -6px;
    left: -8px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    align-items: center;
    justify-content: center;
}
.notif-enable-push-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
}
.notif-enable-push-btn:hover { background: var(--bg); }
.notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    z-index: 300;
    overflow: hidden;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}
.notif-dropdown-head button {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Tajawal', sans-serif;
}
.notif-dropdown-list {
    max-height: 360px;
    overflow-y: auto;
}
.notif-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    text-decoration: none;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item-unread { background: #FFF3E9; }
.notif-item-unread::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-left: 6px;
    vertical-align: middle;
}
.notif-item-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 3px;
}
.notif-item-msg {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 4px;
    line-height: 1.5;
}
.notif-item-time {
    font-size: 11px;
    color: var(--muted);
}
.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

/* ============ دردشة الدعم المباشرة (Live Chat) ============ */
.chat-box {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    overflow: hidden;
}
.chat-box-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-box-messages {
    height: 280px;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.chat-msg { display: flex; flex-direction: column; max-width: 80%; }
.chat-msg-mine { align-self: flex-start; align-items: flex-start; }
.chat-msg:not(.chat-msg-mine) { align-self: flex-end; align-items: flex-end; }
.chat-msg-bubble {
    padding: 9px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    background: var(--surface);
    border: 1px solid var(--border);
}
.chat-msg-mine .chat-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.chat-msg-meta {
    font-size: 10px;
    color: var(--muted);
    margin-top: 3px;
    padding: 0 4px;
}
.chat-box-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
}
.chat-box-form input[type="text"] {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
}
.chat-box-form button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.tip-chip.active { background: var(--ink); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- الهيرو ---------- */
.hero {
    background: linear-gradient(180deg, #FFF1DD 0%, var(--bg) 100%);
    padding: 56px 0 40px;
    overflow: hidden;
}
.hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 40px;
    align-items: center;
}
.hero h1 {
    font-size: 44px;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero h1 em {
    font-style: normal;
    color: var(--primary);
}
.hero p { color: var(--muted); font-size: 17px; margin-bottom: 28px; max-width: 480px; }

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 8px 8px 20px;
    max-width: 480px;
    box-shadow: var(--shadow);
}
.search-box input {
    border: none;
    outline: none;
    flex: 1;
    font-family: inherit;
    font-size: 15px;
    background: transparent;
    padding: 10px 6px;
}
.search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
}

/* ---------- اقتراحات تلقائية لصندوق البحث الرئيسي ---------- */
.search-wrap { position: relative; max-width: 480px; }
.search-suggest-box {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    max-height: 360px;
    overflow-y: auto;
    z-index: 50;
    text-align: right;
}
.search-suggest-group-label {
    padding: 10px 16px 4px;
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}
.search-suggest-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text);
    text-decoration: none;
}
.search-suggest-item:hover,
.search-suggest-item.active { background: var(--bg); }
.search-suggest-item .ss-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex: 0 0 auto;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--muted);
    font-size: 14px;
}
.search-suggest-item .ss-icon img { width: 100%; height: 100%; object-fit: cover; }
.search-suggest-item .ss-info { flex: 1; min-width: 0; }
.search-suggest-item .ss-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest-item .ss-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }

.hero-art {
    position: relative;
    aspect-ratio: 1/1;
    background: radial-gradient(circle at 30% 30%, #FFDCAF, transparent 60%),
                radial-gradient(circle at 70% 70%, #CBEFDD, transparent 55%);
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-art .ring-badge { transform: scale(2.4); }

/* ---------- شريط الأقسام ---------- */
.category-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 2px 18px;
}
.category-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    transition: all .15s ease;
}
.category-chip.active,
.category-chip:hover {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

/* ---------- كارت وضع "مشغول" في لوحة التاجر ---------- */
.busy-mode-card.is-busy {
    background: #FFF3E0;
    border-color: #F5A623;
}

/* ---------- اختيار عنوان محفوظ في صفحة إتمام الطلب ---------- */
.address-picker {
    display: grid;
    gap: 10px;
}
.address-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm, 10px);
    padding: 12px 14px;
    cursor: pointer;
    transition: all .15s ease;
}
.address-option:hover {
    border-color: var(--primary);
}
.address-option.selected {
    border-color: var(--primary);
    background: rgba(255, 145, 0, 0.06);
}
.address-option input[type="radio"] {
    margin-top: 4px;
    width: auto;
}
.address-option strong {
    display: block;
    margin-bottom: 4px;
}
.address-option p {
    margin: 0;
    color: var(--text-light, #6b6b6b);
    font-size: 13px;
}

/* ---------- شريط الفلاتر والترتيب ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group label {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    color: var(--text-light, #6b6b6b);
}
.filter-group .form-control {
    width: auto;
    min-height: unset;
    padding: 9px 14px;
}
.filter-toggle {
    cursor: pointer;
}
.filter-toggle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---------- شبكة الكروت ---------- */
.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 36px 0 18px;
}
.section-title h2 { font-size: 24px; }
.section-title .muted { color: var(--muted); font-size: 14px; font-weight: 600; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

/* قسم "مطاعم مميزة / برعاية" أعلى الصفحة الرئيسية */
.featured-section {
    background: linear-gradient(135deg, #FFF3D6, #FFE9B8);
    border: 1.5px solid #F3D98A;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin: 24px 0;
}
.featured-section .section-title { margin: 0 0 16px; }
.featured-section .section-title h2 { color: #8A6100; }
.featured-section .section-title h2 i { color: #E0A800; }
.featured-badge-tag {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: #F5A623;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media {
    position: relative;
    height: 150px;
    background: linear-gradient(135deg, #FFE3C2, #FFD1A9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; }

.favorite-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.9);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
    transition: transform .15s ease, color .15s ease;
}
.favorite-btn:hover { transform: scale(1.08); }
.favorite-btn.is-favorited { color: var(--danger); }
.favorite-btn-inline {
    position: static;
    background: rgba(255,255,255,.15);
    color: #fff;
    flex-shrink: 0;
}
.favorite-btn-inline.is-favorited { color: var(--danger); background: #fff; }
.favorite-btn-menu-item {
    position: static;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    width: 30px;
    height: 30px;
    font-size: 15px;
}
.favorite-btn-menu-item.is-favorited { color: var(--danger); }

.card-body h3 { font-size: 17px; margin-bottom: 4px; }
.card-desc { color: var(--muted); font-size: 13px; margin: 4px 0 10px; min-height: 34px; }
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #FFF3D6;
    color: #8A6100;
    padding: 3px 9px;
    border-radius: 999px;
    font-weight: 700;
}

/* عنصر التصميم المميز: حلقة وقت التوصيل */
.ring-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: conic-gradient(var(--secondary) calc(var(--pct, 60) * 1%), rgba(255,255,255,.55) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.ring-badge::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: #fff;
    border-radius: 50%;
}
.ring-badge span {
    position: relative;
    font-family: 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: var(--ink);
    text-align: center;
    line-height: 1.1;
}

/* ---------- صفحة المطعم ---------- */
.restaurant-banner {
    background: linear-gradient(135deg, var(--secondary), #084A35);
    color: #fff;
    padding: 40px 0;
    border-radius: 0 0 32px 32px;
}
.restaurant-banner h1 { font-size: 32px; margin-bottom: 8px; }
.trust-badge-icon {
    font-size: 17px;
    color: #FFD166;
    margin-inline-start: 8px;
    vertical-align: middle;
    cursor: default;
}
.trust-badge-icon[href] { cursor: pointer; }
.trust-badge-icon:hover { opacity: .85; }
.restaurant-banner .tags { display: flex; gap: 16px; margin-top: 14px; flex-wrap: wrap; font-size: 14px; opacity: .95; }

.menu-section-heading {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.menu-section-heading:first-of-type { margin-top: 6px; }

/* ---------- الطلب الجماعي (Group Order) ---------- */
.share-link-box {
    display: flex;
    gap: 10px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    align-items: center;
}
.share-link-box input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text);
    direction: ltr;
    text-align: left;
}
.go-participant-block { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 12px; }
.go-participant-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 15px; }
.go-participant-head span { font-weight: 800; color: var(--primary-dark); }
.go-item-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.go-item-row:first-of-type { border-top: none; }
.go-item-name { flex: 1; }
.go-item-price { font-weight: 700; white-space: nowrap; }
.go-item-actions { display: flex; gap: 4px; white-space: nowrap; }
.go-item-actions .btn { padding: 2px 9px; line-height: 1.4; }
.go-grand-total {
    display: flex;
    justify-content: space-between;
    font-size: 17px;
    font-weight: 800;
    color: var(--primary-dark);
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid var(--border);
}
.go-menu-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.go-menu-row:last-child { border-bottom: none; }
.go-menu-info { flex: 1; }
.go-add-form { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex: 0 0 auto; min-width: 120px; }
.go-qty-input { width: 70px; text-align: center; }
.go-options-details { width: 100%; max-width: 260px; }
.go-options-details summary { cursor: pointer; font-size: 13px; color: var(--primary); margin-bottom: 6px; }

/* ---------- كومبوهات وعروض ---------- */
.combo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.combo-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.combo-card-media {
    position: relative;
    height: 130px;
    background: linear-gradient(135deg, var(--primary-light, #fdece7), var(--surface));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: var(--primary);
}
.combo-card-media img { width: 100%; height: 100%; object-fit: cover; }
.combo-savings-badge {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    background: var(--danger, #d7263d);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
}
.combo-card-body { padding: 14px 16px 4px; flex: 1; }
.combo-card-body h4 { margin-bottom: 6px; }
.combo-card-body p { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.combo-items-list { list-style: none; padding: 0; margin: 0 0 10px; font-size: 13px; color: var(--text-light); }
.combo-items-list li { padding: 2px 0; }
.combo-price-row { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.combo-price-old { text-decoration: line-through; color: var(--muted); font-size: 13px; }
.combo-price-new { font-weight: 800; color: var(--primary-dark); font-family: 'Cairo', sans-serif; font-size: 17px; }
.combo-card .menu-item-action { padding: 4px 16px 16px; }

/* ---------- علامات غذائية (Dietary Tags) ---------- */
.dietary-tags { display: inline-flex; gap: 5px; margin-inline-start: 6px; }
.dietary-tag-icon { font-size: 13px; }
.diet-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.diet-filter-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.diet-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    transition: all .15s;
}
.diet-filter-chip:hover { border-color: var(--primary); }
.diet-filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.diet-filter-clear {
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
}
.diet-filter-clear:hover { color: var(--danger, #d7263d); }

/* ---------- معرض الصور (سلايدر بسيط للمطعم والمنتج) ---------- */
.gallery-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #111;
    width: 100%;
    height: 100%;
}
.gallery-slider-track { position: relative; width: 100%; height: 100%; }
.gallery-slide { display: none; width: 100%; height: 100%; object-fit: cover; }
.gallery-slide.active { display: block; }

.gallery-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.gallery-slider-arrow:hover { background: rgba(0,0,0,.65); }
.gallery-slider-prev { right: 10px; }
.gallery-slider-next { left: 10px; }

.gallery-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.gallery-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
}
.gallery-slider-dot.active { background: #fff; }

.restaurant-gallery { height: 260px; margin-top: 18px; }
.gallery-slider-lg { height: 380px; }
.banner-slider { height: 280px; margin: 20px 0; }
.banner-slider .gallery-slide { background: #111; }
.banner-slide-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-modal-box { max-width: 560px; }
.gallery-modal-box .modal-body { padding: 0; }

.gallery-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
}
.menu-item-media[data-gallery-trigger] { cursor: pointer; position: relative; }

.menu-item {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}
.menu-item-media {
    width: 76px;
    height: 76px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #FFE3C2, #FFD1A9);
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    overflow: hidden;
}
.menu-item-media img { width: 100%; height: 100%; object-fit: cover; }
.menu-item-info { flex: 1; }
.menu-item-info h4 { font-size: 16px; margin-bottom: 4px; }
.menu-item-info p { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.menu-item-price { font-weight: 800; color: var(--primary-dark); font-family: 'Cairo', sans-serif; }

.qty-control {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg);
    border-radius: 999px;
    padding: 6px 8px;
}
.qty-control button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qty-control .qty-val { min-width: 20px; text-align: center; font-weight: 700; }

/* ---------- الكارت والدفع ---------- */
.cart-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.cart-row:last-child { border-bottom: none; }
.cart-summary {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}
.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}
.summary-line.total {
    font-weight: 800;
    font-size: 18px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    padding-top: 14px;
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.form-control {
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 15px;
    background: var(--surface);
    transition: border-color .15s ease;
}
.form-control:focus { outline: none; border-color: var(--primary); }
textarea.form-control { resize: vertical; min-height: 90px; }

.auth-card {
    max-width: 420px;
    margin: 60px auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}

/* ---------- تتبع الطلب ---------- */
.tracker {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    position: relative;
}
.tracker::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 5%;
    left: 5%;
    height: 3px;
    background: var(--border);
    z-index: 0;
}
.tracker-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}
.tracker-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--border);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-weight: 800;
    border: 4px solid var(--bg);
}
.tracker-step.done .tracker-dot { background: var(--secondary); color: #fff; }
.tracker-step span { font-size: 12px; font-weight: 700; color: var(--muted); }
.tracker-step.done span { color: var(--ink); }

.badge-status {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-pending { background: #FFF3D6; color: #8A6100; }
.badge-confirmed, .badge-preparing { background: #DCEEFF; color: #0B5FA5; }
.badge-on_the_way { background: #FDE6D0; color: var(--primary-dark); }
.badge-delivered { background: #DCF3E6; color: var(--secondary); }
.badge-cancelled { background: #FBDCE0; color: var(--danger); }
.badge-refused { background: #FBDCE0; color: var(--danger); }
.badge-refunded { background: #E9E3F7; color: #5B3EA6; }

/* ---------- نافذة اختيار خيارات المنتج ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(32, 28, 22, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}
.modal-box {
    background: var(--surface);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
}
.modal-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.option-group { margin-bottom: 18px; }
.option-group h4 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.req-badge { background: #FDE6D0; color: var(--primary-dark); font-size: 11px; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 14px;
}
.option-row:last-child { border-bottom: none; }
.option-row input { width: 18px; height: 18px; accent-color: var(--primary); }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.modal-footer .btn-primary { flex: 1; }

/* ---------- فوتر ---------- */
.site-footer {
    background: var(--ink);
    color: #EDE4D3;
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 14px;
}

/* ---------- أدمن ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px;
    background: var(--ink);
    color: #fff;
    padding: 24px 16px;
    flex: 0 0 auto;
}
.admin-sidebar .logo { color: #fff; margin-bottom: 30px; }
.admin-sidebar .logo span { color: var(--accent); }
.admin-sidebar a {
    display: block;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 4px;
    color: #cfc9bd;
}
.admin-sidebar a.active, .admin-sidebar a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-main { flex: 1; padding: 30px; background: var(--bg); }
.admin-topbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.stat-card .num { font-family: 'Cairo', sans-serif; font-size: 28px; font-weight: 800; color: var(--primary-dark); }
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 700; margin-top: 4px; }

table.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-md); overflow: hidden; }
table.data-table th, table.data-table td { padding: 12px 14px; text-align: right; border-bottom: 1px solid var(--border); font-size: 14px; }
table.data-table th { background: #FBF2E4; font-weight: 800; }
table.data-table tr:last-child td { border-bottom: none; }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-weight: 600; font-size: 14px; }
.alert-success { background: #DCF3E6; color: #0B6E4F; }
.alert-error { background: #FBDCE0; color: var(--danger); }
.alert-info { background: #DCEEFF; color: #0B5FA5; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }

/* ---------- تقييمات ومراجعات العملاء ---------- */
.star-input { font-size: 30px; color: var(--accent); direction: ltr; text-align: center; margin-bottom: 6px; }
.star-input i { cursor: pointer; margin: 0 3px; transition: transform .1s ease; }
.star-input i:hover { transform: scale(1.15); }
.star-display { color: var(--accent); font-size: 18px; direction: ltr; }
.star-display i { margin-left: 2px; }
.review-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.review-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.review-card-head strong { font-size: 14px; }
.review-comment { color: var(--muted); font-size: 14px; margin: 6px 0; }
.review-date { font-size: 12px; color: var(--muted); }
.review-report-btn {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 4px;
}
.review-report-btn:hover { color: var(--danger, #d7263d); }
.review-report-btn.is-reported { color: var(--danger, #d7263d); cursor: default; }
.review-report-btn:disabled { opacity: .8; }

/* ---------- المساعد الذكي (AI Chat Widget) ---------- */
#ai-chat-widget {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 900;
    font-family: 'Tajawal', sans-serif;
}
#ai-chat-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
#ai-chat-toggle:hover { background: var(--primary-dark); }
#ai-chat-panel {
    position: absolute;
    bottom: 72px;
    left: 0;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 460px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
#ai-chat-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#ai-chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
#ai-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.ai-chat-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}
.ai-chat-msg-bot {
    background: var(--surface);
    border: 1px solid var(--border);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.ai-chat-msg-user {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.ai-chat-typing { display: flex; gap: 4px; align-items: center; padding: 14px 16px; }
.ai-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: ai-chat-blink 1.2s infinite ease-in-out;
}
.ai-chat-typing span:nth-child(2) { animation-delay: .2s; }
.ai-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ai-chat-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.ai-chat-suggestions { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ai-chat-suggest-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    text-decoration: none;
    color: var(--text);
}
.ai-chat-suggest-card:hover { border-color: var(--primary); }
.ai-chat-suggest-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.ai-chat-suggest-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-chat-suggest-info strong { font-size: 13px; }
.ai-chat-suggest-info small { color: var(--muted); font-size: 11.5px; }

#ai-chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); }
#ai-chat-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13.5px;
    background: var(--bg);
    color: var(--text);
}
#ai-chat-input:focus { outline: none; border-color: var(--primary); }
#ai-chat-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    flex: 0 0 auto;
}
#ai-chat-send:hover { background: var(--primary-dark); }

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-art { display: none; }
    .hero h1 { font-size: 32px; }
    .banner-slider { height: 160px; margin: 14px 0; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; display: flex; overflow-x: auto; gap: 4px; }
    .admin-sidebar .logo { display: none; }
    .header-nav span.nav-text { display: none; }
    #ai-chat-panel { width: calc(100vw - 30px); height: 70vh; left: -6px; }
}
