/* ============================================================
   روشن پلی — سیستم طراحی
   فونت: وزیرمتن | پالت: نیلی عمیق + بنفش + فیروزه‌ای + طلایی
   ============================================================ */

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

:root {
  --bg: #070a18;
  --bg-2: #0a0e20;
  --panel: #0d1226;
  --panel-2: #111832;
  --panel-3: #151d3b;
  --line: #212a4a;
  --line-2: #2c3760;
  --text: #e9eefc;
  --muted: #94a1c2;
  --muted-2: #6d7a9c;
  --violet: #7c5cff;
  --violet-2: #a78bfa;
  --cyan: #22d3ee;
  --gold: #ffc857;
  --green: #34d399;
  --red: #f87171;
  --pink: #f472b6;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 24px 60px -30px rgba(6, 9, 22, .95);
  --shadow-soft: 0 12px 30px -18px rgba(6, 9, 22, .9);
  --grad: linear-gradient(135deg, #a78bfa 0%, #7c5cff 45%, #22d3ee 100%);
  --grad-gold: linear-gradient(135deg, #ffe29a, #ffb020);
  --container: 1200px;
  --header-h: 74px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--violet-2); }
p { margin: 0 0 1em; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.5; font-weight: 700; letter-spacing: -.2px; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.85rem); }
h3 { font-size: 1.15rem; }
ul, ol { padding-right: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .4em; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; background: #0a0f22; border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .86em; direction: ltr; display: inline-block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: rgba(124, 92, 255, .35); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon { width: 22px; height: 22px; flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.icon--xs { width: 15px; height: 15px; }
.icon--sm { width: 18px; height: 18px; }
.icon--lg { width: 28px; height: 28px; }
.icon--xl { width: 36px; height: 36px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; right: -999px; top: 0; background: var(--violet); color: #fff; padding: 10px 16px; z-index: 999; border-radius: 0 0 10px 10px; }
.skip:focus { right: 12px; }

/* ---------------- پس‌زمینه ---------------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 92, 255, .18), transparent 70%);
}
.bg__orb { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; }
.bg__orb--1 { width: 520px; height: 520px; background: #5527c9; top: -180px; right: -120px; }
.bg__orb--2 { width: 460px; height: 460px; background: #0e7490; bottom: -160px; left: -140px; opacity: .35; }
.bg__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(124, 92, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 92, 255, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 20%, transparent 75%);
}

/* ---------------- اعلان ---------------- */
.announce { background: linear-gradient(90deg, rgba(124, 92, 255, .18), rgba(34, 211, 238, .12)); border-bottom: 1px solid var(--line); font-size: .86rem; }
.announce__inner { display: flex; align-items: center; gap: 10px; padding-block: 9px; }
.announce__inner p { margin: 0; flex: 1; color: #cfd8f0; }
.announce__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(52, 211, 153, .16); flex: 0 0 auto; }
.announce__close { background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 4px; }

/* ---------------- هدر ---------------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(7, 10, 24, .82);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand__mark { display: grid; place-items: center; filter: drop-shadow(0 6px 16px rgba(124, 92, 255, .35)); }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__text strong { font-size: 1.12rem; font-weight: 700; letter-spacing: -.3px; }
.brand__text small { font-size: .57rem; letter-spacing: 3.4px; color: var(--muted-2); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav__link { padding: 8px 12px; border-radius: 10px; font-size: .9rem; color: #c3cde6; white-space: nowrap; }
.nav__link:hover { background: rgba(124, 92, 255, .12); color: #fff; }
.nav__link.is-active { color: #fff; background: rgba(124, 92, 255, .16); box-shadow: inset 0 0 0 1px rgba(124, 92, 255, .28); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  color: #cbd5ee; cursor: pointer; position: relative; transition: .2s;
}
.icon-btn:hover { border-color: var(--line-2); color: #fff; background: var(--panel-3); }
.cart-btn__count {
  position: absolute; top: -6px; left: -6px; min-width: 19px; height: 19px; padding: 0 4px;
  background: var(--grad); color: #0b0716; font-size: .68rem; font-weight: 700;
  border-radius: 999px; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(124, 92, 255, .5);
}
.user-menu { position: relative; }
.user-menu__panel {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 218px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px; display: none; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow); z-index: 80;
}
.user-menu__panel.is-open { display: flex; }
.user-menu__panel a { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px; font-size: .87rem; color: #cbd5ee; }
.user-menu__panel a:hover { background: var(--panel-3); color: #fff; }
.user-menu__admin { color: var(--gold) !important; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px !important; }
.nav-toggle { display: none; }

.mobile-nav { display: none; padding: 12px 20px 20px; border-top: 1px solid var(--line); background: var(--bg-2); }
.mobile-nav.is-open { display: block; }
.mobile-nav a { display: block; padding: 11px 12px; border-radius: 10px; font-size: .93rem; color: #cbd5ee; }
.mobile-nav a.is-active, .mobile-nav a:hover { background: var(--panel-3); color: #fff; }
.mobile-nav__foot { display: flex; gap: 8px; margin-top: 12px; }

.searchbox { border-top: 1px solid var(--line); background: rgba(10, 14, 32, .96); }
.searchbox__inner { padding-block: 14px; }
.searchbox__field {
  display: flex; align-items: center; gap: 10px; background: var(--panel-2);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 4px 14px;
}
.searchbox__field input {
  flex: 1; background: none; border: 0; color: var(--text); font: inherit; padding: 12px 0; outline: none;
}
.searchbox__results { display: grid; gap: 8px; margin-top: 12px; }
.searchbox__results a {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: .88rem;
}
.searchbox__results.empty { color: var(--muted); font-size: .85rem; }

/* ---------------- دکمه‌ها ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 500; font-size: .92rem; cursor: pointer; white-space: nowrap;
  transition: transform .18s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn--primary {
  background: var(--grad); color: #0a0716; font-weight: 700;
  box-shadow: 0 14px 34px -14px rgba(124, 92, 255, .85);
}
.btn--primary:hover { color: #0a0716; box-shadow: 0 18px 40px -12px rgba(124, 92, 255, .95); transform: translateY(-1px); }
.btn--ghost { background: var(--panel-2); border-color: var(--line-2); color: #dbe3f7; }
.btn--ghost:hover { background: var(--panel-3); border-color: var(--violet); color: #fff; }
.btn--soft { background: rgba(124, 92, 255, .14); border-color: rgba(124, 92, 255, .3); color: var(--violet-2); }
.btn--soft:hover { background: rgba(124, 92, 255, .22); color: #fff; }
.btn--gold { background: var(--grad-gold); color: #2a1c00; font-weight: 700; }
.btn--danger { background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .35); color: #fca5a5; }
.btn--danger:hover { background: rgba(248, 113, 113, .24); color: #fff; }
.btn--sm { padding: 8px 14px; font-size: .83rem; border-radius: 10px; }
.btn--lg { padding: 15px 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------- کارت و پنل ---------------- */
.card {
  background: linear-gradient(180deg, rgba(17, 24, 50, .9), rgba(13, 18, 38, .92));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-soft);
}
.card--flat { background: var(--panel); box-shadow: none; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card__head h2, .card__head h3 { margin: 0; font-size: 1.05rem; }
.card__sub { color: var(--muted); font-size: .84rem; margin: 2px 0 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

.section { padding-block: 62px; }
.section--tight { padding-block: 40px; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.section__head h2 { margin: 0; }
.section__head p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; letter-spacing: .4px;
  color: var(--violet-2); background: rgba(124, 92, 255, .12);
  border: 1px solid rgba(124, 92, 255, .26); padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------------- تیترها و متن ---------------- */
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1rem; color: #b9c4de; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row--between { justify-content: space-between; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------------- نشان‌ها ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 500;
  padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.badge--ok { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .28); }
.badge--warn { background: rgba(255, 200, 87, .12); color: #fcd34d; border-color: rgba(255, 200, 87, .3); }
.badge--bad { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .28); }
.badge--info { background: rgba(34, 211, 238, .1); color: #67e8f9; border-color: rgba(34, 211, 238, .26); }
.badge--off { background: rgba(255, 200, 87, .16); color: #ffd479; border-color: rgba(255, 200, 87, .35); }
.badge--violet { background: rgba(124, 92, 255, .16); color: var(--violet-2); border-color: rgba(124, 92, 255, .32); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: #c2cce4;
  background: var(--panel-2); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px;
}

/* ---------------- قیمت ---------------- */
.price { font-weight: 700; font-size: 1.05rem; color: #fff; }
.price small { font-size: .7rem; font-weight: 400; color: var(--muted); }
.price-old { color: var(--muted-2); text-decoration: line-through; font-size: .82rem; margin-inline-end: 6px; }

/* ---------------- فرم‌ها ---------------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label, .field__label { font-size: .85rem; color: #c7d2ea; font-weight: 500; }
.field__hint { font-size: .76rem; color: var(--muted-2); }
.field-row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=search], input[type=date], input[type=url], select, textarea {
  width: 100%; background: #0b1024; border: 1px solid var(--line-2); color: var(--text);
  border-radius: 12px; padding: 11px 14px; font: inherit; font-size: .9rem; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
input:focus, select:focus, textarea:focus {
  border-color: var(--violet); box-shadow: 0 0 0 3px rgba(124, 92, 255, .16); background: #0c1229;
}
input::placeholder, textarea::placeholder { color: #5b678a; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 51%); background-size: 6px 6px, 6px 6px; background-position: left 16px center, left 10px center; background-repeat: no-repeat; padding-left: 34px; }
.check { display: flex; align-items: center; gap: 9px; font-size: .87rem; color: #cad4ea; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--violet); }
.form-note { font-size: .8rem; color: var(--muted); background: var(--panel-2); border: 1px dashed var(--line-2); border-radius: 10px; padding: 10px 12px; }

/* ---------------- جدول ---------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 640px; }
thead th {
  text-align: right; padding: 12px 14px; color: var(--muted); font-weight: 500; font-size: .8rem;
  background: #0b1128; border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 12px 14px; border-bottom: 1px solid rgba(33, 42, 74, .6); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(124, 92, 255, .05); }
.t-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.t-actions .btn { padding: 5px 10px; font-size: .76rem; }

/* ---------------- توست ---------------- */
.toasts { position: fixed; bottom: 22px; left: 22px; z-index: 200; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 44px)); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px;
  background: rgba(17, 24, 50, .97); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  font-size: .86rem; animation: toastIn .28s ease;
}
.toast--ok { border-color: rgba(52, 211, 153, .45); }
.toast--bad { border-color: rgba(248, 113, 113, .45); }
.toast--warn { border-color: rgba(255, 200, 87, .45); }
.toast__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--panel-3); }
.toast--ok .toast__icon { color: var(--green); }
.toast--bad .toast__icon { color: var(--red); }
.toast--warn .toast__icon { color: var(--gold); }
.toast__text { flex: 1; }
.toast__close { background: none; border: 0; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------- فوتر ---------------- */
.footer { margin-top: 70px; border-top: 1px solid var(--line); background: linear-gradient(180deg, rgba(10, 14, 32, .4), rgba(7, 10, 24, .96)); }
.footer__top { display: grid; grid-template-columns: 1.1fr 2fr; gap: 46px; padding-block: 52px 34px; }
.footer__about { color: var(--muted); font-size: .86rem; max-width: 340px; margin-top: 16px; }
.footer__badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.footer__social { display: flex; gap: 9px; margin-top: 18px; }
.footer__social a {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px;
  background: var(--panel-2); border: 1px solid var(--line); color: #c3cde6;
}
.footer__social a:hover { border-color: var(--violet); color: #fff; background: var(--panel-3); }
.footer__cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }
.footer__col h2 { font-size: .92rem; margin-bottom: 14px; color: #e4eaf9; }
.footer__col a, .footer__col p { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); margin-bottom: 9px; }
.footer__col a:hover { color: var(--violet-2); }
.footer__addr { line-height: 1.7; }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-block: 18px 26px; border-top: 1px solid var(--line); font-size: .79rem; color: var(--muted-2);
}
.footer__bottom p { margin: 0; }
.footer__seo { color: var(--muted-2); }
.footer__meta { display: flex; gap: 16px; }

/* ---------------- برش‌های عمومی ---------------- */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: .78rem; color: var(--muted); }
.crumbs li { display: flex; align-items: center; gap: 8px; margin: 0; }
.crumbs li:not(:last-child)::after { content: '/'; color: var(--line-2); }
.crumbs a:hover { color: var(--violet-2); }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .icon { width: 46px; height: 46px; color: var(--line-2); margin-bottom: 12px; }
.empty h3 { color: #dbe3f7; margin-bottom: 6px; }

.alert { display: flex; gap: 10px; padding: 13px 15px; border-radius: 12px; font-size: .85rem; margin-bottom: 16px; border: 1px solid; }
.alert--info { background: rgba(34, 211, 238, .07); border-color: rgba(34, 211, 238, .25); color: #a5f3fc; }
.alert--warn { background: rgba(255, 200, 87, .07); border-color: rgba(255, 200, 87, .28); color: #fde68a; }
.alert--ok { background: rgba(52, 211, 153, .07); border-color: rgba(52, 211, 153, .28); color: #a7f3d0; }
.alert--bad { background: rgba(248, 113, 113, .07); border-color: rgba(248, 113, 113, .28); color: #fecaca; }

@media (max-width: 1080px) {
  .footer__top { grid-template-columns: 1fr; gap: 32px; }
  .footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; }
  .nav-toggle { display: grid; }
}
@media (max-width: 860px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding-inline: 16px; }
  .section { padding-block: 40px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; }
  .toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 18px; }
  .card { padding: 18px; }
}
