/*
 * NobexSkill Premium Reference Header — Convergence R1
 * Reference direction: premium LMS header supplied by user on 2026-09-21.
 * Scope: visual-only header convergence. No route, DB, auth, cart, course or Composer mutation.
 * Loaded LAST so legacy eClass/theme rules cannot distort the header.
 */

:root {
  --nsr-bg: #ffffff;
  --nsr-ink: #0c2947;
  --nsr-text: #213b55;
  --nsr-muted: #718096;
  --nsr-line: #e4ebf2;
  --nsr-soft: #f7f9fc;
  --nsr-soft-2: #fff3ef;
  --nsr-accent: #ff684a;
  --nsr-accent-dark: #ed5839;
  --nsr-shadow: 0 16px 42px rgba(20, 45, 70, .10);
}

/* The legacy horizontal category rail is duplicate navigation. */
#categories-tab.categories-tab-main-block {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* ---------- Theme 1 canonical premium header ---------- */
.nobex-premium-header,
.nobex-premium-header * {
  box-sizing: border-box !important;
}

.nobex-premium-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1045 !important;
  width: 100% !important;
  background: rgba(255,255,255,.985) !important;
  border-bottom: 1px solid var(--nsr-line) !important;
  box-shadow: 0 3px 16px rgba(12,41,71,.045) !important;
  backdrop-filter: saturate(150%) blur(12px) !important;
  -webkit-backdrop-filter: saturate(150%) blur(12px) !important;
}

.nobex-premium-header .nobex-header-shell {
  width: min(1460px, calc(100% - 64px)) !important;
  margin: 0 auto !important;
}

.nobex-premium-header .nobex-header-main {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  gap: 18px !important;
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 0 !important;
}

/* Logo: safe fallback and reference-like two-tone text treatment. */
.nobex-premium-header .nobex-brand {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  min-width: 176px !important;
  max-width: 205px !important;
  height: 52px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  text-decoration: none !important;
  background: transparent !important;
}

.nobex-premium-header .nobex-brand-logo {
  display: block !important;
  width: auto !important;
  height: 40px !important;
  max-width: 188px !important;
  max-height: 40px !important;
  object-fit: contain !important;
  margin: 0 !important;
}

.nobex-premium-header .nobex-brand-text {
  max-width: 190px !important;
  margin: 0 !important;
  font-size: 29px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  letter-spacing: -1.2px !important;
  white-space: nowrap !important;
  color: var(--nsr-ink) !important;
  background: linear-gradient(90deg, #0b2d50 0 68%, #ff684a 68% 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.nobex-premium-header .nobex-brand.nobex-media-fallback,
.nobex-premium-header .nobex-mobile-brand.nobex-media-fallback {
  min-height: 0 !important;
  height: auto !important;
  overflow: visible !important;
  background: transparent !important;
  background-image: none !important;
}
.nobex-premium-header .nobex-brand.nobex-media-fallback::after,
.nobex-premium-header .nobex-mobile-brand.nobex-media-fallback::after {
  display: none !important;
  content: none !important;
}
.nobex-premium-header .nobex-brand.nobex-media-fallback > .nobex-brand-logo,
.nobex-premium-header .nobex-mobile-brand.nobex-media-fallback > .nobex-brand-logo {
  display: none !important;
  visibility: hidden !important;
}
.nobex-premium-header .nobex-brand.nobex-media-fallback .nobex-brand-text-fallback,
.nobex-premium-header .nobex-mobile-brand.nobex-media-fallback .nobex-brand-text-fallback {
  display: inline-flex !important;
}

/* Primary navigation */
.nobex-premium-header .nobex-desktop-nav {
  display: flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
}

.nobex-premium-header .nobex-nav-link {
  height: 44px !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 11px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: var(--nsr-ink) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background .16s ease, color .16s ease, border-color .16s ease !important;
}

.nobex-premium-header .nobex-nav-link:hover,
.nobex-premium-header .nobex-nav-link:focus-visible {
  background: var(--nsr-soft) !important;
  color: #071f38 !important;
  outline: none !important;
}

.nobex-premium-header .nobex-category-trigger {
  min-width: 140px !important;
  background: var(--nsr-soft-2) !important;
  border-color: #fff0eb !important;
  color: #16334e !important;
}
.nobex-premium-header .nobex-category-trigger > svg:first-child {
  width: 18px !important;
  height: 18px !important;
  color: var(--nsr-accent) !important;
  stroke-width: 2.2 !important;
}
.nobex-premium-header .nobex-category-trigger .nobex-chevron {
  width: 14px !important;
  height: 14px !important;
  margin-left: 2px !important;
  color: var(--nsr-accent) !important;
}

/* Categories mega panel */
.nobex-premium-header .nobex-category-menu { position: relative !important; }
.nobex-premium-header .nobex-category-panel {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  left: 0 !important;
  width: min(650px, 82vw) !important;
  padding: 18px !important;
  border: 1px solid var(--nsr-line) !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 24px 64px rgba(12,41,71,.16) !important;
  z-index: 1080 !important;
}
.nobex-premium-header .nobex-category-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
  margin: 0 0 12px !important;
  padding: 2px 4px 14px !important;
  border-bottom: 1px solid #edf1f5 !important;
}
.nobex-premium-header .nobex-category-panel-head strong {
  color: var(--nsr-ink) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}
.nobex-premium-header .nobex-category-panel-head span {
  color: var(--nsr-muted) !important;
  font-size: 11px !important;
  margin-top: 4px !important;
}
.nobex-premium-header .nobex-category-panel-head a {
  color: var(--nsr-accent) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}
.nobex-premium-header .nobex-category-grid {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 8px !important;
}
.nobex-premium-header .nobex-category-item {
  min-height: 52px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  border: 1px solid #edf1f5 !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: #304a63 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
}
.nobex-premium-header .nobex-category-item:hover {
  background: #fff8f5 !important;
  border-color: #ffe2d9 !important;
  color: var(--nsr-ink) !important;
  transform: translateY(-1px) !important;
}
.nobex-premium-header .nobex-category-icon {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 9px !important;
  background: #fff0eb !important;
  color: var(--nsr-accent) !important;
}

/* Search */
.nobex-premium-header .nobex-header-search {
  height: 46px !important;
  flex: 1 1 310px !important;
  min-width: 210px !important;
  max-width: 355px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin-left: auto !important;
  padding: 0 8px 0 16px !important;
  border: 1px solid #dce5ed !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  box-shadow: none !important;
}
.nobex-premium-header .nobex-header-search:focus-within {
  background: #fff !important;
  border-color: #b8c7d5 !important;
  box-shadow: 0 0 0 4px rgba(12,74,110,.06) !important;
}
.nobex-premium-header .nobex-header-search > svg {
  width: 19px !important;
  height: 19px !important;
  color: #25425c !important;
}
.nobex-premium-header .nobex-header-search input {
  height: 42px !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--nsr-ink) !important;
  font-size: 13px !important;
}
.nobex-premium-header .nobex-header-search input::placeholder { color: #8a9bad !important; }
.nobex-premium-header .nobex-header-search button {
  width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #fff !important;
  color: #667c90 !important;
}
.nobex-premium-header .nobex-header-search button:hover {
  background: var(--nsr-accent) !important;
  color: #fff !important;
}

/* Header actions */
.nobex-premium-header .nobex-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  flex: 0 0 auto !important;
  margin-left: 0 !important;
  white-space: nowrap !important;
}
.nobex-premium-header .nobex-icon-button {
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: transparent !important;
  color: #203b54 !important;
}
.nobex-premium-header .nobex-icon-button:hover {
  background: var(--nsr-soft) !important;
  border-color: var(--nsr-line) !important;
}
.nobex-premium-header .nobex-icon-button svg {
  width: 21px !important;
  height: 21px !important;
  stroke-width: 1.9 !important;
}
.nobex-premium-header .nobex-action-badge {
  top: -2px !important;
  right: -3px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  line-height: 18px !important;
  border-radius: 999px !important;
  background: var(--nsr-accent) !important;
  color: #fff !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 2px #fff !important;
}
.nobex-premium-header .nobex-guest-actions {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  margin-left: 2px !important;
}
.nobex-premium-header .nobex-btn {
  min-height: 44px !important;
  padding: 0 18px !important;
  border-radius: 11px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}
.nobex-premium-header .nobex-btn-ghost {
  background: #fff !important;
  border: 1px solid #d6e0e8 !important;
  color: var(--nsr-ink) !important;
  box-shadow: none !important;
}
.nobex-premium-header .nobex-btn-primary {
  background: linear-gradient(135deg,#ff7255,#ff5e43) !important;
  border: 1px solid var(--nsr-accent) !important;
  color: #fff !important;
  box-shadow: 0 9px 22px rgba(255,104,74,.22) !important;
}

/* Language: isolate from every legacy button/svg rule. */
.nobex-premium-header .nobex-lang-dropdown {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  z-index: 1205 !important;
}
.nobex-premium-header .nobex-lang-dropdown__trigger {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: auto !important;
  min-width: 82px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: row !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: #fff !important;
  color: var(--nsr-ink) !important;
  box-shadow: none !important;
  overflow: hidden !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.nobex-premium-header .nobex-lang-dropdown__trigger:hover,
.nobex-premium-header .nobex-lang-dropdown.is-open .nobex-lang-dropdown__trigger {
  background: var(--nsr-soft) !important;
  border-color: var(--nsr-line) !important;
}
.nobex-premium-header .nobex-lang-flag {
  display: inline-block !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  flex: 0 0 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}
.nobex-premium-header .nobex-lang-caret {
  width: 7px !important;
  min-width: 7px !important;
  max-width: 7px !important;
  height: 7px !important;
  min-height: 7px !important;
  max-height: 7px !important;
  flex: 0 0 7px !important;
}
.nobex-premium-header .nobex-lang-dropdown__menu {
  top: calc(100% + 9px) !important;
  right: 0 !important;
  left: auto !important;
  width: 158px !important;
  min-width: 158px !important;
  max-width: 158px !important;
  padding: 7px !important;
  border: 1px solid var(--nsr-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: var(--nsr-shadow) !important;
  z-index: 1210 !important;
}
.nobex-premium-header .nobex-lang-dropdown__option {
  min-height: 42px !important;
  border-radius: 9px !important;
  font-size: 13px !important;
}

/* Mobile drawer */
.nobex-premium-header .nobex-mobile-menu-toggle {
  width: 42px !important;
  height: 42px !important;
  flex: 0 0 42px !important;
  padding: 10px !important;
  border: 1px solid transparent !important;
  border-radius: 11px !important;
  background: #f6f8fb !important;
}
.nobex-premium-header .nobex-mobile-menu-toggle span {
  width: 20px !important;
  height: 2px !important;
  margin: 4px auto !important;
  background: #17344f !important;
  border-radius: 10px !important;
}
.nobex-premium-header .nobex-mobile-overlay {
  background: rgba(9,29,48,.48) !important;
  backdrop-filter: blur(2px) !important;
}
.nobex-premium-header .nobex-mobile-drawer {
  width: min(370px, 94vw) !important;
  background: #fff !important;
  box-shadow: -24px 0 70px rgba(12,41,71,.20) !important;
}
.nobex-premium-header .nobex-mobile-drawer-head {
  min-height: 72px !important;
  padding: 0 18px !important;
  border-bottom: 1px solid #edf1f5 !important;
}
.nobex-premium-header .nobex-mobile-drawer-body {
  padding: 14px 15px 24px !important;
}
.nobex-premium-header .nobex-mobile-link {
  min-height: 46px !important;
  padding: 9px 11px !important;
  border-radius: 10px !important;
  color: #29445e !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}
.nobex-premium-header .nobex-mobile-link:hover {
  background: #fff2ee !important;
  color: var(--nsr-accent) !important;
}
.nobex-premium-header .nobex-mobile-drawer-search form {
  height: 46px !important;
  border: 1px solid #dfe7ee !important;
  border-radius: 12px !important;
  background: #f8fafc !important;
}
.nobex-premium-header .nobex-mobile-categories {
  grid-template-columns: 1fr !important;
  gap: 7px !important;
}
.nobex-premium-header .nobex-mobile-categories > a {
  min-height: 44px !important;
  border: 1px solid #edf1f5 !important;
  border-radius: 10px !important;
  background: #fafbfd !important;
}
.nobex-premium-header .nobex-mobile-drawer-footer {
  gap: 9px !important;
  padding: 14px 15px 18px !important;
  border-top: 1px solid #edf1f5 !important;
}

/* Neutralize old theme header fragments inside canonical Theme 1. */
.nobex-premium-header .smallscreen-search-block,
.nobex-premium-header .fullscreen-search-block,
.nobex-premium-header .mobile-bottom-bar,
.nobex-premium-header .nobex-mobile-search-toggle,
.nobex-premium-header .nobex-mobile-search[data-nobex-mobile-search] {
  display: none !important;
}

/* Theme 2: keep its structure, but guarantee sane language control. */
.nobex-theme2-language-desktop,
.nobex-theme2-mobile-language {
  align-items: center !important;
}
.nobex-theme2-language-desktop .nobex-lang-dropdown__trigger,
.nobex-theme2-mobile-language .nobex-lang-dropdown__trigger {
  max-height: 40px !important;
}

/* ---------- Responsive convergence ---------- */
@media (max-width: 1380px) {
  .nobex-premium-header .nobex-header-shell {
    width: min(1320px, calc(100% - 36px)) !important;
  }
  .nobex-premium-header .nobex-header-main { gap: 12px !important; }
  .nobex-premium-header .nobex-brand { min-width: 154px !important; }
  .nobex-premium-header .nobex-brand-logo { max-width: 158px !important; }
  .nobex-premium-header .nobex-brand-text { font-size: 26px !important; }
  .nobex-premium-header .nobex-nav-link { padding: 0 8px !important; }
  .nobex-premium-header .nobex-category-trigger { min-width: 128px !important; }
  .nobex-premium-header .nobex-header-search { max-width: 310px !important; }
  .nobex-premium-header .nobex-account-copy { display: none !important; }
}

@media (max-width: 1180px) {
  .nobex-premium-header .nobex-desktop-nav,
  .nobex-premium-header .nobex-desktop-search,
  .nobex-premium-header .nobex-desktop-action {
    display: none !important;
  }
  .nobex-premium-header .nobex-header-shell {
    width: calc(100% - 24px) !important;
  }
  .nobex-premium-header .nobex-header-main {
    height: 66px !important;
    min-height: 66px !important;
    max-height: 66px !important;
    gap: 6px !important;
  }
  .nobex-premium-header .nobex-brand {
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 auto !important;
    height: 48px !important;
    overflow: hidden !important;
  }
  .nobex-premium-header .nobex-brand-logo {
    height: 34px !important;
    max-height: 34px !important;
    max-width: 136px !important;
  }
  .nobex-premium-header .nobex-brand-text {
    max-width: 136px !important;
    font-size: 23px !important;
    letter-spacing: -.8px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .nobex-premium-header .nobex-header-actions {
    margin-left: auto !important;
    gap: 4px !important;
  }
  .nobex-premium-header .nobex-mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    min-width: 72px !important;
    padding: 0 7px !important;
    gap: 5px !important;
    border-color: var(--nsr-line) !important;
  }
  .nobex-premium-header .nobex-lang-flag {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 12px !important;
    min-height: 12px !important;
    max-height: 12px !important;
    flex-basis: 18px !important;
  }
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    width: 38px !important;
    height: 38px !important;
    flex-basis: 38px !important;
    border-radius: 10px !important;
  }
}

@media (max-width: 767px) {
  .nobex-premium-header .nobex-header-shell {
    width: calc(100% - 18px) !important;
  }
  .nobex-premium-header .nobex-header-main {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    gap: 4px !important;
  }
  .nobex-premium-header .nobex-brand-logo {
    height: 31px !important;
    max-height: 31px !important;
    max-width: 124px !important;
  }
  .nobex-premium-header .nobex-brand-text {
    max-width: 124px !important;
    font-size: 21px !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    min-width: 68px !important;
    padding: 0 6px !important;
    font-size: 12px !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__menu {
    width: 144px !important;
    min-width: 144px !important;
    max-width: 144px !important;
  }
}

@media (max-width: 380px) {
  .nobex-premium-header .nobex-header-shell {
    width: calc(100% - 14px) !important;
  }
  .nobex-premium-header .nobex-header-main { gap: 3px !important; }
  .nobex-premium-header .nobex-brand-logo,
  .nobex-premium-header .nobex-brand-text {
    max-width: 108px !important;
  }
  .nobex-premium-header .nobex-brand-text { font-size: 19px !important; }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    min-width: 64px !important;
    padding: 0 5px !important;
    gap: 4px !important;
  }
  .nobex-premium-header .nobex-lang-flag {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 11px !important;
    min-height: 11px !important;
    max-height: 11px !important;
    flex-basis: 16px !important;
  }
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }
}

/* RTL safety */
[dir="rtl"] .nobex-premium-header .nobex-header-search {
  margin-left: 0 !important;
  margin-right: auto !important;
}
[dir="rtl"] .nobex-premium-header .nobex-category-panel {
  left: auto !important;
  right: 0 !important;
}
[dir="rtl"] .nobex-premium-header .nobex-lang-dropdown__menu {
  right: auto !important;
  left: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .nobex-premium-header *,
  .nobex-lang-dropdown * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   NobexSkill Header Pixel Alignment Refinement R2 — 2026-09-22
   Visual-only closure from fresh post-R1 screenshots.
   No nav markup, routes, auth, cart, DB, Composer or home source mutation.
   ============================================================ */

:root {
  --nsr2-desktop-control: 44px;
  --nsr2-mobile-control: 38px;
}

/* Deterministic flex geometry: every direct header child shares one center line. */
.nobex-premium-header .nobex-header-main {
  justify-content: flex-start !important;
}
.nobex-premium-header .nobex-header-main > * {
  align-self: center !important;
}
.nobex-premium-header .nobex-header-actions,
.nobex-premium-header .nobex-guest-actions {
  min-height: var(--nsr2-desktop-control) !important;
  align-items: center !important;
}

/* Desktop controls: same box height, same optical center. */
.nobex-premium-header .nobex-nav-link,
.nobex-premium-header .nobex-icon-button,
.nobex-premium-header .nobex-lang-dropdown__trigger,
.nobex-premium-header .nobex-btn {
  height: var(--nsr2-desktop-control) !important;
  min-height: var(--nsr2-desktop-control) !important;
  max-height: var(--nsr2-desktop-control) !important;
}
.nobex-premium-header .nobex-nav-link,
.nobex-premium-header .nobex-category-trigger,
.nobex-premium-header .nobex-lang-dropdown__trigger,
.nobex-premium-header .nobex-btn,
.nobex-premium-header .nobex-icon-button {
  line-height: 1 !important;
  vertical-align: middle !important;
}

/* Feather/icon normalization: remove baseline drift across labels. */
.nobex-premium-header .nobex-nav-link > svg,
.nobex-premium-header .nobex-category-trigger > svg,
.nobex-premium-header .nobex-icon-button > svg,
.nobex-premium-header .nobex-btn > svg,
.nobex-premium-header .nobex-account-trigger > svg,
.nobex-premium-header .nobex-mobile-link > svg,
.nobex-premium-header .nobex-drawer-close > svg,
.nobex-premium-header .nobex-header-search > svg,
.nobex-premium-header .nobex-header-search button > svg {
  display: block !important;
  margin: 0 !important;
  vertical-align: middle !important;
}
.nobex-premium-header .nobex-nav-link > span,
.nobex-premium-header .nobex-lang-dropdown__current,
.nobex-premium-header .nobex-lang-dropdown__text {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 1em !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Language trigger optical correction: flag / label / caret on one baseline. */
.nobex-premium-header .nobex-lang-dropdown__trigger {
  gap: 6px !important;
  padding-inline: 10px !important;
}
.nobex-premium-header .nobex-lang-flag {
  align-self: center !important;
  transform: translateY(0) !important;
}
.nobex-premium-header .nobex-lang-caret,
.nobex-premium-header .nobex-lang-dropdown.is-open .nobex-lang-caret {
  align-self: center !important;
  margin: -2px 1px 0 2px !important;
}
.nobex-premium-header .nobex-lang-dropdown.is-open .nobex-lang-caret {
  margin-top: 2px !important;
}

/* Cart/notification: stable icon and badge optical position. */
.nobex-premium-header .nobex-icon-button {
  width: var(--nsr2-desktop-control) !important;
  flex: 0 0 var(--nsr2-desktop-control) !important;
  padding: 0 !important;
}
.nobex-premium-header .nobex-icon-button > svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.9 !important;
}
.nobex-premium-header .nobex-action-badge {
  top: -4px !important;
  right: -4px !important;
}

/* Search control: visual center and stable submit box. */
.nobex-premium-header .nobex-header-search {
  align-self: center !important;
  height: 46px !important;
  min-height: 46px !important;
  max-height: 46px !important;
}
.nobex-premium-header .nobex-header-search input {
  line-height: 1.2 !important;
}
.nobex-premium-header .nobex-header-search button {
  flex: 0 0 34px !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Desktop spacing tuned from the reference screenshot. */
@media (min-width: 1181px) {
  .nobex-premium-header .nobex-header-main {
    gap: 16px !important;
  }
  .nobex-premium-header .nobex-desktop-nav {
    gap: 2px !important;
  }
  .nobex-premium-header .nobex-header-actions {
    gap: 8px !important;
  }
  .nobex-premium-header .nobex-guest-actions {
    gap: 8px !important;
    margin-left: 1px !important;
  }
}

/* Drawer rows: icon column and label baselines are deterministic. */
.nobex-premium-header .nobex-mobile-link {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  line-height: 1.2 !important;
}
.nobex-premium-header .nobex-mobile-link > svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}
.nobex-premium-header .nobex-mobile-categories > a {
  align-items: center !important;
  line-height: 1.2 !important;
}
.nobex-premium-header .nobex-mobile-categories > a > span:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
}
.nobex-premium-header .nobex-mobile-categories > a > span:first-child > i {
  width: 18px !important;
  min-width: 18px !important;
  margin: 0 !important;
  text-align: center !important;
  line-height: 1 !important;
}
.nobex-premium-header .nobex-mobile-categories > a > svg {
  display: block !important;
  margin: 0 !important;
}

/* Mobile: logo is deliberately left anchored; controls stay right. */
@media (max-width: 1180px) {
  .nobex-premium-header .nobex-header-main {
    justify-content: flex-start !important;
  }
  .nobex-premium-header .nobex-brand {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 136px !important;
    margin: 0 auto 0 0 !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }
  .nobex-premium-header .nobex-header-actions {
    flex: 0 0 auto !important;
    margin-left: 0 !important;
    gap: 5px !important;
  }
  .nobex-premium-header .nobex-lang-dropdown,
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    align-self: center !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger,
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    height: var(--nsr2-mobile-control) !important;
    min-height: var(--nsr2-mobile-control) !important;
    max-height: var(--nsr2-mobile-control) !important;
  }
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    width: var(--nsr2-mobile-control) !important;
    min-width: var(--nsr2-mobile-control) !important;
    max-width: var(--nsr2-mobile-control) !important;
    flex: 0 0 var(--nsr2-mobile-control) !important;
    padding: 0 !important;
  }
  .nobex-premium-header .nobex-mobile-menu-toggle {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }
  .nobex-premium-header .nobex-mobile-menu-toggle span {
    width: 18px !important;
    height: 2px !important;
    margin: 2px 0 !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    min-width: 70px !important;
    padding: 0 7px !important;
    gap: 5px !important;
  }
  .nobex-premium-header .nobex-action-badge {
    top: -4px !important;
    right: -3px !important;
  }
}

@media (max-width: 767px) {
  .nobex-premium-header .nobex-header-shell {
    width: calc(100% - 20px) !important;
  }
  .nobex-premium-header .nobex-header-main {
    height: 62px !important;
    min-height: 62px !important;
    max-height: 62px !important;
    gap: 5px !important;
  }
  .nobex-premium-header .nobex-brand {
    max-width: 122px !important;
  }
  .nobex-premium-header .nobex-brand-logo {
    max-width: 118px !important;
    height: 30px !important;
    max-height: 30px !important;
  }
  .nobex-premium-header .nobex-brand-text {
    max-width: 118px !important;
    font-size: 20px !important;
    letter-spacing: -.65px !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    min-width: 66px !important;
    font-size: 12px !important;
  }
}

/* 344/360px hard-fit contract: left logo + breathing space + 3 right controls. */
@media (max-width: 380px) {
  .nobex-premium-header .nobex-header-shell {
    width: calc(100% - 16px) !important;
  }
  .nobex-premium-header .nobex-header-main {
    gap: 4px !important;
  }
  .nobex-premium-header .nobex-brand {
    max-width: 106px !important;
  }
  .nobex-premium-header .nobex-brand-logo,
  .nobex-premium-header .nobex-brand-text {
    max-width: 104px !important;
  }
  .nobex-premium-header .nobex-brand-text {
    font-size: 18px !important;
    letter-spacing: -.55px !important;
  }
  .nobex-premium-header .nobex-header-actions {
    gap: 3px !important;
  }
  .nobex-premium-header .nobex-lang-dropdown__trigger {
    min-width: 62px !important;
    padding: 0 5px !important;
    gap: 4px !important;
  }
  .nobex-premium-header .nobex-lang-flag {
    width: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    height: 11px !important;
    min-height: 11px !important;
    max-height: 11px !important;
    flex-basis: 16px !important;
  }
  .nobex-premium-header .nobex-icon-button,
  .nobex-premium-header .nobex-mobile-menu-toggle {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    flex-basis: 36px !important;
  }
}
