/* ===== El Suez Pastry & Cafe ===== */
:root {
  --green: #0B4D43;
  --green-dark: #073A33;
  --gold: #B8A47A;
  --gold-dark: #8C7A50;   /* ذهبي أغمق للنص على الخلفية الفاتحة (تباين أوضح) */
  --pink: #F2B8B8;
  --bg: #FAF6EF;
  --surface: #FFFFFF;
  --text: #1F2A28;
  --muted: #5E6B68;
  --line: #E8E0D2;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(7, 58, 51, .08);
  --shadow-lg: 0 10px 30px rgba(7, 58, 51, .18);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Cairo", system-ui, "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
main.container { flex: 1; padding-block: 16px 110px; outline: none; }
.loading { text-align: center; color: var(--muted); padding: 48px 0; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--green-dark); color: #fff;
  padding-top: var(--safe-t);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.topbar__inner {
  max-width: 1200px; margin-inline: auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 10px; background: #fff; object-fit: cover; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; direction: ltr; text-align: left; }
.brand__text strong { font-size: 1.15rem; font-weight: 800; letter-spacing: .3px; }
.brand__text small { color: var(--gold); font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; }

.cart-btn {
  position: relative; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .1); color: #fff;
  display: grid; place-items: center;
}
.cart-btn:hover { background: rgba(255, 255, 255, .18); }
.cart-btn__count {
  position: absolute; top: 2px; left: 2px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--pink); color: var(--green-dark);
  font-size: .75rem; font-weight: 800; display: grid; place-items: center;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.15); } }

/* ---------- Home ---------- */
.hero {
  background: var(--green); color: #fff; border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset-inline-start: 20px; bottom: 14px;
  width: 40px; height: 4px; border-radius: 2px; background: var(--pink);
}
.hero h1 { margin: 0 0 4px; font-size: 1.45rem; font-weight: 800; }
.hero p { margin: 0 0 14px; color: #D9E6E2; font-size: .95rem; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: rgba(255, 255, 255, .12);
}
.chip--open { background: #DDF3E6; color: #11633A; }
.chip--closed { background: #F8DADA; color: #8A2626; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.tab {
  flex: none; padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 700; min-height: 44px;
}
.tab[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.section-title { font-size: 1.15rem; font-weight: 800; margin: 0 0 12px; color: var(--green-dark); }

.grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card {
  position: relative; display: block; text-decoration: none; color: #fff;
  border-radius: var(--radius); overflow: hidden; background: var(--green);
  aspect-ratio: 4 / 5; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 58, 51, .92) 0%, rgba(7, 58, 51, .35) 45%, rgba(7, 58, 51, 0) 70%);
}
.card__body { position: absolute; inset-inline: 0; bottom: 0; padding: 12px; z-index: 1; }
.card__name { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.35; }
.card__meta { margin: 2px 0 0; font-size: .78rem; color: var(--gold); font-weight: 600; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card:hover img { transform: scale(1.04); }
.card:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Section page ---------- */
.banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 9; max-height: 300px; width: 100%; margin-bottom: 16px; background: var(--green);
}
.banner img { width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 58, 51, .9), rgba(7, 58, 51, 0) 60%);
}
.banner__text { position: absolute; bottom: 0; inset-inline: 0; padding: 16px; color: #fff; z-index: 1; }
.banner__text h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.banner__text p { margin: 0; color: var(--gold); font-weight: 600; font-size: .9rem; }
.back {
  position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 6px 14px;
  border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--green-dark);
  font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}

.items { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.item {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start;
  background: var(--surface); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.item__img { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--line); }
.item__name { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.item__ing { margin: 2px 0 0; font-size: .82rem; color: var(--muted); line-height: 1.5; }
.opts { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opt__label { font-size: .9rem; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.opt__size {
  font-size: .78rem; font-weight: 700; color: var(--green); background: #E6EFEC;
  padding: 1px 10px; border-radius: 999px;
}
.price { color: var(--gold-dark); font-weight: 800; white-space: nowrap; }

.add {
  min-width: 44px; height: 40px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--green); color: #fff; font-weight: 700; display: inline-flex; align-items: center; gap: 4px;
}
.add:hover { background: var(--green-dark); }
.stepper {
  display: inline-flex; align-items: center; border-radius: 999px; background: #E6EFEC; height: 40px;
}
.stepper button {
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent;
  color: var(--green-dark); font-size: 1.2rem; font-weight: 800;
}
.stepper button:hover { background: rgba(11, 77, 67, .12); }
.stepper output { min-width: 24px; text-align: center; font-weight: 800; }

/* ---------- Cart bar ---------- */
.cart-bar {
  position: fixed; z-index: 25; inset-inline: 12px; bottom: calc(12px + var(--safe-b));
  max-width: 560px; margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: 8px 18px; border: 0; border-radius: 999px;
  background: var(--green); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg);
}
.cart-bar__count {
  background: var(--pink); color: var(--green-dark); border-radius: 999px;
  padding: 2px 10px; font-size: .85rem; font-weight: 800;
}
.cart-bar strong { color: var(--gold); }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .4); }
.drawer {
  position: fixed; z-index: 50; inset-inline: 0; bottom: 0;
  max-height: 88vh; display: flex; flex-direction: column;
  background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); transition: transform .28s ease; visibility: hidden;
  padding-bottom: var(--safe-b);
}
.drawer.open { transform: none; visibility: visible; }
.drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.drawer__head h2 { margin: 0; font-size: 1.15rem; color: var(--green-dark); }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: #ECE5D8; font-size: 1rem;
}
.drawer__body { overflow-y: auto; padding: 12px 16px; flex: 1; }
.drawer__foot { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.empty { text-align: center; color: var(--muted); padding: 32px 0; }
.empty .btn { margin-top: 12px; }

.line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--line);
}
.line:last-child { border-bottom: 0; }
.line__name { font-weight: 700; }
.line__name small { color: var(--green); font-weight: 700; }
.line__unit { font-size: .8rem; color: var(--muted); }
.line__total { font-weight: 800; color: var(--gold-dark); text-align: end; }
.line__actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.link-btn { border: 0; background: none; color: #A33; font-size: .85rem; padding: 8px 0; min-height: 40px; }

.sum { display: flex; justify-content: space-between; padding: 3px 0; }
.sum--total { font-size: 1.1rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.sum--total span:last-child { color: var(--green); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px; border: 0;
  font-weight: 700; text-decoration: none; text-align: center;
}
.btn--primary { background: var(--green); color: #fff; width: 100%; margin-top: 10px; }
.btn--primary:hover { background: var(--green-dark); }
.btn--wa { background: #1FA855; color: #fff; width: 100%; font-size: 1.05rem; }
.btn--wa:hover { background: #178A45; }
.btn--wa:disabled { background: #9DBBA8; cursor: not-allowed; }
.btn--gold { background: var(--gold); color: var(--green-dark); }
.btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.btn--outline { background: transparent; color: var(--green); border: 1px solid var(--green); }

/* ---------- Checkout ---------- */
.checkout { display: grid; gap: 16px; max-width: 980px; margin-inline: auto; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 12px; font-size: 1.1rem; color: var(--green-dark); }
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.page-head h1 { margin: 0; font-size: 1.35rem; color: var(--green-dark); }
.page-head .back { position: static; box-shadow: none; background: #E6EFEC; }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg label {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 64px; padding: 8px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--bg); font-weight: 700; cursor: pointer; text-align: center;
}
.seg label small { font-weight: 600; color: var(--muted); font-size: .78rem; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:checked + label { border-color: var(--green); background: #E6EFEC; color: var(--green-dark); }
.seg input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field label { font-weight: 700; font-size: .9rem; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg); font-size: 1rem;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--green); border-color: transparent; }
.field .err { color: #A33; font-size: .82rem; min-height: 1em; }
.field.invalid input, .field.invalid textarea { border-color: #C44; }
.note { font-size: .82rem; color: var(--muted); margin: 8px 0 0; }
.warn { background: #FFF4E0; color: #7A5300; border-radius: 12px; padding: 8px 12px; font-size: .9rem; margin-top: 8px; }

.table-badge {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding: 10px 14px; border-radius: 12px; background: #E6EFEC; color: var(--green-dark); font-weight: 700;
}
.table-badge strong { font-size: 1.2rem; }
.table-badge .link-btn { margin-inline-start: auto; color: var(--green); }

/* ---------- Sugar sheet ---------- */
.in-cart { font-size: .78rem; font-weight: 700; color: var(--green); margin-inline-end: 6px; }
.line__sugar { font-size: .8rem; color: var(--green); font-weight: 600; }
.sheet {
  position: fixed; z-index: 55; inset-inline: 0; bottom: 0; margin-inline: auto; max-width: 480px;
  background: var(--bg); border-radius: 20px 20px 0 0; box-shadow: var(--shadow-lg);
  padding: 18px 16px calc(12px + var(--safe-b));
}
.sheet h2 { margin: 0; font-size: 1.15rem; color: var(--green-dark); }
.sheet__sub { margin: 2px 0 12px; color: var(--muted); font-size: .9rem; }
.sugar-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sugar-opts input { position: absolute; opacity: 0; pointer-events: none; }
.sugar-opts label {
  display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 8px;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer;
}
.sugar-opts input:checked + label { border-color: var(--green); background: #E6EFEC; color: var(--green-dark); }
.sugar-opts input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.sheet__cancel { width: 100%; color: var(--muted); }
@media (min-width: 640px) { .sheet { bottom: 50%; transform: translateY(50%); border-radius: 20px; } }

.sent { text-align: center; padding: 24px 16px; }
.sent h2 { color: var(--green-dark); }
.sent .btn { margin: 6px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--green-dark); color: #E7EFEC; padding-block: 28px calc(90px + var(--safe-b));
}
.footer__grid { display: grid; gap: 18px; }
.footer__logo { width: 56px; height: 56px; border-radius: 12px; background: #fff; }
.footer__name { margin: 8px 0 0; font-weight: 800; color: #fff; }
.footer__info { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + var(--safe-b)); max-width: calc(100% - 32px);
  background: var(--text); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: .9rem; box-shadow: var(--shadow-lg);
}

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .hero { padding: 28px; }
  .hero h1 { font-size: 1.8rem; }
  .items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: auto 1fr auto; align-items: center; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .card { aspect-ratio: 1 / 1; }
  .items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .checkout { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .checkout .summary { position: sticky; top: 90px; }
  /* السلة لوحة جانبية على الكمبيوتر */
  .drawer {
    inset-inline-start: 0; inset-inline-end: auto; /* يمين الشاشة في RTL */
    top: 0; bottom: 0; width: 420px; max-height: none; border-radius: 20px 0 0 20px;
    transform: translateX(105%);
  }
  .drawer.open { transform: none; }
  .footer { padding-bottom: 28px; }
}
@media (min-width: 1280px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

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

/* ---------- الفروع: شاشة الاختيار وزرار التبديل ---------- */
.branch-btn {
  margin-inline-start: auto; display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 6px 14px; border-radius: 999px; text-decoration: none;
  background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; font-size: .9rem;
  border: 1px solid rgba(184, 164, 122, .6);
}
.branch-btn:hover { background: rgba(255, 255, 255, .18); }
.chooser { text-align: center; padding: 24px 0 8px; }
.chooser h1 { margin: 0 0 4px; color: var(--green-dark); font-size: 1.5rem; }
.chooser p { margin: 0 0 20px; color: var(--muted); }
.chooser__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; max-width: 640px; margin-inline: auto; }
.branch-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px 12px;
  border-radius: 20px; background: var(--green); color: #fff; text-decoration: none;
  box-shadow: var(--shadow); min-height: 220px; justify-content: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.branch-card img { width: min(120px, 60%); height: auto; aspect-ratio: 1; border-radius: 50%; object-fit: cover; background: #fff; border: 3px solid var(--gold); }
.branch-card strong { font-size: 1.4rem; font-weight: 800; }
.branch-card__cart { font-size: .8rem; font-weight: 700; background: var(--pink); color: var(--green-dark); border-radius: 999px; padding: 2px 10px; }
.branch-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.branch-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- الحلواني: الوحدة، الأوزان، التورتة ---------- */
.unit { color: var(--muted); font-weight: 600; font-size: .78rem; margin-inline-start: 4px; }
.item__hint { margin: 4px 0 0; font-size: .78rem; color: var(--muted); }
.weights { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.weights input, .choices input { position: absolute; opacity: 0; pointer-events: none; }
.weights label {
  display: flex; flex-direction: column; align-items: center; min-height: 44px; justify-content: center;
  padding: 4px 10px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg);
  font-size: .8rem; font-weight: 700; cursor: pointer;
}
.weights label small { color: var(--gold-dark); font-weight: 700; font-size: .72rem; }
.weights input:checked + label, .choices input:checked + label { border-color: var(--green); background: #E6EFEC; color: var(--green-dark); }
.weights input:focus-visible + label, .choices input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.line__photo { font-size: .8rem; color: #7A5300; font-weight: 600; }
.sheet--tall { max-height: calc(100dvh - 24px); display: flex; flex-direction: column; }
.sheet__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.sheet__img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--line); flex: none; }
.sheet__body { overflow-y: auto; flex: 1; margin-bottom: 10px; }
.sheet__body .sheet__sub { display: block; margin: 10px 0 6px; font-weight: 700; color: var(--green-dark); font-size: .9rem; }
.choices { display: grid; gap: 6px; }
.choices--row { grid-template-columns: 1fr 1fr; }
.choices label {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 48px; padding: 8px 12px;
  border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer;
}
.choices label small { color: var(--gold-dark); font-weight: 700; font-size: .78rem; }
.choices--row label { justify-content: center; }
#cakeNote {
  width: 100%; min-height: 64px; padding: 10px 14px; border-radius: 12px; resize: vertical;
  border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 1rem;
}

/* ---------- السلة المشتركة والطاولة والمخبوزات ---------- */
/* البراند يزق الباقي للناحية التانية — السلة ظاهرة في كل الشاشات */
.topbar__inner > .brand { margin-inline-end: auto; }
.topbar__inner > .branch-btn { margin-inline-start: 0; }
.table-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px; border-radius: 999px;
  background: var(--gold); color: var(--green-dark); font-weight: 800; font-size: .8rem; white-space: nowrap;
}
.item__desc { margin: 2px 0 0; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.branch-group { padding-bottom: 6px; margin-bottom: 10px; border-bottom: 1px dashed var(--line); }
.branch-group:last-of-type { border-bottom: 0; }
.branch-group__title {
  margin: 6px 0 4px; font-size: .95rem; font-weight: 800; color: var(--green-dark);
  display: flex; align-items: center; gap: 6px;
}
.branch-group__title::before { content: ""; width: 4px; height: 1em; border-radius: 2px; background: var(--gold); }
.branch-group__total { font-weight: 700; color: var(--green-dark); }
.order-copy {
  display: block; width: 100%; min-height: 140px; margin: 10px 0; padding: 10px; border-radius: 12px;
  border: 1px solid var(--line); font: inherit; font-size: .8rem; direction: rtl; resize: vertical;
}
/* موبايل صغير وفيه زرار الفرع وشارة الطاولة مع بعض: نخفي اسم البراند عشان الهيدر ميتكسرش */
@media (max-width: 420px) {
  .topbar__inner:has(#tableBadge:not([hidden])):has(#branchBtn:not([hidden])) .brand__text { display: none; }
}

/* ---------- الشريط العلوي: العنوان + معمولة بحب (مش sticky) ---------- */
.infobar { background: var(--green); color: #E7EFEC; font-size: .78rem; padding-top: var(--safe-t); }
.infobar__inner {
  max-width: 1200px; margin-inline: auto; padding: 5px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; line-height: 1.5;
}
.infobar__addr { color: #fff; text-decoration: none; min-width: 0; }
.infobar__addr:hover, .infobar__addr:focus-visible { text-decoration: underline; color: var(--gold); }
.infobar__love { font-size: .72rem; color: var(--gold); white-space: nowrap; }
.heart { color: #E0245E; }

/* ---------- البحث في المنيو ---------- */
.search { position: relative; margin: 14px 0 6px; }
.search input {
  width: 100%; min-height: 48px; padding: 10px 44px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 1rem; box-shadow: var(--shadow);
}
.search input:focus { outline: 2px solid var(--green); border-color: transparent; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search__icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__clear {
  position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 1rem; cursor: pointer;
}
.search__clear:hover { background: var(--bg); }
.search-empty p { margin-bottom: 12px; }
.item__section {
  display: inline-block; font-size: .7rem; font-weight: 700; color: var(--gold-dark);
  background: var(--bg); border-radius: 999px; padding: 0 8px; margin-bottom: 2px;
}

/* ---------- الملاحظات ---------- */
.note-btn { color: var(--green); font-weight: 700; font-size: .8rem; min-height: 36px; padding: 4px 0; }
.line__note, .sum__note { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.sum__note { display: block; }
.note-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.note-edit__input, .note-input {
  flex: 1 1 160px; width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); font: inherit; font-size: .95rem;
}
.note-edit .link-btn { color: var(--green); font-weight: 700; }
.hint { color: var(--muted); font-size: .75rem; }

/* ---------- حالة التوفر اللحظي (متوفر / غير متوفر) ---------- */
.item--out {
  background: #F5F1E9;
  border: 1px dashed var(--line);
}
.item--out .item__img {
  filter: grayscale(.55);
  opacity: .62;
}
.item--out .item__name,
.item--out .price,
.opt--out .opt__size,
.opt--out .price {
  color: var(--muted);
}
.opt--out .opt__size {
  background: #EAE4D8;
  text-decoration: line-through;
}
.badge-out {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #FCE6E6;
  color: #9E2424;
  font-size: .72rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-out--sm {
  font-size: .68rem;
  padding: 1px 7px;
}
.add--out {
  background: #E5DED2;
  color: var(--muted);
  cursor: not-allowed;
  font-size: .8rem;
}
.add--out:hover { background: #E5DED2; }
.btn--primary:disabled {
  background: #9EB5B0;
  cursor: not-allowed;
}
.stepper button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.weights input:disabled + label,
.choice--out {
  opacity: .52;
  cursor: not-allowed !important;
  background: #F3EFE7 !important;
  border-color: var(--line) !important;
}
.choice--out small { color: #9E2424 !important; }
.line--out {
  background: #FDF2F2;
  border-radius: 12px;
  padding: 10px;
  margin: 4px 0;
  border: 1px solid #F3CACA;
}
.sum--out span:first-child { color: #9E2424; }
.warn--out {
  background: #FDF0F0;
  color: #8A2020;
  border: 1px solid #F3CACA;
}
.warn--out p { margin: 0 0 8px; }
.btn--sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: .85rem;
  width: 100%;
  border-color: #9E2424;
  color: #9E2424;
}
