/* إصلاح الصفحة وإلغاء القفل الأسود */
body {
    background-color: #ffffff !important;
    color: #111111 !important;
    min-height: 100vh !important;
    height: auto !important;
    overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* =========================
   OVERLAY & CART DRAWER (السلة والخلفية)
========================= */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998 !important;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: none !important; /* إلغاء البلور تماماً */
    -webkit-backdrop-filter: none !important;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* --- الكود اللي كان ناقص عشان السلة تفتح --- */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%; /* مخفية برا الشاشة */
    width: 100%;
    max-width: 400px; /* عرض السلة */
    height: 100vh;
    background-color: #ffffff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 9999 !important; /* فوق كل حاجة في الصفحة */
    transition: right 0.3s ease; /* حركة الدخول */
    overflow-y: auto;
}

.cart-drawer.active {
    right: 0; /* تظهر في الشاشة لما تاخد الكلاس */
}
/* ------------------------------------------ */

/* =========================
   MENU HERO & HEADER
========================= */

.menu-hero-header {
    text-align: center;
    padding-top: 110px;
    padding-bottom: 20px;
    background-color: #ffffff;
}

.menu-hero-header p {
    font-size: 14px;
    letter-spacing: 4px;
    color: #7D0A0A;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Oswald', sans-serif;
}

.menu-hero-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #111;
    font-family: 'Oswald', sans-serif;
}

.menu-header {
  text-align: center;
  padding: 50px 20px 30px;
  background-color: #ffffff;
}

.menu-header p {
  font-size: 15px;
  letter-spacing: 5px;
  color: #a81c1c;
  font-weight: bold;
  margin-bottom: 8px;
}

.menu-header h1 {
  font-size: 45px;
  font-weight: 700;
  color: #111;
}

/* =========================
   CATEGORY NAVIGATION
========================= */

.category-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto 50px;
  padding: 0 20px;
  background-color: #ffffff;
}

.nav-btn {
  background-color: transparent;
  border: 2px solid #a81c1c;
  color: #a81c1c;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.nav-btn:hover,
.nav-btn.active {
  background-color: #a81c1c;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(168, 28, 28, 0.25);
}

/* =========================
   MENU GRID
========================= */

.menu-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 100px;
  min-height: 55vh;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 80px;
  row-gap: 70px;
  background-color: #ffffff;
}

/* =========================
   MENU ITEM & ANIMATION
========================= */

.menu-item {
  text-align: center;
  animation: fadeIn 0.5s ease forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
}

.item-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 6px 0;
  flex-wrap: wrap;
}

.size-btn, .option-btn {
  background-color: #f4f4f4;
  border: 1px solid #e0e0e0;
  color: #333333;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.size-btn:hover, .option-btn:hover {
  border-color: #7D0A0A;
  color: #7D0A0A;
}

.size-btn.active, .option-btn.active {
  background-color: #7D0A0A;
  color: #ffffff;
  border-color: #7D0A0A;
  box-shadow: 0 2px 6px rgba(125, 10, 10, 0.2);
}

.add-to-cart-btn {
  margin-top: 14px;
  background-color: #7D0A0A;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.add-to-cart-btn:hover {
  background-color: #550000;
}

.add-to-cart-btn:active {
  transform: scale(0.96);
}

.animate-fade {
  animation: fadeIn 0.5s ease forwards;
}

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

/* =========================
   IMAGE
========================= */

.item-image {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.35s ease;
}

.menu-item:hover .item-image img {
  transform: scale(1.05);
}

/* =========================
   ITEM DETAILS
========================= */

.menu-item h2 {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 700;
  color: #111;
}

.menu-item .price {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #a81c1c;
  margin: 8px 0;
}

.menu-item .description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  max-width: 80%;
  margin: 0 auto;
}

/* =========================
   TABLET
========================= */

@media (max-width: 768px) {
  .menu-header {
    padding-top: 40px;
  }

  .menu-header h1 {
    font-size: 36px;
  }

  .category-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    padding-left: 15px;
    padding-right: 15px;
    gap: 10px;
  }

  .nav-btn {
    padding: 8px 16px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .menu-container {
    width: 94%;
    column-gap: 30px;
    row-gap: 50px;
  }

  .item-image {
    height: 200px;
  }

  .menu-item h2 {
    font-size: 20px;
    margin-top: 16px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 500px) {
  .menu-header {
    padding: 35px 15px 25px;
  }

  .menu-header p {
    font-size: 12px;
    letter-spacing: 3px;
  }

  .menu-header h1 {
    font-size: 28px;
  }

  .category-nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 15px;
    margin-bottom: 30px;
  }

  .nav-btn {
    scroll-snap-align: start;
  }

  .menu-container {
    width: 94%;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 15px;
    row-gap: 40px;
    margin-bottom: 60px;
    min-height: 60vh;
  }

  .item-image {
    height: 140px;
  }

  .menu-item h2 {
    font-size: 15px;
    margin-top: 12px;
  }

  .menu-item .price {
    font-size: 14px;
  }

  .menu-item .description {
    font-size: 11px;
    max-width: 100%;
  }

  .size-btn, .option-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}
