@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;900&family=Noto+Kufi+Arabic:wght@400;600;700&display=swap');

:root {
  --brown-900: #2b1810;
  --brown-800: #3d2418;
  --brown-700: #54301f;
  --gold-500: #c9972a;
  --gold-400: #e0b24a;
  --gold-100: #f8ecd4;
  --cream: #fdf8ef;
  --cream-dark: #f3e8d2;
  --green-ok: #2e7d4f;
  --red-no: #b83b3b;
  --text-dark: #2b1810;
  --text-muted: #6b5a4d;
  --shadow: 0 10px 30px rgba(43, 24, 16, 0.12);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', 'Noto Kufi Arabic', system-ui, sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.7;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brown-900);
  color: var(--gold-100);
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--gold-400);
}

.brand .logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 500;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: border-color .2s, color .2s;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--gold-400);
  border-color: var(--gold-400);
}

.nav-cta {
  background: var(--gold-500);
  color: var(--brown-900);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .2s, background .2s;
}
.nav-cta:hover { background: var(--gold-400); transform: translateY(-2px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--gold-100);
  font-size: 1.8rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: var(--brown-900);
    flex-direction: column;
    gap: 0;
    display: none;
    padding: 10px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 24px; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brown-900), var(--brown-700) 60%, #6b3f23);
  min-height: 86vh;
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 20% 20%, rgba(224,178,74,.18), transparent 45%),
                     radial-gradient(circle at 80% 70%, rgba(224,178,74,.14), transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  padding-block: 60px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(224,178,74,.15);
  border: 1px solid rgba(224,178,74,.4);
  color: var(--gold-400);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  margin: 0 0 18px;
  line-height: 1.3;
}

.hero h1 span { color: var(--gold-400); }

.hero p {
  font-size: 1.15rem;
  color: #ead9c3;
  margin-bottom: 34px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}

.btn-primary { background: var(--gold-500); color: var(--brown-900); }
.btn-primary:hover { background: var(--gold-400); transform: translateY(-3px); box-shadow: 0 12px 24px rgba(224,178,74,.35); }

.btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline:hover { border-color: var(--gold-400); color: var(--gold-400); }

.hero-stats {
  display: flex;
  gap: 36px;
  margin-top: 46px;
  flex-wrap: wrap;
}
.hero-stats div strong { display: block; font-size: 1.6rem; color: var(--gold-400); }
.hero-stats div span { color: #cdb79a; font-size: .9rem; }

/* ---------- Sections ---------- */
section { padding-block: 80px; }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head .eyebrow {
  color: var(--gold-500);
  font-weight: 700;
  letter-spacing: .5px;
  display: block;
  margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 14px; color: var(--brown-900); }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }

/* Featured dishes */
.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 28px;
}

.dish-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
}
.dish-card:hover { transform: translateY(-8px); box-shadow: 0 18px 40px rgba(43,24,16,.18); }

.dish-media {
  height: 210px;
  position: relative;
  overflow: hidden;
}
.dish-media img { width: 100%; height: 100%; object-fit: cover; }

.dish-badge {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  background: var(--gold-500);
  color: var(--brown-900);
  font-weight: 700;
  font-size: .8rem;
  padding: 5px 14px;
  border-radius: 999px;
}

.dish-body { padding: 20px; }
.dish-body h3 { margin: 0 0 8px; font-size: 1.2rem; color: var(--brown-900); }
.dish-body p { margin: 0 0 14px; color: var(--text-muted); font-size: .92rem; min-height: 44px; }
.dish-price { display: flex; align-items: center; justify-content: space-between; }
.price-tag { font-weight: 800; color: var(--gold-500); font-size: 1.15rem; }

/* About */
.about-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.about-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4/3;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); color: var(--brown-900); margin-top: 0; }
.about-text p { color: var(--text-muted); margin-bottom: 20px; }
.feature-list { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 14px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--brown-800); }
.feature-list li .ic {
  width: 36px; height: 36px; border-radius: 10px;
  background: #fff; color: var(--gold-text); border: 1.5px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

@media (max-width: 860px) {
  .about-wrap { grid-template-columns: 1fr; }
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--brown-800), var(--brown-900));
  color: #fff;
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  margin-inline: auto;
}
.cta-banner h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin: 0 0 14px; }
.cta-banner p { color: #e6d6bd; margin-bottom: 28px; }

/* Footer */
.site-footer {
  background: var(--brown-900);
  color: #d9c7ad;
  padding-block: 50px 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-grid h4 { color: var(--gold-400); margin: 0 0 16px; font-size: 1.05rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid p { color: #c6b394; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px;
  text-align: center;
  font-size: .9rem;
  color: #a8926f;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Menu page ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--brown-900), var(--brown-700));
  color: #fff;
  padding-block: 70px 50px;
  text-align: center;
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 12px; color: var(--gold-400); }
.page-hero p { color: #e6d6bd; max-width: 560px; margin: 0 auto; }

.menu-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 46px;
}
.menu-tab {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--cream-dark);
  background: #fff;
  font-weight: 700;
  color: var(--brown-800);
  cursor: pointer;
  transition: all .2s;
}
.menu-tab.active, .menu-tab:hover { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }

.menu-category { margin-bottom: 54px; }
.menu-category h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--brown-900);
  font-size: 1.5rem;
  margin-bottom: 24px;
}
.menu-category h2::after {
  content: "";
  flex: 1;
  height: 2px;
  background: var(--cream-dark);
}

.menu-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

.menu-item {
  display: flex;
  gap: 16px;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.menu-item .thumb {
  width: 84px; height: 84px; border-radius: 12px; overflow: hidden; flex-shrink: 0; background: var(--cream-dark);
}
.menu-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-item .info { flex: 1; min-width: 0; }
.menu-item .info .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.menu-item .info h3 { margin: 0; font-size: 1.05rem; color: var(--brown-900); }
.menu-item .info p { margin: 6px 0 0; color: var(--text-muted); font-size: .88rem; }
.menu-item .price { color: var(--gold-500); font-weight: 800; white-space: nowrap; }

/* ---------- Booking page ---------- */
.booking-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) { .booking-wrap { grid-template-columns: 1fr; } }

.booking-info {
  background: var(--brown-900);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
}
.booking-info h2 { color: var(--gold-400); margin-top: 0; }
.booking-info p { color: #e6d6bd; }
.info-row { display: flex; gap: 14px; margin-top: 22px; align-items: flex-start; }
.info-row .ic { font-size: 1.3rem; }
.info-row h4 { margin: 0 0 4px; }
.info-row span { color: #cdb79a; font-size: .92rem; }

.booking-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; color: var(--brown-800); font-size: .92rem; }
.form-field input, .form-field select, .form-field textarea {
  border: 2px solid var(--cream-dark);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  color: var(--text-dark);
  transition: border-color .2s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--gold-500);
}
.form-field .error-msg { color: var(--red-no); font-size: .82rem; min-height: 16px; }
.submit-btn { width: 100%; justify-content: center; margin-top: 8px; font-size: 1.05rem; }
.form-alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 600;
  display: none;
}
.form-alert.show { display: block; }
.form-alert.success { background: #e5f4ea; color: var(--green-ok); }
.form-alert.error { background: #fbe9e9; color: var(--red-no); }

/* ---------- WhatsApp float ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 26px;
  inset-inline-end: 26px;
  z-index: 200;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37,211,102,.45);
  transition: transform .2s;
  animation: pulse 2.4s infinite;
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 32px; height: 32px; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ---------- Admin ---------- */
.admin-shell { min-height: 100vh; background: var(--cream); }
.admin-topbar {
  background: var(--brown-900);
  color: #fff;
  padding: 18px 0;
}
.admin-topbar .container { display: flex; justify-content: space-between; align-items: center; }
.admin-topbar .who { color: var(--gold-400); font-weight: 600; font-size: .92rem; }
.logout-link { color: #e6d6bd; font-weight: 600; }
.logout-link:hover { color: var(--gold-400); }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 18px; margin-block: 30px; }
.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card strong { display: block; font-size: 2rem; color: var(--brown-900); }
.stat-card span { color: var(--text-muted); font-size: .9rem; }

.admin-filters { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.bookings-table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.bookings-table { width: 100%; border-collapse: collapse; min-width: 760px; }
table.bookings-table th, table.bookings-table td {
  padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--cream-dark); font-size: .92rem;
}
table.bookings-table th { background: var(--cream); color: var(--brown-800); font-weight: 700; }
table.bookings-table td { min-width: 0; }
.badge { padding: 5px 12px; border-radius: 999px; font-weight: 700; font-size: .78rem; }
.badge.pending { background: #fdf0d8; color: #9a6a00; }
.badge.confirmed { background: #e5f4ea; color: var(--green-ok); }
.badge.rejected { background: #fbe9e9; color: var(--red-no); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions button {
  border: none; border-radius: 8px; padding: 7px 12px; font-weight: 700; cursor: pointer; font-size: .82rem;
  transition: opacity .2s, transform .15s;
}
.row-actions button:active { transform: scale(.95); }
.btn-accept { background: #e5f4ea; color: var(--green-ok); }
.btn-reject { background: #fbe9e9; color: var(--red-no); }
.btn-delete { background: #eee; color: #555; }
.row-actions button:hover { opacity: .8; }

.login-gate {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 18px;
  padding: 40px 20px;
}
.login-gate .ic { font-size: 3.4rem; }
.login-gate h2 { color: var(--brown-900); margin: 0; }
.login-gate p { color: var(--text-muted); max-width: 420px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .ic { font-size: 2.8rem; margin-bottom: 14px; }

.toast {
  position: fixed; bottom: 30px; inset-inline-start: 30px; z-index: 300;
  background: var(--brown-900); color: #fff; padding: 14px 22px; border-radius: 12px;
  box-shadow: var(--shadow); font-weight: 600; opacity: 0; transform: translateY(20px);
  transition: opacity .25s, transform .25s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* 404 */
.notfound { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.notfound .num { font-size: 5rem; font-weight: 900; color: var(--gold-500); }

bdi, .ltr { direction: ltr; unicode-bidi: isolate; }

.dish-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.2rem;
  background: linear-gradient(135deg, #e9c98a, #c9972a 55%, #8a5a23);
}
.thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, #f3dba6, #c9972a);
}
.about-media.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  background: linear-gradient(135deg, #e9c98a, #a9661f);
}

/* ---------- Accessibility / contrast & tap-target fixes ---------- */
:root { --gold-text: #8a5e10; }
.section-head .eyebrow { color: var(--gold-text); }
.price-tag { color: var(--gold-text); }
.menu-item .price { color: var(--gold-text); }
.menu-tab.active, .menu-tab:hover { background: var(--brown-800); border-color: var(--brown-800); color: #fff; }

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
}
.footer-grid ul li a { display: inline-block; padding-block: 6px; min-height: 32px; }
.dish-badge { line-height: 1.4; }
