:root {
  --ink: #0a0908; --ink-2: #131110; --card: #161412; --line: #2a2622; --line-2: #3a342d;
  --bone: #f4f2ee; --text-2: #d8d5ce; --muted: #9a958c;
  --gold: #d4b071; --gold-2: #e8cf9d; --gold-bg: rgba(212, 176, 113, .1);
  --red: #eb6f6f; --green: #6fcf97;
  --ease: cubic-bezier(.16, 1, .3, 1); --r: 18px;
  --ar: 'Almarai', system-ui, sans-serif; --en: 'Bebas Neue', 'Almarai', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--bone);
  font-family: var(--ar); font-size: 16px; line-height: 1.6; overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* التوهّج الدافئ */
.glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 40% at 78% -6%, rgba(212, 150, 70, .2), transparent 70%),
    radial-gradient(45% 35% at 8% 4%, rgba(190, 110, 50, .1), transparent 70%);
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1240px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 0;
}
.brand { display: grid; text-decoration: none; line-height: 1.1; }
.brand-en { font-family: var(--en); letter-spacing: .22em; font-size: 13px; color: var(--gold); }
.brand-ar { font-weight: 800; font-size: 22px; }
.live {
  display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(22, 20, 18, .7); font-size: 13px; color: var(--text-2); white-space: nowrap;
}
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(111, 207, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0); } }

main { max-width: 1240px; margin: 0 auto; padding: 0 16px 48px; }
.hero { padding: 34px 0 22px; }
.hero h1 { margin: 0 0 8px; font-size: clamp(30px, 8vw, 54px); font-weight: 800; line-height: 1.2; text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin: 0; color: var(--muted); max-width: 46ch; }

.tools { display: grid; gap: 12px; position: sticky; top: 0; z-index: 5; padding: 10px 0; margin: 0 -16px; padding-inline: 16px; background: linear-gradient(var(--ink) 78%, transparent); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 50px; border-radius: 14px; background: var(--ink-2); border: 1px solid var(--line); transition: border-color .2s; }
.search:focus-within { border-color: var(--gold); }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; }
.search input::placeholder { color: var(--muted); }
.cats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
.cats::-webkit-scrollbar { display: none; }
.cats button {
  flex: none; min-height: 40px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--text-2); font-size: 14px; transition: all .2s var(--ease);
}
.cats button.on { background: var(--gold); border-color: var(--gold); color: #17130c; font-weight: 700; }

.disclosure { margin: 6px 0 18px; padding: 10px 14px; border-radius: 12px; background: var(--gold-bg); border: 1px solid rgba(212, 176, 113, .18); color: var(--text-2); font-size: 13px; }

.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1220px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.deal {
  display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--card);
  border: 1px solid var(--line); transition: transform .35s var(--ease), border-color .25s, opacity .5s, box-shadow .35s;
  animation: in .5s var(--ease) both;
}
@keyframes in { from { opacity: 0; transform: translateY(14px); } }
.deal:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(212, 150, 70, .25); }
.deal.featured { border-color: rgba(212, 176, 113, .55); }
.deal.gone { opacity: 0; transform: scale(.96); pointer-events: none; }

.shot { position: relative; aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; }
.shot img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.badge {
  position: absolute; top: 12px; right: 12px; display: flex; align-items: baseline; gap: 1px; direction: ltr;
  padding: 3px 12px 0; border-radius: 12px; background: var(--gold); color: #17130c; font-family: var(--en); font-size: 30px; line-height: 1.25;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5);
}
.badge small { font-size: 18px; }
.star { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(10, 9, 8, .82); color: var(--gold-2); font-size: 12px; font-weight: 700; }

.body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; }
.store { font-size: 12px; color: var(--gold); font-weight: 700; }
.deal h2 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; color: var(--text-2); font-size: 14px; }
.feats li { display: flex; gap: 8px; align-items: baseline; }
.feats li::before { content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); transform: translateY(-2px); }

.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.now { font-family: var(--en); font-size: 40px; line-height: 1; color: var(--bone); letter-spacing: .01em; }
.cur { font-size: 14px; color: var(--muted); font-weight: 700; }
.was { color: var(--muted); text-decoration: line-through; font-family: var(--en); font-size: 20px; }

.timer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--ink-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.timer b { font-family: var(--en); font-size: 22px; font-weight: 400; color: var(--gold-2); letter-spacing: .06em; direction: ltr; font-variant-numeric: tabular-nums; }
.timer.soon b { color: var(--red); }

.acts { display: flex; gap: 8px; }
.open {
  flex: 1; display: grid; place-items: center; min-height: 50px; border-radius: 14px; background: var(--gold); color: #17130c;
  font-weight: 800; text-decoration: none; transition: filter .2s, transform .2s var(--ease);
}
.open:hover { filter: brightness(1.08); }
.open:active { transform: scale(.98); }
.share { flex: none; width: 50px; min-height: 50px; display: grid; place-items: center; border-radius: 14px; background: none; border: 1px solid var(--line-2); transition: border-color .2s; }
.share:hover { border-color: var(--gold); }
.share svg { width: 20px; height: 20px; fill: none; stroke: var(--gold-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.empty { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 70px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }
.empty[hidden] { display: none; }
.empty b { color: var(--bone); font-size: 18px; }

footer { display: grid; gap: 2px; justify-items: center; padding: 30px 16px max(34px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.sig-en { font-family: var(--en); letter-spacing: .3em; font-size: 20px; color: var(--gold); }
.sig-ar { color: var(--text-2); font-weight: 700; }
footer a { text-decoration: none; direction: ltr; }
footer a:hover { color: var(--gold); }

.toast {
  position: fixed; inset-inline: 16px; bottom: max(20px, env(safe-area-inset-bottom)); margin: 0 auto; width: fit-content; max-width: calc(100vw - 32px);
  padding: 13px 20px; border-radius: 14px; background: #201c17; border: 1px solid var(--gold); color: var(--bone); font-weight: 700; z-index: 20;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .6); animation: in .4s var(--ease) both;
}
.toast[hidden] { display: none; }

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

.demo-note { margin: 0 0 18px; padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--gold); color: var(--gold-2); font-size: 13px; font-weight: 700; text-align: center; }
.demo-note[hidden] { display: none; }
