* { margin:0; padding:0; box-sizing:border-box; }
:root {
  --bg:#171210; --panel:#221a16; --panel2:#2b211b; --text:#f5ede4; --muted:#b9a99b;
  --accent:#e0a458; --accent2:#c77b3f; --green:#4caf7d; --red:#e05c5c; --radius:16px;
}
html { scroll-behavior:smooth; }
body { font-family:'Segoe UI', Tahoma, Arial, sans-serif; background:var(--bg); color:var(--text); direction:rtl; min-height:100vh; }
.wrap { max-width:560px; margin:0 auto; padding:0 16px 120px; }

/* الهيدر */
.hero { text-align:center; padding:40px 16px 24px; background:linear-gradient(180deg,#2b1f18,#171210); }
.hero .logo { font-size:52px; }
.hero h1 { font-size:30px; margin:8px 0 4px; letter-spacing:.5px; }
.hero p { color:var(--muted); font-size:15px; }

/* التصنيفات */
.cats { position:sticky; top:0; z-index:10; background:var(--bg); padding:10px 0; display:flex; gap:8px; overflow-x:auto; scrollbar-width:none; }
.cats::-webkit-scrollbar { display:none; }
.cats a { flex:0 0 auto; background:var(--panel); color:var(--muted); text-decoration:none; padding:8px 16px; border-radius:999px; font-size:14px; border:1px solid #33271f; }
.cats a.on { background:var(--accent); color:#221605; font-weight:700; border-color:var(--accent); }

.cat-title { font-size:20px; margin:26px 0 12px; display:flex; align-items:center; gap:10px; }
.cat-title::after { content:""; flex:1; height:1px; background:#33271f; }

/* الأصناف */
.item { display:flex; gap:14px; background:var(--panel); border:1px solid #33271f; border-radius:var(--radius); padding:14px; margin-bottom:12px; align-items:center; }
.item.off { opacity:.45; }
.item .em { font-size:34px; width:56px; height:56px; background:var(--panel2); border-radius:14px; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.item .info { flex:1; min-width:0; }
.item .info h3 { font-size:16px; margin-bottom:3px; }
.item .info p { font-size:13px; color:var(--muted); line-height:1.5; }
.item .price { color:var(--accent); font-weight:700; font-size:15px; margin-top:5px; display:block; }
.addbtn { background:var(--accent); color:#221605; border:none; border-radius:12px; width:40px; height:40px; font-size:22px; font-weight:700; cursor:pointer; flex:0 0 auto; }
.addbtn:active { transform:scale(.92); }
.unavail { color:var(--red); font-size:12px; font-weight:700; }

/* السلة */
.cartbar { position:fixed; bottom:0; right:0; left:0; z-index:20; padding:12px 16px 20px; background:linear-gradient(0deg,#171210 70%,transparent); }
.cartbar button { width:100%; max-width:560px; margin:0 auto; display:flex; justify-content:space-between; align-items:center; background:var(--green); color:#fff; border:none; border-radius:var(--radius); padding:15px 20px; font-size:16px; font-weight:700; cursor:pointer; font-family:inherit; }

/* نافذة السلة */
.sheet { position:fixed; inset:0; z-index:30; background:rgba(0,0,0,.6); display:none; align-items:flex-end; justify-content:center; }
.sheet.open { display:flex; }
.sheet .box { background:var(--panel); width:100%; max-width:560px; max-height:85vh; overflow-y:auto; border-radius:22px 22px 0 0; padding:20px; }
.sheet h2 { font-size:19px; margin-bottom:14px; }
.crow { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid #33271f; }
.crow .nm { flex:1; font-size:15px; }
.crow .nm small { display:block; color:var(--muted); }
.qty { display:flex; align-items:center; gap:10px; }
.qty button { width:30px; height:30px; border-radius:9px; border:1px solid #4a3a2e; background:var(--panel2); color:var(--text); font-size:16px; cursor:pointer; }
.total-row { display:flex; justify-content:space-between; font-size:18px; font-weight:700; padding:16px 0; }
.total-row span:last-child { color:var(--accent); }
.field { margin-bottom:12px; }
.field label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.field input, .field textarea { width:100%; background:var(--panel2); border:1px solid #4a3a2e; border-radius:12px; color:var(--text); padding:12px; font-size:15px; font-family:inherit; }
.send-wa { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; background:#25d366; color:#062a15; border:none; border-radius:14px; padding:16px; font-size:17px; font-weight:800; cursor:pointer; font-family:inherit; margin-top:6px; }
.ghostbtn { width:100%; background:transparent; color:var(--muted); border:1px solid #4a3a2e; border-radius:14px; padding:12px; font-size:14px; cursor:pointer; font-family:inherit; margin-top:10px; }

/* الأدمن */
.abar { display:flex; gap:8px; flex-wrap:wrap; margin:16px 0; }
.abar button, .abar a { background:var(--panel2); color:var(--text); border:1px solid #4a3a2e; border-radius:12px; padding:10px 16px; font-size:14px; cursor:pointer; font-family:inherit; text-decoration:none; }
.abar button.main { background:var(--accent); color:#221605; border-color:var(--accent); font-weight:700; }
.aitem { display:flex; gap:8px; align-items:center; background:var(--panel); border:1px solid #33271f; border-radius:12px; padding:10px; margin-bottom:8px; }
.aitem input[type=text], .aitem input[type=number] { background:var(--panel2); border:1px solid #4a3a2e; border-radius:9px; color:var(--text); padding:8px; font-size:14px; font-family:inherit; }
.aitem .n { flex:2; } .aitem .p { flex:1; width:60px; } .aitem .e { width:46px; text-align:center; }
.smallbtn { background:var(--panel2); border:1px solid #4a3a2e; color:var(--text); border-radius:9px; padding:7px 10px; font-size:13px; cursor:pointer; }
.smallbtn.danger { color:var(--red); border-color:#5c2f2f; }
.smallbtn.ok { color:var(--green); border-color:#2f5c44; }
.acat { background:var(--panel); border:1px solid #33271f; border-radius:var(--radius); padding:14px; margin-bottom:16px; }
.acat > h3 { margin-bottom:10px; font-size:16px; }
.note { background:#2b211b; border:1px solid #4a3a2e; border-radius:12px; padding:12px; font-size:13px; color:var(--muted); line-height:1.7; margin-bottom:16px; }
#qrbox { text-align:center; padding:16px; background:#fff; border-radius:14px; margin-top:12px; display:none; }
#qrbox canvas, #qrbox img { margin:0 auto; display:block; }
