/* =====================================================================
   site-header.css — هدر سایت بیامنو (v2) · همه کلاس‌ها با پیشوند bh-
   مستقل از home.css و style.css؛ قوانین قدیمی header.css را خنثی می‌کند.
   ===================================================================== */

:root {
  --bh-bar-h: 72px;
  --bh-glass: rgba(7, 11, 24, .72);
  --bh-glass-2: rgba(7, 11, 24, .9);
  --bh-solid: #0b1222;
  --bh-surface: #0f172b;
  --bh-surface-2: #141e37;
  --bh-line: rgba(148, 178, 255, .11);
  --bh-line-2: rgba(148, 178, 255, .2);
  --bh-text: #eaf0ff;
  --bh-text-2: #c3cde6;
  --bh-muted: #8e9bbb;
  --bh-brand: #3b82f6;
  --bh-ink: #8ab8ff;
  --bh-hover: rgba(148, 178, 255, .08);
  --bh-grad: linear-gradient(135deg, #1d6cf2 0%, #3b82f6 45%, #6366f1 100%);
  --bh-glow: 0 8px 24px -8px rgba(59, 130, 246, .65);
  --bh-shadow: 0 28px 70px -22px rgba(0, 0, 0, .75), 0 0 0 1px rgba(148, 178, 255, .08);
  --bh-green: #34d399;
  --bh-ease: cubic-bezier(.22, 1, .36, 1);
  --bh-ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --bh-font: var(--font-family, Vazirmatn, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif);
}
[data-theme="light"] {
  --bh-glass: rgba(255, 255, 255, .78);
  --bh-glass-2: rgba(255, 255, 255, .94);
  --bh-solid: #ffffff;
  --bh-surface: #ffffff;
  --bh-surface-2: #f3f7ff;
  --bh-line: rgba(30, 64, 175, .09);
  --bh-line-2: rgba(30, 64, 175, .17);
  --bh-text: #0b1530;
  --bh-text-2: #2c3a5c;
  --bh-muted: #5a6889;
  --bh-brand: #2563eb;
  --bh-ink: #1d4ed8;
  --bh-hover: rgba(37, 99, 235, .06);
  --bh-grad: linear-gradient(135deg, #1d5fe0 0%, #2f74f0 45%, #5359e8 100%);
  --bh-glow: 0 8px 22px -8px rgba(37, 99, 235, .55);
  --bh-shadow: 0 28px 70px -26px rgba(15, 40, 110, .3), 0 0 0 1px rgba(30, 64, 175, .07);
  --bh-green: #059669;
}

/* رنگ هر مقصد (آیکون رنگی = تشخیص سریع‌تر) */
.bh-t-blue   { --t: #3b82f6; }
.bh-t-orange { --t: #f97316; }
.bh-t-violet { --t: #8b5cf6; }
.bh-t-amber  { --t: #f59e0b; }
.bh-t-indigo { --t: #6366f1; }
.bh-t-green  { --t: #10b981; }
.bh-t-teal   { --t: #14b8a6; }
.bh-t-sky    { --t: #0ea5e9; }
.bh-t-pink   { --t: #ec4899; }

/* ---------- پایه ---------- */
.bh, .bh-drawer, .bh-promo { font-family: var(--bh-font); -webkit-tap-highlight-color: transparent; }
:where(.bh, .bh-drawer, .bh-promo) * { box-sizing: border-box; }
:where(.bh, .bh-drawer, .bh-promo) a { text-decoration: none; color: inherit; }
.bh a::after { content: none; }
:where(.bh, .bh-drawer, .bh-promo) button {
  font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.bh-i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bh :focus-visible, .bh-drawer :focus-visible, .bh-promo :focus-visible { outline: 2px solid var(--bh-brand); outline-offset: 2px; border-radius: 10px; }
html.bh-lock, html.bh-lock body { overflow: hidden; }
/* ویجت چت گفتینو (z-index بسیار بالا) فقط وقتی منوی موبایل باز است پنهان شود */
html.bh-lock [id^="goftino"], html.bh-lock [class*="goftino"] { visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }

/* ---------- نوار اطلاعیه ---------- */
.bh-promo {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 6px 48px; font-size: 13px; line-height: 1.6;
  color: #e9efff; text-align: center;
  background:
    radial-gradient(600px 80px at 50% 0, rgba(99, 102, 241, .35), transparent 70%),
    linear-gradient(90deg, #0c1530, #121d42 50%, #0c1530);
  border-bottom: 1px solid rgba(148, 178, 255, .12);
  transition: margin-top .26s var(--bh-ease), opacity .2s;
}
[data-theme="light"] .bh-promo {
  color: #13204a;
  background: radial-gradient(600px 80px at 50% 0, rgba(99, 102, 241, .16), transparent 70%), linear-gradient(90deg, #eef3ff, #e6edff 50%, #eef3ff);
  border-bottom-color: rgba(30, 64, 175, .1);
}
.bh-promo.is-gone { opacity: 0; margin-top: -40px; }
.bh-promo[hidden] { display: none; }
.bh-promo__in { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.bh-promo__badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: #fff; background: var(--bh-grad); box-shadow: var(--bh-glow);
}
.bh-promo__badge .bh-i { width: 14px; height: 14px; }
.bh-promo__txt b { font-weight: 800; }
.bh-promo__txt--sm { display: none; }
.bh-promo__link { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--bh-ink) !important; }
.bh-promo__link .bh-i { width: 16px; height: 16px; transition: transform .2s var(--bh-ease); }
.bh-promo__link:hover .bh-i { transform: translateX(-3px); }
.bh-promo__x {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; opacity: .65;
}
.bh-promo__x:hover { opacity: 1; background: var(--bh-hover); }
.bh-promo__x .bh-i { width: 16px; height: 16px; }

/* ---------- هدر ---------- */
header.bh {
  position: sticky; top: 0; z-index: 9990; display: block; width: 100%;
  background: var(--bh-glass); border: 0; border-bottom: 1px solid var(--bh-line);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
  color: var(--bh-text);
  transition: background .25s, box-shadow .25s, border-color .25s;
}
body.hm-body > header.bh { border-bottom: 1px solid var(--bh-line); }
header.bh.is-scrolled { background: var(--bh-glass-2); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .55); }
[data-theme="light"] header.bh.is-scrolled { box-shadow: 0 10px 30px -18px rgba(15, 40, 110, .25); }

.bh-bar {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: min(1480px, 100% - 48px); margin-inline: auto;
  height: var(--bh-bar-h); transition: height .25s var(--bh-ease);
}
.bh.is-scrolled .bh-bar { height: calc(var(--bh-bar-h) - 10px); }

/* لوگو */
.bh-brand { display: flex; align-items: center; gap: 10px; flex: none; min-width: 0; }
.bh-logo {
  position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px;
  transition: transform .3s var(--bh-ease);
}
.bh-logo:empty { background: var(--bh-grad); box-shadow: var(--bh-glow), inset 0 1px 0 rgba(255, 255, 255, .25); }
.bh-logo:empty::before { content: attr(data-l); font-size: 21px; font-weight: 900; color: #fff; line-height: 1; }
.bh-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.bh-brand:hover .bh-logo { transform: rotate(-6deg) scale(1.04); }
.bh-brand__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bh-brand__txt b { font-size: 17px; font-weight: 800; color: var(--bh-text); letter-spacing: -.2px; }
.bh-brand__txt small { font-size: 11.5px; font-weight: 500; color: var(--bh-muted); white-space: nowrap; }

/* ناوبری دسکتاپ */
.bh-nav { flex: 1 0 auto; display: flex; justify-content: center; }
.bh-nav__list { display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.bh-nav__list > li { position: relative; }
.bh-nav__list > li.bh-dd--mega { position: static; }
.bh-link {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 13px;
  border-radius: 12px; font-size: 14.5px; font-weight: 600; color: var(--bh-text-2) !important; white-space: nowrap;
  transition: color .2s, background .2s;
}
.bh-link:hover, .bh-dd.is-open > .bh-link { color: var(--bh-text) !important; background: var(--bh-hover); }
.bh-link.is-active, .bh-link[aria-current="page"] { color: var(--bh-text) !important; }
.bh-link.is-active::before, .bh-link[aria-current="page"]::before {
  content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--bh-grad);
}
.bh-link__chev { width: 16px; height: 16px; opacity: .6; transition: transform .25s var(--bh-ease); }
.bh-dd.is-open > button .bh-link__chev { transform: rotate(180deg); opacity: 1; }
.bh-pill {
  font-style: normal; font-size: 10.5px; font-weight: 800; line-height: 1; padding: 4px 7px; border-radius: 999px; margin-inline-start: 4px;
  color: #047857; background: rgba(16, 185, 129, .16); border: 1px solid rgba(16, 185, 129, .3);
}
:root:not([data-theme="light"]) .bh-pill { color: #6ee7b7; }

/* پنل‌ها */
.bh-panel {
  position: absolute; top: calc(100% + 6px); inset-inline-start: 50%; z-index: 5;
  background: var(--bh-surface); border-radius: 20px; box-shadow: var(--bh-shadow); color: var(--bh-text);
  opacity: 0; visibility: hidden; transform: translate(50%, 8px) scale(.985); transform-origin: top center;
  transition: opacity .18s ease, transform .22s var(--bh-ease), visibility 0s linear .22s;
}
.bh-panel::before { content: ""; position: absolute; inset-inline: 0; top: -14px; height: 14px; } /* پل hover */
.bh-dd.is-open > .bh-panel { opacity: 1; visibility: visible; transform: translate(50%, 0) scale(1); transition: opacity .18s ease, transform .26s var(--bh-ease), visibility 0s; }
[dir="ltr"] .bh-panel { transform: translate(-50%, 8px); }

.bh-panel--list { width: 320px; padding: 8px; }
.bh-panel--mega {
  inset-inline-start: 50%; width: min(980px, calc(100vw - 40px)); top: calc(100% - 2px); padding: 0; overflow: hidden;
}
.bh-panel--acc { inset-inline-start: auto; inset-inline-end: 0; width: 250px; padding: 8px; transform: translateY(8px) scale(.985); transform-origin: top left; }
.bh-dd.is-open > .bh-panel--acc { transform: translateY(0) scale(1); }

.bh-mega { display: grid; grid-template-columns: 1fr 1fr 290px; gap: 6px; padding: 14px; }
.bh-mega__col { display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.bh-mega__title { margin: 4px 12px 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; color: var(--bh-muted); }
.bh-mega__foot {
  display: flex; align-items: center; gap: 22px; padding: 12px 26px; font-size: 12.5px; color: var(--bh-muted);
  background: var(--bh-surface-2); border-top: 1px solid var(--bh-line);
}
.bh-mega__foot > * { display: inline-flex; align-items: center; gap: 7px; }
.bh-mega__foot .bh-i { width: 17px; height: 17px; color: var(--bh-green); }
.bh-mega__foot a { margin-inline-start: auto; font-weight: 700; color: var(--bh-text-2); }
.bh-mega__foot a:hover { color: var(--bh-ink); }

/* آیتم منو (آیکون رنگی + عنوان + توضیح) */
.bh-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; min-height: 56px;
  transition: background .18s;
}
.bh-item:hover, .bh-item:focus-visible { background: var(--bh-hover); }
.bh-item[aria-current="page"] { background: var(--bh-hover); }
.bh-chip {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  color: var(--t, var(--bh-brand)); background: var(--bh-hover);
  background: color-mix(in srgb, var(--t, #3b82f6) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t, #3b82f6) 22%, transparent);
  transition: transform .25s var(--bh-ease);
}
.bh-item:hover .bh-chip { transform: scale(1.07) rotate(-4deg); }
.bh-item__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bh-item__txt b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--bh-text); }
.bh-item__txt small { font-size: 12px; color: var(--bh-muted); line-height: 1.5; }
.bh-tag {
  font-style: normal; font-size: 10px; font-weight: 800; line-height: 1; padding: 3px 6px; border-radius: 6px;
  color: #fff; background: linear-gradient(135deg, #8b5cf6, #6366f1);
}
.bh-tag--new { background: linear-gradient(135deg, #10b981, #14b8a6); }
.bh-item--all { margin-top: 6px; border: 1px dashed var(--bh-line-2); }
.bh-item--all .bh-chip { --t: #94a3b8; }

/* کارت پیشنهادی mega */
.bh-feat {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 16px; overflow: hidden;
  background:
    radial-gradient(240px 160px at 85% 0%, rgba(99, 102, 241, .32), transparent 70%),
    radial-gradient(220px 160px at 0% 100%, rgba(59, 130, 246, .26), transparent 70%),
    var(--bh-surface-2);
  border: 1px solid var(--bh-line);
}
/* تصویرسازی SVG کارت پیشنهادی */
.bh-feat__art { position: relative; height: 138px; margin: -8px -10px 4px; }
.bh-art { display: block; width: 100%; height: 100%; overflow: visible; direction: ltr; }
.bh-art * { transform-box: fill-box; transform-origin: center; }
.bh-art .a-frame { fill: #0a1120; stroke: rgba(148, 178, 255, .28); stroke-width: 1; }
.bh-art .a-btn { fill: #1e293b; }
.bh-art .a-screen { fill: #0f172b; }
.bh-art .a-ink { fill: #c3cde6; }
.bh-art .a-mute { fill: rgba(148, 178, 255, .28); }
.bh-art .a-chip { fill: rgba(148, 178, 255, .16); }
.bh-art .a-card { fill: rgba(148, 178, 255, .07); stroke: rgba(148, 178, 255, .14); stroke-width: .8; }
.bh-art .a-toast { fill: var(--bh-surface); stroke: var(--bh-line-2); stroke-width: 1; }
.bh-art text { font-family: var(--bh-font); }
.bh-art .a-t1 { font-size: 9.5px; font-weight: 800; fill: var(--bh-text); }
.bh-art .a-t2 { font-size: 7.6px; font-weight: 600; fill: var(--bh-muted); }
.bh-art .a-t3 { font-size: 6.6px; font-weight: 800; fill: var(--bh-ink); }
.bh-art .a-ok { fill: #10b981; font-weight: 800; }
[data-theme="light"] .bh-art .a-frame { fill: #1e293b; stroke: #0f172a; }
[data-theme="light"] .bh-art .a-btn { fill: #334155; }
[data-theme="light"] .bh-art .a-screen { fill: #ffffff; }
[data-theme="light"] .bh-art .a-ink { fill: #1e293b; }
[data-theme="light"] .bh-art .a-mute { fill: #cbd5e1; }
[data-theme="light"] .bh-art .a-chip { fill: #e2e8f0; }
[data-theme="light"] .bh-art .a-card { fill: #f8fafc; stroke: #e2e8f0; }

.bh-art__phone { animation: bh-float 6s ease-in-out infinite; }
.bh-art__qr    { animation: bh-float-r 6s ease-in-out -3s infinite; }
.bh-art__pay   { animation: bh-float 5s ease-in-out -1.5s infinite; }
.bh-art__toast { transform-origin: right center; animation: bh-toast 6s var(--bh-ease) infinite; }
.bh-art__dot   { animation: bh-pulse 1.6s ease-in-out infinite; }
.bh-art__scan  { animation: bh-scan 2.4s ease-in-out infinite; }
.bh-art__link  { animation: bh-dash 1s linear infinite; }
.bh-art__spark { animation: bh-twinkle 2.8s ease-in-out infinite; }
.bh-art__spark--2 { animation-delay: -1s; }
.bh-art__spark--3 { animation-delay: -1.9s; }
@keyframes bh-float   { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes bh-float-r { 0%, 100% { transform: rotate(-7deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-6px); } }
@keyframes bh-toast   { 0%, 14%, 100% { transform: none; } 4% { transform: translateY(-3px) scale(1.04); } 9% { transform: translateY(1px) scale(.99); } }
@keyframes bh-pulse   { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes bh-scan    { 0%, 100% { transform: translateY(0); opacity: .25; } 50% { transform: translateY(41px); opacity: 1; } }
@keyframes bh-dash    { to { stroke-dashoffset: -13; } }
@keyframes bh-twinkle { 0%, 100% { transform: scale(.55); opacity: .35; } 50% { transform: scale(1.1); opacity: 1; } }
.bh-feat__title { font-size: 15.5px; font-weight: 800; line-height: 1.6; color: var(--bh-text); }
.bh-feat p { margin: 0 0 6px; font-size: 12.5px; line-height: 1.8; color: var(--bh-muted); }
.bh-feat__more { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px; font-size: 13px; font-weight: 700; color: var(--bh-text-2); border-radius: 10px; }
.bh-feat__more:hover { color: var(--bh-ink); }
.bh-feat__more .bh-i { width: 17px; height: 17px; }

/* اکشن‌ها */
.bh-actions { display: flex; align-items: center; gap: 8px; flex: none; margin-inline-start: auto; }
.bh-nav + .bh-actions { margin-inline-start: 0; }

.bh-call { display: inline-flex; align-items: center; gap: 9px; padding: 4px 4px 4px 10px; border-radius: 14px; transition: background .2s; }
.bh-call:hover { background: var(--bh-hover); }
.bh-call__ico {
  position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--bh-green); background: rgba(16, 185, 129, .12); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .28);
}
.bh-call__ico::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(16, 185, 129, .45);
  animation: bh-ping 2.6s var(--bh-ease) infinite; opacity: 0;
}
@keyframes bh-ping { 0% { transform: scale(.85); opacity: .8; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
.bh-call__ico .bh-i { width: 19px; height: 19px; }
.bh-call__txt { display: flex; flex-direction: column; line-height: 1.3; }
.bh-call__txt small { font-size: 11px; color: var(--bh-muted); }
.bh-call__txt b { font-size: 14px; font-weight: 800; color: var(--bh-text); letter-spacing: .3px; }

.bh-icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px;
  color: var(--bh-text-2) !important; border: 1px solid var(--bh-line-2) !important; transition: background .2s, color .2s, transform .15s;
}
.bh-icon-btn:hover { background: var(--bh-hover) !important; color: var(--bh-text) !important; }
.bh-icon-btn:active { transform: scale(.94); }
.bh-theme .bh-theme__moon { display: none; }
[data-theme="light"] .bh-theme .bh-theme__sun { display: none; }
[data-theme="light"] .bh-theme .bh-theme__moon { display: block; }
.bh-theme .bh-i { transition: transform .45s var(--bh-ease); }
.bh-theme:hover .bh-i { transform: rotate(35deg); }

.bh-login {
  display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; border-radius: 13px;
  font-size: 14px; font-weight: 700; color: var(--bh-text) !important; border: 1px solid var(--bh-line-2); transition: background .2s;
}
.bh-login:hover { background: var(--bh-hover); }
.bh-login .bh-i { width: 18px; height: 18px; }

.bh-cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: 14px; font-size: 14px; font-weight: 800; white-space: nowrap; color: #fff !important;
  background: var(--bh-grad); box-shadow: var(--bh-glow), inset 0 1px 0 rgba(255, 255, 255, .22); overflow: hidden; isolation: isolate;
  transition: transform .18s var(--bh-ease), box-shadow .25s;
}
.bh-cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
  transform: translateX(120%); animation: bh-shine 5.5s ease-in-out 2s infinite;
}
@keyframes bh-shine { 0%, 70% { transform: translateX(120%); } 100% { transform: translateX(-120%); } }
.bh-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(59, 130, 246, .75), inset 0 1px 0 rgba(255, 255, 255, .22); }
.bh-cta:active { transform: translateY(0) scale(.98); }
.bh-cta .bh-i { width: 18px; height: 18px; transition: transform .2s var(--bh-ease); }
.bh-cta:hover .bh-i { transform: translateX(-3px); }
.bh-cta__sm { display: none; }
.bh-cta--block { width: 100%; height: 48px; font-size: 14.5px; }

/* آواتار موبایل (لینک مستقیم داشبورد) */
.bh-me-btn { display: none; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; }
.bh-me-btn .bh-avatar { width: 38px; height: 38px; }
.bh-me-btn .bh-avatar > b { font-size: 16px; }

/* حساب کاربری */
.bh-acc { position: relative; }
.bh-acc__btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 10px; border-radius: 14px; border: 1px solid var(--bh-line-2) !important; transition: background .2s; }
.bh-acc__btn:hover, .bh-acc.is-open .bh-acc__btn { background: var(--bh-hover) !important; }
.bh-acc__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; min-width: 0; }
.bh-acc__txt small { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--bh-green); }
.bh-acc__txt small i { width: 6px; height: 6px; border-radius: 50%; background: #10b981; }
.bh-acc__txt b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 800; color: var(--bh-text); }

/* آواتار = لوگوی مجموعه + حلقه و نقطه سبز «وارد شده» */
.bh-avatar {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 0 0 2px var(--bh-solid), 0 0 0 3.5px #10b981;
}
.bh-avatar > b { font-size: 14px; font-weight: 800; color: #fff; line-height: 1; }
.bh-avatar > img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #fff; }
.bh-online {
  position: absolute; bottom: -2px; left: -2px; z-index: 1; width: 11px; height: 11px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 0 2px var(--bh-solid);
}
.bh-online::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #10b981; animation: bh-online 2.2s ease-out infinite; }
@keyframes bh-online { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.4); opacity: 0; } }
.bh-avatar--lg { width: 46px; height: 46px; }
.bh-avatar--lg > b { font-size: 19px; }
.bh-avatar--lg .bh-online { width: 13px; height: 13px; }
.bh-on-txt { font-style: normal; font-weight: 700; color: var(--bh-green); }
.bh-acc__head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--bh-line); }
.bh-acc__head span:last-child { display: flex; flex-direction: column; min-width: 0; }
.bh-acc__head b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-acc__head small { font-size: 12px; color: var(--bh-muted); }
.bh-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--bh-text-2) !important; }
.bh-row:hover { background: var(--bh-hover); color: var(--bh-text) !important; }
.bh-row .bh-i { width: 19px; height: 19px; opacity: .8; }
.bh-row--danger:hover { color: #ef4444 !important; background: rgba(239, 68, 68, .08); }

/* همبرگر */
.bh-burger {
  display: none; position: relative; width: 44px; height: 44px; flex: none; border-radius: 13px;
  border: 1px solid var(--bh-line-2) !important; color: var(--bh-text);
}
.bh-burger__l { position: absolute; inset-inline-start: 12px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--bh-ease), opacity .2s, width .3s var(--bh-ease); }
.bh-burger__l:nth-child(1) { top: 14px; width: 20px; }
.bh-burger__l:nth-child(2) { top: 21px; width: 14px; }
.bh-burger__l:nth-child(3) { top: 28px; width: 18px; }
.bh-burger:hover .bh-burger__l { width: 20px; }
.bh-burger.is-on .bh-burger__l:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 20px; }
.bh-burger.is-on .bh-burger__l:nth-child(2) { opacity: 0; }
.bh-burger.is-on .bh-burger__l:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 20px; }

/* ---------- منوی کشویی موبایل ---------- */
.bh-scrim {
  position: fixed; inset: 0; z-index: 100000; background: rgba(2, 6, 18, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s ease;
}
.bh-scrim.is-on { opacity: 1; }
.bh-scrim[hidden] { display: none; }
[data-theme="light"] .bh-scrim { background: rgba(15, 23, 42, .35); }

.bh-drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 100001;
  width: min(400px, 88vw); height: 100vh; height: 100dvh;
  display: flex; flex-direction: column; color: var(--bh-text);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(380px 200px at 0% 18%, rgba(59, 130, 246, .14), transparent 70%),
    var(--bh-solid);
  border-radius: 26px 0 0 26px; box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .6);
  transform: translate3d(104%, 0, 0); visibility: hidden; touch-action: pan-y;
  transition: transform .42s var(--bh-ease-drawer), visibility 0s linear .42s;
}
[data-theme="light"] .bh-drawer {
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(99, 102, 241, .12), transparent 70%),
    radial-gradient(380px 200px at 0% 18%, rgba(59, 130, 246, .08), transparent 70%),
    #fbfcff;
  box-shadow: -24px 0 60px -24px rgba(15, 40, 110, .3);
}
.bh-drawer.is-open { transform: translate3d(0, 0, 0); visibility: visible; transition: transform .46s var(--bh-ease-drawer), visibility 0s; }
.bh-drawer.is-drag { transition: none; }
.bh-drawer::before { /* دستگیره کشیدن */
  content: ""; position: absolute; inset-inline-end: 6px; top: 50%; width: 4px; height: 44px; margin-top: -22px; border-radius: 4px;
  background: var(--bh-line-2); opacity: .8;
}

.bh-drawer__head {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px 12px 14px;
  padding-top: max(14px, env(safe-area-inset-top));
}
.bh-brand--sm { flex: 1; }
.bh-brand--sm .bh-logo { width: 38px; height: 38px; border-radius: 11px; }
.bh-brand--sm .bh-logo:empty::before { font-size: 18px; }
.bh-brand--sm .bh-brand__txt b { font-size: 15.5px; }
.bh-brand--sm .bh-brand__txt small { font-size: 11px; }

.bh-drawer__body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 4px 16px 18px; scrollbar-width: none;
}
.bh-drawer__body::-webkit-scrollbar { display: none; }
.bh-dlabel { margin: 10px 4px 10px; font-size: 12px; font-weight: 700; color: var(--bh-muted); letter-spacing: .3px; }

.bh-me {
  display: flex; align-items: center; gap: 12px; padding: 12px; margin: 4px 0 6px; border-radius: 18px;
  background: var(--bh-surface-2); border: 1px solid var(--bh-line);
}
.bh-me__txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.bh-me__txt b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bh-me__txt small { font-size: 12px; color: var(--bh-muted); font-weight: 600; }
.bh-me__go { color: var(--bh-muted); }

.bh-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bh-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; min-height: 112px;
  border-radius: 18px; background: var(--bh-surface); border: 1px solid var(--bh-line); overflow: hidden;
  transition: transform .15s var(--bh-ease), border-color .2s;
}
.bh-tile::after {
  content: ""; position: absolute; inset-inline-end: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--t); opacity: .12; filter: blur(14px); pointer-events: none;
}
.bh-tile:active { transform: scale(.97); }
.bh-tile[aria-current="page"] { border-color: var(--t); }
.bh-tile .bh-chip { width: 42px; height: 42px; margin-bottom: 6px; }
.bh-tile b { font-size: 14px; font-weight: 800; color: var(--bh-text); }
.bh-tile small { font-size: 11.5px; color: var(--bh-muted); }

.bh-dnav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.bh-drow {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 12px; border-radius: 14px;
  font-size: 15px; font-weight: 700; color: var(--bh-text) !important; text-align: start; transition: background .18s;
}
.bh-drow:hover, .bh-drow:active { background: var(--bh-hover); }
.bh-drow[aria-current="page"] { background: var(--bh-hover); color: var(--bh-ink) !important; }
.bh-drow > .bh-i:first-child { width: 21px; height: 21px; color: var(--bh-muted); }
.bh-drow > span { flex: 1; }
.bh-drow .bh-pill { margin: 0; }
.bh-count {
  font-style: normal; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; color: var(--bh-muted); background: var(--bh-hover);
}
.bh-acc-g__chev { width: 18px; height: 18px; color: var(--bh-muted); transition: transform .3s var(--bh-ease); }
.bh-acc-g.is-open .bh-acc-g__chev { transform: rotate(180deg); }
.bh-acc-g.is-open > .bh-acc-g__btn { background: var(--bh-hover); }
.bh-acc-g__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .32s var(--bh-ease); }
.bh-acc-g.is-open .bh-acc-g__panel { grid-template-rows: 1fr; }
.bh-acc-g__in { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear .32s; }
.bh-acc-g.is-open .bh-acc-g__in { visibility: visible; transition: visibility 0s; }
.bh-acc-g__in { padding-inline-start: 6px; }
.bh-acc-g.is-open .bh-acc-g__in { padding-block: 4px 8px; }
.bh-item--d { min-height: 58px; padding: 8px 10px; }
.bh-item--d .bh-chip { width: 38px; height: 38px; border-radius: 11px; }
.bh-item--d .bh-i { width: 19px; height: 19px; }

.bh-promo-card {
  display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px; border-radius: 18px; color: #fff !important;
  background: radial-gradient(200px 120px at 0% 100%, rgba(255, 255, 255, .18), transparent 70%), var(--bh-grad);
  box-shadow: var(--bh-glow);
}
.bh-promo-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bh-promo-card b { font-size: 14.5px; font-weight: 800; }
.bh-promo-card small { font-size: 12px; opacity: .88; line-height: 1.6; }
.bh-promo-card__ico { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; background: rgba(255, 255, 255, .18); }
.bh-promo-card__go { width: 18px; height: 18px; }

.bh-support {
  display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 18px;
  background: rgba(16, 185, 129, .08); border: 1px solid rgba(16, 185, 129, .22);
}
.bh-support__ico { position: relative; display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px; color: var(--bh-green); background: rgba(16, 185, 129, .14); }
.bh-support__dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 2px var(--bh-solid); }
.bh-support__txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bh-support__txt small { font-size: 12px; color: var(--bh-muted); }
.bh-support__txt b { font-size: 16px; font-weight: 800; letter-spacing: .5px; text-align: right; }
.bh-support__btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: #10b981; box-shadow: 0 8px 18px -8px rgba(16, 185, 129, .8); }
.bh-support__btn .bh-i { width: 19px; height: 19px; }

.bh-drawer__foot {
  display: flex; gap: 8px; padding: 12px 16px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--bh-line); background: var(--bh-glass-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.bh-drawer__foot .bh-cta { flex: 1; }
.bh-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; height: 48px; padding: 0 16px; border-radius: 14px;
  font-size: 14.5px; font-weight: 700; color: var(--bh-text) !important; border: 1px solid var(--bh-line-2);
}
.bh-ghost:active { background: var(--bh-hover); }

/* ورود پله‌ای آیتم‌ها */
.bh-drawer .bh-stag { opacity: 0; transform: translate3d(18px, 0, 0); }
.bh-drawer.is-open .bh-stag { animation: bh-in .5s var(--bh-ease) both; animation-delay: calc(var(--i, 0) * 35ms + 90ms); }
@keyframes bh-in { from { opacity: 0; transform: translate3d(18px, 0, 0); } to { opacity: 1; transform: none; } }

/* ---------- واکنش‌گرا ---------- */
/* اولویت نمایش: هرچه صفحه باریک‌تر، اول موارد کم‌اهمیت‌تر جمع می‌شوند (هیچ‌وقت روی هم نمی‌افتند) */
@media (max-width: 1599px) {
  .bh-nav__xl { display: none; }           /* نمایندگی → داخل منوی «بیامنو» هست */
  .bh-call__txt { display: none; }         /* فقط آیکون تماس */
  .bh-call { padding: 0; }
  .bh-login span { display: none; }
  .bh-login { width: 42px; padding: 0; justify-content: center; }
  .bh-acc__txt { display: none; }
  .bh-link { padding: 0 11px; }
  .bh-mega { grid-template-columns: 1fr 1fr 260px; }
}
@media (max-width: 1179px) {
  :root { --bh-bar-h: 64px; }
  .bh-nav { display: none; }
  .bh-burger { display: block; }
  .bh-bar { gap: 10px; width: calc(100% - 32px); }
  .bh-acc { display: none; }
  .bh-me-btn { display: grid; }
  .bh-nav + .bh-actions { margin-inline-start: auto; }   /* دکمه‌ها به لبه چپ بچسبند، نه کنار لوگو */
  .bh-brand__txt small { display: block; }
}
/* گوشی: فقط تم + ورود کنار لوگو؛ شروع آزمایشی و تماس داخل منوی کشویی هستند */
@media (max-width: 767px) {
  .bh-call, .bh-actions .bh-cta { display: none; }
  .bh-actions { gap: 8px; }
  .bh-actions .bh-icon-btn, .bh-login { width: 44px; height: 44px; border-radius: 14px; }
  .bh-login { color: #fff !important; border-color: transparent; background: var(--bh-grad); box-shadow: var(--bh-glow); }
  .bh-login .bh-i { width: 20px; height: 20px; }
}
@media (max-width: 640px) {
  .bh-promo { padding: 6px 44px 6px 12px; font-size: 12.5px; }
  .bh-promo__txt--lg { display: none; }
  .bh-promo__txt--sm { display: inline; }
  .bh-promo__in { gap: 8px; }
}
@media (max-width: 400px) {
  .bh-bar { gap: 8px; width: calc(100% - 24px); }
  .bh-logo { width: 40px; height: 40px; }
  .bh-promo__badge { display: none; }
}
@media (max-width: 359px) {
  .bh-brand__txt small { display: none; }
}

/* لمسی: hover چسبنده نداشته باشیم */
@media (hover: none) {
  .bh-item:hover .bh-chip, .bh-brand:hover img, .bh-theme:hover .bh-i { transform: none; }
  .bh-cta:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bh *, .bh-drawer, .bh-drawer *, .bh-scrim, .bh-promo { animation: none !important; transition-duration: .01ms !important; }
  .bh-drawer .bh-stag { opacity: 1; transform: none; }
}

@media print { .bh, .bh-promo, .bh-drawer, .bh-scrim { display: none !important; } }
