/* ==========================================================================
   eve — استایل اصلی (سایت، پنل مشتری و پنل مدیریت)
   رنگ‌ها فقط از لوگو: صورتی گلبهی #FCDAF5 و آلویی تیره #20021E
   ========================================================================== */

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

:root {
  --pink: #FCDAF5;
  --pink-50: #FFF7FD;
  --pink-100: #FEEEFB;
  --pink-200: #FCDAF5;
  --pink-300: #F5C3EA;
  --pink-400: #E9A5DB;
  --plum: #20021E;
  --plum-800: #2E0B2B;
  --plum-700: #3D1639;
  --plum-600: #573152;
  --plum-500: #735270;
  --plum-400: #9A7F97;
  --plum-300: #C4B0C1;
  --line: #F1DDEC;
  --line-2: #E7CCE0;
  --white: #FFFFFF;
  --bg: #FFF9FE;

  --ok: #1B7A4C; --ok-bg: #E7F5EE;
  --err: #B3261E; --err-bg: #FDEDEC;
  --warn: #8A5700; --warn-bg: #FFF4DC;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow-sm: 0 1px 2px rgba(32, 2, 30, .06), 0 2px 8px -2px rgba(32, 2, 30, .06);
  --shadow: 0 12px 32px -14px rgba(32, 2, 30, .22), 0 2px 6px -2px rgba(32, 2, 30, .06);
  --shadow-lg: 0 30px 60px -24px rgba(32, 2, 30, .35);
  --header-h: 68px;
  --container: 1200px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 15px; line-height: 1.8; font-weight: 400;
  color: var(--plum); background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip; /* جلوگیری از بیرون‌زدگی افقی بدون خراب کردن هدر چسبان */
  overflow-wrap: break-word; /* کلمه‌ی خیلی بلند بدون فاصله (مثلاً نام اشتباه‌تایپ‌شده) از کادر بیرون نزند */
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.45; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
::selection { background: var(--pink-300); color: var(--plum); }
:focus-visible { outline: 3px solid var(--pink-400); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ic-lg { width: 1.6em; height: 1.6em; }
/* اعداد جهت متن را عوض نمی‌کنند؛ فقط از متن اطرافشان جدا می‌شوند تا «تومان» و «از» جابه‌جا نشوند */
.num { unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
/* فقط برای چیزهایی که واقعاً باید چپ‌به‌راست باشند (مثل +۱۲٬۰۰۰ یا نام کاربری انگلیسی) */
.ltr, .sgn { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--plum-500); }
.small { font-size: .86em; }
.xsmall { font-size: .78em; }
.bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-ok { color: var(--ok); } .text-err { color: var(--err); } .text-warn { color: var(--warn); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.grid { display: grid; gap: 20px; }
.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)); }
.span-2 { grid-column: span 2; }

/* ------------------------------ splash / progress ------------------------------ */
.splash {
  position: fixed; inset: 0; z-index: 1000; display: none; place-items: center; align-content: center; gap: 22px;
  background: radial-gradient(120% 90% at 50% 20%, var(--pink-100) 0%, var(--pink) 60%, var(--pink-300) 100%);
}
html.show-splash .splash { display: grid; animation: splash-failsafe .01s linear 3.2s forwards; }
.splash img { width: 150px; animation: splash-in .9s var(--ease) both; filter: drop-shadow(0 12px 30px rgba(32, 2, 30, .15)); }
.splash-bar { width: 120px; height: 3px; border-radius: 3px; background: rgba(32, 2, 30, .12); overflow: hidden; position: relative; }
.splash-bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--plum); border-radius: 3px; animation: splash-bar 1.1s ease-in-out infinite; }
.splash.is-done { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
@keyframes splash-in { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes splash-bar { 0% { transform: translateX(160%); } 100% { transform: translateX(-260%); } }
@keyframes splash-failsafe { to { opacity: 0; visibility: hidden; } }

.progress { position: fixed; top: 0; right: 0; left: 0; height: 3px; z-index: 999; pointer-events: none; }
.progress::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 0; background: linear-gradient(270deg, var(--plum), var(--plum-600)); box-shadow: 0 0 10px rgba(32, 2, 30, .35); }
.progress.is-active::before { width: 85%; transition: width 6s cubic-bezier(.05, .7, .3, 1); }
.progress.is-done::before { width: 100%; opacity: 0; transition: width .2s ease, opacity .4s ease .2s; }

/* ------------------------------ buttons ------------------------------ */
.btn {
  --b-bg: var(--plum); --b-fg: var(--pink); --b-bd: var(--plum);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font-weight: 700; font-size: 15px; line-height: 1.2;
  white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .15s var(--ease), background-color .2s, box-shadow .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--plum-700); border-color: var(--plum-700); box-shadow: 0 10px 22px -12px rgba(32, 2, 30, .6); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.btn-soft { --b-bg: var(--pink); --b-fg: var(--plum); --b-bd: var(--pink); }
.btn-soft:hover { background: var(--pink-300); border-color: var(--pink-300); box-shadow: none; }
.btn-ghost { --b-bg: transparent; --b-fg: var(--plum); --b-bd: var(--line-2); }
.btn-ghost:hover { background: var(--pink-100); border-color: var(--pink-300); box-shadow: none; }
.btn-danger { --b-bg: var(--err-bg); --b-fg: var(--err); --b-bd: #F6CFCB; }
.btn-danger:hover { background: var(--err); border-color: var(--err); color: #fff; box-shadow: none; }
.btn-ok { --b-bg: var(--ok); --b-fg: #fff; --b-bd: var(--ok); }
.btn-ok:hover { background: #156A41; border-color: #156A41; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 13.5px; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: 12.5px; gap: 5px; }
.btn-lg { min-height: 54px; padding: 12px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; min-height: 42px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 36px; min-height: 36px; }
.btn.is-loading { pointer-events: none; position: relative; color: transparent !important; }
.btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--b-fg); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { color: var(--plum); font-weight: 700; border-bottom: 1.5px solid var(--pink-400); transition: border-color .2s; }
.link:hover { border-color: var(--plum); }

/* ------------------------------ header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(255, 249, 254, .86); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(32, 2, 30, .45); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 42px; width: auto; flex: none; }
.brand-name { font-size: 12px; line-height: 1.3; color: var(--plum-500); border-right: 1px solid var(--line-2); padding-right: 10px; max-width: 150px; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; color: var(--plum-600); transition: background .2s, color .2s; }
.main-nav a:hover { background: var(--pink-100); color: var(--plum); }
.main-nav a.is-active { background: var(--pink); color: var(--plum); font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.main-nav + .header-actions { margin-inline-start: 0; }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -3px; left: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--plum); color: var(--pink); font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  border: 2px solid var(--bg); transition: transform .25s var(--ease);
}
.cart-badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.nav-toggle { display: none; }
.hours-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; padding: 5px 12px; border-radius: 999px; background: var(--pink-100); color: var(--plum-600); white-space: nowrap; }
.hours-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--plum-300); }
.hours-pill.is-open .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(27, 122, 76, .15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(27, 122, 76, 0); } }

/* drawer (موبایل) */
/* منوی کشویی وقتی بسته است کاملاً از صفحه حذف می‌شود (نه اینکه بیرون صفحه بماند)؛
   وگرنه مرورگر موبایل با زوم‌اوت صفحه را به‌اندازه‌ی آن کوچک می‌کند */
.drawer-backdrop { display: none; position: fixed; inset: 0; z-index: 90; background: rgba(32, 2, 30, .38); }
.drawer { display: none; position: fixed; top: 0; bottom: 0; right: 0; z-index: 100; width: min(86vw, 330px); background: var(--white); box-shadow: var(--shadow-lg); flex-direction: column; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
body.drawer-open .drawer { display: flex; animation: drawer-in .32s var(--ease) both; }
body.drawer-open .drawer-backdrop { display: block; animation: fade-in .25s ease both; }
body.drawer-open { overflow: hidden; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.drawer-head img { height: 40px; width: auto; }
.drawer nav { display: flex; flex-direction: column; gap: 4px; }
.drawer nav a, .drawer nav button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; font-weight: 500; background: none; border: 0; text-align: right; width: 100%; }
.drawer nav a:hover, .drawer nav button:hover { background: var(--pink-100); }
.drawer nav a.is-active { background: var(--pink); font-weight: 700; }
.drawer-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 10px; }

/* ------------------------------ flash / toasts ------------------------------ */
.toasts { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(560px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 13px 16px; border-radius: 16px;
  background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 500; font-size: 14.5px; line-height: 1.7;
  animation: toast-in .35s var(--ease) both;
}
.toast .ic { margin-top: 3px; }
.toast-close { margin-inline-start: auto; background: none; border: 0; padding: 2px; opacity: .55; }
.toast-close:hover { opacity: 1; }
.toast.success { border-color: #BFE3CF; } .toast.success .ic:first-child { color: var(--ok); }
.toast.error { border-color: #F3C5C1; background: #FFFBFB; } .toast.error .ic:first-child { color: var(--err); }
.toast.warning { border-color: #F2DDAF; } .toast.warning .ic:first-child { color: var(--warn); }
.toast.is-leaving { animation: toast-out .3s ease forwards; pointer-events: none; }
.toast { position: relative; overflow: hidden; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* نوار زمان باقیمانده‌ی پیام */
.toast-timer { position: absolute; right: 0; left: 0; bottom: 0; height: 3px; background: var(--plum-300); transform-origin: right center; animation: toast-timer linear forwards; }
.toast.success .toast-timer { background: var(--ok); opacity: .45; }
.toast.error .toast-timer { background: var(--err); opacity: .45; }
.toast.warning .toast-timer { background: var(--warn); opacity: .45; }
@keyframes toast-timer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

.alert { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--pink-100); border: 1px solid var(--line); font-size: 14.5px; }
.alert .ic { margin-top: 3px; }
.alert-ok { background: var(--ok-bg); border-color: #C7E6D5; color: #124D31; }
.alert-err { background: var(--err-bg); border-color: #F3C5C1; color: #7A1A14; }
.alert-warn { background: var(--warn-bg); border-color: #F2DDAF; color: #5E3C00; }
.alert b { font-weight: 700; }

.closed-banner { background: var(--plum); color: var(--pink); }
.closed-banner .container { display: flex; align-items: center; justify-content: center; gap: 10px; padding-block: 10px; font-size: 14px; font-weight: 500; text-align: center; flex-wrap: wrap; }

/* ------------------------------ cards & forms ------------------------------ */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 22px; }
.card-flat { box-shadow: none; }
.card-pink { background: var(--pink-100); border-color: var(--pink-300); }
.card-plum { background: var(--plum); color: var(--pink); border-color: var(--plum); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card + .card { margin-top: 20px; }

.page { padding-block: 28px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head > * { min-width: 0; max-width: 100%; }
.page-head h1 { font-size: 26px; margin: 0; overflow-wrap: anywhere; }
.page-head p { margin: 4px 0 0; color: var(--plum-500); }
.crumbs { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; font-size: 13px; color: var(--plum-500); margin-bottom: 6px; min-width: 0; }
.crumbs a { white-space: nowrap; }
.crumbs .ic { flex: none; }
.crumbs > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs a:hover { color: var(--plum); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .label { font-weight: 700; font-size: 14px; }
.hint, .field .hint { font-size: 12.5px; color: var(--plum-500); line-height: 1.7; }
.req::after { content: " *"; color: var(--err); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-2); background: var(--white); color: var(--plum); font-size: 15.5px;
  transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--plum-300); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--pink-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--plum); box-shadow: 0 0 0 4px rgba(252, 218, 245, .9); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2320021E' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 36px; }
.input-ltr { direction: ltr; text-align: left; }
.input-ltr::placeholder { text-align: left; }
.input-money { direction: ltr; text-align: left; font-weight: 700; letter-spacing: .02em; }
.input-group { position: relative; }
.input-group .addon { position: absolute; top: 50%; transform: translateY(-50%); right: 14px; color: var(--plum-400); font-size: 13px; pointer-events: none; }
.input-group .addon-left { right: auto; left: 14px; }
.input-group .input { padding-right: 42px; }
.input-group.has-left .input { padding-left: 64px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 500; user-select: none; }
.check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--plum); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 26px; border-radius: 13px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .25s var(--ease); }
.switch input:checked + .track { background: var(--plum); }
.switch input:checked + .track::after { transform: translateX(-20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--pink-400); outline-offset: 2px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
/* تله‌ی ربات: نامرئی ولی سر جای خودش (بیرون بردنش با left منفی، در صفحه‌ی راست‌به‌چپ اسکرول افقی می‌ساخت) */
.hp { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap; opacity: 0; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-flex; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); font-weight: 500; font-size: 14px; cursor: pointer; transition: all .2s; }
.chip-check input:checked + span { background: var(--plum); color: var(--pink); border-color: var(--plum); }
.chip-check input:focus-visible + span { outline: 3px solid var(--pink-400); }

/* ------------------------------ badges ------------------------------ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; line-height: 1.7; white-space: nowrap; background: var(--pink-100); color: var(--plum-600); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.no-dot::before { display: none; }
.st-registered { background: var(--pink); color: var(--plum); }
.st-shipping { background: var(--plum); color: var(--pink); }
.st-completed { background: var(--ok-bg); color: var(--ok); }
.st-cancelled { background: #F2EEF1; color: #8C7C89; text-decoration: none; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-plum { background: var(--plum); color: var(--pink); }

/* ------------------------------ tables ------------------------------ */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; font-weight: 700; font-size: 12.5px; color: var(--plum-500); background: var(--pink-50); padding: 12px 14px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #FFFBFE; }
.table .t-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.table a.row-link { font-weight: 700; }
.table a.row-link:hover { text-decoration: underline; text-decoration-color: var(--pink-400); text-underline-offset: 4px; }
.table tfoot td { font-weight: 700; background: var(--pink-50); }
.amount-pos { color: var(--ok); font-weight: 700; }
.amount-neg { color: var(--err); font-weight: 700; }

.pager { display: flex; justify-content: center; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); font-weight: 500; }
.pager a:hover { border-color: var(--pink-400); background: var(--pink-100); }
.pager .is-current { background: var(--plum); color: var(--pink); border-color: var(--plum); }
.pager .gap { border: 0; background: none; }

.empty { text-align: center; padding: 48px 20px; color: var(--plum-500); }
.empty .empty-ic { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 24px; background: var(--pink-100); display: grid; place-items: center; color: var(--plum-600); }
.empty .empty-ic .ic { width: 34px; height: 34px; stroke-width: 1.5; }
.empty h3 { color: var(--plum); font-size: 18px; margin-bottom: 4px; }

/* ------------------------------ hero (صفحه‌ی اصلی) ------------------------------ */
.hero { position: relative; overflow: hidden; padding: 40px 0 70px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(2px); z-index: -1; }
.hero::before { width: 620px; height: 620px; background: radial-gradient(circle, var(--pink) 0%, rgba(252, 218, 245, 0) 70%); top: -200px; left: -180px; }
.hero::after { width: 420px; height: 420px; background: radial-gradient(circle, var(--pink-100) 0%, rgba(254, 238, 251, 0) 70%); bottom: -160px; right: -120px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--plum-600); box-shadow: var(--shadow-sm); }
.hero h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.35; margin: 18px 0 14px; letter-spacing: -.02em; }
.hero h1 .accent { background: linear-gradient(transparent 62%, var(--pink) 62%); padding: 0 4px; }
.hero-lines { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.hero-lines li { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; color: var(--plum-700); }
.hero-lines li .ic { width: 26px; height: 26px; padding: 5px; border-radius: 9px; background: var(--pink); color: var(--plum); stroke-width: 2.4; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-contact { display: flex; gap: 18px; align-items: center; margin-top: 26px; flex-wrap: wrap; color: var(--plum-600); font-size: 14px; }
.hero-contact a { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--plum); }
.hero-art { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; margin-inline: auto; }
.hero-card {
  position: absolute; inset: 6%; border-radius: 44% 56% 52% 48% / 48% 44% 56% 52%;
  background: radial-gradient(120% 120% at 30% 20%, #FFF0FC 0%, var(--pink) 55%, var(--pink-300) 100%);
  box-shadow: var(--shadow-lg), inset 0 -20px 60px rgba(32, 2, 30, .06);
  display: grid; place-items: center; animation: morph 12s ease-in-out infinite;
}
.hero-card img { width: 58%; filter: drop-shadow(0 16px 26px rgba(32, 2, 30, .16)); }
@keyframes morph { 50% { border-radius: 54% 46% 44% 56% / 52% 58% 42% 48%; } }
.float-chip { position: absolute; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow); font-size: 13px; font-weight: 700; animation: float 6s ease-in-out infinite; white-space: nowrap; }
.float-chip .ic { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background: var(--pink); }
.float-chip.c1 { top: 8%; left: -2%; }
.float-chip.c2 { bottom: 10%; right: -4%; animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-10px); } }

.section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.section-head p { color: var(--plum-500); margin: 0; }
.feature { padding: 26px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .f-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--pink); display: grid; place-items: center; margin-bottom: 16px; }
.feature .f-ic .ic { width: 26px; height: 26px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { color: var(--plum-500); margin: 0; font-size: 14.5px; }
.steps { counter-reset: step; }
.step { position: relative; padding: 24px; border-radius: 22px; background: var(--pink-100); border: 1px solid var(--pink-300); }
.step::before { counter-increment: step; content: counter(step, persian); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--plum); color: var(--pink); font-weight: 700; margin-bottom: 12px; }
.step h3 { font-size: 16.5px; margin-bottom: 4px; }
.step p { margin: 0; font-size: 14px; color: var(--plum-600); }
.cta-band { border-radius: 32px; background: var(--plum); color: var(--pink); padding: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; flex-wrap: wrap; }
.cta-band::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(252, 218, 245, .18), transparent 70%); left: -80px; top: -120px; }
.cta-band h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 6px; color: var(--pink); }
.cta-band p { margin: 0; color: var(--pink-300); }
.cta-band .btn { --b-bg: var(--pink); --b-fg: var(--plum); --b-bd: var(--pink); position: relative; z-index: 1; }
.cta-band .btn:hover { background: #fff; border-color: #fff; }

/* ------------------------------ products ------------------------------ */
/* نوار دسته‌ها ثابت (غیرچسبان) است تا هنگام اسکرول روی محصولات نیفتد و محو دیده نشوند */
/* نوار دسته‌ها و جستجوی فروشگاه: همان کادر سفید فیلترهای پنل */
.shop-toolbar { padding: 14px 16px; margin-bottom: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.shop-toolbar .st-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shop-toolbar .st-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; }
.shop-toolbar .st-label .ic { width: 18px; height: 18px; color: var(--plum-500); }
.shop-toolbar .search-box { width: 320px; }
/* دسکتاپ و تبلت: همه‌ی دسته‌ها دیده می‌شوند (چندخطی)؛ موبایل: اسکرول افقی لبه‌تالبه */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tabs a { flex: none; padding: 8px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-weight: 500; font-size: 14px; transition: all .2s; }
.cat-tabs a:hover { border-color: var(--pink-400); }
.cat-tabs a.is-active { background: var(--plum); color: var(--pink); border-color: var(--plum); font-weight: 700; }
.search-box { position: relative; min-width: 220px; }
.search-box .ic { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--plum-400); }
.search-box .input { padding-right: 42px; min-height: 42px; border-radius: 999px; }

.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.pcard { position: relative; display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--pink-300); }
.pcard.in-cart { border-color: var(--plum); box-shadow: 0 0 0 1px var(--plum), var(--shadow-sm); }
.pcard-img { position: relative; aspect-ratio: 1 / 1; background: var(--pink-100); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-tag { position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pcard.is-out .pcard-img img { filter: grayscale(.9); opacity: .6; }
.pcard.is-out .out-label { position: absolute; inset: 0; display: grid; place-items: center; }
.pcard.is-out .out-label span { background: var(--plum); color: var(--pink); padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 13.5px; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
/* نام کامل نمایش داده می‌شود (حداقل ارتفاع ۲ خط)؛ پایین کارت‌های یک ردیف هم‌تراز است */
.pcard-body h3 { font-size: 16px; margin: 0; line-height: 1.6; min-height: 3.2em; }
.pcard-desc { font-size: 13px; color: var(--plum-500); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; min-height: 2.6em; }
/* همه‌ی کارت‌ها یک چیدمان: قیمت و موجودی، سپس دکمه‌ی تمام‌عرض در پایین */
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.pcard-foot .qty { width: 100%; justify-content: space-between; }
.pcard-foot .qty input { flex: 1; }
.pcard-foot .add-btn { width: 100%; justify-content: center; }
.price { font-weight: 700; font-size: 16px; }
.price small { font-weight: 500; font-size: 12px; color: var(--plum-500); }
.price-hidden { font-size: 13px; color: var(--plum-500); display: inline-flex; align-items: center; gap: 6px; }
.min-note { font-size: 11.5px; color: var(--plum-500); }

.qty { display: inline-flex; align-items: center; background: var(--pink-100); border-radius: 999px; padding: 3px; gap: 2px; border: 1px solid var(--pink-300); }
.qty button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--white); color: var(--plum); display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: background .15s, transform .1s; }
.qty button:hover { background: var(--plum); color: var(--pink); }
.qty button:active { transform: scale(.9); }
.qty button .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.qty input { width: 46px; height: 34px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 15px; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: none; background: var(--white); border-radius: 8px; }
.qty.is-busy { opacity: .7; }
.add-btn { min-height: 40px; padding: 8px 16px; }
.pcard .qty { display: none; }
.pcard.in-cart .qty { display: inline-flex; }
.pcard.in-cart .add-btn { display: none; }

/* نوار سبد پایین صفحه (موبایل) */
/* نوار شیشه‌ای سبد: روشن و نیمه‌شفاف تا روی فوتر تیره یا عکس محصولات هم خوانا بماند */
.cart-bar {
  position: fixed; right: 12px; left: 12px; bottom: calc(76px + var(--safe-b)); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 20px;
  background: rgba(255, 246, 253, .72); color: var(--plum);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255, 255, 255, .7); outline: 1px solid rgba(32, 2, 30, .08);
  box-shadow: 0 18px 40px -18px rgba(32, 2, 30, .55), inset 0 1px 0 rgba(255, 255, 255, .8);
  transform: translateY(150%); transition: transform .35s var(--ease);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cart-bar { background: rgba(255, 246, 253, .96); }
}
.cart-bar.is-visible { transform: none; }
.cart-bar .cb-info { flex: 1; min-width: 0; line-height: 1.5; }
.cart-bar .cb-info b { display: block; font-size: 16px; }
.cart-bar .cb-info span { font-size: 12.5px; color: var(--plum-600); }

/* ------------------------------ cart / checkout ------------------------------ */
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.summary { position: sticky; top: calc(var(--header-h) + 16px); }
.sum-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; font-size: 14.5px; }
.sum-row.total { border-top: 1px dashed var(--line-2); margin-top: 6px; padding-top: 14px; font-size: 17px; font-weight: 700; }
.sum-row .num { font-weight: 700; }
.sum-row > span:first-child { min-width: 0; }
.sum-row > span:last-child { flex: none; }
.cart-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line img { width: 76px; height: 76px; border-radius: 16px; object-fit: cover; background: var(--pink-100); }
.cart-line h3 { font-size: 15.5px; margin: 0 0 2px; }
.cart-line .unit { font-size: 13px; color: var(--plum-500); }
.cart-line .line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-line .line-total { font-weight: 700; }
.cart-line.is-bad { opacity: .6; }
.remove-btn { background: none; border: 0; color: var(--plum-400); padding: 4px; border-radius: 8px; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.remove-btn:hover { color: var(--err); background: var(--err-bg); }

.payopts { display: grid; gap: 14px; }
.payopt { position: relative; display: block; cursor: pointer; }
.payopt input { position: absolute; opacity: 0; }
.payopt-box { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; padding: 18px; border-radius: 20px; border: 2px solid var(--line-2); background: var(--white); transition: border-color .2s, box-shadow .2s, background .2s; }
.payopt-box .p-ic { grid-row: span 3; width: 50px; height: 50px; border-radius: 15px; background: var(--pink-100); display: grid; place-items: center; }
.payopt-box .p-ic .ic { width: 24px; height: 24px; }
.payopt-box h3 { margin: 0; font-size: 16.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.payopt-box .p-sub { font-size: 13.5px; color: var(--plum-500); line-height: 1.7; }
.payopt-box .p-amount { font-size: 18px; font-weight: 700; margin-top: 4px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.payopt-box .p-amount del { font-size: 13.5px; font-weight: 500; color: var(--plum-400); }
.payopt input:checked + .payopt-box { border-color: var(--plum); background: var(--pink-50); box-shadow: 0 0 0 4px rgba(252, 218, 245, .8); }
.payopt input:checked + .payopt-box .p-ic { background: var(--plum); color: var(--pink); }
.payopt input:focus-visible + .payopt-box { outline: 3px solid var(--pink-400); outline-offset: 2px; }
.payopt.is-disabled { cursor: not-allowed; }
.payopt.is-disabled .payopt-box { opacity: .6; background: #FCFAFC; }
.payopt .p-warn { grid-column: 2; font-size: 13px; color: var(--err); font-weight: 500; }
.payopt .p-warn a { text-decoration: underline; }
.discount-ribbon {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: linear-gradient(135deg, var(--plum) 0%, var(--plum-600) 100%); color: var(--pink); font-size: 12.5px; font-weight: 700;
  box-shadow: 0 6px 16px -8px rgba(32, 2, 30, .7); position: relative; overflow: hidden;
}
.discount-ribbon .ic { width: 15px; height: 15px; }
.discount-ribbon::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 0% { right: -40px; } 45%, 100% { right: 110%; } }
.save-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ok); background: var(--ok-bg); padding: 3px 10px; border-radius: 999px; }

/* ------------------------------ account ------------------------------ */
.acc-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.acc-nav { position: sticky; top: calc(var(--header-h) + 16px); padding: 12px; }
.acc-user { display: flex; align-items: center; gap: 12px; padding: 8px 8px 16px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.avatar { width: 46px; height: 46px; border-radius: 15px; background: var(--pink); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.acc-user > div { min-width: 0; }
.acc-user b { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.acc-user span { font-size: 12.5px; color: var(--plum-500); }
.acc-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; font-weight: 500; color: var(--plum-600); transition: background .2s; }
.acc-nav a:hover { background: var(--pink-100); color: var(--plum); }
.acc-nav a.is-active { background: var(--pink); color: var(--plum); font-weight: 700; }
.acc-nav a .count { margin-inline-start: auto; font-size: 12px; background: var(--plum); color: var(--pink); border-radius: 999px; padding: 0 8px; }

.stat { padding: 20px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; min-width: 0; }
.stat .s-label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--plum-500); font-weight: 500; }
.stat .s-label .ic { width: 32px; height: 32px; padding: 7px; border-radius: 10px; background: var(--pink-100); color: var(--plum); }
.stat .s-value { font-size: 23px; font-weight: 700; line-height: 1.4; word-break: break-word; }
.stat .s-value small { font-size: 13px; font-weight: 500; color: var(--plum-500); }
.stat .s-foot { font-size: 12.5px; color: var(--plum-500); }
.stat.is-plum { background: var(--plum); color: var(--pink); border-color: var(--plum); }
.stat.is-plum .s-label, .stat.is-plum .s-foot, .stat.is-plum .s-value small { color: var(--pink-300); }
.stat.is-plum .s-label .ic { background: rgba(252, 218, 245, .14); color: var(--pink); }
.stat.is-pink { background: var(--pink); border-color: var(--pink-300); }
.stat.is-pink .s-label .ic { background: rgba(255, 255, 255, .6); }

.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
/* background/color صریح: کلاس‌های st-* رنگ برچسب وضعیت دارند و نباید به ردیف‌های سابقه برسند */
.timeline li { position: relative; padding: 0 30px 18px 0; background: none; color: inherit; }
.timeline li::before { content: ""; position: absolute; right: 7px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; right: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--pink-400); }
/* رنگ دایره‌ی هر وضعیت در سابقه (توپُر): ثبت شده صورتی، در حال ارسال بادمجانی، تکمیل سبز، لغو قرمز */
.timeline li[class*="st-"]::after { box-shadow: 0 0 0 3px var(--white); }
.timeline li.st-registered::after { border-color: #D98BCB; background: var(--pink-400); }
.timeline li.st-shipping::after { border-color: var(--plum); background: var(--plum); }
.timeline li.st-completed::after { border-color: var(--ok); background: var(--ok); }
.timeline li.st-cancelled::after { border-color: var(--err); background: var(--err); }
.timeline li.st-completed b { color: var(--ok); }
.timeline li.st-cancelled b { color: var(--err); }
.order-steps .os span { line-height: 1.5; }
.order-steps .os-time { display: block; font-size: 11px; font-weight: 500; color: var(--plum-500); line-height: 1.4; }
.timeline b { display: block; }
.timeline span { font-size: 12.5px; color: var(--plum-500); }

.order-steps { display: flex; align-items: center; gap: 0; margin: 6px 0 4px; }
.order-steps .os { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; font-size: 12.5px; font-weight: 500; color: var(--plum-400); text-align: center; }
/* خط هر مرحله از وسط خودش به سمت مرحله‌ی قبلی (سمت راست در RTL) کشیده می‌شود */
.order-steps .os::before { content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 3px; background: var(--line); z-index: 0; }
.order-steps .os:first-child::before { display: none; }
.order-steps .os i { width: 32px; height: 32px; border-radius: 50%; background: var(--white); border: 2px solid var(--line-2); display: grid; place-items: center; position: relative; z-index: 1; font-style: normal; }
.order-steps .os.is-done { color: var(--plum); font-weight: 700; }
.order-steps .os.is-done i { background: var(--plum); border-color: var(--plum); color: var(--pink); }
.order-steps .os.is-done::before { background: var(--plum); }
.order-steps .ic { width: 16px; height: 16px; stroke-width: 2.4; }

.success-hero { text-align: center; padding: 30px 20px; }
.success-hero .check-anim { width: 78px; height: 78px; border-radius: 50%; background: var(--plum); color: var(--pink); display: grid; place-items: center; margin: 0 auto 14px; animation: pop .6s var(--ease) both; }
.success-hero .check-anim .ic { width: 38px; height: 38px; stroke-width: 2.6; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.08); } 100% { transform: none; opacity: 1; } }

/* ------------------------------ auth pages ------------------------------ */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 30px 16px 60px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 32px 28px; box-shadow: var(--shadow); }
.auth-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.auth-logo img { height: 96px; width: auto; }
.auth-card h1 { text-align: center; font-size: 22px; margin-bottom: 4px; }
.auth-card .sub { text-align: center; color: var(--plum-500); font-size: 14px; margin-bottom: 24px; }
.pass-toggle { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 8px; color: var(--plum-400); border-radius: 8px; }
.pass-toggle:hover { color: var(--plum); }
.captcha-q { display: inline-block; direction: ltr; unicode-bidi: isolate; padding: 1px 10px; margin: 0 4px; border-radius: 8px; background: var(--pink); color: var(--plum); font-weight: 700; letter-spacing: .04em; }
.auth-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--plum-500); }

/* ------------------------------ footer ------------------------------ */
/* فوتر جمع‌وجور: یک ردیف (برند | تماس | لینک‌ها) + یک خط پایینی */
.site-footer { background: var(--plum); color: var(--pink-300); padding: 26px 0 16px; margin-top: 40px; font-size: 13.5px; line-height: 1.7; }
.site-footer a { color: var(--pink); }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.f-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; padding-bottom: 18px; border-bottom: 1px solid rgba(252, 218, 245, .12); }
.f-brand { display: flex; align-items: center; gap: 12px; color: var(--pink); }
.site-footer a.f-brand:hover { text-decoration: none; }
.f-brand img { height: 44px; width: auto; flex: none; }
.f-brand b { display: block; font-size: 14.5px; line-height: 1.5; color: var(--pink); }
.f-brand small { display: block; font-size: 12px; color: var(--pink-300); }
.f-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 22px; }
.f-contact li { display: inline-flex; align-items: center; gap: 7px; }
.f-contact li .ic { width: 17px; height: 17px; color: var(--pink); flex: none; }
.f-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 18px; font-weight: 500; }
.f-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px 18px; flex-wrap: wrap; padding-top: 14px; font-size: 12px; }
.site-footer .f-bottom a.f-refresh { color: var(--pink-300); display: inline-flex; align-items: center; gap: 5px; }
.f-refresh .ic { width: 14px; height: 14px; }

.made-by { margin: 0; font-size: 12px; opacity: .9; }
.made-by a { display: inline-flex; gap: 5px; align-items: baseline; }
.adm-side .made-by { margin-top: 10px; padding: 8px 6px 0; border-top: 1px solid rgba(252, 218, 245, .12); font-size: 11.5px; color: var(--plum-400); }
.adm-side .made-by a { display: inline; padding: 0; color: var(--pink-300); background: none; }

/* ------------------------------ bottom nav (موبایل مشتری) ------------------------------ */
.bottom-nav { display: none; }

/* ------------------------------ modal ------------------------------ */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(32, 2, 30, .45); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s linear .2s; }
.modal.is-open { opacity: 1; visibility: visible; transition: opacity .2s; }
.modal-box { width: 100%; max-width: 440px; background: var(--white); border-radius: 24px; padding: 26px; box-shadow: var(--shadow-lg); transform: translateY(14px) scale(.98); transition: transform .3s var(--ease); max-height: calc(100vh - 32px); overflow-y: auto; }
.modal.is-open .modal-box { transform: none; }
.modal-box h3 { font-size: 18px; margin-bottom: 8px; }
.confirm-list { display: grid; gap: 0; margin: 10px 0 4px; max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; }
.confirm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.confirm-row:last-child { border-bottom: 0; }
.confirm-row span:first-child { font-weight: 500; }
.modal-box .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ---------- صفحه‌ی عمومی محصول ---------- */
.card.prod { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; padding: 22px; margin-top: 6px; }
.prod-media { border-radius: 18px; overflow: hidden; background: var(--pink-100); aspect-ratio: 1 / 1; }
.prod-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prod-media.no-photo img { object-fit: contain; padding: 24%; }
.prod-info { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.prod-info h1 { font-size: 26px; margin: 0; line-height: 1.6; overflow-wrap: anywhere; }
.prod-desc { margin: 0; font-size: 15px; line-height: 2; color: var(--plum-600); white-space: pre-line; overflow-wrap: anywhere; }
.prod-price .price { font-size: 21px; }
.prod-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; margin: 4px 0 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--pink-50); font-size: 14px; }
.prod-facts dt { color: var(--plum-500); }
.prod-facts dd { margin: 0; font-weight: 700; }
.prod-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.section-title-sm { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 14px; }
@media (max-width: 760px) {
  .card.prod { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 14px; }
  .prod-media.no-photo { aspect-ratio: auto; height: 150px; }
  .prod-info h1 { font-size: 21px; }
  .prod-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---------- نمای بزرگ محصول (عکس بزرگ + توضیحات کامل) ---------- */
.pcard-img[data-quick], .pcard-name[data-quick] { cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.pcard-img[data-quick]:focus-visible { outline: 3px solid var(--pink-400); outline-offset: -3px; }
.pcard-zoom { position: absolute; bottom: 10px; left: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--plum); box-shadow: var(--shadow-sm); pointer-events: none; }
.pcard-zoom .ic { width: 17px; height: 17px; stroke-width: 2.2; }
.pcard-name a { color: inherit; text-decoration: none; cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
.pcard-name a:hover { text-decoration: underline; text-decoration-color: var(--pink-400); text-underline-offset: 5px; }
.pcard-name[data-quick]:hover { text-decoration: underline; text-decoration-color: var(--pink-400); text-underline-offset: 5px; }
/* زیر اعلان‌ها (۲۰۰) و بالای هدر، منوی پایین و نوار سبد */
.qv { z-index: 150; }
.qv .modal-box { position: relative; max-width: 860px; padding: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
.qv-media { position: relative; background: var(--pink-100); aspect-ratio: 1 / 1; align-self: start; }
.qv-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* محصول بدون عکس: جای عکس کوچک می‌شود تا توضیحات و دکمه فوراً دیده شوند */
.qv.no-photo .modal-box { max-width: 520px; grid-template-columns: minmax(0, 1fr); }
.qv.no-photo .qv-media { aspect-ratio: auto; height: 150px; }
.qv.no-photo .qv-media img { object-fit: contain; padding: 30px; }
.qv.no-photo .qv-main { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
.qv-main { display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 22px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); }
.qv-main h3 { font-size: 20px; line-height: 1.6; margin: 0; padding-left: 40px; }
.qv-tag { align-self: flex-start; padding: 3px 11px; border-radius: 999px; background: var(--pink-100); font-size: 12px; font-weight: 700; }
.qv-desc { margin: 0; font-size: 14.5px; line-height: 2; color: var(--plum-600); white-space: pre-line; overflow-wrap: anywhere; }
.qv-desc.is-empty { color: var(--plum-400); font-size: 13.5px; }
.qv-price .price { font-size: 19px; }
.qv-price .min-note { font-size: 12.5px; margin-top: 2px; }
.qv-out { align-self: flex-start; background: var(--plum); color: var(--pink); padding: 5px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; }
.qv-actions { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.qv-actions .btn { width: 100%; justify-content: center; }
.qv-actions .qty { display: none; width: 100%; justify-content: space-between; padding: 4px; }
.qv-actions.in-cart .qty { display: inline-flex; }
.qv-actions.in-cart [data-qv-add] { display: none; }
.qv-actions .qty button { width: 42px; height: 42px; }
.qv-actions .qty input { flex: 1; height: 42px; font-size: 17px; }
.qv-close { position: absolute; top: 12px; left: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .94); color: var(--plum); box-shadow: var(--shadow-sm); cursor: pointer; }
.qv-close:hover { background: var(--plum); color: var(--pink); }
.qv-close .ic { width: 20px; height: 20px; stroke-width: 2.4; }
html.qv-lock, html.qv-lock body { overflow: hidden; }
@media (max-width: 760px) {
  /* گوشی: پنجره از پایین بالا می‌آید؛ عکس بالا، توضیحات زیرش و قابل اسکرول */
  .qv { padding: 0; place-items: end stretch; }
  .qv .modal-box { max-width: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); border-radius: 24px 24px 0 0; max-height: 92vh; max-height: 92dvh; transform: translateY(40px); }
  .qv-media { aspect-ratio: auto; height: min(100vw, 46vh); height: min(100vw, 46dvh); }
  .qv-main { padding: 16px 16px calc(16px + var(--safe-b)); gap: 8px; max-height: calc(92vh - min(100vw, 46vh)); max-height: calc(92dvh - min(100vw, 46dvh)); }
  .qv-main h3 { font-size: 17.5px; padding-left: 0; }
  .qv.no-photo .modal-box { max-width: none; }
  .qv.no-photo .qv-media { height: 130px; }
  .qv.no-photo .qv-main { max-height: calc(92vh - 130px); max-height: calc(92dvh - 130px); }
  .qv-close { top: 10px; left: 10px; }
}

/* ------------------------------ admin ------------------------------ */
.adm { background: #FCF8FB; }
.adm-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.adm-side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; background: var(--plum); color: var(--pink-300); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; scrollbar-width: thin; scrollbar-color: var(--plum-600) transparent; }
.adm-brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(252, 218, 245, .12); }
.adm-brand img { height: 42px; width: auto; flex: none; }
.adm-brand b { color: var(--pink); display: block; line-height: 1.4; }
.adm-brand span { font-size: 12px; }
.adm-side .nav-label { font-size: 11.5px; font-weight: 700; letter-spacing: .02em; padding: 14px 12px 6px; color: var(--plum-400); }
.adm-side a, .adm-side button.nav-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--pink-300); font-weight: 500; font-size: 14.5px; transition: background .2s, color .2s; background: none; border: 0; width: 100%; text-align: right; }
.adm-side a:hover, .adm-side button.nav-btn:hover { background: rgba(252, 218, 245, .08); color: var(--pink); }
.adm-side a.is-active { background: var(--pink); color: var(--plum); font-weight: 700; }
.adm-side .n-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--pink); color: var(--plum); font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.adm-side a.is-active .n-badge { background: var(--plum); color: var(--pink); }
.adm-side .side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(252, 218, 245, .12); display: grid; gap: 4px; }
.adm-main { min-width: 0; display: flex; flex-direction: column; }
.adm-top { position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 26px; background: rgba(252, 248, 251, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.adm-top h1 { font-size: 18px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-top .top-actions { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.adm-content { padding: 26px; flex: 1; }
.adm-toggle { display: none; }
.adm-backdrop { display: none; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.grid-dash { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
/* نوار فیلتر: یک کادر مرتب؛ فیلدها هم‌عرض، دکمه‌ها و تیک‌ها هم‌تراز با پایین فیلدها */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; padding: 14px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.toolbar .field { margin: 0; flex: 1 1 160px; min-width: 0; }
.toolbar .field-wide { flex: 2 1 240px; }
.toolbar .field .input, .toolbar .field .select { min-height: 42px; padding-top: 8px; padding-bottom: 8px; font-size: 14.5px; }
.toolbar .btn { min-height: 42px; }
.toolbar .tb-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex: none; }
.toolbar .tb-row { flex: 1 1 100%; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
/* صفحه‌ی تنظیمات: هر بخش یک کادر جدا با سرتیتر، ردیف‌های روشن/خاموش مرتب و نوار ذخیره‌ی چسبان */
.settings-form { max-width: 900px; display: grid; gap: 16px; }
.settings-form > .alert { margin: 0; }
.card.set-sec { padding: 0; overflow: hidden; }
.set-head { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px; background: var(--pink-50); border-bottom: 1px solid var(--line); }
.set-ic { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--white); border: 1px solid var(--line); color: var(--plum); }
.set-ic .ic { width: 19px; height: 19px; }
.set-head h2 { font-size: 16px; margin: 0; line-height: 1.6; }
.set-head p { margin: 2px 0 0; font-size: 12.5px; line-height: 1.7; color: var(--plum-500); }
.set-body { padding: 18px 20px 20px; display: grid; gap: 16px; }
.set-body .field { margin: 0; }
.set-body .form-grid { gap: 16px 18px; }
.set-toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; transition: border-color .15s, background .15s; }
.set-toggle:hover { border-color: var(--pink-300); }
.set-toggle:has(input:checked) { background: var(--pink-50); border-color: var(--pink-300); }
.set-toggle .t-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.set-toggle .t-text b { font-size: 14.5px; }
.set-toggle .t-text span { font-size: 12.5px; color: var(--plum-500); line-height: 1.6; }
.set-toggle .switch { flex: none; }
.set-save { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 640px) {
  .set-head { padding: 14px 16px; }
  .set-body { padding: 16px; gap: 14px; }
  .set-body .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .set-save { bottom: 8px; }
  .set-save > span { display: none; }
  .set-save .btn { flex: 1 1 auto; justify-content: center; }
}
/* انتخاب فایل با دکمه‌ی فارسی به‌جای متن انگلیسی مرورگر */
.file-pick { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-pick input:focus-visible + .btn { outline: 3px solid var(--pink-400); outline-offset: 2px; }
.file-pick .file-name { font-size: 13px; color: var(--plum-500); min-width: 0; overflow-wrap: anywhere; }
.adjust-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.adjust-row > span { flex-basis: 100%; }
.filter-check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--white); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; transition: background .15s, border-color .15s; }
.filter-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--plum); flex: none; }
.filter-check:has(input:checked) { background: var(--pink-100); border-color: var(--plum); font-weight: 700; }
.note-flag { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 6px; padding: 1px 8px; border-radius: 999px; background: var(--warn-bg); color: var(--warn); font-size: 11.5px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.note-flag .ic { width: 13px; height: 13px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 16px; font-weight: 500; color: var(--plum-500); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs a:hover { color: var(--plum); }
.tabs a.is-active { color: var(--plum); border-color: var(--plum); font-weight: 700; }
.tabs .t-count { font-size: 11.5px; background: var(--pink); border-radius: 999px; padding: 0 8px; }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--pink-100); flex: none; }
.p-cell { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.p-cell b { display: block; line-height: 1.5; }
.p-cell span { font-size: 12.5px; color: var(--plum-500); }
.p-cell > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.6; font-size: 14px; color: var(--plum); }
.p-cell > span > span { display: block; font-size: 12.5px; color: var(--plum-500); }
.chart { width: 100%; height: auto; overflow: visible; }
.chart .bar { fill: var(--pink-400); transition: fill .2s; }
.chart .bar.is-today { fill: var(--plum); }
.chart g:hover .bar { fill: var(--plum-600); }
.chart text { font-family: inherit; font-size: 10px; fill: var(--plum-500); }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 3 4; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--plum-500); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; vertical-align: middle; }
.hbar { height: 8px; border-radius: 4px; background: var(--pink-100); overflow: hidden; min-width: 60px; }
.hbar span { display: block; height: 100%; background: var(--plum); border-radius: 4px; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--plum-500); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
.mode-switch { display: inline-flex; background: var(--pink-100); border-radius: 999px; padding: 4px; gap: 2px; border: 1px solid var(--line); flex-wrap: wrap; }
.mode-switch button { border: 0; background: none; padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 13.5px; color: var(--plum-600); }
.mode-switch button.is-active { background: var(--plum); color: var(--pink); font-weight: 700; }
.pass-reveal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px; border-radius: 16px; background: var(--plum); color: var(--pink); }
.pass-reveal code { font-family: ui-monospace, Consolas, monospace; font-size: 20px; font-weight: 700; letter-spacing: .08em; background: rgba(252, 218, 245, .12); padding: 4px 12px; border-radius: 10px; direction: ltr; }
.pass-reveal .btn { --b-bg: var(--pink); --b-fg: var(--plum); --b-bd: var(--pink); }
.img-drop { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; align-items: center; }
.img-drop .preview { width: 150px; height: 150px; border-radius: 20px; background: var(--pink-100) center / cover no-repeat; border: 2px dashed var(--pink-400); display: grid; place-items: center; color: var(--plum-400); overflow: hidden; }
.img-drop .preview img { width: 100%; height: 100%; object-fit: cover; }
.draft-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.log-details { font-size: 12.5px; color: var(--plum-600); max-width: 420px; word-break: break-word; line-height: 1.7; }
.ua { font-size: 11.5px; color: var(--plum-400); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------ print ------------------------------ */
.print-page { max-width: 820px; margin: 0 auto; padding: 32px; background: #fff; }
.print-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 2px solid var(--plum); padding-bottom: 16px; margin-bottom: 20px; }
.print-head img { height: 80px; width: auto; }
.print-actions { display: flex; gap: 10px; justify-content: center; padding: 16px; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff; font-size: 12px; }
  .no-print, .print-actions, .toasts { display: none !important; }
  .print-page { padding: 0; max-width: none; }
  .table-wrap { border: 0; overflow: visible; }
  .table th { background: #f6eef4 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; }
}

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1180px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
  .main-nav, .header-actions .hide-md { display: none; }
  .nav-toggle { display: inline-flex; }
  .brand-name { display: none; }
  /* هدر موبایل/تبلت: منو راست، لوگو وسط، سبد خرید (یا ورود) چپ */
  .site-header .container { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
  .header-actions { display: contents; }
  .nav-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
  .brand { grid-column: 2; grid-row: 1; justify-self: center; }
  .header-actions > .cart-btn, .header-actions > a.btn:not(.nav-toggle) { grid-column: 3; grid-row: 1; justify-self: end; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .hero-art { max-width: 360px; order: -1; }
  .hero { padding-top: 16px; }
  .hero-text { text-align: center; }
  .hero-lines { justify-items: center; }
  .hero-cta, .hero-contact { justify-content: center; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .acc-nav { display: none; }
  .f-top { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 14px; }
  .f-links { justify-content: center; }
  .f-bottom { justify-content: center; text-align: center; }

  .grid-dash, .grid-side { grid-template-columns: minmax(0, 1fr); }
  .adm-shell { grid-template-columns: minmax(0, 1fr); }
  .adm-side { display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 120; width: min(86vw, 282px); box-shadow: var(--shadow-lg); overscroll-behavior: contain; }
  body.adm-open .adm-side { display: flex; animation: drawer-in .3s var(--ease) both; }
  .adm-backdrop { display: none; position: fixed; inset: 0; z-index: 110; background: rgba(32, 2, 30, .4); }
  body.adm-open .adm-backdrop { display: block; animation: fade-in .25s ease both; }
  body.adm-open { overflow: hidden; }
  .adm-toggle { display: inline-flex; }
  .adm-top { padding: 0 16px; }
  .adm-content { padding: 18px 16px; }
}

@media (max-width: 767px) {
  body { font-size: 14.5px; }
  :root { --header-h: 60px; }
  .container { padding-inline: 16px; }
  .brand img { height: 36px; }
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pcard { border-radius: 18px; }
  .pcard-body { padding: 10px 12px 12px; }
  .pcard-body h3 { font-size: 14.5px; }
  .pcard-desc { display: none; }
  .pcard-body h3 { min-height: 3.2em; }
  .pcard-foot { gap: 8px; }
  .price { font-size: 15px; }
  .page { padding-block: 18px 40px; }
  .page-head h1 { font-size: 21px; }
  .card { padding: 18px 16px; border-radius: 16px; }
  .section { padding: 44px 0; }
  .hero-lines li { font-size: 15.5px; }
  .float-chip { font-size: 12px; padding: 8px 10px; }
  .float-chip.c1 { left: 0; }
  .float-chip.c2 { right: 0; }
  .cta-band { padding: 28px 22px; border-radius: 24px; }
  /* فوتر موبایل: بزرگ‌تر و بازتر */
  .site-footer { padding-top: 34px; margin-top: 32px; font-size: 15px; line-height: 1.8; }
  .f-top { gap: 22px; padding-bottom: 24px; }
  .f-brand { flex-direction: column; gap: 10px; }
  .f-brand img { height: 62px; }
  .f-brand b { font-size: 17px; }
  .f-brand small { font-size: 14px; margin-top: 2px; }
  .f-contact { flex-direction: column; gap: 12px; }
  .f-contact li { font-size: 15px; }
  .f-contact li .ic { width: 20px; height: 20px; }
  .f-links { gap: 10px; }
  .f-links a { padding: 9px 18px; border: 1px solid rgba(252, 218, 245, .25); border-radius: 999px; font-size: 14.5px; }
  .site-footer .f-links a:hover { text-decoration: none; background: rgba(252, 218, 245, .1); }
  .f-bottom { flex-direction: column; gap: 10px; padding-top: 20px; font-size: 13.5px; }
  .made-by { font-size: 13.5px; line-height: 1.9; }
  .f-refresh .ic { width: 16px; height: 16px; }
  /* فضای زیر فوتر فقط یک‌بار و به اندازه‌ی منوی پایین (و نوار سبد در فروشگاه)؛ رنگ فوتر تا زیر منو ادامه دارد */
  body.has-bottom-nav .site-footer { padding-bottom: calc(92px + var(--safe-b)); }
  body.has-bottom-nav.page-shop .site-footer { padding-bottom: calc(166px + var(--safe-b)); }
  .kpis { gap: 10px; }
  .stat { padding: 14px; border-radius: 18px; }
  .stat .s-value { font-size: 18px; }
  .stat .s-label .ic { width: 28px; height: 28px; padding: 6px; }
  .toolbar { padding: 12px; gap: 10px; }
  .toolbar .field { flex: 1 1 130px; }
  .toolbar .field-wide { flex-basis: 100%; }
  .toolbar .tb-actions { flex: 1 1 100%; }
  .toolbar .tb-actions .btn { flex: 1 1 auto; }
  .img-drop { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-line img { width: 64px; height: 64px; }
  .cart-line .line-end { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  /* nowrap مهم است: با wrap، نوار دسته‌ها به عرض کل محتوایش کش می‌آمد و صفحه از عرض گوشی بیرون می‌زد */
  .shop-toolbar { padding: 12px; }
  /* گوشی: جستجو تمام‌عرض، زیرش دسته‌ها با اسکرول افقی از لبه تا لبه‌ی کادر */
  .shop-toolbar .st-top { margin-bottom: 10px; }
  .shop-toolbar .st-label { display: none; }
  .shop-toolbar .search-box { width: 100%; }
  .cat-tabs {
    flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
    margin-inline: -12px; padding: 2px 12px 4px; scroll-padding-inline: 12px;
    scroll-snap-type: x proximity; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; touch-action: pan-x pan-y pinch-zoom;
  }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tabs a { scroll-snap-align: start; }
  .search-box { min-width: 0; }
  .auth-card .card { padding: 26px 20px; }
  .toasts { top: calc(var(--header-h) + 8px); }

  /* نوار پایین مشتری */
  /* فضای منوی پایین داخل خود فوتر در نظر گرفته شده (بالا)؛ اینجا دوباره اضافه نمی‌شود */
  body.has-bottom-nav { padding-bottom: 0; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; right: 0; left: 0; bottom: 0; z-index: 45; height: calc(64px + var(--safe-b)); padding-bottom: var(--safe-b); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -18px rgba(32, 2, 30, .4); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--plum-500); position: relative; }
  .bottom-nav a .ic { width: 23px; height: 23px; }
  .bottom-nav a.is-active { color: var(--plum); font-weight: 700; }
  .bottom-nav a.is-active::before { content: ""; position: absolute; top: 0; width: 30px; height: 3px; border-radius: 0 0 3px 3px; background: var(--plum); }
  .bottom-nav .cart-badge { top: 6px; left: calc(50% - 22px); }

  /* جدول‌ها روی موبایل به‌صورت کارت */
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .rtable tr:last-child { border-bottom: 0; }
  .rtable td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: left; }
  .rtable td::before { content: attr(data-label); font-size: 12.5px; color: var(--plum-500); font-weight: 500; text-align: right; flex: none; }
  .rtable td[data-label=""]::before, .rtable td:not([data-label])::before { display: none; }
  .rtable td.t-main { font-size: 15px; }
  .rtable tfoot tr { background: var(--pink-50); }
  .rtable .p-cell { min-width: 0; }
}

@media (min-width: 768px) {
  .cart-bar { display: none; }
  .only-mobile { display: none !important; }
}
@media (max-width: 767px) { .only-desktop { display: none !important; } }

@media (max-width: 380px) {
  .pgrid { gap: 10px; }
  .pcard-body { padding: 8px 10px 10px; }
  .qty button { width: 30px; height: 30px; }
  .btn { padding-inline: 16px; }
  .hero h1 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
