/* دور ۲۲ — هدر یکپارچه: سه سبد، ورود/خروج، برند */
.g22-carts{display:flex;align-items:flex-start;gap:4px;direction:rtl}
.g22-cart{--cc:#ffb02e;display:flex;flex-direction:column;align-items:center;gap:0;text-decoration:none;color:var(--cc);padding:3px 5px 2px;border-radius:14px;position:relative;
  transition:transform .25s cubic-bezier(.2,.9,.3,1.4),background .25s;-webkit-tap-highlight-color:transparent;min-width:58px}
.g22-cart:hover,.g22-cart:focus-visible{transform:translateY(-2px);background:color-mix(in srgb,var(--cc) 14%,transparent)}
.g22-cart.on{background:color-mix(in srgb,var(--cc) 18%,transparent);box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--cc) 70%,transparent)}
.g22-ic{position:relative;display:grid;place-items:center;width:44px;height:34px;color:var(--cc);filter:drop-shadow(0 0 6px color-mix(in srgb,var(--cc) 55%,transparent))}
.g22-ic svg{width:31px;height:31px;stroke-width:2}
.g22-t{font:800 .7rem/1.35 'Vazirmatn',Tahoma,sans-serif;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.7);white-space:nowrap;letter-spacing:0}
.g22-n,.g22-cart .notif-badge{position:absolute !important;top:-5px !important;left:-3px !important;right:auto !important;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:linear-gradient(135deg,#ff2d6f,#ff6a3d);color:#fff;
  font:900 .72rem/20px 'Vazirmatn',Tahoma,sans-serif;text-align:center;box-shadow:0 0 0 2px rgba(12,14,32,.9),0 0 12px rgba(255,60,110,.85);animation:g22pulse 2.2s ease-in-out infinite;display:inline-block}
.g22-n[style*="display: none"],.g22-n[style*="display:none"]{display:none !important}
@keyframes g22pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.14)}}
/* ورود / خروج */
.g22-auth{display:flex;align-items:center;gap:6px}
.g22-ab{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border-radius:12px;border:0;background:transparent;color:#f3efe6;font:800 .82rem 'Vazirmatn',Tahoma,sans-serif;cursor:pointer;text-decoration:none;white-space:nowrap;transition:background .2s,transform .2s,border-color .2s}
.g22-ab:hover{background:rgba(255,255,255,.1);transform:translateY(-1px)}
.g22-out{color:#ffb4b4}.g22-out:hover{background:rgba(255,90,90,.16)}
.g22-in{color:#ffe2a6}
/* برند */
.b22{direction:ltr;unicode-bidi:isolate;display:inline-block;white-space:nowrap;font-weight:800}
.b22 small{font-size:.56em;font-weight:800;letter-spacing:.04em;margin-inline-start:.04em;opacity:.95}
html .nav-logo b,html .iq-logo b{font-size:.5em !important;font-weight:800;letter-spacing:.05em;margin-inline-start:2px;vertical-align:baseline}
/* موشن نام برند در هدر */
html .nav .nav-logo.nav-logo-anim{background:linear-gradient(100deg,#fff 0%,#ffe2a6 30%,#8fd6ff 55%,#fff 80%);background-size:240% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;
  animation:g22shine 5.5s linear infinite;filter:drop-shadow(0 0 10px rgba(255,200,110,.45));font-size:2.15rem;font-weight:800}
html .nav .nav-logo.nav-logo-anim b{background:linear-gradient(135deg,#ffd27a,#ff9a3c);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
@keyframes g22shine{0%{background-position:0% 0}100%{background-position:240% 0}}
@media (prefers-reduced-motion:reduce){html .nav .nav-logo.nav-logo-anim,.g22-n{animation:none}}
/* ===== نسخه‌ی مستقل (سمیم) — هم‌اندازه با هدر اصلی ===== */
.g22-standalone{position:relative;z-index:60;height:72px;display:flex;align-items:center;background:rgba(12,14,32,.78);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid rgba(255,255,255,.1);font-family:'Vazirmatn',Tahoma,sans-serif;color:#fff;--nav:#e6edf7}
.g22-standalone .nav-inner{display:grid;grid-template-columns:auto 1fr auto;align-items:center;width:100%;gap:12px;direction:ltr;padding-inline:16px;max-width:1400px;margin:0 auto}
.g22-standalone .nav-group{display:flex;align-items:center;gap:6px}
.g22-standalone .nav-group-left{justify-self:start}.g22-standalone .nav-group-center{justify-self:center}.g22-standalone .nav-group-right{justify-self:end;gap:12px}
.g22-standalone .nav-icon-btn{background:none;border:0;color:inherit;cursor:pointer;padding:6px;display:inline-flex;align-items:center;text-decoration:none}
.g22-standalone .nav-home-btn{padding:9px;border-radius:12px;background:rgba(190,215,240,.08);border:1px solid rgba(196,214,232,.3)}
.g22-standalone .g22-back{gap:7px;padding:8px 14px;border-radius:12px;font-weight:800;font-size:.9rem;background:linear-gradient(90deg,rgba(255,226,178,.16),rgba(150,196,244,.12));border:1px solid rgba(196,214,232,.3)}
.g22-standalone .nav-back-label{direction:ltr;letter-spacing:.06em}
.g22-standalone .nav-logo{font-family:'Sora','Inter',system-ui,sans-serif;font-size:2.15rem;font-weight:800;color:#fff;text-decoration:none}
@media (max-width:767px){
  .g22-cart{min-width:46px;padding:2px 2px 1px}.g22-ic{width:36px;height:30px}.g22-ic svg{width:27px;height:27px}.g22-t{font-size:.58rem}
  .g22-n,.g22-cart .notif-badge{min-width:17px;height:17px;font-size:.62rem;line-height:17px;top:-4px !important;left:-2px !important}
  .g22-ab span{display:none}.g22-ab{padding:8px}
  html .nav .nav-logo.nav-logo-anim{font-size:1.35rem}
  .g22-standalone .nav-inner{padding-inline:6px;gap:4px}.g22-standalone .nav-logo{font-size:1.3rem}.g22-standalone .nav-back-label,.g22-standalone .nav-group-center{display:none}
  .g22-standalone .nav-group-right{gap:4px}
}
@media (max-width:380px){.g22-cart{min-width:40px}.g22-t{font-size:.52rem}}
/* هدر در همه‌ی صفحات (روشن/تیره) یکسان و خوانا: شیشه‌ی تیره */
html .nav{background:linear-gradient(180deg,rgba(8,10,26,.9),rgba(10,12,30,.82)) !important;backdrop-filter:blur(16px) saturate(1.3);-webkit-backdrop-filter:blur(16px) saturate(1.3);border-bottom:1px solid rgba(255,255,255,.1) !important;color:#e6edf7}
html .nav .nav-icon-btn,html .nav .nav-back-btn,html .nav .nav-home-btn{color:#e6edf7}
html .nav .nav-back-btn,html .nav .nav-home-btn{background:rgba(190,215,240,.1) !important;border:1px solid rgba(196,214,232,.3) !important}
html .nav .nav-all{color:#fff}
@media (max-width:767px){
  html .nav .nav-group-right a[href="/messages.html"]{display:none}
  .g22-cart{min-width:42px}.g22-t{font-size:.55rem}
}
@media (max-width:380px){html .nav .nav-search-btn{display:none}.g22-cart{min-width:38px}.g22-t{font-size:.5rem}}
html body[data-tone="light"] .nav,html body[data-tone] .nav{background:linear-gradient(180deg,rgba(8,10,26,.92),rgba(10,12,30,.86)) !important;color:#e6edf7;border-bottom:1px solid rgba(255,255,255,.1) !important}
html body[data-tone="light"] .nav .nav-icon-btn,html body[data-tone="light"] .nav .nav-back-btn,html body[data-tone="light"] .nav .nav-home-btn,html body[data-tone="light"] .nav .nav-text-btn{color:#e6edf7}
html body[data-tone="light"] .nav .nav-home-btn{background:rgba(190,215,240,.1);border-color:rgba(196,214,232,.3)}
html body[data-tone="light"] .nav .nav-logo.nav-logo-anim{background:linear-gradient(100deg,#fff 0%,#ffe2a6 30%,#8fd6ff 55%,#fff 80%);background-size:240% 100%;-webkit-background-clip:text;background-clip:text}
html body[data-tone="light"] .nav .g22-ab{color:#f3efe6}
@media (max-width:767px){html .nav .nav-back-btn{display:none !important}}
@media (max-width:767px){
  html .nav .g22-cart{min-width:0;padding:2px 1px 1px}html .nav .g22-ic{width:34px}html .nav .g22-t{font-size:.52rem}
  html .nav .g22-carts{gap:1px}html .nav .g22-ab{padding:6px}html .nav .nav-all{padding:8px 9px}
  html .nav .nav-group-left .nav-icon-btn{min-width:34px !important;width:34px;padding:2px}
}

/* ===== دور ۲۴: هدر موبایل — فاصله‌ی منطقی بین آیکون‌ها، لوگوی بزرگ‌تر (IQE هم‌اندازه‌ی قبل)، دکمه‌ی خانه‌ی بی‌کادر ===== */
.g22-homemini{display:none !important}
@media (max-width:767px){
  html .nav .container.nav-inner{padding-inline:3px;gap:6px}
  html .nav .g22-homemini{display:inline-flex !important;align-items:center;justify-content:center;width:30px !important;min-width:0 !important;padding:2px !important;background:none !important;border:0 !important;color:#e6edf7}
  html .nav .nav-group-left{gap:1px}
  html .nav .nav-group-left .nav-icon-btn{width:30px !important;min-width:0 !important;padding:2px !important}
  html .nav .nav-group-left .nav-icon-btn svg{width:23px;height:23px}
  html .nav .g22-carts{gap:0;margin-inline-start:3px}
  html .nav .g22-cart{min-width:0;padding:2px 0 1px}html .nav .g22-ic{width:30px}html .nav .g22-t{font-size:.5rem}
  html .nav .nav-group-right{gap:5px}
  html .nav .g22-auth{gap:0;margin-inline-end:5px}
  html .nav .g22-ab{padding:4px;background:none !important;border:0 !important}html .nav .g22-ab svg{width:20px;height:20px}
  html .nav .nav-logo.nav-logo-anim{font-size:1.5rem}
  html .nav .nav-logo.nav-logo-anim b{font-size:.675rem !important}
  html .nav .nav-all{margin-inline-start:5px;padding:7px 8px}
}

/* ===== دور ۲۴: سبک‌سازی موبایل (اسکرول روان) — blur زنده‌ی روی پس‌زمینه‌ی ثابت هر فریم گران است ===== */
@media (max-width:767px){
  html .nav,html .navfab,html #agentFab,html #cartFab,html #homeFab,html #backFab,.home-module,.why-card,.home-preview,.sx-card,.stats-bar{-webkit-backdrop-filter:none !important;backdrop-filter:none !important}
  html .nav{background:linear-gradient(180deg,rgba(8,10,26,.97),rgba(10,12,30,.94)) !important}
  html.is-home .art,html.is-home .veil{will-change:transform;transform:translateZ(0)}
  #page-home .why-section,#page-home .stats-bar,#page-home .home-preview{content-visibility:auto;contain-intrinsic-size:auto 520px}
}

/* ===== دور ۲۶: هدر موبایل دو ردیفه (فقط ≤۷۶۷px؛ دسکتاپ دست‌نخورده) =====
   ردیف ۱: برگشت چپ | خانه وسط | لوگو + منو راست
   ردیف ۲: جستجو، نوتیفیکیشن، سه سبد، ورود/پروفایل+خروج — همه هم‌اندازه (آیکون ۲۴px در قاب ۳۸px) */
@media (max-width:767px){
  html.g22-m2:root{--nav-h:106px}
  html.g22-m2 .nav{height:var(--nav-h)}
  html.g22-m2 .g22-standalone{height:auto;min-height:106px;display:block}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-inner{display:grid !important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) !important;grid-template-rows:56px 46px;align-items:center;
    gap:0 4px;padding:0 8px !important;overflow:visible;height:auto;width:100%;max-width:none}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-group-left{grid-column:1;grid-row:1;justify-self:start;gap:0}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-group-center{grid-column:2;grid-row:1;display:flex !important;justify-self:center}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-group-right{grid-column:3;grid-row:1;justify-self:end;gap:6px;min-width:0}
  html.g22-m2 :is(.nav,.g22-standalone) .g22-row2{grid-column:1/-1;grid-row:2;display:flex;align-items:center;justify-content:space-between;direction:ltr;gap:0;
    border-top:1px solid rgba(255,255,255,.07);height:46px}
  /* برگشت (فقط موبایل) و خانه‌ی وسط — قاب ۴۰px، آیکون ۲۴px */
  html.g22-m2 :is(.nav,.g22-standalone) .nav-back-btn,html.g22-m2 .g22-standalone .g22-back{display:inline-flex !important;width:40px;height:40px;min-width:0 !important;min-height:0;padding:0 !important;justify-content:center;align-items:center;border-radius:12px}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-back-label{display:none !important}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-back-btn svg,html.g22-m2 .g22-standalone .g22-back svg,
  html.g22-m2 :is(.nav,.g22-standalone) .nav-home-btn svg{width:24px;height:24px}
  html.g22-m2 :is(.nav,.g22-standalone) .nav-home-btn{width:42px;height:42px;min-width:0 !important;min-height:0;padding:0 !important;justify-content:center;border-radius:13px}
  html.g22-m2 .g22-homemini{display:none !important}
  /* ردیف دوم: همه هم‌اندازه */
  html.g22-m2 .g22-row2 .nav-icon-btn{width:38px;height:38px;min-width:0 !important;min-height:0;padding:0 !important;justify-content:center;align-items:center;position:relative}
  html.g22-m2 .g22-row2 .nav-icon-btn svg{width:24px;height:24px}
  html.g22-m2 .g22-row2 .g22-carts{gap:2px;margin:0}
  html.g22-m2 .g22-row2 .g22-cart{min-width:48px;padding:1px 2px 0}
  html.g22-m2 .g22-row2 .g22-ic{width:38px;height:28px}
  html.g22-m2 .g22-row2 .g22-ic svg{width:24px;height:24px}
  html.g22-m2 .g22-row2 .g22-t{font-size:.56rem;line-height:1.2}
  /* ورود / پروفایل + خروج: آیکون‌های هم‌اندازه، هر دو دیده شوند */
  html.g22-m2 .g22-row2 #g22Auth,html.g22-m2 .g22-row2 #detailAuthArea{display:inline-flex !important;align-items:center;gap:2px;margin:0;flex:0 0 auto}
  html.g22-m2 .g22-row2 .g22-ab{width:38px;height:38px;padding:0 !important;justify-content:center;border-radius:12px}
  html.g22-m2 .g22-row2 .g22-ab span{display:none}
  html.g22-m2 .g22-row2 .g22-ab svg{width:24px;height:24px}
  html.g22-m2 .g22-row2 #detailAuthArea .nav-text-btn{width:38px;height:38px;min-width:0;padding:0;font-size:0;line-height:0;display:inline-grid;place-items:center;overflow:visible}
  html.g22-m2 .g22-row2 #detailAuthArea .nav-text-btn::before{content:none !important}
  html.g22-m2 .g22-row2 #detailAuthArea #detailLogoutBtn{display:inline-grid !important}
  /* لوگو: «360» بزرگ‌تر، «IQE» همان اندازه‌ی قبل */
  html.g22-m2 .nav .nav-logo.nav-logo-anim,html.g22-m2 .g22-standalone .nav-logo{font-size:1.95rem}
  html.g22-m2 .nav .nav-logo.nav-logo-anim b,html.g22-m2 .g22-standalone .nav-logo b{font-size:.675rem !important}
  html.g22-m2 .nav .nav-all{margin-inline-start:0;padding:7px 8px}
  html.g22-m2 .nav .nav-all span{display:none}
  /* پنل‌های جستجو/نوتیف زیر هدر دو ردیفه */
  html.g22-m2 .nav #notifDropdown,html.g22-m2 .nav #globalSearchPanel{top:calc(var(--nav-h) - 4px) !important}
}
/* دسکتاپ: «360» کمی بزرگ‌تر، «IQE» همان اندازه‌ی قبل (≈۱.۰۷۵rem) */
@media (min-width:768px){
  html .nav .nav-logo.nav-logo-anim,.g22-standalone .nav-logo{font-size:2.5rem}
  html .nav .nav-logo.nav-logo-anim b,.g22-standalone .nav-logo b{font-size:1.075rem !important}
}
@media (max-width:767px){ html.g22-m2 #backFab{display:none !important} }
@media (max-width:767px){
  html.g22-m2 .nav .nav-group-left .nav-back-btn,html.g22-m2 .nav .nav-group-left .nav-icon-btn.nav-back-btn{width:40px !important;min-width:0 !important}
  html.g22-m2 .nav .g22-row2 .nav-search-btn,html.g22-m2 .nav .g22-row2 #globalSearchBtn,html.g22-m2 .nav .g22-row2 .nav-notif-btn{display:inline-flex !important;width:38px !important}
}
@media (max-width:380px){
  html.g22-m2 .nav .g22-row2 #globalSearchBtn,html.g22-m2 .nav .g22-row2 .nav-search-btn{display:inline-flex !important}
}
