:root {
  --bg: #0c0c0e;
  --surface: #151518;
  --surface-2: #1c1c21;
  --text: #ece9e6;
  --muted: #9b9ba5;
  --accent: #c1121f;
  --accent-hover: #e0222f;
  --accent-dark: #7d0c15;
  --border: #2a2a31;
  --glow: 0 0 0 1px rgba(193, 18, 31, .45), 0 8px 28px rgba(193, 18, 31, .22);
  --radius: 14px;
  --font-title: "Aref Ruqaa", "Cairo", serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(193, 18, 31, .14), transparent 55%),
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, .7), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}

/* نسيج خفيف جداً فوق الخلفية */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; position: relative; z-index: 1; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
::selection { background: var(--accent); color: #fff; }

/* الهيدر */
.site-header {
  background: rgba(12, 12, 14, .85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 16px; flex-wrap: wrap; }

.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-title); font-size: 2.3rem; color: var(--text); letter-spacing: .5px; }
.brand-stitch { display: block; height: 0; margin-top: 4px; border-top: 2px dashed var(--accent); opacity: .9; }
.brand:hover .brand-name { color: #fff; text-shadow: 0 0 18px rgba(193, 18, 31, .7); }

.search { display: flex; gap: 6px; flex: 1; max-width: 420px; }
.search input {
  flex: 1; padding: 8px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(193, 18, 31, .25); }
.search button { padding: 8px 18px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; transition: background .15s; }
.search button:hover { background: var(--accent-hover); }

main.container { padding-top: 32px; padding-bottom: 40px; min-height: 70vh; }

/* الفئات */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 6px 18px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); transition: all .15s; }
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--glow); }

.filters { margin-bottom: 18px; color: var(--muted); }
.filters select { padding: 4px 10px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }

/* الشبكة والبطاقات */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--glow); border-color: transparent; }
.thumb { aspect-ratio: 4 / 3; background: #000; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.9) contrast(1.05); transition: transform .35s, filter .35s; }
.card:hover .thumb img { transform: scale(1.05); filter: saturate(1.05) contrast(1.08); }
.card-body { padding: 12px 14px 14px; }
.card-body h3 { margin: 6px 0 4px; font-size: 1.05rem; font-weight: 600; }
.badge { font-size: .75rem; background: rgba(193, 18, 31, .15); color: #ff6b73; border: 1px solid rgba(193, 18, 31, .35); padding: 1px 10px; border-radius: 999px; }
.price { color: #ff4d57; font-weight: 700; margin: 0; }
.price.big { font-size: 2rem; margin: 6px 0 14px; }

.empty { text-align: center; padding: 70px 0; color: var(--muted); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; color: var(--muted); }
.pager a { padding: 6px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.pager a:hover { border-color: var(--accent); }

/* صفحة المنتج */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.detail-image img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); display: block; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
.detail-info h1 { margin: 4px 0; font-family: var(--font-title); font-size: 2.4rem; font-weight: 700; }
.detail-info a:hover { color: var(--accent-hover); }
.code { margin: 0; color: var(--muted); }
.code strong { color: var(--text); letter-spacing: 1px; }
.desc { margin: 12px 0 24px; color: #cfcbc7; }

.btn-telegram {
  display: inline-block; background: var(--accent); color: #fff;
  padding: 12px 30px; border-radius: 12px; font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 6px 24px rgba(193, 18, 31, .35); transition: background .15s, box-shadow .15s, transform .15s;
}
.btn-telegram:hover { background: var(--accent-hover); box-shadow: 0 8px 32px rgba(224, 34, 47, .55); transform: translateY(-1px); }

.section-title { margin-top: 48px; font-family: var(--font-title); font-size: 1.7rem; }

/* الفوتر */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: rgba(12, 12, 14, .9); padding: 22px 0; text-align: center; color: var(--muted); }
.site-footer a { color: #ff6b73; font-weight: 600; }
.site-footer a:hover { color: #fff; }

@media (max-width: 760px) {
  .detail { grid-template-columns: 1fr; }
  .search { max-width: none; width: 100%; }
}

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