/* Modern Styles for El Mohtaref Restaurant - مطعم المحترف */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&family=Tajawal:wght@400;500;700;900&display=swap');

:root {
  --primary: #f97316;
  --primary-hover: #ea580c;
  --secondary: #eab308;
  --accent: #ef4444;
  --bg-dark: #090d16;
  --bg-card: #111827;
  --bg-card-hover: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --border-color: #374151;
  --gold-glow: rgba(234, 179, 8, 0.25);
  --fire-glow: rgba(249, 115, 22, 0.35);
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --radius-sm: 0.5rem;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --gold-glow: rgba(234, 179, 8, 0.15);
  --fire-glow: rgba(249, 115, 22, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  direction: rtl;
  font-family: 'Cairo', 'Tajawal', system-ui, sans-serif;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Utilities & Animations */
.fire-gradient {
  background: linear-gradient(135deg, #f97316 0%, #ef4444 50%, #b91c1c 100%);
}

.gold-gradient-text {
  background: linear-gradient(135deg, #fef08a 0%, #facc15 50%, #ca8a04 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.fire-gradient-text {
  background: linear-gradient(135deg, #ffedd5 0%, #fb923c 40%, #ef4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.glass-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .glass-nav {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.card-hover {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px -6px rgba(0, 0, 0, 0.4), 0 0 20px var(--fire-glow);
  border-color: rgba(249, 115, 22, 0.4);
}

/* Pulse badge */
@keyframes pulse-flame {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.04);
    opacity: 0.92;
  }
}

.animate-flame {
  animation: pulse-flame 2s infinite ease-in-out;
}

/* Buttons */
.btn-fire {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
  transition: all 0.25s ease;
  min-height: 44px;
}

.btn-fire:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6);
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 50%, #ef4444 100%);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.35);
  transition: all 0.25s ease;
  min-height: 44px;
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.55);
}

/* Category Filter Scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Overlay & Drawers Architecture */
.overlay-backdrop {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.75);
}

/* Cart Drawer Container - Guaranteed Hidden by default */
#cart-drawer-container {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-start;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cart-drawer-container.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#cart-drawer-container .drawer-content {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
  max-width: 440px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#cart-drawer-container.open .drawer-content {
  transform: translateX(0);
}

/* Mobile Nav Drawer - Guaranteed Hidden by default */
#mobile-nav-container {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-nav-container.open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#mobile-nav-container .drawer-content {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  width: 85%;
  max-width: 340px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#mobile-nav-container.open .drawer-content {
  transform: translateX(0);
}

/* Toast animations */
@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast-enter {
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Touch friendliness */
@media (max-width: 768px) {
  body {
    padding-bottom: 72px; /* space for mobile bottom bar */
  }
}
