:root {
  --primary: #b5452b;
  --accent: #e0a43a;
  --bg: #fbf6ef;
  --card: #fff;
  --text: #2b2018;
  --muted: color-mix(in srgb, var(--text) 55%, transparent);
  --line: color-mix(in srgb, var(--text) 10%, transparent);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { overflow-anchor: none; }
body {
  font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  max-width: 680px;
  margin-inline: auto;
  padding-bottom: 96px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; color: inherit; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 16px 20px 34px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 60%),
    linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 70%, #000));
  background-size: cover;
  background-position: center;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}
.hero::after { /* زخرفة خفيفة */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  pointer-events: none;
}
.hero.has-cover::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.65));
}
.hero > * { position: relative; z-index: 1; }
.hero__top { display: flex; justify-content: flex-end; }

.lang {
  display: inline-flex;
  background: rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 3px;
  backdrop-filter: blur(6px);
}
.lang button {
  border: 0; background: none; color: #fff;
  padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--primary); }

.brand { text-align: center; margin-top: 10px; }
.brand__logo {
  width: 78px; height: 78px; margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff center/cover no-repeat;
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 34px; font-weight: 800;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
.brand__name { font-size: 30px; font-weight: 800; letter-spacing: -.3px; }
.brand__tagline { opacity: .9; margin-top: 2px; }
.brand__info {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px;
  margin-top: 12px; font-size: 13px; opacity: .85;
}
.brand__info span:empty { display: none; }

/* ---------- Categories ---------- */
.cats {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.cats::-webkit-scrollbar { display: none; }
.cats a {
  flex: none;
  text-decoration: none; color: var(--text);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: .2s;
}
.cats a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Search ---------- */
.search { padding: 14px 16px 0; }
.search input {
  width: 100%;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 11px 14px; outline: none;
}
.search input:focus { border-color: var(--primary); }

/* ---------- Menu ---------- */
main { padding: 0 16px; }
.section { padding-top: 22px; }
.section__title {
  display: flex; align-items: center; gap: 8px;
  font-size: 21px; font-weight: 800; margin-bottom: 12px;
}
.section__title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.item {
  display: flex; gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.item__img {
  flex: none; width: 92px; height: 92px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 18%, var(--card)) center/cover no-repeat;
  display: grid; place-items: center; font-size: 38px;
}
.item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item__name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.item__desc { font-size: 13px; color: var(--muted); margin-top: 3px; }
.item__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: color-mix(in srgb, var(--accent) 50%, #000);
}
.tag--spicy { background: #fde3dc; color: #a2321a; }
.tag--veg { background: #e1f3e3; color: #2c6b34; }
.tag--new { background: #e4ecfb; color: #2a4d93; }
.item__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { font-size: 17px; font-weight: 800; color: var(--primary); }
.price small { font-size: 12px; font-weight: 700; }

.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button {
  width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer; font-size: 18px; font-weight: 700; line-height: 1;
  background: var(--primary); color: #fff;
}
.qty button.minus { background: color-mix(in srgb, var(--primary) 12%, transparent); color: var(--primary); }
.qty span { min-width: 16px; text-align: center; font-weight: 800; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.foot { text-align: center; padding: 30px 16px 10px; font-size: 14px; }
.foot a { color: var(--primary); font-weight: 700; text-decoration: none; }

/* ---------- Cart bar ---------- */
.cartbar {
  position: fixed; z-index: 20;
  inset-inline: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  max-width: 648px; margin-inline: auto;
  display: flex; align-items: center; gap: 10px;
  border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  padding: 14px 18px; border-radius: 14px;
  font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 45%, transparent);
  animation: up .25s ease;
}
.cartbar strong { margin-inline-start: auto; }
.cartbar__count {
  background: #fff; color: var(--primary);
  min-width: 26px; height: 26px; border-radius: 13px;
  display: grid; place-items: center; font-size: 13px; padding: 0 6px;
}
@keyframes up { from { transform: translateY(20px); opacity: 0; } }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 30; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.sheet__panel {
  position: absolute; bottom: 0; inset-inline: 0;
  max-width: 680px; margin-inline: auto;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 85vh; overflow: auto;
  animation: up .25s ease;
}
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sheet__head h2 { font-size: 20px; }
.icon-btn { border: 0; background: var(--line); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; }
.sheet__list { list-style: none; }
.sheet__list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.sheet__list .n { flex: 1; font-weight: 700; }
.sheet__list .p { color: var(--muted); font-size: 14px; }
#note {
  width: 100%; margin-top: 12px; resize: none;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 12px; padding: 10px 12px; outline: none;
}
.sheet__total { display: flex; justify-content: space-between; font-size: 18px; margin: 14px 0; }
.wa-btn {
  display: block; text-align: center; text-decoration: none;
  background: #25d366; color: #fff; font-weight: 800;
  padding: 14px; border-radius: 14px;
}

/* item image (img element with emoji fallback) */
.item__img{position:relative;overflow:hidden}
.item__img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.item__img.has-img .item__emo{visibility:hidden}
