:root {
  --bg: #f6efe3;
  --card: #fffdf9;
  --ink: #1d1714;
  --muted: #7a6d62;
  --line: #eadfce;
  --dark: #16110e;
  --red: #8e1f1a;
  --red-soft: #f6e2dc;
  --gold: #c99a3e;
  --gold-soft: #f7ecd4;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(40, 20, 10, .05), 0 6px 20px rgba(40, 20, 10, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Tajawal, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- الهيدر ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #f8efe0;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(142, 31, 26, .55), transparent 60%),
    radial-gradient(80% 80% at 0% 100%, rgba(201, 154, 62, .22), transparent 60%),
    var(--dark);
  padding: 44px 16px 40px;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .7;
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.hero-logo {
  width: 112px;
  height: 112px;
  flex: none;
  border-radius: 26px;
  object-fit: cover;
  background: #fff;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.hero h1 {
  margin: 0 0 6px;
  font-family: "Reem Kufi", Tajawal, sans-serif;
  font-size: clamp(28px, 6vw, 40px);
  line-height: 1.15;
  color: #fff6e6;
}
.tagline { margin: 0; color: #e3cfa6; font-size: 16px; font-weight: 500; }
.meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
  padding: 8px 14px;
  border: 1px solid rgba(201, 154, 62, .35);
  background: rgba(255, 255, 255, .06);
  border-radius: 12px;
  font-size: 14px;
  color: #f1e3c7;
}
.meta a { color: inherit; text-decoration: none; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.meta svg { width: 15px; height: 15px; stroke: var(--gold); fill: none; stroke-width: 2; }

/* ---------- البحث والأقسام ---------- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 239, 227, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}
.search {
  flex: 0 0 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.search svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 2; flex: none; }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--red); border-color: var(--red); color: #fff6e6; }

/* ---------- المنيو ---------- */
.menu { max-width: 1080px; margin: 0 auto; padding: 8px 16px 24px; }
.section { padding-top: 28px; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 14px; }
.section-head h2 {
  margin: 0;
  font-family: "Reem Kufi", Tajawal, sans-serif;
  font-size: 26px;
  color: var(--ink);
}
.section-head h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 10px;
  vertical-align: middle;
  border-radius: 2px;
  background: var(--gold);
  transform: rotate(45deg);
}
.section-head small { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.card {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card img {
  width: 84px;
  height: 84px;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
  background: var(--gold-soft);
}
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card h3 { margin: 4px 0 4px; font-size: 17px; font-weight: 800; line-height: 1.4; }
.card p {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-size: 20px; font-weight: 800; color: var(--red); }
.price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 3px; }
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #8a6420;
}
.badge.b-new { background: #e4f1e6; color: #2c6b3a; }
.badge.b-offer { background: var(--red-soft); color: var(--red); }

mark { background: var(--gold-soft); color: inherit; border-radius: 4px; padding: 0 2px; }

.empty { text-align: center; color: var(--muted); font-size: 17px; padding: 40px 16px; }

.loading { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding-top: 32px; }
.sk {
  height: 112px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #efe6d6 0%, #f8f2e8 50%, #efe6d6 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.error { text-align: center; padding: 40px 16px; color: var(--red); }

.footer {
  max-width: 1080px;
  margin: 20px auto 0;
  padding: 24px 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.footer img { border-radius: 12px; }
.footer div { display: flex; flex-direction: column; gap: 2px; }
.footer strong { color: var(--ink); font-size: 15px; }

@media (max-width: 760px) {
  .toolbar-inner { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 16px; }
  .search { flex: none; }
  .grid, .loading { grid-template-columns: 1fr; }
  .hero { padding: 32px 16px 30px; }
  .hero-logo { width: 92px; height: 92px; border-radius: 22px; }
  .section { scroll-margin-top: 130px; }
}
