@font-face { font-family: "Droid Arabic Naskh"; src: url(fonts/DroidNaskh-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Droid Arabic Naskh"; src: url(fonts/DroidNaskh-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #fbf6ea;
  --card: #fff;
  --ink: #1f1a12;
  --muted: #7a6f5c;
  --line: #eadfc6;
  --gold: #d4a514;
  --gold-deep: #9c7208;
  --black: #16130e;
  --wa: #1fa855;
  --r: 16px;
  --err: #b42318;
}
/* Opt-in dark theme (button in the header); light stays the default */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13100b;
  --card: #1e1912;
  --ink: #f1e7d0;
  --muted: #a99c80;
  --line: #3a3123;
  --gold: #e0b22a;
  --gold-deep: #e0b22a;
  --black: #2a2318;
  --wa: #25b660;
  --err: #ff8a7a;
}
[data-theme="dark"] .top { background: #0c0a06; }
[data-theme="dark"] .add, [data-theme="dark"] .card .qty,
[data-theme="dark"] .tabs button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #1a150d; }
[data-theme="dark"] .btn.gold { box-shadow: inset 0 0 0 1.5px var(--gold); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
section { scroll-margin-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.7 "Droid Arabic Naskh", "Noto Naskh Arabic", serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.demo-bar { background: var(--gold); color: var(--black); text-align: center; font-size: 14px; font-weight: 700; padding: 4px 16px; }

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--black); color: #f6ecd2; padding: 10px max(16px, calc((100% - 1100px) / 2));
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 50%; border: 1.5px solid var(--gold); }
.brand span { display: flex; flex-direction: column; line-height: 1.3; }
.brand b { color: var(--gold); font-size: 19px; }
.brand small { font-size: 13px; color: #c9bc9c; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.theme-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: transparent; border: 1.5px solid #5b4a22; color: #f6ecd2;
}
.theme-btn .sun, [data-theme="dark"] .theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: block; }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 6px;
  background: transparent; border: 1.5px solid #5b4a22; color: #f6ecd2;
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.cart-btn em {
  position: absolute; top: -7px; left: -7px; min-width: 22px; height: 22px; padding: 0 5px;
  background: var(--gold); color: var(--black); border-radius: 999px;
  font: 700 13px/22px system-ui, sans-serif; font-style: normal; text-align: center;
}
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 50% { transform: scale(1.12); } }

.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 32px;
  max-width: 1100px; margin: 0 auto; padding: 40px 16px 24px;
}
.kicker { color: var(--gold-deep); font-weight: 700; margin: 0 0 4px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); }
.origins { font-size: 21px; margin: 10px 0 2px; color: var(--ink); }
.also { color: var(--muted); margin: 0 0 22px; }
.hero-actions, .shop-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-img img { border-radius: 24px; box-shadow: 0 18px 40px -18px rgba(70, 45, 0, .45); width: 100%; height: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 8px 22px; border-radius: 999px; border: 0;
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn.gold { background: var(--black); color: var(--gold); }
.btn.line { border: 1.5px solid var(--ink); background: transparent; }
.btn.wa { background: var(--wa); color: #fff; width: 100%; font-size: 18px; }

.perks {
  list-style: none; margin: 8px auto 0; padding: 0 16px; max-width: 1100px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.perks li {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center;
}
.perks .ic { grid-row: span 2; font-size: 26px; }
.perks small { color: var(--muted); }

.offer { max-width: 1100px; margin: 36px auto 0; padding: 0 16px; }
.offer-card {
  display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
  background: var(--black); color: #f6ecd2; border-radius: 22px; padding: 16px; overflow: hidden;
}
.offer-card img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.offer-card .tag { display: inline-block; background: var(--gold); color: var(--black); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 2px 12px; }
.offer-card h3 { font-size: 24px; margin: 8px 0 4px; }
.offer-card .price { font-size: 30px; color: var(--gold); font-weight: 700; }
.offer-card .note { color: #c9bc9c; margin: 0 0 12px; }
.offer-card .btn { background: var(--gold); color: var(--black); }

.products { max-width: 1100px; margin: 0 auto; padding: 44px 16px 16px; }
.products h2, .shop h2 { font-size: 30px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: none; border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 16px; cursor: pointer; font-weight: 700; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--black); border-color: var(--black); color: var(--gold); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
}
.card img { aspect-ratio: 1; object-fit: cover; width: 100%; background: var(--line); }
.card .body { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card h3 { font-size: 18px; }
.card .desc { color: var(--muted); font-size: 15px; margin: 0; }
.card .row { margin-top: auto; padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 19px; }
.price s { color: var(--muted); font-weight: 400; font-size: 15px; margin-inline-start: 6px; }
.price.ask {
  font-size: 14px; color: var(--wa); text-decoration: none; white-space: nowrap;
  border: 1.5px solid currentColor; border-radius: 999px; padding: 4px 10px; line-height: 1.4;
}
.add {
  flex: none; width: 42px; height: 42px; border-radius: 12px; border: 0; cursor: pointer;
  background: var(--black); color: var(--gold); font-size: 26px; line-height: 1;
}
.qty { flex: none; display: flex; align-items: center; background: var(--black); color: var(--gold); border-radius: 12px; }
.qty button { width: 36px; height: 42px; border: 0; background: none; color: inherit; font-size: 22px; cursor: pointer; }
.qty span { min-width: 22px; text-align: center; font: 700 16px system-ui, sans-serif; }

.shop {
  max-width: 1100px; margin: 40px auto 0; padding: 0 16px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center;
}
.shop img { border-radius: 22px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.shop p { font-size: 19px; margin: 8px 0 18px; }

.foot { text-align: center; padding: 48px 16px 110px; color: var(--ink); }
.foot img { margin: 0 auto 8px; border-radius: 50%; }
.foot p { margin: 0; }
.foot .tg { display: inline-block; margin-top: 10px; color: var(--gold-deep); font-weight: 700; }
.muted { color: var(--muted); }

.wa-float {
  position: fixed; bottom: 18px; right: 18px; z-index: 15; transition: bottom .2s;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa);
  display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.has-cart .wa-float { bottom: 88px; }
.has-cart .foot { padding-bottom: 170px; }
.checkout-bar {
  position: fixed; z-index: 16; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 0; cursor: pointer; text-align: start;
  background: var(--black); color: #f6ecd2; font-size: 16px;
  padding: 12px max(16px, calc((100% - 1100px) / 2)) calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(0, 0, 0, .18);
}
.checkout-bar b { background: var(--gold); color: var(--black); border-radius: 999px; padding: 6px 18px; white-space: nowrap; }
.sheet-open .checkout-bar, .sheet-open .wa-float { display: none; }

.sheet-bg { position: fixed; inset: 0; background: rgba(20, 15, 5, .5); z-index: 40; }
.sheet {
  position: fixed; z-index: 41; top: 0; bottom: 0; left: 0; width: min(440px, 100%);
  background: var(--bg); overflow-y: auto; padding: 0 16px 24px;
  box-shadow: 0 0 40px rgba(0, 0, 0, .3);
}
.sheet-head { position: sticky; top: 0; background: var(--bg); display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head h2 { font-size: 22px; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 18px; }
.cart-items { padding: 6px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.line-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.line-item b { display: block; font-size: 16px; line-height: 1.4; }
.line-item small { color: var(--muted); }
.line-item .qty button { width: 32px; height: 36px; }

.order { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; }
.order label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 15px; }
.order input, .order select, .order textarea {
  font-weight: 400; font-size: 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--card); padding: 10px 12px; width: 100%;
}
.order input:focus, .order select:focus, .order textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.order fieldset { border: 1.5px solid var(--line); border-radius: 12px; margin: 0; padding: 6px 12px 10px; }
.order legend { font-weight: 700; font-size: 15px; padding: 0 4px; }
.order .radio { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; font-size: 16px; padding: 3px 0; }
.order .radio input { width: auto; accent-color: var(--black); }
[data-theme="dark"] .order .radio input { accent-color: var(--gold); }
.hint { margin: -6px 0 0; font-size: 13px; color: var(--muted); }
.totals { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.totals div { display: flex; justify-content: space-between; }
.totals .sum { font-weight: 700; font-size: 19px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 6px; }
.totals small { display: block; color: var(--muted); }
.err { color: var(--err); margin: 0; font-weight: 700; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: max-content; max-width: calc(100vw - 32px); text-align: center;
  background: var(--black); color: var(--gold); padding: 8px 18px; border-radius: 22px; font-weight: 700;
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; gap: 20px; text-align: center; }
  .hero-actions { justify-content: center; }
  .hero-img { order: -1; max-width: 270px; margin: 0 auto; }
  .perks { grid-template-columns: 1fr; }
  .offer-card { grid-template-columns: 1fr; text-align: center; }
  .offer-card img { max-width: 320px; margin: 0 auto; }
  .shop { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card h3 { font-size: 16px; }
  .card .body { padding: 8px 10px 10px; }
  .card .row { flex-wrap: wrap; }
  .price { font-size: 17px; }
  .cart-btn span { display: none; }
}
