/* =============================
   NOVA CLEAN - v2
   ============================= */

:root {
  --green-dark: #1f4d2c;
  --green: #2e7d4f;
  --green-light: #e8f5ea;
  --gold: #c9a15a;
  --cream: #fbf9f4;
  --text: #1f2723;
  --muted: #5c6b62;
  --danger: #c93838;
  --radius: 16px;
  --shadow: 0 6px 18px rgba(31, 77, 44, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; height: auto; display: block; }
button, input, select { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; flex-shrink: 0; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 12px 96px;
}

/* ===== البوستر ===== */
.menu-header {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  aspect-ratio: 679 / 367;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--green-dark);
  text-align: center;
  margin: 16px 0 10px;
}

/* ===== شبكة العروض ===== */
.offers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.offer-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 2px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.offer-tile img { width: 100%; }
.offer-tile:active { transform: scale(.97); }
.offer-tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (hover: hover) { .offer-tile:hover { border-color: var(--green); } }

.offer-tile.is-featured { border-color: var(--gold); }

.tile-cta {
  display: block;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  padding: 9px 6px;
  text-align: center;
}
.is-featured .tile-cta { background: var(--green-dark); }

.tile-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  background: var(--gold);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 50px;
}

/* ===== شريط الثقة ===== */
.trust {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 14px;
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 12px 6px;
}
.trust li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--green-dark);
}
.trust svg { font-size: 1.5rem; color: var(--green); }

/* ===== أزرار ===== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 0;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn svg { font-size: 1.3rem; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 6px 16px rgba(46,125,79,.3); }
.btn-wa { background: #25D366; color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); margin-top: 6px; }

/* ===== واتساب عائم ===== */
.floating-wa {
  position: fixed;
  bottom: 18px;
  left: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
  z-index: 50;
}

/* ===== نافذة الطلب ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(20, 30, 24, .55);
}
.modal[hidden] { display: none; }

.modal-box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 94dvh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
  animation: up .25s ease;
}
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

@media (min-width: 560px) {
  .modal { align-items: center; }
  .modal-box { border-radius: 22px; }
}

.modal-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  cursor: pointer;
}

.picked {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--green-light);
  border-radius: 14px;
  padding: 10px;
  margin: 28px 0 16px;
}
.picked img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.picked strong { display: block; font-size: .95rem; color: var(--green-dark); line-height: 1.4; }
.picked-price { font-size: 1.2rem; font-weight: 800; color: var(--danger); }

.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.field input,
.field select {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1.5px solid #d6dbd6;
  border-radius: 12px;
  background: #fff;
  font-size: 16px; /* يمنع التكبير التلقائي بالآيفون */
}
.field input[dir="ltr"] { text-align: right; }
.field input:focus,
.field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46,125,79,.15); }
.field .invalid { border-color: var(--danger); }
.err { display: block; color: var(--danger); font-size: .8rem; min-height: 1.1em; margin-top: 2px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  font-size: .82rem;
  color: var(--muted);
}

/* ===== شاشة النجاح ===== */
.success { text-align: center; padding: 26px 4px 4px; }
.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 2.4rem;
}
.success h2 { color: var(--green-dark); font-size: 1.3rem; margin-bottom: 6px; }
.success p { color: var(--muted); margin-bottom: 18px; }
.success b { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
