:root {
  --bg: #0a0a0a; --surface: #161616; --card: #1e1e1e; --line: #2c2c2c;
  --gold: #d4af37; --gold-2: #ffd700; --text: #ffffff; --muted: #b0b0b0;
  --ok: #4caf50; --warn: #ffc107; --bad: #cf6679; --info: #64b5f6;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", Tahoma, "Noto Kufi Arabic", sans-serif; }
a { color: var(--gold); text-decoration: none; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: rgba(10,10,10,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 22px; letter-spacing: .5px; color: var(--text); }
.brand span { color: var(--gold); }
nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
nav a { color: var(--muted); font-weight: 600; }
nav a.active, nav a:hover { color: var(--gold); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; min-height: 70vh; }
.footer { display: flex; justify-content: space-between; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
h1, h2, h3 { margin: 0 0 12px; } h1 { font-size: 28px; } h2 { font-size: 22px; color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card img.cover { width: calc(100% + 36px); margin: -18px -18px 12px; height: 170px; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; display: block; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.price { font-weight: 700; color: var(--gold-2); }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px; border-radius: 10px; border: 0; background: var(--gold); color: #111; font-weight: 700; cursor: pointer; font-size: 15px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.ghost, .btn.ghost { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
button.danger { background: var(--bad); color: #fff; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 12px; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
input, select, textarea { width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); border-color: transparent; }
.option { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.option:has(input:checked) { border-color: var(--gold); background: #221d0c; }
.option input { width: auto; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid currentColor; }
.s-ok { color: var(--ok); } .s-warn { color: var(--warn); } .s-bad { color: var(--bad); } .s-info { color: var(--info); } .s-muted { color: var(--muted); }
.copy { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px dashed var(--line); padding: 10px 12px; border-radius: 10px; word-break: break-all; }
.copy code { flex: 1; font-size: 15px; }
.alert { padding: 12px 14px; border-radius: 10px; background: #2a1518; color: #ffb4bf; border: 1px solid #5a2a32; }
.notice { padding: 12px 14px; border-radius: 10px; background: #1b1a10; color: #f1e3a8; border: 1px solid #4a4220; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: fixed; bottom: 20px; inset-inline: 0; margin: auto; width: fit-content; max-width: 90vw; background: var(--card); border: 1px solid var(--gold); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: opacity .3s; pointer-events: none; }
#toast.show { opacity: 1; }
img.proof { max-width: 100%; border-radius: 10px; margin-top: 8px; }
@media (max-width: 640px) { nav { gap: 10px; font-size: 14px; } h1 { font-size: 23px; } main { padding: 16px 12px 48px; } }

/* V10: specs, Ahmed dock */
table.specs { width: 100%; border-collapse: collapse; } table.specs td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
details.card summary { cursor: pointer; }
#ahmed { position: fixed; bottom: 12px; right: 12px; left: auto; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
#ahmed > * { pointer-events: auto; }
#ahmedRobot { width: 110px; height: 150px; }
#ahmed.min #ahmedRobot { display: none; }
#ahmedHide { position: absolute; bottom: 136px; right: 0; width: 22px; height: 22px; padding: 0; border-radius: 50%; font-size: 14px; background: #222; color: #ddd; }
#ahmed.min #ahmedHide { position: static; width: 44px; height: 44px; font-size: 0; background: radial-gradient(circle at 35% 30%, #ffe58a, #a67c1e); }
#ahmedChat { position: absolute; bottom: 160px; right: 0; width: min(360px, 92vw); height: 440px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--gold); border-radius: var(--radius); overflow: hidden; }
#ahmedChat[hidden] { display: none; }
.ahmed-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: #1b1608; color: var(--gold); font-weight: 700; }
.ahmed-head button { background: transparent; color: var(--gold); padding: 0 6px; }
#ahmedLog { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; white-space: pre-wrap; line-height: 1.5; }
.msg.bot { background: var(--surface); align-self: flex-start; } .msg.me { background: #3a2f0e; align-self: flex-end; }
#ahmedForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); } #ahmedForm input { flex: 1; }
@media (max-width: 640px) { #ahmedRobot { width: 90px; height: 122px; } #ahmedChat { bottom: 132px; height: 60vh; } #ahmedHide { bottom: 110px; } }
