@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Amiri:wght@700&display=swap');
:root { --bg: #FBF7F1; --ink: #2B1D14; --muted: #7A6656; --brand: #B4532A; --brand-d: #8E3E1C; --gold: #D9A441; --green: #3F7D4E; --line: #EFE4D6; --card: #fff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Cairo', Tahoma, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-family: inherit; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.demo-bar { background: var(--ink); color: #E9D9C7; font-size: 13.5px; text-align: center; padding: 8px 16px; }
.demo-bar a { color: var(--gold); font-weight: 800; }

.nav { position: sticky; top: 0; z-index: 40; background: rgba(251,247,241,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 14px; }
.logo { font-family: 'Amiri', serif; font-size: 30px; color: var(--brand); line-height: 1; }
.logo small { display: block; font-family: 'Cairo'; font-size: 11px; color: var(--muted); letter-spacing: 1px; font-weight: 700; }
.status { font-weight: 800; font-size: 14px; padding: 6px 14px; border-radius: 30px; }
.status.open { background: #E3F1E6; color: var(--green); } .status.closed { background: #F7E3DB; color: var(--brand-d); }
.cart-btn { position: relative; background: var(--ink); color: #fff; border: 0; border-radius: 14px; padding: 11px 18px; font-weight: 800; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.cart-btn .count { background: var(--gold); color: var(--ink); border-radius: 20px; min-width: 24px; height: 24px; display: grid; place-items: center; font-size: 13px; padding: 0 6px; }
.bump { animation: bump .4s; } @keyframes bump { 40% { transform: scale(1.12); } }

.hero { position: relative; min-height: 460px; display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.06); animation: zoom 18s ease-in-out infinite alternate; }
@keyframes zoom { to { transform: scale(1.15); } }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(43,29,20,.92) 0%, rgba(43,29,20,.35) 60%, rgba(43,29,20,.15) 100%); }
.hero .container { position: relative; z-index: 2; padding-bottom: 46px; }
.hero h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 900; line-height: 1.2; }
.hero h1 span { color: var(--gold); }
.hero p { font-size: 18px; opacity: .9; max-width: 560px; margin: 10px 0 22px; }
.hero-info { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-info span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(6px); padding: 8px 16px; border-radius: 30px; font-weight: 700; font-size: 14.5px; }

.tabs-wrap { position: sticky; top: 68px; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { white-space: nowrap; border: 1.5px solid var(--line); background: #fff; border-radius: 30px; padding: 8px 18px; font-weight: 800; cursor: pointer; color: var(--muted); }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.search { margin-inline-start: auto; min-width: 220px; border: 1.5px solid var(--line); border-radius: 30px; padding: 8px 16px; background: #fff; font-size: 14.5px; }

.menu { padding: 30px 0 120px; }
.cat-title { font-size: 26px; font-weight: 900; margin: 26px 0 14px; display: flex; align-items: center; gap: 12px; }
.cat-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.item { display: grid; grid-template-columns: 1fr 150px; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 14px; transition: transform .2s, box-shadow .2s; }
.item:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(43,29,20,.08); }
.item .pic { width: 150px; height: 150px; border-radius: 16px; overflow: hidden; background: #F3E8DA; order: 2; }
.item .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.item:hover .pic img { transform: scale(1.07); }
.item .info { display: flex; flex-direction: column; }
.item h3 { font-size: 19px; font-weight: 800; }
.item .tag { align-self: flex-start; background: #FBEFD9; color: #8A5A0B; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 20px; margin-bottom: 4px; }
.item p { color: var(--muted); font-size: 14.5px; margin: 4px 0 auto; }
.item .row { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.price { font-weight: 900; font-size: 18px; }
.add { background: var(--brand); color: #fff; border: 0; border-radius: 12px; padding: 8px 16px; font-weight: 800; cursor: pointer; }
.add:hover { background: var(--brand-d); }
.qty { display: flex; align-items: center; gap: 10px; background: #F7EDE2; border-radius: 12px; padding: 4px; }
.qty button { width: 32px; height: 32px; border: 0; border-radius: 10px; background: #fff; font-size: 18px; font-weight: 900; cursor: pointer; color: var(--brand); }
.qty b { min-width: 18px; text-align: center; }
.none { color: var(--muted); text-align: center; padding: 40px; }

/* cart drawer */
.overlay { position: fixed; inset: 0; background: rgba(43,29,20,.45); opacity: 0; pointer-events: none; transition: opacity .3s; z-index: 60; }
.overlay.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%); background: #fff; z-index: 70; transform: translateX(-105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; }
html[dir="rtl"] .drawer { inset-inline-end: auto; left: 0; }
.drawer.on { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 20px; font-weight: 900; }
.x { border: 0; background: #F7EDE2; width: 36px; height: 36px; border-radius: 10px; font-size: 18px; cursor: pointer; }
.lines { flex: 1; overflow-y: auto; padding: 10px 20px; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.line img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.line b { display: block; font-size: 15px; } .line span { color: var(--muted); font-size: 13.5px; }
.checkout { padding: 16px 20px 20px; border-top: 1px solid var(--line); background: #FFFCF8; }
.mode { display: grid; grid-template-columns: 1fr 1fr; background: #F7EDE2; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.mode button { border: 0; background: none; padding: 8px; border-radius: 10px; font-weight: 800; cursor: pointer; color: var(--muted); }
.mode button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.checkout input, .checkout textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; font-size: 14.5px; }
.checkout textarea { min-height: 54px; }
.sum { display: flex; justify-content: space-between; font-size: 14.5px; padding: 3px 0; }
.sum.total { font-size: 18px; font-weight: 900; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.hint { font-size: 13px; color: var(--green); font-weight: 700; }
.err { color: var(--brand-d); font-weight: 700; font-size: 13.5px; min-height: 18px; margin-top: 4px; }
.order { width: 100%; margin-top: 10px; background: #25D366; color: #fff; border: 0; border-radius: 14px; padding: 14px; font-weight: 900; font-size: 16px; cursor: pointer; }
.order:disabled { background: #CFC3B5; cursor: not-allowed; }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }

.bottom-bar { display: none; position: fixed; bottom: 14px; inset-inline: 14px; z-index: 50; background: var(--ink); color: #fff; border-radius: 18px; padding: 14px 18px; justify-content: space-between; align-items: center; box-shadow: 0 14px 30px rgba(0,0,0,.25); font-weight: 800; cursor: pointer; }
.bottom-bar.on { display: flex; }
footer { background: var(--ink); color: #CDB9A5; padding: 30px 0; font-size: 14.5px; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 820px) {
  .items { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr 110px; }
  .item .pic { width: 110px; height: 110px; }
  .search { display: none; }
  .cart-btn .label { display: none; }
  .hero { min-height: 380px; }
}
/* items without photos: compact list style */
.item.text-only { grid-template-columns: 1fr; }
.item.text-only p { margin-bottom: 0; }
/* the closed cart drawer sits off-canvas; never let it create a sideways scroll */
html, body { overflow-x: clip; }
.status { white-space: nowrap; }
@media (max-width: 820px) { .status { font-size: 12px; padding: 5px 10px; } .logo small { display: none; } }
