/* ============================================
   ط³ظˆط¨ط± ظپظˆط¯ - ط§ظ„طھطµظ…ظٹظ… ط§ظ„ط¬ط¯ظٹط¯ v2.0
   Mobile-First | Flutter-like | ط§ط­طھط±ط§ظپظٹ
   ============================================ */

/* ===== FONT ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Core */
  --primary: #B84A32;
  --primary-light: #D06A52;
  --primary-dark: #8F3624;
  --primary-bg: rgba(184, 74, 50, 0.08);
  
  /* Surfaces */
  --bg-primary: #F7F3EE;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-input: #F2F4F8;
  --bg-hover: #F0F2F5;
  
  /* Text */
  --text-primary: #0F1828;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;
  
  /* Borders */
  --border-light: #EDF0F4;
  --border-medium: #DEE2E8;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  
  /* Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Layout */
  --app-max-width: 1200px;
  --bottom-nav-height: 64px;
  --top-nav-height: 56px;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --primary: #FF7A4A;
  --primary-light: #FF9B6F;
  --primary-dark: #E05A2B;
  --primary-bg: rgba(255, 122, 74, 0.12);
  
  --bg-primary: #0A0E17;
  --bg-secondary: #111827;
  --bg-card: #1A1F2E;
  --bg-input: #1E2538;
  --bg-hover: #252D3F;
  
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0F1828;
  
  --border-light: #1E293B;
  --border-medium: #334155;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.6);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background var(--transition-normal), color var(--transition-normal);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ===== APP LAYOUT ===== */
.app-wrapper {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  position: relative;
}

/* ============================================
   NAV LINKS (Desktop)
   ============================================ */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.nav-link i {
  font-size: 15px;
}

/* Hide nav-links on mobile */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.top-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: var(--top-nav-height);
  gap: var(--space-sm);
}

/* Logo Area */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.nav-title {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #FFB347);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-title span {
  color: var(--primary);
  background: none;
}

/* Search */
.nav-search {
  flex: 1;
  max-width: 480px;
  margin: 0 var(--space-md);
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper .search-icon {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.nav-search input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border: none;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition-fast);
  font-family: inherit;
}

.nav-search input::placeholder {
  color: var(--text-muted);
}

.nav-search input:focus {
  background: var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--primary);
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  text-decoration: none;
}

.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-btn .badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

/* Mobile hamburger */
.hamburger-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============================================
   BOTTOM NAVIGATION (Mobile)
   ============================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 4px 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  max-width: var(--app-max-width);
  margin: 0 auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  position: relative;
  min-width: 56px;
  font-family: inherit;
}

.nav-item i {
  font-size: 22px;
  transition: var(--transition-fast);
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active i {
  transform: scale(1.1);
}

.nav-item .nav-badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(6px);
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

/* ============================================
   SIDEBAR (Desktop)
   ============================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  animation: fadeIn 0.2s ease;
}

.sidebar-overlay.open {
  display: block;
}

.sidebar-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg-secondary);
  z-index: 201;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}

.sidebar-menu.open {
  right: 0;
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-hover);
  border-radius: var(--radius-full);
  font-size: 18px;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary);
}

.sidebar-user-info h4 {
  font-size: 15px;
  font-weight: 700;
}

.sidebar-user-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.sidebar-nav a:hover {
  background: var(--bg-hover);
}

.sidebar-nav a i {
  width: 22px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
}

.sidebar-nav a.active {
  background: var(--primary-bg);
  color: var(--primary);
}

.sidebar-nav a.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-light);
}

.sidebar-footer button {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-medium);
  background: transparent;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
}

.sidebar-footer button:hover {
  background: var(--bg-hover);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-md));
  min-height: 100vh;
}

.main-content.no-bottom-nav {
  padding-bottom: var(--space-lg);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
  padding: var(--space-lg) var(--space-md) 0;
  max-width: var(--app-max-width);
  margin: 0 auto;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* ============================================
   CONTENT CONTAINER
   ============================================ */
.page-content {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash-messages {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  animation: slideDown 0.3s ease;
}

.flash-message.success {
  background: #E8F5E9;
  color: #1B5E20;
}

.flash-message.error {
  background: #FBE9E7;
  color: #BF360C;
}

[data-theme="dark"] .flash-message.success {
  background: rgba(27, 94, 32, 0.2);
  color: #81C784;
}

[data-theme="dark"] .flash-message.error {
  background: rgba(191, 54, 12, 0.2);
  color: #EF9A9A;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
  margin: var(--space-md);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  overflow: hidden;
  position: relative;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.hero-text h1 {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.3;
}

.hero-text p {
  opacity: 0.9;
  font-size: 14px;
  margin-top: 4px;
}

.hero-icon {
  font-size: 56px;
  opacity: 0.3;
  flex-shrink: 0;
}

/* ============================================
   CATEGORY TABS
   ============================================ */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 0 var(--space-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: var(--space-lg);
}

.category-tabs::-webkit-scrollbar { display: none; }

.category-tab {
  flex-shrink: 0;
  padding: 8px 20px;
  border: none;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.category-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.category-tab.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  gap: var(--space-sm);
}

.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-header h2 i {
  color: var(--primary);
}

.section-header .see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.section-header .see-all:hover {
  background: var(--primary);
  color: white;
}

.section-header .count-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

/* ============================================
   RESTAURANT CARDS
   ============================================ */
.restaurants-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.restaurant-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition-normal);
  animation: fadeInUp 0.4s ease forwards;
}

.restaurant-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.restaurant-card .card-img {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
  position: relative;
}

.restaurant-card .featured-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.restaurant-card .card-body {
  padding: 12px 14px 14px;
}

.restaurant-card .card-body h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.restaurant-card .card-body p {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.restaurant-card .card-body p i {
  color: var(--primary);
}

.restaurant-card .card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.restaurant-card .card-meta i {
  font-size: 10px;
}

.restaurant-card .card-meta .fa-star {
  color: #FFD700;
}

/* ============================================
   FEATURED SCROLL
   ============================================ */
.featured-scroll {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.featured-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: var(--transition-normal);
  animation: fadeInUp 0.4s ease forwards;
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.featured-card .card-img {
  height: 120px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-input);
  position: relative;
}

.featured-card .featured-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--primary);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.featured-card .card-body {
  padding: 10px 12px 12px;
}

.featured-card .card-body h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.featured-card .card-body p {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state .empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 14px;
}

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
  text-align: center;
  padding: var(--space-lg);
  padding-bottom: calc(var(--bottom-nav-height) + var(--space-lg));
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-2xl);
}

.app-footer .footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-sm);
}

.app-footer .footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition-fast);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
}

.app-footer .footer-links a:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.app-footer .footer-sep {
  color: var(--border-medium);
  font-size: 10px;
}

.app-footer p {
  opacity: 0.7;
}

/* ============================================
   LEGAL PAGES (ط´ط±ظˆط· ط§ظ„ط§ط³طھط®ط¯ط§ظ… - ط³ظٹط§ط³ط© ط§ظ„ط®طµظˆطµظٹط©)
   ============================================ */
.legal-page {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.legal-page .legal-header {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
}

.legal-page .legal-header h1 {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.legal-page .legal-header .legal-date {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.legal-page .legal-section {
  margin-bottom: var(--space-xl);
}

.legal-page .legal-section h2 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
}

.legal-page .legal-section h2 .section-icon {
  font-size: 22px;
}

.legal-page .legal-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  margin-top: var(--space-lg);
  color: var(--text-primary);
}

.legal-page .legal-section p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.legal-page .legal-section ul {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0;
}

.legal-page .legal-section ul li {
  position: relative;
  padding-right: 24px;
  margin-bottom: var(--space-sm);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.legal-page .legal-section ul li::before {
  content: 'â€¢';
  position: absolute;
  right: 8px;
  color: var(--primary);
  font-weight: bold;
}

.legal-page .legal-section .highlight-box {
  background: var(--primary-bg);
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin: var(--space-md) 0;
}

.legal-page .legal-section .highlight-box p {
  color: var(--text-primary);
  margin: 0;
  font-weight: 600;
}

@media (max-width: 768px) {
  .legal-page .legal-header h1 {
    font-size: 22px;
  }

  .legal-page .legal-section h2 {
    font-size: 17px;
  }

  .legal-page {
    padding: var(--space-md) var(--space-sm);
  }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  animation: toastIn 0.3s ease;
  max-width: 380px;
  white-space: nowrap;
  border: 1px solid var(--border-light);
}

.toast i {
  font-size: 18px;
}

.toast.success i { color: #22C55E; }
.toast.error i { color: #EF4444; }
.toast.info i { color: var(--primary); }

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
}

/* Stagger animations for cards */
.restaurant-card:nth-child(2) { animation-delay: 0.05s; }
.restaurant-card:nth-child(3) { animation-delay: 0.1s; }
.restaurant-card:nth-child(4) { animation-delay: 0.15s; }
.restaurant-card:nth-child(5) { animation-delay: 0.2s; }
.restaurant-card:nth-child(6) { animation-delay: 0.25s; }

.featured-card:nth-child(2) { animation-delay: 0.05s; }
.featured-card:nth-child(3) { animation-delay: 0.1s; }
.featured-card:nth-child(4) { animation-delay: 0.15s; }

/* ============================================
   RESPONSIVE - Desktop First
   ============================================ */

/* Desktop >= 1024px */
@media (min-width: 1024px) {
  .restaurants-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .featured-scroll {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .restaurant-card .card-img {
    height: 160px;
  }

  .featured-card .card-img {
    height: 140px;
  }

  .hero-section {
    padding: 48px;
    margin: var(--space-lg);
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .page-content {
    padding: 0 var(--space-lg);
  }

  .main-content {
    padding-bottom: var(--space-lg);
  }
}

/* Tablet 769px - 1023px */
@media (min-width: 769px) and (max-width: 1023px) {
  .restaurants-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .featured-scroll {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  .main-content {
    padding-bottom: var(--space-lg);
  }
}

/* Mobile < 769px */
@media (max-width: 768px) {
  .restaurants-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .featured-scroll {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  /* Hide desktop elements */
  .nav-search {
    display: none;
  }

  /* ط£ظٹظ‚ظˆظ†ط© ط§ظ„ط¨ط­ط« ظ„ظ„ظ‡ط§طھظپ طھط¸ظ‡ط± ظپظ‚ط· ظپظٹ ط§ظ„ظ…ظˆط¨ط§ظٹظ„ */
  .mobile-search-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
  }
  .mobile-search-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
  }

  /* ظ…ط±ط¨ط¹ ط§ظ„ط¨ط­ط« ط¹ظ†ط¯ ط§ظ„ط¶ط؛ط· ط¹ظ„ظ‰ ط§ظ„ط£ظٹظ‚ظˆظ†ط© */
  .nav-search.mobile-visible {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-search.mobile-visible .search-input-wrapper {
    width: 100%;
    max-width: 100%;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Show bottom nav */
  .bottom-nav {
    display: block;
  }

  .main-content {
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-sm));
  }

  /* Adjust nav for mobile */
  .top-nav-inner {
    height: 52px;
  }

  .nav-title {
    font-size: 18px;
  }

  .nav-logo {
    width: 32px;
    height: 32px;
  }

  .hero-section {
    margin: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
  }

  .hero-text h1 {
    font-size: 22px;
  }

  .hero-icon {
    font-size: 42px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .restaurant-card .card-img {
    height: 120px;
  }

  .featured-card .card-img {
    height: 110px;
  }
}

/* Small phones < 400px */
@media (max-width: 400px) {
  .restaurants-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .featured-scroll {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .restaurant-card .card-img {
    height: 90px;
  }

  .featured-card .card-img {
    height: 85px;
  }

  .restaurant-card .card-body {
    padding: 8px 10px 10px;
  }

  .restaurant-card .card-body h4 {
    font-size: 13px;
  }

  .restaurant-card .card-body p {
    font-size: 11px;
  }

  .restaurant-card .card-meta {
    flex-wrap: wrap;
    gap: 4px;
    font-size: 10px;
    margin-top: 6px;
  }

  .featured-card .card-body {
    padding: 8px 10px 10px;
  }

  .featured-card .card-body h4 {
    font-size: 13px;
  }

  .featured-card .card-body p {
    font-size: 11px;
  }

  .hero-text h1 {
    font-size: 18px;
  }

  .page-content {
    padding: 0 var(--space-sm);
  }
}

/* ===== UTILITY CLASSES ===== */
.d-none { display: none; }
.text-center { text-align: center; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }

/* ============================================
   LAZY LOADING & SKELETON
   ============================================ */
.lazy-bg {
  background-image: none;
  background-color: var(--bg-input);
  position: relative;
  overflow: hidden;
}

.lazy-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .lazy-bg::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%
  );
}

.lazy-bg.loaded {
  background-image: var(--bg-url) !important;
  background-size: cover;
  background-position: center;
}

.lazy-bg.loaded::before {
  display: none;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Skeleton text */
.skeleton-text {
  display: inline-block;
  height: 14px;
  border-radius: 8px;
  background: var(--bg-input);
  position: relative;
  overflow: hidden;
}

.skeleton-text::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .skeleton-text::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.05) 50%,
    transparent 100%
  );
}

/* الصور تبقى فارغة إلى أن يصلها التمرير */
img[data-src] {
  background: #F3EDE7;
}
img.is-loaded {
  background: transparent;
}

/* ============================================
   KEEP COMPATIBILITY (old classes mapped)
   ============================================ */
.container {
  max-width: var(--app-max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

footer {
  text-align: center;
  padding: var(--space-lg);
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-2xl);
}

/* ============================================
   ًں“± PWA - INSTALL PROMPT (طھط«ط¨ظٹطھ ط§ظ„طھط·ط¨ظٹظ‚)
   ============================================ */
.pwa-install-prompt {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--space-sm));
  left: var(--space-md);
  right: var(--space-md);
  z-index: 9998;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: 420px;
  margin: 0 auto;
}

.pwa-install-prompt.show {
  opacity: 1;
  transform: translateY(0);
}

.pwa-install-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.pwa-install-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.pwa-install-text {
  flex: 1;
  min-width: 140px;
}

.pwa-install-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.pwa-install-text span {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 2px;
}

.pwa-install-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pwa-install-btn {
  padding: 8px 18px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pwa-install-btn:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}

.pwa-install-btn i {
  font-size: 14px;
}

.pwa-install-dismiss {
  padding: 8px 14px;
  border: none;
  background: var(--bg-input);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.pwa-install-dismiss:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.pwa-install-forever {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
  padding: 4px 6px;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.pwa-install-forever:hover {
  color: var(--danger, #EF4444);
}

@media (max-width: 768px) {
  .pwa-install-content {
    flex-direction: column;
    text-align: center;
  }
  
  .pwa-install-actions {
    width: 100%;
    justify-content: center;
  }
}

@media (min-width: 769px) {
  .pwa-install-prompt {
    bottom: var(--space-lg);
    left: var(--space-lg);
    right: auto;
  }
}

.ui-ico {
  display: inline-block;
  width: 1.15em;
  font-size: 1em;
  line-height: 1;
  text-align: center;
  vertical-align: -0.125em;
  flex-shrink: 0;
}
.ui-ico-live { color: #2f7d4a; font-size: 0.72em; }
.ui-ico-off { color: #B33A2B; font-size: 0.72em; }
button .ui-ico,
a .ui-ico,
.quick-link .ui-ico,
.sidebar-link .ui-ico {
  vertical-align: -0.15em;
}

