@font-face {
  font-family: "Thmanyah";
  src: url("thmanyahsans-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --brown: #6E3529;
  --brown-deep: #4A2219;
  --orange: #FAB85B;
  --orange-soft: #FDE3BC;
  --cream: #FFF8EE;
  --paper: #FFFFFF;
  --ink: #3A1D16;
  --muted: #8A6A5F;
  --line: #F0E1CC;
  --radius: 18px;
  --shadow: 0 6px 20px rgba(110, 53, 41, .08);
  --head: "Thmanyah", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  touch-action: manipulation; /* يمنع زوم الدبل-تاب عالآيفون */
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.card, a { -webkit-tap-highlight-color: transparent; }
/* أي خانة كتابة أصغر من 16px بتخلي الآيفون يعمل زوم */
input, textarea, select { font-size: 16px !important; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 0 16px 26px;
  background: var(--brown);
}
.hero__pattern {
  position: absolute; inset: 0;
  background: url("pattern.png") center / 340px repeat;
  filter: brightness(1.9) saturate(.8);
  opacity: .16;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center 45%, rgba(110,53,41,.85) 0%, rgba(110,53,41,.35) 55%, transparent 80%);
}
.hero__logo {
  position: relative; z-index: 1;
  width: min(360px, 86vw); height: auto;
  margin: -40px auto -64px;
}
.hero__tagline {
  position: relative; z-index: 2;
  margin: 0; font-family: var(--head);
  color: var(--orange); font-size: 17px;
}

/* ---------- Tabs ---------- */
.tabs {
  position: sticky; top: 0; z-index: 20;
  background: var(--brown);
  border-top: 1px solid rgba(250, 184, 91, .25);
  box-shadow: 0 4px 14px rgba(74, 34, 25, .25);
}
.tabs__inner {
  display: flex; gap: 8px;
  max-width: 1100px; margin: 0 auto;
  padding: 12px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs__inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none;
  border: 0; border-radius: 999px;
  padding: 9px 18px;
  font-family: var(--head); font-size: 15px;
  color: var(--orange-soft);
  background: rgba(255, 255, 255, .08);
  transition: background .2s, color .2s;
}
.tab:hover { background: rgba(255, 255, 255, .16); }
.tab.is-active { background: var(--orange); color: var(--brown-deep); }

/* ---------- Search ---------- */
.search {
  position: relative;
  max-width: 1100px; margin: 18px auto 0; padding: 0 16px;
}
.search svg {
  position: absolute; top: 50%; right: 30px; transform: translateY(-50%);
  width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round;
}
.search input {
  width: 100%;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: var(--paper);
  padding: 13px 46px 13px 16px;
  font: inherit; font-size: 15px; color: var(--ink);
  outline: none;
}
.search input:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(250, 184, 91, .25); }

/* ---------- Menu ---------- */
.menu { max-width: 1100px; margin: 0 auto; padding: 8px 16px 40px; }
.loading, .empty { text-align: center; color: var(--muted); padding: 60px 0; }

.section { padding-top: 34px; }
.section:first-child { padding-top: 22px; }
.section__head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.section__bar { width: 6px; height: 28px; border-radius: 4px; background: var(--orange); flex: none; }
.section__head h2 {
  margin: 0; font-family: var(--head); font-size: 24px; color: var(--brown);
}
.section__head::after {
  content: ""; flex: 1; height: 1.5px; border-radius: 2px;
  background: var(--line);
}
.section__count {
  order: 3; flex: none;
  padding: 4px 12px; border-radius: 999px;
  background: var(--orange-soft); color: var(--brown);
  font-size: 12px; font-weight: 500;
}

/* انتقال ناعم بين القسمين */
.page-in { animation: pageIn .28s ease-out; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- + و − عالكارت ---------- */
.qty {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  display: flex; align-items: center;
  border-radius: 999px;
  background: var(--brown);
  box-shadow: 0 4px 10px rgba(74, 34, 25, .25);
  transition: background .2s;
}
.qty button {
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: #fff;
  font-family: var(--head); font-size: 20px; line-height: 1;
  display: grid; place-items: center;
}
.qty button:active { background: rgba(255, 255, 255, .15); }
.qty__n { min-width: 18px; text-align: center; color: #fff; font-family: var(--head); font-size: 15px; }
.qty.has-qty { background: var(--brown-deep); }
.qty.has-qty .qty__n { color: var(--orange); }
.qty.bump { animation: bump .25s ease-out; }
@keyframes bump { 50% { transform: scale(1.12); } }
.card:has(.qty.has-qty) .card__price { padding-left: 0; padding-bottom: 46px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  text-align: right;
  border: 0; padding: 0;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  color: inherit;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(110, 53, 41, .14); }
.card:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.card__img, .sheet__img {
  aspect-ratio: 1 / 1;
  background: var(--orange-soft);
  display: grid; place-items: center;
  overflow: hidden;
}
.card__img img, .sheet__img img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 55%),
    var(--orange-soft);
}
.ph img { width: 80%; height: auto; object-fit: contain; opacity: .45; mix-blend-mode: multiply; }

.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__name { margin: 0; font-family: var(--head); font-size: 16px; line-height: 1.35; color: var(--ink); }
.card__desc {
  margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__price {
  margin-top: auto; padding-top: 6px;
  font-family: var(--head); font-size: 17px; color: var(--brown);
}
.badge {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  font-family: var(--head); font-size: 12px;
  background: var(--orange); color: var(--brown-deep);
}
.card.is-out { opacity: .6; }
.card.is-out .card__img { filter: grayscale(1); }
.badge--out { background: var(--brown); color: #fff; }

/* ---------- Sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; justify-items: center; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(42, 18, 12, .55); animation: fade .2s; }
.sheet__card {
  position: relative;
  width: min(520px, 100%);
  max-height: 92vh; overflow: auto;
  background: var(--paper);
  border-radius: 24px 24px 0 0;
  animation: up .25s ease-out;
}
@media (min-width: 720px) {
  .sheet { align-items: center; }
  .sheet__card { border-radius: 24px; }
}
.sheet__close {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.9); color: var(--brown); font-size: 16px;
  box-shadow: var(--shadow);
}
.sheet__img { aspect-ratio: 4 / 3; }
.sheet__body { padding: 20px 22px 28px; }
.sheet__body h3 { margin: 0 0 8px; font-family: var(--head); font-size: 24px; color: var(--brown); }
.sheet__body p { margin: 0 0 14px; line-height: 1.8; color: var(--muted); }
.sheet__price { font-family: var(--head); font-size: 22px; color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }

/* ---------- Footer ---------- */
.footer {
  background: var(--brown); color: var(--orange-soft);
  text-align: center; padding: 32px 16px 40px;
  position: relative; overflow: hidden;
}
.footer::before {
  content: ""; position: absolute; inset: 0;
  background: url("pattern.png") center / 300px repeat;
  opacity: .12; filter: brightness(2.2);
}
.footer > * { position: relative; }
.footer__name { font-family: var(--head); font-size: 22px; color: var(--orange); margin: 0 0 6px; }
.footer__info { margin: 4px 0; font-size: 14px; opacity: .9; }
.footer__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.footer__links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 14px;
}
.footer__links a:hover { background: var(--orange); color: var(--brown-deep); }
.footer__links svg { width: 18px; height: 18px; fill: currentColor; }

/* =========================================================
   القسمين: المنيو / من نحن
   ========================================================= */
.switch {
  position: relative; z-index: 3;
  display: flex; gap: 4px;
  width: fit-content; margin: -22px auto 0;
  padding: 5px; border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(74, 34, 25, .18);
}
.switch__btn {
  border: 0; border-radius: 999px;
  padding: 10px 26px;
  font-family: var(--head); font-size: 15px;
  background: transparent; color: var(--muted);
  transition: background .2s, color .2s;
}
.switch__btn.is-active { background: var(--brown); color: #fff; }
.hero { padding-bottom: 40px; }
.tabs { margin-top: 16px; }

/* ---------- الكارت مع زر الإضافة ---------- */
.card { cursor: pointer; }
.add {
  position: absolute; bottom: 12px; left: 12px; z-index: 2;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 0; border-radius: 999px;
  background: var(--brown); color: #fff;
  font-family: var(--head); font-size: 20px; line-height: 1;
  display: grid; place-items: center;
  box-shadow: 0 4px 10px rgba(74, 34, 25, .25);
  transition: transform .15s, background .15s;
}
.add:hover { background: var(--brown-deep); }
.add:active { transform: scale(.92); }
.add.has-qty { background: var(--orange); color: var(--brown-deep); font-size: 15px; }
.card__price { padding-left: 44px; }

/* ---------- شريط السلة ---------- */
.cartbar {
  position: fixed; z-index: 40;
  left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 18px;
  padding: 14px 18px;
  background: var(--brown); color: #fff;
  font-family: var(--head); font-size: 16px;
  box-shadow: 0 12px 30px rgba(74, 34, 25, .35);
  animation: up .25s ease-out;
}
.cartbar[hidden] { display: none; }
.cartbar__count {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--orange); color: var(--brown-deep); font-size: 14px;
}
.cartbar__label { flex: 1; text-align: right; }
.cartbar__total { color: var(--orange); }
body.has-cart { padding-bottom: 90px; }

/* ---------- الشراء من نافذة المنتج ---------- */
.sheet__buy { display: flex; gap: 12px; margin-top: 18px; }
.sheet__buy[hidden] { display: none; }
.stepper {
  display: flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden;
}
.stepper button {
  width: 40px; height: 46px; border: 0; background: var(--cream);
  color: var(--brown); font-size: 20px; font-family: var(--head);
}
.stepper span { min-width: 36px; text-align: center; font-family: var(--head); font-size: 17px; }
.stepper--sm button { width: 32px; height: 34px; font-size: 17px; }
.stepper--sm span { min-width: 28px; font-size: 15px; }
.btn-add {
  flex: 1; border: 0; border-radius: 14px;
  background: var(--brown); color: #fff;
  font-family: var(--head); font-size: 16px;
}
.btn-add:hover { background: var(--brown-deep); }

/* ---------- السلة ---------- */
.cart { display: flex; flex-direction: column; }
.cart__head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; background: var(--paper); border-bottom: 1px solid var(--line);
}
.cart__head h3 { margin: 0; font-family: var(--head); font-size: 20px; color: var(--brown); }
.sheet__close--static { position: static; box-shadow: none; background: var(--cream); }
.cart__items { padding: 6px 20px; }
.cart__row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.cart__row-main { flex: 1; min-width: 0; }
.cart__row-name { margin: 0; font-family: var(--head); font-size: 15px; }
.cart__row-price { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.cart__row-total { font-family: var(--head); color: var(--brown); min-width: 48px; text-align: left; }
.cart__empty { text-align: center; color: var(--muted); padding: 30px 0; }
.cart__form { padding: 14px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.cart__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.cart__form input, .cart__form textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px;
  font: inherit; font-size: 15px; color: var(--ink); background: var(--paper); outline: none; resize: vertical;
}
.cart__form input:focus, .cart__form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(250, 184, 91, .25); }
.cart__sum {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-radius: 14px; background: var(--cream);
  font-family: var(--head); font-size: 17px;
}
.cart__sum strong { color: var(--brown); font-size: 20px; }
.btn-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 14px; padding: 15px;
  background: #1FAF54; color: #fff;
  font-family: var(--head); font-size: 17px;
}
.btn-wa:hover { background: #178F44; }
.btn-wa svg { width: 22px; height: 22px; fill: currentColor; }
.link-clear { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; }

/* ---------- من نحن ---------- */
.about { max-width: 760px; margin: 0 auto; padding: 28px 16px 48px; }
.about[hidden] { display: none; }
.about__intro { text-align: center; padding: 8px 4px 26px; }
.about__intro h1 {
  margin: 0 0 12px; font-family: var(--head);
  font-size: clamp(28px, 7vw, 40px); line-height: 1.3; color: var(--brown);
}
.about__intro p { margin: 0 auto; max-width: 560px; font-size: 17px; line-height: 1.9; color: var(--muted); white-space: pre-line; }
.about__card {
  background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px;
}
.about__card h2 {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; font-family: var(--head); font-size: 19px; color: var(--brown);
}
.about__card h2 .ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--orange-soft); font-size: 17px;
}
.about__card p { margin: 0; line-height: 1.9; color: var(--ink); white-space: pre-line; }
.about__card--vision { background: var(--brown); position: relative; overflow: hidden; }
.about__card--vision::before {
  content: ""; position: absolute; inset: 0;
  background: url("pattern.png") center / 260px repeat; opacity: .12; filter: brightness(2.2);
}
.about__card--vision > * { position: relative; }
.about__card--vision h2 { color: var(--orange); }
.about__card--vision h2 .ico { background: rgba(250, 184, 91, .18); }
.about__card--vision p { color: #fff; font-size: 17px; }

.phone-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.phone-row:first-of-type { border-top: 0; }
.phone-row__label { flex: 1; min-width: 120px; }
.phone-row__acts { display: flex; gap: 6px; }
.phone-row__label small { display: block; color: var(--muted); font-size: 12px; }
.phone-row__num { font-family: var(--head); font-size: 16px; direction: ltr; display: inline-block; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; text-decoration: none;
  font-family: var(--head); font-size: 13px;
}
.pill svg { width: 17px; height: 17px; fill: currentColor; }
.pill--wa { background: #E6F6EC; color: #157A3B; }
.pill--call { background: var(--orange-soft); color: var(--brown); }
.pill:hover { filter: brightness(.95); }

.socials { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.social {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 16px; text-decoration: none;
  font-family: var(--head); font-size: 14px; color: #fff;
  transition: transform .15s;
}
.social:hover { transform: translateY(-2px); }
.social svg { width: 28px; height: 28px; fill: currentColor; }
.social--fb { background: #1877F2; }
.social--ig { background: linear-gradient(45deg, #F58529, #DD2A7B 50%, #8134AF); }
.social--tt { background: #111; }

.footer__social { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.footer__social a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.1); color: #fff;
}
.footer__social a:hover { background: var(--orange); color: var(--brown-deep); }
.footer__social svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 100px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; transition: .25s; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
