/* =========================================================
   01BAZAAR GLOBAL HEADER 2.0
   One bar, fixed; a spacer in the page flow reserves its height.
   Breakpoints: >1280 full · ≤1280 no wallet pill (it is in the menu)
   ≤1100 no centre links · ≤600 phone · ≤359 small phone.
   ========================================================= */

#ob-header {
  --ob-h: 64px;                                     /* bar height (never changes on scroll) */
  --ob-top: var(--wp-admin--admin-bar--height, 0px);/* admin bar, when shown */
  --ob-pad: clamp(20px, 3.4vw, 64px);
  --ob-black: #000;
  --ob-white: #f5f7fb;
  --ob-border: rgba(255,255,255,.09);
  --ob-lime: #baff00;
  --ob-cyan: #24d9ff;
  --ob-blue: #315cff;
  --ob-violet: #9a4dff;
  --ob-font: "Inter", "Vazirmatn", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --ob-tech: "Aldrich", "Vazirmatn", "Inter", Tahoma, sans-serif;
  position: relative;
  z-index: 2147483000;
  font-family: var(--ob-font);
}
body:not(.admin-bar) #ob-header { --ob-top: 0px; }

#ob-header *, #ob-header *::before, #ob-header *::after { box-sizing: border-box; }
#ob-header a { text-decoration: none !important; }
#ob-header [hidden] { display: none !important; }

/* Spacer: the only thing that takes up room in the page. */
#ob-header .bazaar01-header-spacer {
  display: block !important;
  height: var(--ob-h);
  margin: 0 !important; padding: 0 !important; border: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* =========================================================
   BAR
   ========================================================= */

#ob-header .ob-nav {
  position: fixed;
  top: var(--ob-top);
  left: 0; right: 0;
  height: var(--ob-h);
  padding: 0 var(--ob-pad);
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 3;
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,.075);
  transition: border-color .3s ease, box-shadow .3s ease;
  overflow: visible;
}
#ob-header.ob-scrolled .ob-nav {
  border-bottom-color: rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

#ob-header .ob-ambient {
  position: absolute;
  pointer-events: none;
  filter: blur(45px);
  opacity: .07;
  z-index: -1;
}
#ob-header .ob-ambient-blue { width: 260px; height: 140px; top: -100px; left: 35%; background: var(--ob-blue); }
#ob-header .ob-ambient-lime { width: 190px; height: 110px; top: -80px; right: 20%; background: var(--ob-lime); }

/* Logo */
#ob-header .ob-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-family: var(--ob-tech);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  color: var(--ob-white) !important;
  white-space: nowrap;
  direction: ltr;
  transition: opacity .25s ease, transform .25s ease;
}
#ob-header .ob-logo:hover { opacity: .88; transform: translateY(-1px); }
#ob-header .ob-logo-name { letter-spacing: .05em; }

/* Centre links: in the flex flow (no absolute centring, so they can never overlap the buttons). */
#ob-header .ob-desktop-nav {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 2.4vw, 44px);
}
#ob-header .ob-nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #c7cedb !important;
  font-family: var(--ob-tech);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color .25s ease;
}
#ob-header .ob-nav-item small { color: #4f5868; font-family: var(--ob-tech); font-size: 8px; font-weight: 600; transition: color .25s ease; }
#ob-header .ob-nav-item:hover, #ob-header .ob-nav-item.ob-nav-active { color: #fff !important; }
#ob-header .ob-nav-item:hover small { color: var(--ob-cyan); }
#ob-header .ob-nav-item.ob-nav-active small { color: var(--ob-lime); }
#ob-header .ob-nav-item.ob-nav-active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 11px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ob-lime);
  box-shadow: 0 0 12px rgba(186,255,0,.75);
  transform: translateX(-50%);
}

/* Right side */
#ob-header .ob-actions {
  flex: 0 0 auto;
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  direction: ltr;
}

/* Wallet pill */
#ob-header .ob-wallet-shell {
  position: relative;
  height: 44px;
  min-width: 150px;
  padding: 0 18px 0 30px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(186,255,0,.20);
  border-radius: 100px;
  background: rgba(186,255,0,.065);
  color: #fff !important;
  overflow: hidden;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
#ob-header .ob-wallet-shell:hover { background: rgba(186,255,0,.11); border-color: rgba(186,255,0,.42); box-shadow: 0 0 28px rgba(186,255,0,.075); transform: translateY(-1px); }
#ob-header .ob-wallet-status { position: absolute; left: 15px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ob-lime); box-shadow: 0 0 10px var(--ob-lime); }
#ob-header .ob-wallet-text { display: flex; flex-direction: column; line-height: 1.15; }
#ob-header .ob-wallet-text b { font-family: var(--ob-tech); font-size: 10px; font-weight: 600; letter-spacing: 1px; }
#ob-header .ob-wallet-text em { unicode-bidi: plaintext; font-style: normal; font-family: var(--ob-font); font-size: 11px; color: var(--ob-lime); white-space: nowrap; }
#ob-header .ob-wallet-line { position: absolute; left: -100%; bottom: 0; width: 70%; height: 1px; background: var(--ob-cyan); transition: left .5s ease; pointer-events: none; }
#ob-header .ob-wallet-shell:hover .ob-wallet-line { left: 130%; }

/* EN | فا (buttons are handled by 01 Bazaar Translate's script) */
#ob-header .bz01t.ob-lang {
  position: static;
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  height: 36px;
  align-items: center;
  border: 1px solid var(--ob-border);
  border-radius: 99px;
  background: rgba(255,255,255,.025);
  font: 600 11px/1 var(--ob-tech);
  direction: ltr;
}
#ob-header .bz01t.ob-lang button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  color: #aab2c1;
  font: inherit;
  transition: background .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
#ob-header .bz01t.ob-lang button[lang="fa"] { font-family: "Vazirmatn", Tahoma, sans-serif; font-size: 13px; font-weight: 700; }
#ob-header .bz01t.ob-lang button:hover { color: #fff; }
#ob-header .bz01t.ob-lang button:focus-visible { outline: 2px solid var(--ob-cyan); outline-offset: 1px; }
#ob-header .bz01t.ob-lang button[aria-pressed="true"] { background: linear-gradient(90deg, var(--ob-lime), var(--ob-cyan)); color: #04120a; }

/* Round icon buttons */
#ob-header .ob-header-tool,
#ob-header .ob-menu-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 44px; height: 44px;
  margin: 0; padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--ob-border);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
  color: rgba(255,255,255,.83) !important;
  cursor: pointer;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
#ob-header .ob-header-tool:hover,
#ob-header .ob-menu-toggle:hover { background: rgba(255,255,255,.07); border-color: rgba(36,217,255,.32); color: #fff !important; }
#ob-header .ob-header-tool:focus-visible,
#ob-header .ob-menu-toggle:focus-visible,
#ob-header .ob-header-logout:focus-visible { outline: 2px solid var(--ob-cyan); outline-offset: 2px; }
#ob-header .ob-header-tool svg { width: 19px; height: 19px; }
#ob-header .ob-account.is-in::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--ob-lime); box-shadow: 0 0 0 2px #000, 0 0 8px rgba(186,255,0,.6);
}
#ob-header .ob-mobile-action.ob-mobile-signin, #ob-header .ob-mobile-action.ob-mobile-signin b { color: var(--ob-lime) !important; }

#ob-header .ob-cart-badge {
  position: absolute;
  top: -4px; right: -3px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px;
  background: var(--ob-lime);
  color: #050700;
  font: 600 9px/1 var(--ob-tech);
  box-shadow: 0 0 12px rgba(186,255,0,.24);
}
#ob-header .ob-cart.ob-cart-pulse { animation: ob-cart-pulse .65s ease; }
@keyframes ob-cart-pulse { 0% { transform: scale(1); } 35% { transform: scale(1.14); } 70% { transform: scale(.96); } 100% { transform: scale(1); } }

/* Log out */
#ob-header .ob-header-logout {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: #8a92a2 !important;
  font: 600 9px/1 var(--ob-tech);
  letter-spacing: .65px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}
#ob-header .ob-header-logout:hover { color: #f5f7fb !important; background: rgba(186,255,0,.055); border-color: rgba(186,255,0,.28); }

/* Hamburger → X (the one and only close control) */
#ob-header .ob-menu-toggle { display: none; }
#ob-header .ob-menu-toggle span {
  position: absolute;
  left: 50%; top: 50%;
  width: 17px; height: 1.5px;
  margin: -.75px 0 0 -8.5px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .15s ease;
}
#ob-header .ob-menu-toggle span:nth-child(1) { transform: translateY(-5.5px); }
#ob-header .ob-menu-toggle span:nth-child(3) { transform: translateY(5.5px); }
#ob-header.ob-menu-active .ob-menu-toggle { border-color: rgba(36,217,255,.4); background: rgba(36,217,255,.06); }
#ob-header.ob-menu-active .ob-menu-toggle span:nth-child(1) { transform: rotate(45deg); }
#ob-header.ob-menu-active .ob-menu-toggle span:nth-child(2) { opacity: 0; transform: scaleX(0); }
#ob-header.ob-menu-active .ob-menu-toggle span:nth-child(3) { transform: rotate(-45deg); }

/* =========================================================
   MENU PANEL — sits under the bar, scrolls inside itself
   ========================================================= */

#ob-header .ob-mobile-menu {
  position: fixed;
  top: calc(var(--ob-top) + var(--ob-h));
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: var(--ob-black);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .24s cubic-bezier(.22,1,.36,1), visibility 0s linear .24s;
}
#ob-header .ob-mobile-menu.ob-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .2s ease, transform .24s cubic-bezier(.22,1,.36,1), visibility 0s;
}

#ob-header .ob-mobile-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#ob-header .ob-mobile-grid {
  position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 55px 55px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 82%);
}
/* Decorations scale with the screen instead of fixed 620px circles. */
#ob-header .ob-menu-01,
#ob-header .ob-orbit-1 { position: absolute; width: min(118vw, 620px); aspect-ratio: 1; right: max(-28vw, -170px); top: 40px; border-radius: 50%; }
#ob-header .ob-menu-01 {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 45% 42%, rgba(36,217,255,.12), rgba(49,92,255,.08) 28%, rgba(154,77,255,.055) 48%, rgba(186,255,0,.025) 65%, transparent 74%);
}
#ob-header .ob-menu-01 span {
  font-family: var(--ob-tech);
  font-size: min(82vw, 430px);
  line-height: .8;
  font-weight: 600;
  letter-spacing: -.08em;
  color: transparent;
  background: linear-gradient(135deg, rgba(186,255,0,.95), rgba(186,255,0,.72) 17%, rgba(36,217,255,.85) 43%, rgba(49,92,255,.78) 66%, rgba(154,77,255,.72) 88%);
  -webkit-background-clip: text; background-clip: text;
  opacity: .16;
}
#ob-header .ob-orbit-1 { border: 1px solid rgba(36,217,255,.14); animation: ob-spin 18s linear infinite; }
#ob-header .ob-orbit-2 { position: absolute; width: min(82vw, 430px); aspect-ratio: 1; right: max(-12vw, -70px); top: calc(40px + min(18vw, 95px)); border-radius: 50%; border: 1px solid rgba(186,255,0,.11); animation: ob-spin 13s linear infinite reverse; }
#ob-header .ob-menu-glow { position: absolute; border-radius: 50%; filter: blur(80px); }
#ob-header .ob-menu-glow-lime { width: 190px; height: 190px; right: 12%; top: 200px; background: var(--ob-lime); opacity: .10; }
#ob-header .ob-menu-glow-blue { width: 260px; height: 260px; right: 40%; top: 10px; background: var(--ob-cyan); opacity: .07; }
#ob-header .ob-menu-glow-violet { width: 210px; height: 210px; right: -30px; top: 420px; background: var(--ob-violet); opacity: .07; }
@keyframes ob-spin { to { transform: rotate(360deg); } }

#ob-header .ob-mobile-content {
  position: relative;
  z-index: 1;
  min-height: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) var(--ob-pad) calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}
#ob-header .ob-mobile-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
#ob-header .ob-mobile-label { display: flex; align-items: center; gap: 10px; color: var(--ob-lime); font: 600 9px/1 var(--ob-tech); letter-spacing: 2.5px; }
#ob-header .ob-pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--ob-lime); box-shadow: 0 0 12px var(--ob-lime); animation: ob-pulse 2s ease-in-out infinite; }
@keyframes ob-pulse { 0%,100% { opacity: .45; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

#ob-header .ob-mobile-nav { display: flex; flex-direction: column; }
#ob-header .ob-mobile-item {
  min-height: clamp(56px, 8.5vh, 72px);
  display: grid;
  grid-template-columns: 40px 1fr 30px;
  align-items: center;
  color: var(--ob-white) !important;
  border-top: 1px solid rgba(255,255,255,.08);
  transition: padding .3s ease, color .25s ease;
}
#ob-header .ob-mobile-item:last-child { border-bottom: 1px solid rgba(255,255,255,.08); }
#ob-header .ob-mobile-item small { color: #4c5565; font: 600 8px/1 var(--ob-tech); }
#ob-header .ob-mobile-item span { font-family: var(--ob-tech); font-size: clamp(21px, 6vw, 30px); font-weight: 600; }
#ob-header .ob-mobile-item b { color: #596273; font-size: 19px; font-weight: 400; justify-self: end; transition: transform .25s ease, color .25s ease; }
#ob-header .ob-mobile-item:hover,
#ob-header .ob-mobile-item.ob-mobile-current { color: var(--ob-lime) !important; padding-inline-start: 7px; }
#ob-header .ob-mobile-item:hover small,
#ob-header .ob-mobile-item.ob-mobile-current small { color: var(--ob-lime); }
#ob-header .ob-mobile-item:hover b,
#ob-header .ob-mobile-item.ob-mobile-current b { color: var(--ob-cyan); transform: translate(3px,-3px); }

#ob-header .ob-mobile-actions { margin-top: 14px; }
#ob-header .ob-mobile-action {
  min-height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  color: #dfe4ef !important;
  font: 600 12px/1 var(--ob-tech);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
#ob-header .ob-mobile-action-right { display: flex; align-items: center; gap: 10px; }
#ob-header .ob-mobile-action b { color: #697284; font-size: 18px; font-weight: 400; }
#ob-header .ob-mobile-action em {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px; background: var(--ob-lime); color: #050700;
  font-style: normal; font-size: 9px;
}

#ob-header .ob-mobile-wallet-shell {
  margin-top: 20px;
  min-height: 58px;
  padding: 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid rgba(186,255,0,.24);
  border-radius: 18px;
  background: rgba(186,255,0,.055);
  color: #fff !important;
}
#ob-header .ob-mobile-wallet-label { color: var(--ob-lime); font: 600 10px/1 var(--ob-tech); letter-spacing: 1px; }
#ob-header .ob-mobile-wallet-value { unicode-bidi: plaintext; font: 600 13px/1.2 var(--ob-font); display: flex; align-items: center; gap: 10px; }
#ob-header .ob-mobile-wallet-value b { color: #9aa3b3; font-weight: 400; }

#ob-header .ob-mobile-footer {
  margin-top: auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  color: #4b5464;
  font: 600 7px/1 var(--ob-tech);
  letter-spacing: 1.5px;
  direction: ltr;
}
#ob-header .ob-system { display: flex; align-items: center; gap: 7px; }
#ob-header .ob-system i { width: 5px; height: 5px; border-radius: 50%; background: var(--ob-lime); box-shadow: 0 0 8px var(--ob-lime); }

html.ob-menu-locked, html.ob-menu-locked body { overflow: hidden !important; }

/* =========================================================
   PERSIAN — no letter-spacing (it breaks joined letters), arrows point the other way
   ========================================================= */
#ob-header[lang="fa"] .ob-nav-item span,
#ob-header[lang="fa"] .ob-mobile-item span,
#ob-header[lang="fa"] .ob-mobile-label,
#ob-header[lang="fa"] .ob-mobile-action,
#ob-header[lang="fa"] .ob-header-logout { letter-spacing: 0; font-family: "Vazirmatn", var(--ob-tech); }
#ob-header[lang="fa"] .ob-nav-item span { font-size: 13px; }
#ob-header[lang="fa"] .ob-mobile-label { font-size: 11px; }
#ob-header[lang="fa"] .ob-mobile-action { font-size: 14px; }
#ob-header[lang="fa"] .ob-header-logout { font-size: 11px; }
#ob-header [dir="rtl"] .ob-mobile-item b,
#ob-header [dir="rtl"] .ob-mobile-action b,
#ob-header [dir="rtl"] .ob-mobile-wallet-value b { transform: scaleX(-1); }
#ob-header [dir="rtl"] .ob-mobile-item:hover b,
#ob-header [dir="rtl"] .ob-mobile-item.ob-mobile-current b { transform: scaleX(-1) translate(3px,-3px); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px) {
  #ob-header .ob-wallet-shell { display: none; }
  #ob-header .ob-menu-toggle { display: grid; }
}
@media (max-width: 1180px) {
  #ob-header .ob-header-logout { display: none; }
}
@media (max-width: 1100px) {
  #ob-header .ob-desktop-nav { display: none; }
}
@media (min-width: 1281px) {
  #ob-header .ob-mobile-menu { display: none; }
}

/* Phones */
@media (max-width: 600px) {
  #ob-header { --ob-h: 58px; --ob-pad: 16px; }
  #ob-header .ob-nav { gap: 10px; }
  #ob-header .ob-logo { font-size: 20px; }
  #ob-header .ob-actions { gap: 8px; }
  #ob-header .ob-header-tool,
  #ob-header .ob-menu-toggle { width: 40px; height: 40px; }
  #ob-header .bz01t.ob-lang { height: 34px; }
  #ob-header .bz01t.ob-lang button { min-width: 28px; height: 26px; padding: 0 7px; }
  /* WordPress makes its admin bar scroll away on phones; keep it fixed so the header never leaves a gap. */
  body.admin-bar #wpadminbar { position: fixed !important; }
}
/* EN | فا: in the bar on tablets and computers, inside the menu on phones. */
#ob-header .ob-lang-menu { display: none !important; }
@media (max-width: 600px) {
  #ob-header .ob-lang-bar { display: none !important; }
  #ob-header .ob-lang-menu { display: inline-flex !important; }
}
@media (max-width: 359px) {
  #ob-header .ob-logo { font-size: 18px; }
  #ob-header .ob-actions { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  #ob-header *, #ob-header *::before, #ob-header *::after { animation: none !important; transition: none !important; }
}
