/* FORMORA3D — هویت بصری: داخل اتاقک پرینتر؛ پس‌زمینه‌ی گرافیتی، متن کرم، فیلامنت داغ نارنجی. */
/* دو تم: تیره (پیش‌فرض، رنگ مذاب نارنجی) و روشن (آبی کبالت). انتخاب با دکمه‌ی بالای صفحه ذخیره می‌شود.
   همه‌ی رنگ‌های سایت از همین متغیرها می‌آیند؛ برای تغییر پالت فقط این دو بلوک را عوض کنید. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --plate: #0e1115;       /* پس‌زمینه */
  --paper: #161a20;       /* سطح کارت‌ها و فرم‌ها */
  --paper-2: #1d222a;
  --ink: #eceee8;         /* متن اصلی */
  --ink-inv: #0e1115;     /* متن روی سطح روشن */
  --muted: #9aa294;
  --line: #2a313a;
  --edge: #46505c;        /* خط‌های پررنگ */
  --accent: #ff6a2b;      /* رنگ اصلی: فلز مذاب */
  --accent-h: #ff8247;
  --accent-d: #b9420f;
  --accent-soft: rgba(255, 106, 43, .16);
  --on-accent: #1d0c03;
  --hard: #b9420f;        /* سایه‌ی سخت کارت‌های بزرگ */
  --ok: #4fd39b;
  --warn: #f0b541;
  --bad: #ff7a6b;
  --lines-c: rgba(255, 255, 255, .06);
  --tile-s: 26%; --tile-l: 19%;
  --vase-a: #ff5a2b; --vase-b: #ff7440; --nozzle: #e9e5dc; --tip: #ffd9a0;
  --logo-bg: #232a33; --logo-top: #eceee8;
  --cta-bg: #ff6a2b; --cta-fg: #1d0c03; --cta-sub: #5a2406; --cta-btn-bg: #0e1115; --cta-btn-fg: #eceee8; --cta-btn-shadow: #000;
  --foot-bg: #090b0e; --foot-fg: #eceee8; --foot-muted: #8f978a; --foot-line: #232a33;
  --intro-a: #ff6a2b; --intro-b: #ffb36b; --intro-glow: rgba(255, 106, 43, .25);
}
:root[data-theme="light"] {
  color-scheme: light;
  --plate: #e8ebe4;
  --paper: #f6f7f2;
  --paper-2: #eef0ea;
  --ink: #12161b;
  --ink-inv: #e8ebe4;
  --muted: #586056;
  --line: #cbd0c4;
  --edge: #12161b;
  --accent: #2640f0;      /* رنگ اصلی: فیلامنت آبی */
  --accent-h: #3550ff;
  --accent-d: #1a2dbd;
  --accent-soft: rgba(38, 64, 240, .12);
  --on-accent: #ffffff;
  --hard: #12161b;
  --ok: #17794f;
  --warn: #8a5a00;
  --bad: #b3261e;
  --lines-c: rgba(18, 22, 27, .07);
  --tile-s: 38%; --tile-l: 84%;
  --vase-a: #2640f0; --vase-b: #3a52ff; --nozzle: #12161b; --tip: #ff5a2b;
  --logo-bg: #12161b; --logo-top: #e8ebe4;
  --cta-bg: #12161b; --cta-fg: #e8ebe4; --cta-sub: #b9c0b2; --cta-btn-bg: #e8ebe4; --cta-btn-fg: #12161b; --cta-btn-shadow: #8f968a;
  --foot-bg: #12161b; --foot-fg: #e8ebe4; --foot-muted: #aab2a3; --foot-line: #2c333b;
  --intro-a: #2640f0; --intro-b: #8fa0ff; --intro-glow: rgba(38, 64, 240, .28);
}
:root {
  --molten: #ff5a2b;      /* نوک نازل در هر دو تم */
  /* نام‌های دیگری که در قاعده‌های زیر استفاده شده؛ به متغیرهای تم وصل‌اند */
  --hot: var(--accent); --on-hot: var(--on-accent); --hot-d: var(--accent-d);
  --brand: var(--cta-bg); --on-brand: var(--cta-fg);
  --edge-shadow: var(--hard); --lilac: var(--accent);
  --bg: var(--plate); --bg-2: var(--paper); --card: var(--paper); --card-2: var(--paper-2);
  --text: var(--ink); --accent-2: var(--accent); --accent-3: var(--accent);
  --r-lg: 22px; --r-md: 14px; --r-sm: 10px;
  --font-display: 'Lalezar', 'Vazirmatn', Tahoma, sans-serif;
  --lines: repeating-linear-gradient(0deg, var(--lines-c) 0 1px, transparent 1px 7px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Vazirmatn', Tahoma, 'Segoe UI', sans-serif;
  background: var(--plate);
  color: var(--ink);
  line-height: 1.85;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, .page-title { font-family: var(--font-display); font-weight: 400; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--hot); color: var(--on-hot); }

input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 11px 14px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);
}
textarea { resize: vertical; min-height: 110px; }
label { display: block; font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.ltr { direction: ltr; text-align: left; }
.container { width: min(1180px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* دکمه‌ها: کمی برجسته مثل یک لایه‌ی چاپ‌شده؛ با فشردن پایین می‌روند */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 24px; border-radius: 12px; font-weight: 700; font-size: .96rem;
  transition: transform .12s, box-shadow .12s, background .2s, border-color .2s, opacity .2s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--hot); color: var(--on-hot); box-shadow: 0 4px 0 var(--hot-d); }
.btn-primary:hover:not(:disabled) { background: var(--accent-h); }
.btn-primary:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--hot-d); }
.btn-ghost { border: 1.5px solid var(--edge); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--ink-inv); }
.btn-ghost:active { transform: scale(.98); }
.btn-danger { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); border: 1.5px solid color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-sm { padding: 6px 16px; font-size: .85rem; border-radius: 10px; }
.btn-primary.btn-sm { box-shadow: 0 3px 0 var(--hot-d); }
.btn-block { width: 100%; }

/* هدر */
.header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); background: color-mix(in srgb, var(--plate) 86%, transparent);
  border-bottom: 1.5px solid var(--edge);
}
.header-inner { display: flex; align-items: center; gap: 22px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.55rem; line-height: 1; }
.logo-mark { width: 34px; height: 34px; display: block; flex: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
.lm-bg { fill: var(--logo-bg); } .lm-a { fill: var(--accent); } .lm-b { fill: var(--logo-top); }
.nav { display: flex; gap: 4px; margin-inline-start: 14px; }
.nav a { position: relative; white-space: nowrap; padding: 8px 14px; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav a::after {
  content: ''; position: absolute; inset-inline: 14px; bottom: 2px; height: 3px; border-radius: 2px;
  background: var(--hot); transform: scaleX(0); transition: transform .25s;
}
.nav a:hover, .nav a.active { color: var(--ink); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.header-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 12px;
  border: 1.5px solid var(--edge); display: grid; place-items: center; font-size: 1.1rem; transition: .2s;
}
.icon-btn:hover { background: var(--ink); color: var(--ink-inv); }
.badge {
  position: absolute; top: -7px; inset-inline-start: -7px; min-width: 21px; height: 21px; padding: 0 5px;
  background: var(--hot); color: var(--on-hot); border-radius: 999px; font-size: .72rem; font-weight: 800;
  display: grid; place-items: center; border: 2px solid var(--plate);
}
.menu-toggle { display: none; }
#themeBtn { font-size: 1.05rem; }

/* ---------- هیرو ---------- */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); line-height: 1.22; max-width: 11em; }
.hero p.lead { color: var(--muted); font-size: 1.12rem; margin: 22px 0 30px; max-width: 30em; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.specs-strip {
  display: flex; margin-top: 44px; border-top: 1.5px solid var(--edge); max-width: 36em;
}
.specs-strip > div { flex: 1; padding: 14px 0 0; padding-inline-end: 18px; }
.specs-strip > div + div { padding-inline-start: 18px; border-inline-start: 1px solid var(--line); }
.specs-strip dt { color: var(--muted); font-size: .8rem; }
.specs-strip dd { font-weight: 700; font-size: .95rem; line-height: 1.6; }

/* صفحه‌ی ساخت: ماکت پرینت لایه‌به‌لایه */
.printer-art { position: relative; width: 100%; max-width: 470px; margin-inline: auto; }
.plate {
  position: relative; aspect-ratio: 1 / 1.08; border: 1.5px solid var(--edge); border-radius: var(--r-lg);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 100%,
    var(--paper);
  box-shadow: 8px 8px 0 var(--edge-shadow); overflow: hidden;
}
.plate svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.layer { fill: var(--vase-a); animation: lay .22s ease-out both; transform-box: fill-box; transform-origin: center; }
.layer.alt { fill: var(--vase-b); }
.plate .tk { stroke: var(--ink); stroke-width: 1.5; }
.plate .tt { fill: var(--muted); font-size: 11px; font-family: Vazirmatn, sans-serif; }
.plate .bl { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.plate .nz { fill: var(--nozzle); }
.plate .nn { fill: var(--muted); }
.plate .nt { fill: var(--tip); }
@keyframes lay { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: none; } }
.nozzle-rise { animation: rise var(--build, 3.4s) linear both; }
.nozzle-sweep { animation: sweep .62s ease-in-out infinite alternate; }
.nozzle-park { animation: park .5s ease-in calc(var(--build, 3.4s) + .15s) both; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(var(--rise, -250px)); } }
@keyframes sweep { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
@keyframes park { to { transform: translate(60px, -26px); opacity: 0; } }
html.has-intro:not(.site-ready) .layer,
html.has-intro:not(.site-ready) .nozzle-rise,
html.has-intro:not(.site-ready) .nozzle-sweep,
html.has-intro:not(.site-ready) .nozzle-park { animation-play-state: paused; }
.plate-readout {
  position: absolute; inset-inline: 14px; top: 14px; display: flex; justify-content: space-between; gap: 10px;
  font-size: .8rem; font-weight: 600; z-index: 2;
}
.plate-readout span {
  background: var(--ink); color: var(--ink-inv); border-radius: 8px; padding: 2px 10px; line-height: 1.7;
}
.plate-readout span.dim { background: transparent; color: var(--muted); font-weight: 500; padding: 2px 0; }

/* ---------- بخش‌ها ---------- */
.layer-band { height: 22px; background: var(--lines); border-block: 1.5px solid var(--edge); }
.section { padding: 76px 0; }
.section-head { max-width: 640px; margin: 0 0 38px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); line-height: 1.3; }
.section-head p { color: var(--muted); margin-top: 6px; }
.section-head.row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 24px;
}

/* ویترین محصولات منتخب: اولی بزرگ */
.showcase { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.showcase .product-card.big { grid-column: span 2; grid-row: span 2; }
.showcase .product-card.big > a { flex: 1; display: flex; }
.showcase .product-card.big .pimg { aspect-ratio: auto; flex: 1; min-height: 300px; font-size: 8rem; }
.showcase .product-card.big h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1.4; }
.showcase .product-card.big .pbody { padding: 20px 22px 22px; flex: 0 0 auto; }
.showcase .product-card.big .pbody p { font-size: 1rem; flex: 0; }

/* چرا ما: فهرست با خط، نه کارت */
.why { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 56px; }
.why > div { border-top: 1.5px solid var(--edge); padding: 20px 0 30px; }
.why h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.5; }
.why p { color: var(--muted); max-width: 30em; }

/* مراحل: یک رشته‌ی فیلامنت که چهار گره را به هم وصل می‌کند */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps::before {
  content: ''; position: absolute; top: 21px; inset-inline: 21px; height: 3px; background: var(--edge); border-radius: 2px;
}
.step { position: relative; }
.step .num {
  position: relative; width: 44px; height: 44px; border-radius: 50%; background: var(--hot); color: var(--on-hot);
  font-family: var(--font-display); font-size: 1.35rem; line-height: 1; display: grid; place-items: center;
  margin-bottom: 16px; border: 3px solid var(--plate); box-shadow: 0 0 0 1.5px var(--edge);
}
.step h3 { font-size: 1.05rem; margin-bottom: 2px; }
.step p { color: var(--muted); font-size: .93rem; }

/* متریال‌ها: قرقره‌ی فیلامنت و ویژگی‌ها */
.materials { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mat { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 20px 18px; transition: border-color .2s; }
.mat:hover { border-color: var(--edge); }
.spool {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 14px;
  background:
    radial-gradient(circle, var(--paper) 0 9px, var(--ink) 9.5px 12px, transparent 12.5px),
    repeating-radial-gradient(circle, var(--c) 0 3px, color-mix(in srgb, var(--c) 78%, #000) 3px 5px);
  box-shadow: 0 0 0 2px var(--edge);
}
.mat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; line-height: 1.3; }
.mat > span { display: block; font-size: .84rem; color: var(--muted); margin-bottom: 12px; }
.mat dl { display: grid; gap: 5px; }
.mat dl div { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--muted); }
.dots { display: inline-flex; gap: 3px; direction: ltr; }
.dots i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--edge); }
.dots i.on { background: var(--ink); }

/* دعوت به اقدام: یک بلوک مرجانیِ داغ با خطوط لایه */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 56px 40px; text-align: center;
  background: var(--brand); color: var(--on-brand);
}
.cta-band::before {
  content: ''; position: absolute; inset-inline: 0; bottom: 0; height: 46%;
  background: repeating-linear-gradient(0deg, color-mix(in srgb, var(--cta-fg) 18%, transparent) 0 1px, transparent 1px 8px);
  mask-image: linear-gradient(to top, #000, transparent); -webkit-mask-image: linear-gradient(to top, #000, transparent);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); margin-bottom: 8px; line-height: 1.35; }
.cta-band p { color: var(--cta-sub); margin-bottom: 26px; }
.cta-band .btn-primary { background: var(--cta-btn-bg); color: var(--cta-btn-fg); box-shadow: 0 4px 0 var(--cta-btn-shadow); }
.cta-band .btn-primary:hover { background: var(--cta-btn-bg); filter: brightness(1.15); }
.cta-band .btn-primary:active { box-shadow: 0 1px 0 var(--cta-btn-shadow); }

/* سؤالات متداول */
.faq details { border-top: 1.5px solid var(--edge); padding: 16px 0; }
.faq details:last-child { border-bottom: 1.5px solid var(--edge); }
.faq summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--hot); }
.faq details[open] summary { color: var(--hot); }
.faq p { color: var(--muted); margin-top: 8px; max-width: 42em; }

/* ---------- کارت محصول ---------- */
.product-card {
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .22s, border-color .22s;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--edge); }
.pimg {
  position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: 4.2rem; overflow: hidden;
  background: var(--lines), hsl(var(--h) var(--tile-s) var(--tile-l));
}
.pimg .emoji { filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5)); transition: transform .35s; }
.product-card:hover .pimg .emoji { transform: scale(1.1) rotate(-4deg); }
.pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tag {
  position: absolute; top: 12px; inset-inline-start: 12px; background: var(--ink); color: var(--ink-inv);
  padding: 1px 12px; border-radius: 8px; font-size: .76rem; z-index: 1;
}
.pbody { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pbody h3 { font-size: 1.05rem; line-height: 1.6; }
.pbody p { color: var(--muted); font-size: .88rem; flex: 1; }
.pfoot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 8px; }
.price { font-weight: 800; color: var(--ink); }
.price small { color: var(--muted); font-weight: 400; font-size: .74rem; margin-inline-start: 3px; }

/* فروشگاه */
.page { padding: 44px 0 76px; min-height: 60vh; }
.page-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.3; margin-bottom: 4px; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 28px; align-items: center; }
.toolbar input[type=search] { max-width: 280px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); font-size: .9rem; transition: .2s; }
.chip:hover { border-color: var(--edge); }
.chip.on { background: var(--hot); color: var(--on-hot); border-color: var(--hot); font-weight: 700; }

/* صفحه محصول */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pdp .pimg { border-radius: var(--r-lg); font-size: 9rem; aspect-ratio: 1 / 1; border: 1.5px solid var(--edge); box-shadow: 8px 8px 0 var(--edge-shadow); }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.spec { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px; }
.spec span { display: block; color: var(--muted); font-size: .78rem; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.swatch { padding: 6px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); font-size: .9rem; }
.swatch:hover { border-color: var(--edge); }
.swatch.on { border-color: var(--hot); color: var(--hot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--edge); border-radius: 12px; background: var(--paper); }
.qty button { width: 40px; height: 40px; font-size: 1.2rem; }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.breadcrumb { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--hot); }

/* فرم‌ها و پنل‌ها */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.panel { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 24px; }
.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.summary-line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); gap: 10px; }
.summary-line:last-of-type { border: 0; }
.total { font-size: 1.2rem; font-weight: 800; }

/* سبد خرید */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s; }
.overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(420px, 100%); background: var(--paper);
  border-right: 1.5px solid var(--edge); z-index: 100; transform: translateX(-105%); transition: transform .3s;
  display: flex; flex-direction: column; visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { padding: 18px 20px; border-bottom: 1.5px solid var(--edge); display: flex; justify-content: space-between; align-items: center; }
.drawer-body { flex: 1; overflow: auto; padding: 14px 20px; }
.drawer-foot { padding: 18px 20px; border-top: 1.5px solid var(--edge); }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item .pimg { width: 64px; aspect-ratio: 1; font-size: 1.8rem; border-radius: 12px; }
.cart-item h4 { font-size: .94rem; }
.cart-item small { color: var(--muted); }
.link-btn { color: var(--bad); font-size: .8rem; }

/* مودال */
.modal-wrap { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.modal { width: min(440px, 100%); background: var(--paper); border: 1.5px solid var(--edge); border-radius: var(--r-lg); padding: 28px; box-shadow: 8px 8px 0 var(--edge-shadow); max-height: 94vh; overflow: auto; position: relative; animation: pop .25s ease; }
@keyframes pop { from { transform: translateY(14px) scale(.97); opacity: 0; } }
.modal .close { position: absolute; top: 14px; inset-inline-end: 14px; width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--edge); }
.modal .close:hover { background: var(--ink); color: var(--ink-inv); }
.tabs { display: flex; background: var(--paper-2); border: 1.5px solid var(--line); border-radius: 12px; padding: 4px; margin: 16px 0 20px; }
.tabs button { flex: 1; padding: 8px; border-radius: 9px; font-size: .9rem; color: var(--muted); }
.tabs button.on { background: var(--hot); color: var(--on-hot); font-weight: 700; }
.stack > * + * { margin-top: 14px; }
.hint { font-size: .82rem; color: var(--muted); }
.error { color: var(--bad); font-size: .88rem; min-height: 1.2em; }
.dev-code { background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1.5px dashed var(--warn); color: var(--warn); border-radius: var(--r-sm); padding: 8px 12px; font-size: .86rem; }
.otp-input { text-align: center; letter-spacing: .6em; font-size: 1.4rem; direction: ltr; }

/* وضعیت‌ها / جدول */
.status { display: inline-block; padding: 1px 12px; border-radius: 8px; font-size: .8rem; font-weight: 700; background: var(--paper-2); border: 1px solid var(--line); }
.st-pending, .st-new { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.st-confirmed, .st-quoted, .st-printing { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.st-qc, .st-ready { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.st-shipped { background: rgba(139, 105, 230, .16); color: #9b7de8; border-color: rgba(139, 105, 230, .4); }
.st-delivered, .st-done { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.st-cancelled, .st-rejected { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.order-card { margin-bottom: 14px; }
.order-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: .84rem; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 18px 0 26px; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; line-height: 1.4; }
.stat span { color: var(--muted); font-size: .86rem; }
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty .big { font-size: 3rem; }

/* فوتر */
.footer { --logo-bg: #262d36; background: var(--foot-bg); color: var(--foot-fg); border-top: 1px solid var(--foot-line); padding: 52px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer h4 { margin-bottom: 10px; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.footer .muted { color: var(--foot-muted); }
.footer li { list-style: none; color: var(--foot-muted); margin-bottom: 6px; font-size: .94rem; }
.footer a:hover { color: var(--foot-fg); }
.copy { text-align: center; color: var(--foot-muted); font-size: .82rem; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--foot-line); }

/* توست */
.toasts { position: fixed; bottom: 22px; inset-inline-start: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--paper-2); color: var(--ink); border: 1px solid var(--line); border-inline-start: 4px solid var(--ok); padding: 12px 18px; border-radius: 12px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .8); animation: pop .25s ease; max-width: 340px; }
.toast.err { border-inline-start-color: var(--bad); }

.spinner { width: 20px; height: 20px; border: 3px solid color-mix(in srgb, var(--ink) 15%, transparent); border-top-color: var(--hot); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 60px; }

/* ظاهر شدن تدریجی کارت‌ها هنگام اسکرول */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s, transform .55s; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- واکنش‌گرا ---------- */
@media (max-width: 960px) {
  .hero-grid, .pdp, .two-col { grid-template-columns: 1fr; }
  .hero-grid { gap: 40px; }
  .printer-art { max-width: 380px; }
  .showcase { grid-template-columns: repeat(2, 1fr); }
  .showcase .product-card.big { grid-column: span 2; grid-row: auto; }
  .showcase .product-card.big .pimg { min-height: 240px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .materials { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .steps::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 70px; inset-inline: 0; flex-direction: column; background: var(--paper); padding: 12px; border-bottom: 1.5px solid var(--edge); margin: 0; }
  .nav.open { display: flex; }
  .nav a::after { inset-inline: 14px; bottom: 4px; }
  .menu-toggle { display: grid; }
}
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 34px; }
  .specs-strip { flex-direction: column; }
  .specs-strip > div, .specs-strip > div + div { padding: 10px 0; border-inline-start: 0; border-bottom: 1px solid var(--line); }
  .why { grid-template-columns: 1fr; }
  .materials { grid-template-columns: 1fr 1fr; }
  .cta-band { padding: 38px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
  .pbody { padding: 12px; }
  .pimg { font-size: 3rem; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 8px 12px; font-size: .84rem; }
  .icon-btn { width: 40px; height: 40px; }
  .logo { font-size: 1.3rem; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
}
@media (max-width: 520px) {
  .header-inner { gap: 8px; }
  .header-actions { gap: 5px; }
  .header-actions .btn { padding: 6px 10px; font-size: .8rem; }
  .icon-btn { width: 38px; height: 38px; }
  .logo { font-size: 1.15rem; gap: 6px; }
  .logo-mark { width: 28px; height: 28px; }
}
@media (max-width: 460px) {
  .grid-3, .grid-4, .showcase { grid-template-columns: 1fr; }
  .showcase .product-card.big { grid-column: auto; }
  .steps { grid-template-columns: 1fr; }
  .materials { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}



/* =========================================================
   صیقل نهایی ظاهر: عمق، درخشش، حرکت‌های ظریف
   ========================================================= */
body {
  background-image:
    radial-gradient(900px 520px at 88% -8%, var(--accent-soft), transparent 70%),
    radial-gradient(760px 480px at -6% 38%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%);
  background-attachment: fixed;
}
::selection { background: var(--accent); color: var(--on-accent); }

/* نوار پیشرفت اسکرول در بالای صفحه (در مرورگرهای جدید) */
.header::after {
  content: ''; position: absolute; inset-inline: 0; bottom: -1.5px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-h));
  transform-origin: right center; transform: scaleX(0);
  animation: progress linear both; animation-timeline: scroll(root);
}
@keyframes progress { to { transform: scaleX(1); } }

/* هیرو */
.hero { position: relative; isolation: isolate; overflow: clip; }
.hero::before {
  content: ''; position: absolute; z-index: -1; top: 8%; inset-inline-end: -6%; width: min(620px, 58vw); aspect-ratio: 1;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
  filter: blur(18px); pointer-events: none;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
  padding: 6px 14px 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--line); background: color-mix(in srgb, var(--paper) 80%, transparent);
  font-size: .84rem; font-weight: 700; color: var(--muted);
}
.eyebrow i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); }
  70% { box-shadow: 0 0 0 9px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.hero h1 .hl {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-h) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-cta .btn { min-height: 50px; padding-inline: 28px; font-size: 1rem; }
.hero-cta .btn-primary { box-shadow: 0 4px 0 var(--accent-d), 0 16px 32px -12px var(--accent-soft); }
.hero-cta .btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 var(--accent-d), 0 20px 36px -12px var(--accent-soft); }
.hero-cta .btn-primary:active:not(:disabled) { transform: translateY(3px); }
.btn-ghost:hover { transform: translateY(-2px); }

.printer-art { filter: drop-shadow(0 30px 40px color-mix(in srgb, var(--accent) 14%, transparent)); }
.plate { background-color: var(--paper); }
.plate-readout { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(6px); }
.specs-strip { gap: 0; }
.specs-strip dd { color: var(--ink); }

/* بخش‌ها */
.section-head h2 { position: relative; padding-bottom: 16px; }
.section-head h2::after {
  content: ''; position: absolute; bottom: 0; inset-inline-start: 0; width: 56px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-h));
}
.section-head.row h2::after { inset-inline-start: 0; }
.section-head.row h2 { padding-bottom: 14px; }

/* کارت‌های محصول */
.product-card {
  border-radius: var(--r-lg); overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .3s, box-shadow .35s;
}
.product-card:hover {
  transform: translateY(-6px); border-color: var(--accent);
  box-shadow: 0 24px 40px -22px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pimg { overflow: hidden; }
.pimg img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.product-card:hover .pimg img { transform: scale(1.06); }
.pimg::after {
  content: ''; position: absolute; inset: auto 0 0; height: 40%; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--paper) 30%, transparent), transparent);
}
.tag { backdrop-filter: blur(6px); background: color-mix(in srgb, var(--ink) 82%, transparent); color: var(--ink-inv); }
.price { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.product-card .btn-primary.btn-sm { padding: 9px 20px; }
.product-card .btn-primary.btn-sm:hover:not(:disabled) { transform: translateY(-1px); }
.showcase .product-card.big:hover { transform: translateY(-4px); }

/* چرا ما */
.why > div { position: relative; transition: transform .3s; }
.why > div::before {
  content: ''; position: absolute; top: -1.5px; inset-inline-start: 0; height: 1.5px; width: 0;
  background: var(--accent); transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.why > div:hover::before { width: 100%; }
.why > div:hover { transform: translateX(-4px); }

/* مراحل */
.step .num {
  box-shadow: 0 0 0 6px var(--plate), 0 0 0 7.5px var(--accent-soft), 0 10px 22px -8px var(--accent-soft);
  transition: transform .3s, box-shadow .3s;
}
.step:hover .num { transform: translateY(-3px) scale(1.06); }

/* متریال‌ها */
.mat {
  position: relative; overflow: hidden;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, box-shadow .35s;
}
.mat:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 30px -20px color-mix(in srgb, var(--accent) 50%, transparent); }

/* سؤالات متداول */
.faq details { transition: padding .25s; }
.faq details[open] { padding-inline-start: 4px; }
.faq summary { padding-block: 4px; }

/* دعوت به اقدام */
.cta-band { overflow: hidden; }
.cta-band .btn-primary { box-shadow: 0 4px 0 var(--cta-btn-shadow), 0 18px 30px -14px rgba(0, 0, 0, .45); }
.cta-band .btn-primary:hover:not(:disabled) { transform: translateY(-2px); }

/* فوتر */
.footer { background-image: radial-gradient(700px 300px at 100% 0%, var(--accent-soft), transparent 70%); }
.footer a { transition: color .2s, padding .25s; }
.footer a:hover { padding-inline-start: 4px; }

/* حرکت‌های کم برای کاربرانی که خواسته‌اند */
@media (prefers-reduced-motion: reduce) {
  .eyebrow i, .header::after { animation: none; }
  .product-card, .mat, .why > div, .btn { transition: none; }
}

/* موبایل */
@media (max-width: 720px) {
  .hero::before { width: 90vw; top: 0; }
  .eyebrow { font-size: .78rem; }
  .product-card:hover { transform: none; }
  .why > div:hover { transform: none; }
}

/* ---------- نوار تماس پایین سایت + نماد اعتماد ---------- */
.contact-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 18px 0; margin-top: 26px; border-top: 1px solid var(--line); }
.contact-info { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.loc-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; }
.loc-link:hover { color: var(--accent); }
.loc-link svg, .soc svg { width: 20px; height: 20px; display: block; }
.soc { display: flex; gap: 10px; }
.soc a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--text); background: var(--card, transparent); transition: transform .2s, color .2s, border-color .2s; }
.soc a:hover, .soc a:focus-visible { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
/* جای نماد اعتماد (اینماد)؛ کد نماد بعداً همین‌جا قرار می‌گیرد */
.enamad-slot { min-width: 120px; min-height: 120px; display: grid; place-items: center; }

/* ---------- صفحه‌ی تماس ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 22px 0; }
.contact-cards .card p { word-break: break-word; }
.contact-addr, .contact-about { margin-top: 14px; }
.contact-about h2 { font-size: 1.2rem; margin-bottom: 8px; }
.contact-about p { line-height: 2; }

/* ---------- اسلایدر عکس محصول ---------- */
.pslider { cursor: grab; touch-action: pan-y; user-select: none; }
.pslider .slide { opacity: 0; transition: opacity .7s ease, transform .7s ease; transform: scale(1.03); }
.pslider .slide.on { opacity: 1; transform: scale(1); }
.sl-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; z-index: 2;
  background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.sl-prev { right: 12px; } .sl-next { left: 12px; }
.sl-btn:hover, .sl-btn:focus-visible { background: rgba(0, 0, 0, .7); }
.sl-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.sl-dot { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255, 255, 255, .5); cursor: pointer; }
.sl-dot.on { background: #fff; width: 26px; border-radius: 6px; transition: width .3s; }

/* ---------- مدیریت عکس‌ها در پنل ادمین ---------- */
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-bottom: 10px; }
.img-item { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #0002; }
.img-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-badge { position: absolute; top: 6px; right: 6px; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; }
.img-tools { position: absolute; bottom: 4px; left: 4px; right: 4px; display: flex; justify-content: space-between; gap: 4px; }
.img-tools button { flex: 1; font-size: .8rem; padding: 3px 0; border-radius: 8px; border: 0; background: rgba(0, 0, 0, .7); color: #fff; cursor: pointer; }
.img-tools button:disabled { opacity: .35; cursor: default; }
.img-tools button[data-rm] { background: #b3261e; }
.img-item.pend { opacity: .75; }

@media (prefers-reduced-motion: reduce) {
  .pslider .slide { transition: none; transform: none; }
}
@media (max-width: 640px) {
  .contact-strip { justify-content: center; text-align: center; }
  .contact-info { justify-content: center; }
  .enamad-slot { min-width: 0; min-height: 0; }
  .enamad-slot:empty { display: none; }
}

/* ---------- ورود با گوگل ---------- */
.gsep { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: var(--muted); font-size: .9rem; }
.gsep::before, .gsep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.gbtn { display: flex; justify-content: center; min-height: 44px; }

/* ---------- لوگوی سفارشی: اگر public/images/logo.png باشد، جای لوگوی پیش‌فرض را می‌گیرد ---------- */
.logo-img { display: none; width: 40px; height: 40px; object-fit: contain; flex: none; }
.logo-img.on { display: block; }
.logo-img.on + .logo-mark { display: none; }

/* ---------- مراحل سفارش در حساب کاربری ---------- */
.ostep { list-style: none; padding: 0; margin: 12px 0 16px; display: flex; }
.ostep li { flex: 1; position: relative; text-align: center; font-size: .72rem; color: var(--muted); }
.ostep li::before { content: ''; position: absolute; top: 6px; inset-inline-start: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.ostep li:first-child::before { display: none; }
.ostep li.done::before { background: var(--accent); }
.ostep .dot { position: relative; z-index: 1; display: block; width: 14px; height: 14px; margin: 0 auto 6px; border-radius: 50%; background: var(--line); }
.ostep li.done .dot { background: var(--accent); }
.ostep li.cur .dot { box-shadow: 0 0 0 4px var(--accent-soft); }
.ostep li.cur { color: var(--text); font-weight: 700; }
.ostep-cancel { margin: 12px 0 16px; color: #f87171; font-weight: 700; }
.track-code { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: .92rem; }

/* ---- صفحه‌ی تماس (فشرده) ---- */
.contact-img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; border-radius: 18px; display: block; margin-bottom: 18px; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 4px; }
.cta-row .btn { flex: 1 1 160px; justify-content: center; }
.crow-list { padding: 0; margin-top: 14px; overflow: hidden; }
.crow { display: flex; align-items: center; gap: 12px; padding: 14px 18px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--line); }
.crow:last-child { border-bottom: 0; }
.crow:hover { background: rgba(0, 0, 0, 0.03); }
.crow-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; background: rgba(0, 0, 0, 0.05); }
.crow-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.crow-txt b { font-size: 0.95rem; }
.crow-txt span { font-size: 0.85rem; opacity: 0.7; word-break: break-word; }
.crow-go { opacity: 0.4; font-size: 1.3rem; }
.contact-addr { margin-top: 14px; }
.contact-addr h3 { margin-bottom: 6px; }
.contact-addr p { line-height: 1.9; margin-bottom: 10px; }
.contact-about { margin-top: 30px; padding: 0 4px; }
.contact-about h2 { font-size: 1.15rem; margin-bottom: 8px; }
.contact-about p { line-height: 2; opacity: 0.85; }
.crow-ico.t-phone { background: #2563eb; color: #fff; }
.crow-ico.t-wa { background: #25d366; color: #fff; }
.crow-ico.t-tg { background: #229ed9; color: #fff; }
.crow-ico.t-ig { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); color: #fff; }
.crow-ico.t-mail { background: #ea4335; color: #fff; }

/* ---------- پنل کاربران (ادمین) ---------- */
.ud-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.ud-search { flex: 1 1 260px; }
.ud-sort { width: auto; }
.ud-counts { font-size: .86rem; margin-bottom: 14px; }
.ud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.ud-card { text-align: start; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: .2s; cursor: pointer; color: inherit; font: inherit; width: 100%; }
.ud-card:hover { border-color: var(--edge); transform: translateY(-2px); }
.ud-top { display: flex; align-items: center; gap: 12px; }
.ud-id { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.ud-id b, .ud-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-id span { font-size: .82rem; }
.ud-av { width: 44px; height: 44px; border-radius: 14px; background: var(--hot); color: var(--on-hot); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.ud-av.lg { width: 58px; height: 58px; font-size: 1.3rem; }
.ud-tags { display: flex; gap: 6px; flex-wrap: wrap; min-height: 4px; }
.ud-tag { font-size: .74rem; padding: 2px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper-2); }
.ud-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px dashed var(--line); padding-top: 12px; }
.ud-stats div { display: flex; flex-direction: column; min-width: 0; }
.ud-stats b { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-stats span { font-size: .74rem; color: var(--muted); }
.ud-modal { width: min(620px, 100%); }
.ud-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-inline-end: 36px; }
.ud-head h3 { margin: 0; }
.ud-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 4px; }
.ud-info div { background: var(--paper-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.ud-info span { font-size: .76rem; color: var(--muted); }
.ud-modal h4 { margin: 18px 0 8px; font-size: 1rem; }
.ud-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.ud-row span { font-size: .84rem; color: var(--muted); }
.ud-role { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ud-role select { width: auto; }

/* ---------- پنل مدیریت روی موبایل ---------- */
@media (max-width: 640px) {
  .admin-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -4px; padding: 2px 4px 8px; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tabs .chip { flex: 0 0 auto; white-space: nowrap; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0 18px; }
  .stat { padding: 14px; }
  .stat b { font-size: 1.4rem; }
  .stat span { font-size: .8rem; }
  .order-card .track-row { flex-direction: column; align-items: stretch !important; }
  .order-card .track-row input { max-width: none !important; width: 100%; }
  .order-card .track-row button { width: 100%; }
  .order-card select { width: 100% !important; }

  .ud-toolbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .ud-toolbar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ud-toolbar .chips::-webkit-scrollbar { display: none; }
  .ud-toolbar .chip { flex: 0 0 auto; white-space: nowrap; }
  .ud-sort { width: 100%; }
  .ud-counts { font-size: .8rem; line-height: 1.9; }
  .ud-grid { grid-template-columns: 1fr; gap: 10px; }
  .ud-card { padding: 14px; gap: 10px; }
  .ud-stats b { font-size: .82rem; }
  .ud-stats span { font-size: .7rem; }

  .modal-wrap { place-items: end center; padding: 0; }
  .modal.ud-modal { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 22px 16px 26px; box-shadow: none; border-bottom: 0; }
  .ud-head { padding-inline-end: 0; margin-top: 6px; }
  .ud-head h3 { font-size: 1.1rem; }
  .ud-info { grid-template-columns: 1fr 1fr; }
  .ud-row { padding: 9px 10px; }
  .ud-role { flex-direction: column; align-items: stretch; }
  .ud-role select { width: 100%; }
  .ud-role .btn { width: 100%; }
}

/* ---------- لیست محصولات و عکس‌های کاربران (ادمین) ---------- */
.adm-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-list { display: grid; gap: 10px; }
.adm-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.adm-emoji { font-size: 1.6rem; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--paper-2); flex: 0 0 auto; }
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.adm-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main > span { font-size: .84rem; }
.adm-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cm-item { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.cm-img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--edge); flex: 0 0 auto; }
.cm-body { flex: 1; min-width: 0; }
.cm-tools { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .page-title { font-size: 1.7rem; }
  .panel { padding: 16px; }
  .modal-wrap { place-items: end center; padding: 0; }
  .modal { width: 100% !important; max-width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; box-shadow: none; border-bottom: 0; padding: 22px 16px 26px; }
  .modal .close { top: 12px; }
  .adm-item { padding: 12px; gap: 10px; }
  .adm-emoji { width: 40px; height: 40px; font-size: 1.3rem; }
  .adm-item > .btn { flex: 0 0 auto; }
  .cm-item { flex-direction: column; align-items: stretch; }
  .cm-img { width: 100%; height: 200px; }
  .cm-tools .btn { flex: 1 1 auto; }
  .order-head b { word-break: break-word; }
  .order-card .summary-line { font-size: .92rem; }
}

/* ---------- عکس پروفایل ---------- */
.av { border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1.5px solid var(--edge); display: inline-block; vertical-align: middle; }
.av-init { display: inline-grid; place-items: center; background: var(--hot); color: var(--on-hot); font-weight: 700; font-family: var(--font-body, inherit); }
.av-sm { width: 24px; height: 24px; font-size: .75rem; margin-inline-end: 4px; }
.av-lg { width: 96px; height: 96px; font-size: 2.2rem; }
.acc-av { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.acc-av-info { flex: 1; min-width: 200px; }
.acc-av-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 640px) {
  .av-lg { width: 80px; height: 80px; font-size: 1.9rem; }
  .acc-av { gap: 14px; }
  .acc-av-btns .btn { flex: 1 1 auto; }
}

.ph-row { display: flex; gap: 8px; align-items: center; }
.ph-row input { flex: 1; min-width: 0; }

/* ---------- شخصی‌سازی محصول (CREATOR) ---------- */
.creator { margin: 8px 0 16px; padding: 14px; border: 1px solid rgba(127,127,127,.25); border-radius: 14px; }
.creator-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.creator-view { width: 100%; border-radius: 10px; overflow: hidden; background: rgba(127,127,127,.06); }
.creator input[type=range] { width: 100%; }

/* ---------- دستیار فروشگاه ---------- */
.assist-btn { position: fixed; bottom: 18px; left: 18px; z-index: 900; width: 66px; height: 66px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); background: radial-gradient(circle at 30% 25%, #5fb4ff, #1f6fe0 60%, #1450b0); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 6px rgba(47,127,230,.18), 0 10px 28px rgba(31,111,224,.55); }
.assist-btn:hover { transform: scale(1.06); }
.assist-btn svg { filter: drop-shadow(0 0 6px rgba(160,220,255,.7)); }
.assist-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(79,195,255,.25), 0 10px 28px rgba(46,134,222,.55); }
.assist-btn svg { display: block; margin: auto; }
/* شناور بودن و درخشش: از ویژگی translate استفاده شده تا با بزرگ‌شدن هنگام hover تداخل نداشته باشد */
.assist-btn { animation: assist-float 3.2s ease-in-out infinite, assist-glow 2.4s ease-in-out infinite; }
.assist-btn:hover { animation-play-state: paused; }
@keyframes assist-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -14px; }
}
@keyframes assist-glow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(47,127,230,.18), 0 10px 28px rgba(31,111,224,.55); }
  50% { box-shadow: 0 0 0 14px rgba(79,195,255,.08), 0 18px 40px rgba(46,134,222,.75); }
}
.assist-panel { position: fixed; bottom: 80px; left: 18px; z-index: 900; width: min(360px, calc(100vw - 36px)); max-height: min(480px, 70vh); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; border: 1px solid rgba(127,127,127,.3); background: #15181e; color: #eceef2; box-shadow: 0 12px 40px rgba(0,0,0,.4); }
.assist-panel[hidden] { display: none; }
.assist-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(127,127,127,.25); }
.assist-x { background: none; border: 0; color: inherit; font-size: 1rem; cursor: pointer; }
.assist-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 200px; }
.assist-msg { padding: 8px 12px; border-radius: 12px; max-width: 85%; white-space: pre-line; line-height: 1.7; font-size: .92rem; }
.assist-msg.bot { background: rgba(127,127,127,.15); align-self: flex-start; }
.assist-msg.me { background: var(--accent, #ff6a2b); color: #fff; align-self: flex-end; }
.assist-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid rgba(127,127,127,.25); }
.assist-form input { flex: 1; min-width: 0; }
.assist-form button { white-space: nowrap; }

/* ---------- انیمیشن‌های بیشتر (کاهش حرکت در تنظیمات سیستم خاموش می‌شود) ---------- */
/* کارت‌های محصول: ورود بزرگ‌تر با تأخیر پلکانی هنگام اسکرول */
.reveal { transform: translateY(40px) scale(.96); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { transform: none; }
.reveal.in:nth-child(3n+2) { transition-delay: .08s; }
.reveal.in:nth-child(3n) { transition-delay: .16s; }
/* کارت‌های محصول: بالا رفتن و درخشش مرز هنگام نشانگر ماوس */
.product-card { transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .3s ease; }
.product-card:hover { box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .65); }
.product-card:hover .pimg img { transform: scale(1.06); }
/* دکمه‌ها: کمی بالا و سایه‌ی نرم */
.btn { transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .7); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
/* کارت‌های عمومی: حرکت ملایم هنگام hover */
.card { transition: transform .35s ease, box-shadow .35s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .6); }
/* صفحه‌ی اول: درخشش‌های پس‌زمینه با حرکت آهسته و مداوم */
.hero::before { animation: heroDrift 14s ease-in-out infinite alternate; }
@keyframes heroDrift {
  from { transform: translate3d(-2%, 0, 0) scale(1); }
  to { transform: translate3d(3%, -2%, 0) scale(1.06); }
}
