:root{
  /* إذا بقي في مسافة: غيّر الرقم لـ 60 أو 64 */
  --headerH: 56px;
}

/* Reset */
*{ margin:0; padding:0; box-sizing:border-box; font-family:"Tajawal", sans-serif; }
html{ scroll-behavior:smooth; }
body{
  background:#faf7f2;
  color:#2c2c2c;
  line-height:1.6;
  direction: rtl;
}

/* wrapper */
.page-wrapper{
  max-width: 1200px;
  margin: 0 auto;
  background:#fff;
  box-shadow: 0 0 40px rgba(0,0,0,0.06);
}

/* navbar under header (no gap) */
.navbar{
  position: sticky;
  top: var(--headerH);
  z-index: 1200;
  padding: 6px 10px;
  margin: 0;
  background: rgba(18,18,18,0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.navbar::-webkit-scrollbar{ display:none; }

.nav-container{
  display: inline-flex;
  align-items:center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0 auto;
}

.nav-link{
  color: rgba(255,255,255,0.9);
  font-weight: 900;
  font-size: .9rem;
  text-decoration:none;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform .12s ease, filter .2s ease;
}
.nav-link:hover{ transform: translateY(-1px); filter: brightness(1.06); }

.nav-link--primary{
  background: linear-gradient(45deg, #e48218, #ffb84d);
  color: #111;
  border: none;
  box-shadow: 0 10px 22px rgba(228,130,24,.20);
}

/* hero */
.hero{
  background: url("/images/7IV03005.jpg") center/cover no-repeat;
  height: 250px;
  margin: 0;
}

/* sections */
.section{
  padding: 3rem 1.5rem;
  margin: 2rem 1.5rem;
  border-radius: 24px;
  position: relative;
  overflow:hidden;
}
.section-meals{ background:#fff7ec; }
.section-starters{ background:#fff; }
.section-drinks{ background:#fef5ff; }

.section-title{
  text-align:center;
  font-size: 2rem;
  color:#e48218;
  margin-bottom: 1.6rem;
  font-weight: 900;
}

/* tabs */
.menu-toggle{
  text-align:center;
  margin-bottom: 1.4rem;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap: .6rem;
}
.menu-btn{
  background:#fff;
  color:#e48218;
  border-radius:999px;
  border:1px solid rgba(228,130,24,0.35);
  padding: .5rem 1.2rem;
  font-size: .95rem;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .2s ease;
}
.menu-btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.menu-btn.active{
  background:#e48218;
  color:#fff;
  box-shadow: 0 6px 18px rgba(228,130,24,0.35);
}

/* menu grid */
.menu-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}

/* meal cards */
.menu-item{
  background:#000;
  padding: 1rem;
  border-radius: 20px;
  text-align:center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.28);
  border: 1px solid rgba(255,184,94,0.35);
  overflow:hidden;
  position:relative;
}
.menu-item img{
  width:100%;
  height:210px;
  object-fit:cover;
  border-radius:14px;
  display:block;
}
.menu-item h3{
  font-size:1.1rem;
  margin-top:.9rem;
  color:#ffb347;
}
.menu-meta{
  display:flex;
  justify-content:center;
  gap:.6rem;
  margin-top:.2rem;
}
.price-tag{
  color:#f8e1a4;
  font-weight:900;
  font-size:1rem;
  padding:.15rem .7rem;
  border-radius:999px;
  border:1px solid rgba(248,225,164,0.7);
  background: rgba(0,0,0,0.5);
}
.menu-item p{ color:#fff; font-size:.9rem; margin-top:.5rem; }

.menu-badge{
  position:absolute;
  top:12px; right:12px;
  background: linear-gradient(135deg, #ff6b35, #ffb347);
  color:#fff;
  padding: 4px 10px;
  font-size:.75rem;
  border-radius:999px;
  font-weight:900;
  z-index:2;
}


/* ===== Special meals badge (id="special") ===== */
.menu-item#special::before{
  content: "🔥 سبيشل";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  color: #111;
  background: linear-gradient(135deg, #ff3b30, #ffb347);
  box-shadow: 0 10px 22px rgba(255, 59, 48, 0.25);
  border: 1px solid rgba(255,255,255,0.15);
}

/* If card already has a badge on the left, push it down */
.menu-item#special .menu-badge{
  top: 44px;
}

/* drinks cards */
.drink-section{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.menu-card-simple{
  background:#fff;
  border-radius:16px;
  text-align:center;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  display:flex;
  flex-direction:column;
  justify-content: space-between;
}
.card-image-simple{ border-radius:12px; overflow:hidden; margin-bottom:.6rem; }
.card-image-simple img{ width:100%; height:100%; object-fit:cover; }
.card-content-simple h3{ color:#000; font-size:1rem; }
.price-simple{ font-weight:800; color:#666; }

/* footer */
.footer{ background:#e48218; color:#fff; text-align:center; padding: 1rem; margin-top: 2rem; }

/* loader */
#menu-loader{
  position: fixed; inset:0;
  background: radial-gradient(circle at top, #ff9b3b, #1a0d02);
  display:flex; align-items:center; justify-content:center;
  z-index: 99999;
  transition: opacity .6s ease, visibility .6s ease;
}
#menu-loader.hide{ opacity:0; visibility:hidden; }
.loader-content{ text-align:center; color:#fff; }
.loader-logo{ width:130px; margin-bottom:20px; }
.spinner{
  width:48px; height:48px;
  border-radius:50%;
  border:4px solid rgba(255,255,255,0.25);
  border-top-color:#ffcc70;
  margin: 0 auto 12px auto;
  animation: spin 1s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* add-to-cart button */
.add-cart-btn{
  margin-top: 12px;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(45deg, #e48218, #ffb84d);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  transition: transform .12s ease, filter .2s ease;
}
.add-cart-btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.add-cart-btn--drink{ margin-top: 10px; }

/* extras list + qty */
.extras-list{ display:grid; gap:10px; margin-top: 10px; }
.extra-row{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color:#fff;
}
.extra-price{ opacity:.85; font-weight:900; margin-inline-start: 8px; }
.qty-mini{ display:flex; align-items:center; gap:10px; }
.qty-mini-btn{
  width:36px; height:36px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.qty-mini-val{ min-width: 18px; text-align:center; font-weight:900; }

.qty-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap: 14px;
  margin-top: 10px;
}
.qty-btn{
  width:46px; height:46px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color:#fff;
  font-size: 22px;
  font-weight: 900;
  cursor:pointer;
}
.qty-value{
  min-width: 44px;
  text-align:center;
  font-size: 20px;
  font-weight: 900;
  color:#fff;
}

/* toast */
.toast{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  background: rgba(20,20,20,0.92);
  color:#fff;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  z-index: 99999;
  opacity: 0;
  pointer-events:none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

/* cart extras */
.cart-extras{
  margin-top: 6px;
  color: rgba(255,255,255,0.78);
  font-size: .9rem;
}

/* responsive */
@media (max-width: 600px){
  .section{ margin: 1.5rem .8rem; padding: 2.5rem 1rem; }
  .section-title{ font-size: 1.5rem; }
  .menu-grid{ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .drink-section{ grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}


/* ============================
   Extras per meal (single choice per type)
============================ */
.extra-group{
  margin-top: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.extra-group__title{
  font-weight: 900;
  color: rgba(255,255,255,0.92);
  margin-bottom: 8px;
}

.extra-options{
  display: grid;
  gap: 8px;
}

.extra-option{
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}

.extra-radio{
  width: 18px;
  height: 18px;
  accent-color: #ffb84d;
}

.extra-option__label{
  font-weight: 800;
  color: #fff;
}

.extra-option__price{
  font-weight: 900;
  color: rgba(255,255,255,0.75);
  font-size: .92rem;
}


/* ===== Extras modal actions (Back/Next/Confirm) ===== */
.extras-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
#extras-confirm{ grid-column: 1 / -1; }

.modal-btn--ghost{
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
}

/* ===== Extras Tiles (grid like sketch) ===== */
.extra-group__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.extra-group__step{
  font-size: 12px;
  opacity: 0.65;
}

.extra-tiles{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 520px){
  .extra-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.extra-tile{
  width: 100%;
  min-height: 82px;
  border-radius: 16px; /* مربع ناعم */
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  padding: 12px 10px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.extra-tile:active{ transform: scale(0.98); }

.extra-tile__label{
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.2px;
}

.extra-tile__price{
  font-size: 12px;
  opacity: 0.75;
}

.extra-tile__mark{
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 14px;
  margin-top: 2px;
  border: 2px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.06);
}

/* Included (default) */
.extra-tile.is-on{
  border-color: rgba(255,184,77,0.75);
  background: rgba(255,184,77,0.12);
}
.extra-tile.is-on .extra-tile__mark{
  border-color: rgba(255,184,77,0.95);
}
.extra-tile.is-on .extra-tile__mark::after{
  content: "✓";
  color: #ffb84d;
}

/* Excluded (clicked => بدون) => RED */
.extra-tile.is-off{
  border-color: rgba(255,59,48,0.75);
  background: rgba(255,59,48,0.16);
}
.extra-tile.is-off .extra-tile__mark{
  border-color: rgba(255,59,48,0.95);
}
.extra-tile.is-off .extra-tile__mark::after{
  content: "✕";
  color: #ff3b30;
}


/* ============================
   Checkout popup: make submit visible on all devices
   - No fixed/sticky button
   - Card uses flex, body scrolls
   - Safe area padding
============================ */
#checkout-modal .modal-card--wide{
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
}
#checkout-modal .modal-head{
  flex: 0 0 auto;
}
#checkout-modal .modal-body.checkout-modal-body{
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}
/* Ensure submit area is normal flow (not fixed) */
#checkout-modal .checkout-send-bar{
  position: static;
  bottom: auto;
  margin-top: 14px;
  padding-bottom: env(safe-area-inset-bottom);
}
#checkout-modal #checkout-send{
  width: 100%;
}
