@font-face {
  font-family: 'Vazirmatn';
  src: url('/public/fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/public/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/public/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/public/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #0d1117;
  --bg-elev: #12161d;
  --card: #161b22;
  --card-hover: #1c232d;
  --border: #30363d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #00d4ff;
  --accent-2: #00ff88;
  --danger: #ff3b5c;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(0, 212, 255, 0.07), transparent),
    radial-gradient(900px 500px at 10% 0%, rgba(0, 255, 136, 0.05), transparent), var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; width: 100%; }

/* ---------- header ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; }
.brand .dot { color: var(--accent); }
nav.main-nav { display: flex; gap: 22px; }
nav.main-nav a { color: var(--muted); font-weight: 500; font-size: 15px; transition: color .15s; }
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); }

/* ---------- hero ---------- */
.hero { padding: 70px 0 40px; text-align: center; }
.hero h1 { font-size: 34px; font-weight: 700; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 16px; max-width: 640px; margin: 0 auto; }
.hero .badges { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px;
}

/* ---------- sections ---------- */
section.block { padding: 36px 0; }
.block h2 { font-size: 22px; margin: 0 0 18px; font-weight: 700; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform .15s, border-color .15s, box-shadow .15s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); border-color: rgba(0, 212, 255, 0.35); box-shadow: var(--shadow); }
.card .thumb { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: #0a0c10; display: block; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.card p.desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; flex: 1; }
.price { font-weight: 700; color: var(--accent-2); font-size: 15px; }
.price.na { color: var(--muted); font-weight: 500; font-size: 13px; }

/* ---------- category chips ---------- */
.cat-strip { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-chip {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; background: var(--card);
  display: flex; align-items: center; gap: 10px; font-weight: 600; transition: border-color .15s;
}
.cat-chip:hover { border-color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #04121a; font-weight: 700; border: none;
  border-radius: 10px; padding: 12px 22px; cursor: pointer; font-size: 15px;
  font-family: inherit; transition: filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.98); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); font-weight: 600; }
input, textarea, select {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 14px; color: var(--text); font-family: inherit; font-size: 14px;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 90px; }

.panel {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; max-width: 480px; margin: 60px auto; box-shadow: var(--shadow);
}
.alert { border-radius: 10px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.alert.err { background: rgba(255, 59, 92, 0.12); color: #ff8da1; border: 1px solid rgba(255, 59, 92, 0.3); }
.alert.ok { background: rgba(0, 255, 136, 0.1); color: #7dffc4; border: 1px solid rgba(0, 255, 136, 0.3); }

/* ---------- product page ---------- */
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding: 36px 0; align-items: start; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; } }
.gallery-main { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #0a0c10; }
.gallery-main img { width: 100%; display: block; aspect-ratio: 4/3; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); cursor: pointer; opacity: .6; }
.gallery-thumbs img:hover { opacity: 1; }
.product-info h1 { font-size: 26px; margin: 0 0 10px; }
.product-info .price-tag { font-size: 24px; font-weight: 700; color: var(--accent-2); margin-bottom: 18px; }
.prose { color: #c3cbd4; line-height: 2; font-size: 14.5px; }
.prose ul { padding-right: 18px; }

/* ---------- admin ---------- */
.admin-shell { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar { width: 220px; border-left: 1px solid var(--border); padding: 24px 12px; flex-shrink: 0; }
.admin-sidebar a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.admin-sidebar a:hover, .admin-sidebar a.active { background: var(--card); color: var(--text); }
.admin-content { flex: 1; padding: 28px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
table th, table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: right; }
table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.status-pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.status-pill.paid, .status-pill.delivered { background: rgba(0,255,136,.12); color: #7dffc4; }
.status-pill.pending { background: rgba(255,200,0,.12); color: #ffd666; }
.status-pill.failed { background: rgba(255,59,92,.12); color: #ff8da1; }
.stat-row { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; min-width: 160px; }
.stat .num { font-size: 24px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- footer ---------- */
footer.site-footer { border-top: 1px solid var(--border); margin-top: auto; padding: 28px 0; color: var(--muted); font-size: 13px; text-align: center; }
footer.site-footer a { color: var(--accent); }
