/* متجر وقت اللاعبين */
:root {
  --bg: #0f0d22;
  --bg2: #17143a;
  --card: #1d1946;
  --card2: #252058;
  --line: rgba(255, 255, 255, .09);
  --ink: #f4f2ff;
  --muted: #a9a3d4;
  --brand: #8b5cf6;
  --brand2: #06b6d4;
  --accent: #f43f5e;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 16px;
  --grad: linear-gradient(135deg, #7c3aed, #06b6d4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", Arial, sans-serif; line-height: 1.7;
  background-image: radial-gradient(circle at 85% -10%, rgba(124, 58, 237, .25), transparent 40%), radial-gradient(circle at 0% 30%, rgba(6, 182, 212, .12), transparent 35%);
  background-attachment: fixed; min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* الشريط العلوي */
.announce { background: var(--grad); text-align: center; padding: 7px 16px; font-weight: 600; font-size: .9rem; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(15, 13, 34, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 14px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; white-space: nowrap; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.search { flex: 1; }
.search input { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; outline: none; }
.search input:focus { border-color: var(--brand); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-link { padding: 8px 12px; border-radius: 10px; font-weight: 600; }
.top-link:hover { background: var(--card); }
.icon-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count { position: absolute; top: -6px; left: -6px; background: var(--accent); color: #fff; border-radius: 999px; min-width: 20px; height: 20px; font-size: .75rem; display: grid; place-items: center; padding: 0 5px; font-weight: 700; }
.cats-bar { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none; }
.cats-bar::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 6px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chip.on, .chip:hover { background: var(--brand); border-color: var(--brand); }

/* عام */
main { padding: 22px 0 60px; min-height: 60vh; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; border-radius: 12px; padding: 11px 20px; font-weight: 700; background: var(--card2); color: var(--ink); transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.danger { background: #be123c; }
.btn.wa { background: #25d366; color: #05300f; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 18px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 10px; }
.sec { margin-top: 38px; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: 1.35rem; margin: 0; }
.sec-head a { color: var(--brand2); font-weight: 600; font-size: .92rem; }
.empty { text-align: center; padding: 50px 16px; color: var(--muted); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--card2); }
.badge.ok { background: rgba(34, 197, 94, .18); color: #4ade80; }
.badge.warn { background: rgba(245, 158, 11, .18); color: #fbbf24; }
.badge.bad { background: rgba(244, 63, 94, .18); color: #fb7185; }
.badge.info { background: rgba(6, 182, 212, .18); color: #22d3ee; }

/* الواجهة الرئيسية */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; padding: 34px; border-radius: 24px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .35), rgba(6, 182, 212, .18)), var(--bg2); border: 1px solid var(--line); overflow: hidden; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.hero p { color: #d8d4ff; font-size: 1.05rem; margin: 0 0 20px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-img { border-radius: 18px; aspect-ratio: 4/3; object-fit: cover; width: 100%; box-shadow: 0 20px 50px rgba(0, 0, 0, .4); }
.hero-art { aspect-ratio: 4/3; border-radius: 18px; background: var(--grad); display: grid; place-items: center; }
.hero-art svg { width: 45%; opacity: .95; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.feature { padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: .92rem; }
.feature span { font-size: 1.5rem; }

/* شبكة المنتجات */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.prod { display: flex; flex-direction: column; overflow: hidden; transition: transform .18s, border-color .18s; }
.prod:hover { transform: translateY(-3px); border-color: rgba(139, 92, 246, .55); }
.prod .ph { position: relative; aspect-ratio: 1; background: #fff; display: grid; place-items: center; }
.prod .ph img { width: 100%; height: 100%; object-fit: contain; }
.ph-empty { width: 100%; height: 100%; display: grid; place-items: center; background: var(--grad); }
.ph-empty svg { width: 40%; opacity: .9; }
.off { position: absolute; top: 10px; right: 10px; background: var(--accent); color: #fff; font-weight: 800; border-radius: 10px; padding: 2px 9px; font-size: .82rem; }
.out { position: absolute; inset: auto 0 0 0; background: rgba(0, 0, 0, .7); text-align: center; font-weight: 700; padding: 4px; font-size: .85rem; }
.prod .info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.prod .name { font-weight: 700; font-size: .98rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.price b { font-size: 1.15rem; color: #fff; }
.price s { color: var(--muted); font-size: .88rem; }
.prod .add { margin-top: 8px; padding: 8px; font-size: .9rem; }

/* صفحة المنتج */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.pdp .gallery { background: #fff; border-radius: 20px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pdp .gallery img { width: 100%; height: 100%; object-fit: contain; }
.pdp h1 { font-size: 1.7rem; }
.pdp .price b { font-size: 1.8rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 40px; height: 42px; background: var(--card2); border: 0; cursor: pointer; font-size: 1.2rem; }
.qty input { width: 52px; text-align: center; background: transparent; border: 0; outline: none; }
.desc { white-space: pre-line; color: #d6d2f5; }

/* السلة والنماذج */
.layout2 { display: grid; grid-template-columns: 1fr 360px; gap: 20px; align-items: start; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line img, .line .ph-empty { width: 76px; height: 76px; border-radius: 12px; object-fit: contain; background: #fff; }
.sum-row { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.2rem; font-weight: 800; }
.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.f > span { font-weight: 600; font-size: .92rem; }
.f input, .f select, .f textarea { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: none; width: 100%; }
.f input:focus, .f select:focus, .f textarea:focus { border-color: var(--brand); }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; margin-bottom: 10px; }
.opt:has(input:checked) { border-color: var(--brand); background: rgba(139, 92, 246, .12); }
.opt.disabled { opacity: .5; cursor: not-allowed; }
.opt input { margin-top: 5px; accent-color: var(--brand); }
.auth { max-width: 430px; margin: 10px auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: #fff; border-color: var(--brand); }
.list-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }

/* الصيانة */
.svc-group { margin-bottom: 20px; }
.svc-group h3 { font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.svc { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0 6px; }
.step { padding: 14px; text-align: center; font-size: .9rem; }
.step b { display: block; font-size: 1.4rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* التذييل */
.foot { border-top: 1px solid var(--line); background: rgba(0, 0, 0, .25); padding: 30px 0; margin-top: 30px; }
.foot-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; color: var(--muted); font-size: .92rem; }
.foot-in h4 { color: var(--ink); margin: 0 0 8px; }
.pay-logos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pay-logos span { background: #fff; color: #111; border-radius: 8px; padding: 3px 10px; font-weight: 800; font-size: .8rem; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(120px); background: #fff; color: #111; padding: 12px 20px; border-radius: 12px; font-weight: 700; transition: transform .25s; z-index: 50; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); max-width: calc(100% - 32px); }
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: #fecdd3; color: #881337; }
.skeleton { background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); min-height: 260px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .pdp, .layout2 { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .top-in { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .top-link { display: none; }
  .brand { flex: 1; }
}
@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prod .info { padding: 10px; }
  .price b { font-size: 1rem; }
}
