/* منيو غزة - الصفحة الرئيسية */
:root[data-theme="dark"] {
    --brand: #f28b05; --brand-2: #ff6a00;
    --brand-light: rgba(242, 139, 5, 0.12); --brand-border: rgba(242, 139, 5, 0.35);
    --bg-page: #090c10; --card: rgba(18, 22, 30, 0.92); --card-solid: #12161e;
    --border: rgba(255, 255, 255, 0.08); --text: #f8fafc; --muted: #94a3b8;
    --field: rgba(255, 255, 255, 0.04); --row: rgba(255, 255, 255, 0.05);
    --good: #22c55e; --bad: #ef4444;
    --glow-a: rgba(242, 139, 5, 0.16); --glow-b: rgba(255, 42, 95, 0.08);
    --map-bg: #141a24; --map-road: rgba(255, 255, 255, 0.07);
}
:root[data-theme="light"] {
    --brand: #f28b05; --brand-2: #ff6a00;
    --brand-light: #fff5e8; --brand-border: rgba(242, 139, 5, 0.30);
    --bg-page: #f6f7f9; --card: rgba(255, 255, 255, 0.97); --card-solid: #ffffff;
    --border: rgba(15, 23, 42, 0.09); --text: #0f172a; --muted: #64748b;
    --field: rgba(15, 23, 42, 0.03); --row: rgba(15, 23, 42, 0.045);
    --good: #16a34a; --bad: #dc2626;
    --glow-a: rgba(242, 139, 5, 0.12); --glow-b: rgba(255, 42, 95, 0.05);
    --map-bg: #eef1f5; --map-road: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'IBM Plex Sans Arabic', -apple-system, sans-serif; -webkit-tap-highlight-color: transparent; }
svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.en { font-family: 'Plus Jakarta Sans', sans-serif; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
body { background: var(--bg-page); color: var(--text); min-height: 100vh; overflow-x: hidden; padding-bottom: 40px; transition: background-color 0.3s ease; }

.bg-blob { position: absolute; border-radius: 50%; filter: blur(60px); pointer-events: none; z-index: 0; }
.bg-blob.a { width: 280px; height: 280px; background: var(--glow-a); top: -80px; right: -70px; }
.bg-blob.b { display: none; }
@keyframes blobMove { to { transform: translate(40px, 60px) scale(1.15); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(0); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ===== الشريط العلوي ===== */
.top-action-bar { position: relative; z-index: 100; max-width: 520px; margin: 0 auto; padding: calc(16px + env(safe-area-inset-top)) 16px 4px; display: flex; align-items: center; justify-content: space-between; }
.btn-theme-toggle { background: var(--card); border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.btn-theme-toggle svg { width: 18px; height: 18px; }
.btn-theme-toggle span { display: flex; animation: themeSpin 0.4s ease; }
@keyframes themeSpin { from { transform: rotate(-90deg) scale(0.5); opacity: 0; } }
:root[data-theme="dark"] .btn-theme-toggle .i-moon, :root[data-theme="light"] .btn-theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .btn-theme-toggle .i-sun { color: #fbbf24; }
.btn-register-pill { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 13px; font-weight: 800; padding: 9px 16px; border-radius: 50px; text-decoration: none; box-shadow: 0 4px 14px rgba(242, 139, 5, 0.32); }
.btn-register-pill svg { width: 15px; height: 15px; stroke-width: 2.6; }
.btn-register-pill:active { transform: scale(0.95); }

.container { position: relative; z-index: 10; max-width: 520px; margin: 0 auto; padding: 12px 16px 20px; }

/* ===== الهيرو ===== */
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-logo { position: relative; width: 70px; height: 70px; animation: fadeUp 0.5s ease both; }
.hero-logo::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, var(--brand), transparent 40%, var(--brand-2), transparent 80%, var(--brand)); }
.hero-logo img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid var(--bg-page); }
.hero-brand { font-size: 12.5px; font-weight: 800; color: var(--muted); animation: fadeUp 0.5s 0.05s ease both; }
.hero-brand .en { color: var(--brand); }
.hero h1 { font-size: 30px; font-weight: 800; line-height: 1.3; animation: fadeUp 0.5s 0.1s ease both; }
.hero h1 .hl { position: relative; display: inline-block; background: linear-gradient(90deg, var(--brand), var(--brand-2), var(--brand)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradMove 4s linear infinite; }
.hero h1 .hl::after { content: ''; position: absolute; right: 0; left: 0; bottom: -1px; height: 4px; border-radius: 4px; background: var(--brand); transform-origin: right; animation: underline 0.8s 0.6s ease both; }
@keyframes gradMove { to { background-position: -200% 0; } }
@keyframes underline { from { transform: scaleX(0); } }
.hero p { font-size: 13.5px; color: var(--muted); line-height: 1.7; max-width: 360px; animation: fadeUp 0.5s 0.16s ease both; }

.search-box { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1.5px solid var(--border); border-radius: 18px; padding: 4px 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease; animation: fadeUp 0.5s 0.22s ease both; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 8px 28px rgba(242,139,5,0.2); transform: translateY(-2px); }
.search-box > svg { width: 19px; height: 19px; color: var(--brand); stroke-width: 2.4; }
.search-box input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-size: 14px; font-weight: 600; padding: 11px 0; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-clear { display: none; width: 28px; height: 28px; border-radius: 50%; border: none; background: var(--row); color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.search-clear svg { width: 14px; height: 14px; }
.search-box.has-text .search-clear { display: flex; }

.hero-stats { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; color: var(--muted); animation: fadeUp 0.5s 0.28s ease both; }
.hero-stats b { color: var(--brand); font-size: 14px; }
.hero-stats .open b { color: var(--good); }
.hero-stats i { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }

/* ===== البحث + زر الخريطة ===== */
.search-row { width: 100%; margin-top: 6px; display: flex; gap: 8px; }
.map-quick { flex-shrink: 0; width: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 18px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; text-decoration: none; font-size: 10.5px; font-weight: 800; box-shadow: 0 6px 18px rgba(242,139,5,0.35); animation: fadeUp 0.5s 0.22s ease both; }
.map-quick svg { width: 20px; height: 20px; }
.map-quick:active { transform: scale(0.94); }

/* ===== شريط الفلاتر (نفس الخريطة) ===== */
.fbar { margin-top: 16px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; }
.fbar-track { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 9px 6px 8px; }
.fbar-track::-webkit-scrollbar { display: none; }
.f-item { flex-shrink: 0; min-width: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 4px; transition: color 0.2s ease; }
.f-item b { font-size: 11px; font-weight: 800; white-space: nowrap; }
.fi { position: relative; width: 40px; height: 40px; border-radius: 13px; display: flex; align-items: center; justify-content: center; background: var(--row); color: var(--text); transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease; }
.fi svg { width: 18px; height: 18px; }
.fi.open svg { color: var(--good); }
.fi em { position: absolute; top: -4px; left: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--card-solid); border: 1px solid var(--border); color: var(--muted); font-size: 9.5px; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.f-item:active .fi { transform: scale(0.9); }
.f-item.active { color: var(--brand); }
.f-item.active .fi { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 5px 14px rgba(242,139,5,0.35); }
.f-item.active .fi svg { color: #fff; }
.f-item.active .fi em { background: #fff; color: var(--brand); border-color: transparent; }
.f-item.fav.active { color: #ef4444; }
.f-item.fav.active .fi { background: linear-gradient(135deg, #ef4444, #f43f5e); box-shadow: 0 5px 14px rgba(239,68,68,0.35); }
.f-item.fav.active .fi svg { fill: currentColor; }
.fbar-sep { flex-shrink: 0; width: 1px; height: 36px; background: var(--border); margin: 0 4px; }

/* ===== النتائج ===== */
.results-head { display: flex; align-items: center; gap: 8px; margin: 20px 2px 10px; }
.results-head h2 { font-size: 15.5px; font-weight: 800; }
.results-count b { display: inline-block; min-width: 24px; text-align: center; font-size: 11.5px; color: var(--brand); background: var(--brand-light); padding: 2px 7px; border-radius: 9px; }
.view-toggle { margin-right: auto; display: flex; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 3px; }
.vt-btn { width: 34px; height: 30px; border: none; border-radius: 9px; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.vt-btn svg { width: 17px; height: 17px; }
.vt-btn.active { background: var(--brand); color: #fff; }

/* ===== كرت المشروع (قائمة) ===== */
.stores { display: grid; grid-template-columns: 1fr; gap: 8px; }
.store-card { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; padding: 8px; animation: cardIn 0.35s ease both; animation-delay: calc(var(--i) * 0.03s); content-visibility: auto; contain-intrinsic-size: 74px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } }
.store-card:active { transform: scale(0.99); }
.sc-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.sc-logo { width: 50px; height: 50px; flex-shrink: 0; border-radius: 13px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 19px; font-weight: 800; }
.sc-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.sc-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sc-name { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sc-state { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; flex-shrink: 0; }
.sc-state i { width: 6px; height: 6px; border-radius: 50%; }
.sc-state.open { color: var(--good); }
.sc-state.open i { background: var(--good); box-shadow: 0 0 6px var(--good); }
.sc-state.closed { color: var(--bad); }
.sc-state.closed i { background: var(--bad); }
.sc-cat { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sc-cat svg { width: 11px; height: 11px; color: var(--brand); }
.sc-loc { display: flex; align-items: center; gap: 3px; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-loc svg { width: 11px; height: 11px; }
.sc-side { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.fav-btn, .map-btn { height: 36px; min-width: 36px; padding: 0 8px; border-radius: 11px; border: 1px solid var(--border); background: var(--field); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 800; cursor: pointer; text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease; }
.fav-btn svg, .map-btn svg { width: 16px; height: 16px; }
.map-btn { color: var(--brand); }
.fav-btn:active, .map-btn:active { transform: scale(0.9); }
.fav-btn.is-fav { color: #ef4444; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.1); }
.fav-btn.is-fav svg { fill: currentColor; animation: popIn 0.35s ease; }

/* ===== عرض الشبكة ===== */
.stores.view-grid { grid-template-columns: 1fr 1fr; }
.view-grid .store-card { flex-direction: column; align-items: stretch; padding: 12px 10px 10px; contain-intrinsic-size: 170px; }
.view-grid .sc-link { flex-direction: column; text-align: center; gap: 8px; }
.view-grid .sc-logo { width: 62px; height: 62px; border-radius: 18px; font-size: 24px; }
.view-grid .sc-info { align-items: center; width: 100%; }
.view-grid .sc-name { font-size: 13.5px; max-width: 100%; }
.view-grid .sc-meta { justify-content: center; flex-wrap: wrap; row-gap: 2px; }
.view-grid .sc-loc { justify-content: center; max-width: 100%; }
.view-grid .sc-side { position: absolute; top: 8px; left: 8px; right: 8px; justify-content: space-between; pointer-events: none; }
.view-grid .sc-side > * { pointer-events: auto; height: 30px; min-width: 30px; padding: 0 6px; border-radius: 9px; }
.view-grid .fav-btn span { display: none; }
.view-grid .sc-dishes { display: none !important; }

.sc-dishes { display: none; width: 100%; gap: 7px; overflow-x: auto; scrollbar-width: none; padding: 8px 2px 2px; border-top: 1px dashed var(--border); }
.sc-dishes::-webkit-scrollbar { display: none; }
.store-card.show-dishes .sc-dishes { display: flex; }
.dish { flex-shrink: 0; display: none; align-items: center; gap: 7px; background: var(--brand-light); border: 1px solid var(--brand-border); border-radius: 12px; padding: 5px 10px 5px 6px; text-decoration: none; color: var(--text); }
.dish.match { display: inline-flex; animation: fadeUp 0.3s ease; }
.dish img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.dish-name { font-size: 12px; font-weight: 700; }
.dish-price { font-size: 12px; font-weight: 800; color: var(--brand); }
.hl-text { color: var(--brand); background: rgba(242,139,5,0.18); border-radius: 4px; padding: 0 2px; }

.empty { margin-top: 10px; text-align: center; background: var(--card); border: 1.5px dashed var(--border); border-radius: 20px; padding: 28px 20px; animation: fadeUp 0.4s ease; }
.empty-ico { width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand); }
.empty-ico svg { width: 24px; height: 24px; }
#emptyFav .empty-ico { background: rgba(239,68,68,0.1); color: #ef4444; }
.empty b { display: block; font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 12px; color: var(--muted); line-height: 1.6; }

.btn-main { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; text-decoration: none; font-size: 14px; font-weight: 800; padding: 13px; border-radius: 14px; box-shadow: 0 6px 20px rgba(242,139,5,0.35); }
.btn-main::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); transform: skewX(-20deg); animation: shine 3.4s ease-in-out infinite; }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }

.site-footer { margin-top: 24px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; color: var(--muted); }
.site-footer img { width: 20px; height: 20px; border-radius: 50%; background: #fff; }

/* ===== Toast + لودر الخريطة ===== */
.toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; z-index: 6000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--card-solid); color: var(--text); border: 1px solid var(--border); font-size: 12.5px; font-weight: 700; padding: 10px 18px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.map-loader { position: fixed; inset: 0; z-index: 9999; background: var(--bg-page); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.map-loader.active { opacity: 1; pointer-events: all; }
.ml-logo { position: relative; width: 80px; height: 80px; margin-bottom: 6px; }
.ml-logo::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--brand); border-right-color: var(--brand); animation: spin 0.9s linear infinite; }
.ml-logo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.map-loader b { font-size: 16px; font-weight: 800; }
.map-loader span { font-size: 12px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ================= أحجام متوازنة للجوال ================= */
.top-action-bar { padding-top: calc(12px + env(safe-area-inset-top)); }
.btn-theme-toggle { width: 40px; height: 40px; border-radius: 12px; }
.btn-theme-toggle svg { width: 18px; height: 18px; }
.btn-register-pill { font-size: 13px; padding: 9px 15px; }
.container { padding: 10px 16px 18px; }

.hero { gap: 9px; }
.hero-logo { width: 60px; height: 60px; }
.hero-brand { font-size: 12px; }
.hero h1 { font-size: 27px; line-height: 1.35; }
.hero p { font-size: 13.5px; line-height: 1.65; max-width: 340px; }

.search-row { margin-top: 6px; gap: 8px; }
.search-box { border-radius: 16px; padding: 0 13px; gap: 9px; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.search-box > svg { width: 19px; height: 19px; }
.search-box input { font-size: 14.5px; padding: 13px 0; }
.map-quick { width: 60px; border-radius: 16px; font-size: 11px; }
.map-quick svg { width: 21px; height: 21px; }
.hero-stats { font-size: 12.5px; gap: 9px; }
.hero-stats b { font-size: 14px; }

.fbar { margin-top: 16px; border-radius: 18px; }
.fbar-track { padding: 10px 6px 9px; gap: 2px; }
.f-item { min-width: 62px; gap: 6px; padding: 2px 3px; }
.f-item b { font-size: 12px; }
.fi { width: 42px; height: 42px; border-radius: 14px; }
.fi svg { width: 19px; height: 19px; }
.fi em { min-width: 18px; height: 18px; font-size: 10px; }
.fbar-sep { height: 38px; margin: 0 4px; }

.results-head { margin: 20px 2px 10px; }
.results-head h2 { font-size: 16.5px; }
.results-count b { font-size: 12.5px; padding: 2px 8px; }
.vt-btn { width: 36px; height: 32px; }
.vt-btn svg { width: 18px; height: 18px; }

/* القائمة */
.stores { gap: 9px; }
.store-card { padding: 10px; border-radius: 18px; gap: 8px; contain-intrinsic-size: 80px; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.sc-link { gap: 12px; }
.sc-logo { width: 56px; height: 56px; border-radius: 15px; font-size: 22px; box-shadow: 0 3px 10px rgba(0,0,0,0.08); }
.sc-info { gap: 4px; }
.sc-name { font-size: 15.5px; }
.sc-meta { gap: 8px; }
.sc-state { font-size: 12px; }
.sc-state i { width: 7px; height: 7px; }
.sc-cat { font-size: 12px; }
.sc-cat svg { width: 13px; height: 13px; }
.sc-loc { font-size: 11.5px; }
.sc-loc svg { width: 13px; height: 13px; }
.sc-side { flex-direction: column; gap: 6px; }
.fav-btn, .map-btn { height: 34px; min-width: 42px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; }
.fav-btn svg, .map-btn svg { width: 17px; height: 17px; }

/* الشبكة: عمودين ما بيطلعوا من الشاشة */
.stores.view-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.view-grid .store-card { min-width: 0; padding: 12px 10px 11px; contain-intrinsic-size: 170px; }
.view-grid .sc-link { width: 100%; min-width: 0; gap: 8px; }
.view-grid .sc-logo { width: 64px; height: 64px; border-radius: 18px; font-size: 25px; }
.view-grid .sc-info { min-width: 0; }
.view-grid .sc-name { font-size: 14.5px; width: 100%; }
.view-grid .sc-meta { width: 100%; overflow: hidden; flex-wrap: nowrap; justify-content: center; gap: 6px; }
.view-grid .sc-state, .view-grid .sc-cat { font-size: 11px; }
.view-grid .sc-cat { flex-shrink: 1; }
.view-grid .sc-loc { width: 100%; justify-content: center; font-size: 10.5px; }
.view-grid .sc-side { flex-direction: row; top: 8px; left: 8px; right: 8px; }
.view-grid .sc-side > * { height: 30px; min-width: 30px; padding: 0 6px; border-radius: 9px; }
.view-grid .sc-side svg { width: 15px; height: 15px; }

/* شاشات صغيرة جداً */
@media (max-width: 360px) {
    .hero h1 { font-size: 24px; }
    .f-item { min-width: 56px; }
    .sc-logo { width: 50px; height: 50px; }
    .view-grid .sc-loc { display: none; }
}

/* ================= الهيرو (بسيط بشكل صفحة الدخول) ================= */
.hero { position: relative; padding: 6px 0 2px; gap: 10px; }
.hero-logo { width: 66px; height: 66px; }
.hero-logo::before { inset: -4px; animation: spin 8s linear infinite; }
.hero-brand { font-size: 12.5px; }

.welcome { display: inline-flex; align-items: center; gap: 7px; background: var(--card-solid); border: 1px solid var(--border); padding: 6px 14px 6px 10px; border-radius: 30px; font-size: 13px; font-weight: 800; color: var(--text); animation: welcomeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both; }
.welcome .wave { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand); }
.welcome .wave svg { width: 14px; height: 14px; animation: spin 6s linear infinite; }
.welcome.night .wave svg { animation: moonSway 3s ease-in-out infinite; }
@keyframes welcomeIn { from { opacity: 0; transform: translateY(-10px) scale(0.85); } }
@keyframes moonSway { 50% { transform: rotate(-15deg); } }

.hero h1 { font-size: 30px; line-height: 1.3; animation: fadeUp 0.5s 0.3s ease both; }

.ask { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 9px; animation: fadeUp 0.5s 0.45s ease both; }
.ask-q { min-height: 1.6em; font-size: 15px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 2px; }
.caret { display: inline-block; width: 2px; height: 1.1em; background: var(--brand); border-radius: 2px; animation: caretBlink 0.9s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
.ask-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.ask-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--card-solid); border: 1.5px solid var(--border); color: var(--text); font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 30px; cursor: pointer; opacity: 0; animation: chipIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(1.6s + var(--i) * 0.08s); transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease; }
.ask-chip svg { width: 15px; height: 15px; color: var(--brand); }
.ask-chip:hover, .ask-chip:active, .ask-chip.on { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
@keyframes chipIn { from { opacity: 0; transform: translateY(10px) scale(0.85); } to { opacity: 1; transform: none; } }

.search-trigger { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; text-align: right; font-family: inherit; background: var(--card-solid); border: 1.5px solid var(--border); border-radius: 16px; padding: 13px; color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: text; box-shadow: 0 6px 18px rgba(0,0,0,0.08); transition: border-color 0.2s ease, transform 0.2s ease; -webkit-appearance: none; appearance: none; }
.search-trigger svg { width: 19px; height: 19px; color: var(--brand); stroke-width: 2.4; }
.search-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-trigger:hover, .search-trigger:active { border-color: var(--brand); }
.search-row { animation: fadeUp 0.5s 0.55s ease both; }
.map-quick { position: relative; overflow: hidden; }
.map-quick::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%); transform: translateX(-120%); animation: mapShine 4s ease-in-out 2s infinite; }
@keyframes mapShine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.hero-stats { gap: 8px; animation: fadeUp 0.5s 0.65s ease both; }
.hero-stats i { display: none; }
.stat { display: inline-flex; align-items: center; gap: 5px; background: var(--card-solid); border: 1px solid var(--border); padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; color: var(--muted); }
.stat b { font-size: 14px; color: var(--brand); }
.stat.open b { color: var(--good); }
.stat.open i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: livePulse 2s ease-in-out infinite; }
.fbar { animation: fadeUp 0.5s 0.75s ease both; }
.f-item.active .fi { animation: fiPop 0.35s ease; }
@keyframes fiPop { 50% { transform: scale(1.12); } }

/* ================= شاشة البحث ================= */
.search-overlay { position: fixed; inset: 0; z-index: 5000; }
.so-backdrop { position: absolute; inset: 0; background: rgba(5, 7, 10, 0.6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.3s ease; }
.so-panel { position: absolute; top: 0; left: 0; right: 0; max-width: 560px; margin: 0 auto; max-height: 100%; display: flex; flex-direction: column; background: var(--bg-page); border-radius: 0 0 24px 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.35); padding-top: env(safe-area-inset-top); transform: translateY(-30px); opacity: 0; transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease; }
.search-overlay.open .so-backdrop { opacity: 1; }
.search-overlay.open .so-panel { transform: none; opacity: 1; }
.so-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.so-input { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--card-solid); border: 1.5px solid var(--brand); border-radius: 15px; padding: 0 12px; box-shadow: 0 0 0 4px var(--brand-light); }
.so-input > svg { width: 18px; height: 18px; color: var(--brand); stroke-width: 2.4; }
.so-input input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-size: 16px; font-weight: 600; padding: 12px 0; }
.so-input input::-webkit-search-cancel-button { display: none; }
.so-clear { display: none; width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--row); color: var(--muted); cursor: pointer; align-items: center; justify-content: center; }
.so-clear svg { width: 13px; height: 13px; }
.so-input.has-text .so-clear { display: flex; }
.so-cancel { background: none; border: none; color: var(--brand); font-size: 13.5px; font-weight: 800; cursor: pointer; padding: 6px 2px; }
.so-body { overflow-y: auto; padding: 4px 14px 18px; overscroll-behavior: contain; }
.so-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--muted); margin: 10px 2px 8px; }
.so-title b { color: var(--brand); background: var(--brand-light); padding: 1px 8px; border-radius: 8px; font-size: 11px; }
.so-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.so-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--card-solid); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 20px; cursor: pointer; animation: soIn 0.3s ease both; animation-delay: calc(var(--i, 0) * 0.03s); }
.so-chip svg { width: 14px; height: 14px; color: var(--brand); }
.so-list { display: flex; flex-direction: column; gap: 6px; }
.so-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; background: var(--card-solid); border: 1px solid var(--border); text-decoration: none; color: var(--text); animation: soIn 0.3s ease both; animation-delay: calc(var(--i, 0) * 0.035s); }
.so-row:active { transform: scale(0.98); }
@keyframes soIn { from { opacity: 0; transform: translateY(8px); } }
.so-logo { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 17px; font-weight: 800; }
.so-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.so-logo.dish-ico { background: var(--brand-light); color: var(--brand); }
.so-logo svg { width: 20px; height: 20px; }
.so-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.so-info b { font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-info small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.so-info small i { width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex-shrink: 0; }
.so-info small i.off { background: var(--bad); }
.so-price { flex-shrink: 0; font-size: 13px; font-weight: 800; color: var(--brand); }
.so-go { flex-shrink: 0; color: var(--muted); }
.so-go svg { width: 16px; height: 16px; }
.so-empty { text-align: center; padding: 30px 10px; color: var(--muted); font-size: 13px; animation: soIn 0.3s ease; }
.so-empty svg { width: 34px; height: 34px; color: var(--brand); display: block; margin: 0 auto 8px; }
body.so-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .map-quick::after, .hero-logo::before, .welcome .wave svg { animation: none !important; } }

/* ================= اللابتوب والتابلت ================= */
@media (min-width: 760px) {
    .top-action-bar, .container { max-width: 980px; }
    .container { padding: 14px 28px 30px; }
    .hero { max-width: 640px; margin: 0 auto; gap: 12px; }
    .hero h1 { font-size: 40px; }
    .ask-q { font-size: 17px; }
    .fbar { max-width: 760px; margin-left: auto; margin-right: auto; }
    .fbar-track { justify-content: center; }
    .stores { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stores.view-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .store-card:hover { border-color: var(--brand-border); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,0.12); }
    .store-card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
    .so-panel { top: 60px; border-radius: 24px; max-height: calc(100% - 120px); }
}
@media (min-width: 1100px) {
    .stores.view-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* الآيفون: الحواف والنوتش */
@supports (padding: max(0px)) {
    .container { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

/* ================= الخلفية المتحركة (نفس صفحة الدخول) ================= */
.bg-blob { position: fixed !important; display: block !important; border-radius: 50%; filter: blur(70px); pointer-events: none; z-index: 0; will-change: transform; }
.bg-blob.a { width: 300px; height: 300px; background: var(--glow-a); top: -90px; right: -80px; animation: blobMove 14s ease-in-out infinite alternate !important; }
.bg-blob.b { width: 260px; height: 260px; background: var(--glow-b); top: 480px; left: -110px; animation: blobMove 18s ease-in-out infinite alternate-reverse !important; }
@keyframes blobMove { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(40px, 60px) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .bg-blob { animation: none !important; } }
.top-action-bar { gap: 8px; }
.sfx-btn .i-off { display: none; }
.sfx-btn.off { color: var(--muted); }
.sfx-btn.off .i-on { display: none; }
.sfx-btn.off .i-off { display: flex; }
.sfx-btn .i-on { color: var(--brand); }
.ask-q { transition: opacity 0.2s ease; }
@media (prefers-reduced-motion: reduce) { .bg-anim { display: none; } }
