@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Cairo:wght@300;400;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg-primary:   #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-card:      #ffffff;
  --bg-card-hover:#f8f9fa;
  --gold:         #D4AF37;
  --gold-light:   #f0d060;
  --gold-dark:    #a8882a;
  --text:         #2c3e50;
  --text-muted:   #6c757d;
  --border:       #e9ecef;
  --shadow:       rgba(0,0,0,0.1);
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-arabic:  'Cairo', 'Segoe UI', sans-serif;
  --radius:       12px;
  --transition:   0.3s ease;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-arabic);
  direction: rtl;
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── HERO ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: #EDE0D4;
  padding: 60px 20px 50px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-ornament {
  font-size: 28px;
  letter-spacing: 8px;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 12px;
  display: block;
}
.hero-logo-container {
  margin: 20px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-logo-img {
  max-width: 220px;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 4px 20px rgba(212,175,55,0.3));
  transition: transform var(--transition), filter var(--transition);
}
.hero-logo-img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 30px rgba(212,175,55,0.5));
}

/* LANGUAGE SWITCHER */
.lang-switcher {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 30px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 100;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  color: var(--text);
}
.lang-switcher:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow);
}
.lang-icon {
  font-size: 1.1rem;
}
.lang-text {
  font-weight: 600;
}

/* PRODUCT MODAL */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  animation: modalFadeIn 0.3s ease;
}
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}
.modal-content {
  position: relative;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 600px;
  max-height: 80vh;
  margin: 50px auto;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--bg-secondary);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}
.modal-close:hover {
  background: var(--gold);
  color: white;
  transform: rotate(90deg);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
}
.modal-image-container {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
}
.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-info {
  text-align: center;
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 15px;
  font-weight: 700;
}
.modal-description {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 20px;
  min-height: 60px;
}
.modal-price-container {
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-price {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #1a365d;
  font-weight: 700;
  background: var(--bg-secondary);
  padding: 10px 20px;
  border-radius: 30px;
  border: 2px solid #1a365d;
}

/* Modal Animations */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modalSlideIn {
  from { 
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to { 
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive Modal */
@media (max-width: 640px) {
  .modal-content {
    margin: 20px;
    max-height: 90vh;
  }
  .modal-body {
    padding: 20px;
    gap: 15px;
  }
  .modal-title {
    font-size: 1.5rem;
  }
  .modal-description {
    font-size: 0.9rem;
  }
}
.hero-logo {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: #1a252f;
  text-shadow: 0 0 40px rgba(212,175,55,0.4);
  letter-spacing: 3px;
  line-height: 1.1;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: #2c3e50;
  opacity: 0.9;
  margin-top: 6px;
  font-weight: 300;
  letter-spacing: 2px;
}
.hero-tagline {
  margin-top: 14px;
  font-size: 0.9rem;
  color: #495057;
  letter-spacing: 1px;
}
.hero-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 20px auto 0;
}

/* ── STICKY NAV ─────────────────────────────────────────────────────────────── */
.categories-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  transition: box-shadow var(--transition);
}
.categories-bar.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.categories-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.cat-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 30px;
  font-family: var(--font-arabic);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.cat-btn:hover {
  border-color: #1a365d;
  color: #1a365d;
}
.cat-btn.active {
  background: #1a365d;
  border-color: #1a365d;
  color: #fff;
}
.cat-btn .cat-icon { font-size: 1rem; }

/* ── SEARCH ─────────────────────────────────────────────────────────────────── */
.search-bar {
  max-width: 500px;
  margin: 24px auto 0;
  padding: 0 16px;
}
.search-wrapper {
  position: relative;
}
.search-wrapper input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 48px 12px 18px;
  border-radius: 30px;
  font-family: var(--font-arabic);
  font-size: 0.9rem;
  direction: rtl;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.search-wrapper input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}
.search-wrapper input::placeholder { color: var(--text-muted); }
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

/* ── SECTION HEADER ─────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 32px 20px 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--gold);
  white-space: nowrap;
}
.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--border));
}
.section-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: 20px;
}

/* ── MENU GRID ──────────────────────────────────────────────────────────────── */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 0 20px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* ── CARD ───────────────────────────────────────────────────────────────────── */
.menu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  animation: fadeInUp 0.4s ease both;
}
.menu-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 40px var(--shadow);
  border-color: var(--gold-dark);
}
.card-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
}
.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}
.menu-card:hover .card-img-wrap img {
  transform: scale(1.06);
}
.card-body {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-price {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a365d;
  white-space: nowrap;
  flex-shrink: 0;
}
.card-price.on-request {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-arabic);
  font-weight: 400;
}

/* ── EMPTY STATE ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: 1rem; }

/* ── FOOTER ─────────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 40px 20px 30px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.82rem;
}
footer .footer-logo {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 6px;
}

/* CONTACT SECTION */
.contact-section {
  margin: 24px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.contact-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}
.social-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  animation: socialIconBounce 0.6s ease both;
}
.social-icon svg {
  width: 24px;
  height: 24px;
  transition: transform var(--transition);
}
.social-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--gold);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  z-index: 0;
}
.social-icon svg {
  position: relative;
  z-index: 1;
}

/* Individual icon colors */
.social-icon.facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.3);
}
.social-icon.facebook:hover::before {
  background: #1877f2;
}

.social-icon.whatsapp:hover {
  border-color: #25d366;
  color: #25d366;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}
.social-icon.whatsapp:hover::before {
  background: #25d366;
}

.social-icon.instagram:hover {
  border-color: #e4405f;
  color: #e4405f;
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(228, 64, 95, 0.3);
}
.social-icon.instagram:hover::before {
  background: linear-gradient(45deg, #e4405f, #c13584, #833ab4, #fd1d1d, #f56040, #f77737, #fcaf45, #ffdc80);
}

.social-icon.email:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}
.social-icon.email:hover::before {
  background: var(--gold);
}

.social-icon:hover svg {
  transform: rotate(360deg) scale(1.2);
}
.social-icon:hover::before {
  width: 100%;
  height: 100%;
}

/* Staggered animation delays */
.social-icon:nth-child(1) { animation-delay: 0.1s; }
.social-icon:nth-child(2) { animation-delay: 0.2s; }
.social-icon:nth-child(3) { animation-delay: 0.3s; }
.social-icon:nth-child(4) { animation-delay: 0.4s; }

footer a.admin-link {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.78rem;
  transition: all var(--transition);
}
footer a.admin-link:hover {
  border-color: var(--gold-dark);
  color: var(--gold);
}

/* ── ANIMATIONS ─────────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes socialIconBounce {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
  }
  50% {
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
@media (max-width: 640px) {
  .hero { padding: 40px 16px 36px; }
  .hero-logo { letter-spacing: 1px; }
  .hero-logo-container { margin: 15px 0; }
  .hero-logo-img {
    max-width: 180px;
    max-height: 180px;
  }
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 12px 12px;
  }
  .card-body { padding: 10px 12px; }
  .card-name { font-size: 0.82rem; }
  .card-price { font-size: 0.9rem; }
  .search-bar { margin-top: 16px; }
  .contact-section { margin: 20px 0; padding: 16px 0; }
  .contact-title { font-size: 1.1rem; margin-bottom: 12px; }
  .social-icons { gap: 16px; }
  .social-icon {
    width: 44px;
    height: 44px;
  }
  .social-icon svg {
    width: 22px;
    height: 22px;
  }
}
@media (max-width: 360px) {
  .menu-grid { grid-template-columns: 1fr; }
}
