.nexab-header {
    width: 100%;
    box-sizing: border-box;
    background: var(--nx-bg, #fff);
    border-bottom: 1px solid var(--nx-border, #e5e7eb);
}
.nexab-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nexab-header__logo { text-decoration: none; flex-shrink: 0; }
.nexab-header__logo img { display: block; max-width: 100%; height: auto; max-height: 36px; }
.nexab-header__logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--nx-text, #0d1117);
}
.nexab-header__menu {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 2rem;
    align-items: center;
}
.nexab-header__menu-item a {
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    color: var(--nx-muted, #6b7280);
    letter-spacing: .01em;
    transition: color .2s ease;
}
.nexab-header__menu-item a:hover { color: var(--nx-text, #0d1117); }
.nexab-header__menu-item.is-active a { color: var(--nx-accent, #2563eb); }

.nexab-header__cta .nexa-btn {
    padding: .5rem 1.25rem;
    font-size: .875rem;
    border-radius: var(--nx-radius-sm, 6px);
}

.nexab-header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--nx-radius-sm, 6px);
}
.nexab-header__burger span {
    display: block;
    width: 22px; height: 2px;
    background: var(--nx-text, #0d1117);
    border-radius: 2px;
    transition: .3s;
}
@media (max-width: 768px) {
    .nexab-header__burger { display: flex; }
    .nexab-header__nav {
        display: none;
        position: absolute;
        top: 68px; left: 0; right: 0;
        background: var(--nx-bg, #fff);
        border-bottom: 1px solid var(--nx-border, #e5e7eb);
        padding: 1rem 1.5rem 1.5rem;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
        z-index: 100;
    }
    .nexab-header--open .nexab-header__nav { display: block; }
    .nexab-header--open .nexab-header__menu { flex-direction: column; align-items: flex-start; gap: .375rem; }
    .nexab-header--open .nexab-header__menu-item a { font-size: 1rem; padding: .5rem 0; display: block; }
    .nexab-header { position: relative; }
}

/* Dark variant */
.nexab-header--dark {
    background: var(--nx-bg-dark, #0d1117);
    border-bottom-color: rgba(255,255,255,.08);
}
.nexab-header--dark .nexab-header__logo-text { color: #fff; }
.nexab-header--dark .nexab-header__menu-item a { color: rgba(255,255,255,.6); }
.nexab-header--dark .nexab-header__menu-item a:hover { color: #fff; }
.nexab-header--dark .nexab-header__burger span { background: #fff; }
.nexab-header--dark .nexab-header__nav { background: var(--nx-bg-dark, #0d1117); border-bottom-color: rgba(255,255,255,.08); }

/* ── Catalog dropdown ── */
.nexab-header__menu-item.has-catalog-drop { position: relative; }
.nexab-catalog__arr { font-size:.6em; margin-left:.35em; vertical-align:middle; display:inline-block; transition:transform .2s; }
.nexab-header__menu-item.has-catalog-drop:hover .nexab-catalog__arr { transform:rotate(-180deg); }
/* Invisible bridge below <li> so gap between link and dropdown doesn't break hover */
.nexab-header__menu-item.has-catalog-drop::after { content:''; position:absolute; top:100%; left:-20px; right:-20px; height:12px; }
@media (min-width:769px) {
    .nexab-catalog-drop { position:absolute; top:100%; left:0; z-index:500; background:#fff; border:1px solid rgba(0,0,0,.09); border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.13); opacity:0; visibility:hidden; transform:translateY(-6px); transition:opacity .18s,transform .18s,visibility .18s; pointer-events:none; }
    .nexab-header__menu-item.has-catalog-drop:hover .nexab-catalog-drop { opacity:1; visibility:visible; transform:translateY(0); pointer-events:auto; }
    .nexab-catalog-drop--simple { min-width:220px; padding:.5rem 0; }
    .nexab-catalog-drop--mega { left:50%; transform:translateX(-50%) translateY(-6px); min-width:640px; max-width:960px; padding:1.5rem 2rem; }
    .nexab-header__menu-item.has-catalog-drop:hover .nexab-catalog-drop--mega { transform:translateX(-50%) translateY(0); }
    /* Sub-level dropdowns for multi-level simple menu */
    .nexab-catalog-sub__list { position:absolute; top:-6px; left:calc(100% + 1px); min-width:200px; background:#fff; border:1px solid rgba(0,0,0,.09); border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.13); list-style:none; padding:.5rem 0; margin:0; opacity:0; visibility:hidden; transform:translateX(-4px); transition:opacity .15s,transform .15s,visibility .15s; pointer-events:none; z-index:600; }
    .nexab-catalog-sub__list::before { content:''; position:absolute; top:0; left:-10px; width:12px; height:100%; }
    .nexab-catalog-drop__list li.has-sub:hover > .nexab-catalog-sub__list { opacity:1; visibility:visible; transform:translateX(0); pointer-events:auto; }
}
.nexab-catalog-drop__list { list-style:none; margin:0; padding:0; }
.nexab-catalog-drop__list a { display:block; padding:.55rem 1.25rem; font-size:.875rem; color:#333; text-decoration:none; white-space:nowrap; transition:background .15s,color .15s; }
.nexab-catalog-drop__list a:hover,.nexab-catalog-sub__list a:hover { background:#f5f7fa; color:var(--nx-accent,#2563eb); }
.nexab-catalog-drop__list li.has-sub { position:relative; }
.nexab-catalog-drop__list li.has-sub > a { padding-right:2.25rem; }
.nexab-catalog-drop__list li.has-sub > a::after { content:'›'; position:absolute; right:.85rem; top:50%; transform:translateY(-50%); opacity:.45; font-size:1.1em; }
.nexab-catalog-sub__list a { display:block; padding:.55rem 1.25rem; font-size:.875rem; color:#333; text-decoration:none; white-space:nowrap; transition:background .15s,color .15s; }
.nexab-catalog-mega__inner { display:flex; gap:2rem; flex-wrap:wrap; }
.nexab-catalog-mega__col { flex:1; min-width:130px; }
.nexab-catalog-mega__title { display:block; font-size:.75rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#0d1117; text-decoration:none; padding-bottom:.5rem; margin-bottom:.5rem; border-bottom:1px solid #e5e7eb; }
.nexab-catalog-mega__title:hover { color:var(--nx-accent,#2563eb); }
.nexab-catalog-mega__sub { list-style:none; margin:0; padding:0; }
.nexab-catalog-mega__sub a { display:block; padding:.3rem 0; font-size:.85rem; color:#555; text-decoration:none; transition:color .15s; }
.nexab-catalog-mega__sub a:hover { color:var(--nx-accent,#2563eb); }
@media (max-width:768px) {
    .nexab-catalog-drop { display:block; position:static; box-shadow:none; border:none; border-radius:0; padding:0 0 .25rem .75rem; border-left:2px solid #e5e7eb; margin:.2rem 0 .4rem; min-width:0; }
    .nexab-catalog-drop--mega { max-width:none; padding:0 0 .25rem .75rem; }
    .nexab-catalog-mega__inner { flex-direction:column; gap:.5rem; }
    .nexab-catalog-mega__col { min-width:0; }
    .nexab-catalog-drop__list a { padding:.3rem 0; font-size:.9rem; }
    .nexab-catalog-sub__list { position:static; transform:none !important; opacity:1; visibility:visible; box-shadow:none; border:none; border-radius:0; border-left:2px solid #e5e7eb; margin:.15rem 0 .25rem .75rem; padding:0; pointer-events:auto; min-width:0; }
    .nexab-catalog-sub__list::before { display:none; }
    .nexab-catalog-sub__list a { padding:.3rem 0; font-size:.875rem; }
}

/* Transparent variant (over hero) */
.nexab-header--transparent {
    background: transparent;
    border-bottom-color: transparent;
    position: absolute;
    left: 0; right: 0; top: 0;
    z-index: 10;
}
.nexab-header--transparent .nexab-header__logo-text,
.nexab-header--transparent .nexab-header__menu-item a { color: rgba(255,255,255,.85); }
.nexab-header--transparent .nexab-header__menu-item a:hover { color: #fff; }
.nexab-header--transparent .nexab-header__burger span { background: #fff; }

/* ── Cart icon ──────────────────────────────────────────────────────────────── */
.nexab-header__cart { position: relative; display: flex; align-items: center; color: inherit; text-decoration: none; margin-left: 12px; }
.nexab-header__cart-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--nexa-global-accent-color, #007bff); color: #fff; font-size: .65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.nexab-header__cart-badge--hidden { display: none; }

/* ── Auth button ────────────────────────────────────────────────────────────── */
.nexab-header__auth { display: flex; align-items: center; gap: 6px; padding: 6px 14px; background: none; border: 1px solid currentColor; border-radius: 6px; color: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; margin-left: 10px; transition: opacity .15s; line-height: 1.2; }
.nexab-header__auth:hover { opacity: .72; }
.nexab-header__auth.is-auth { border-color: transparent; background: rgba(0,0,0,.06); }
.nexab-header__auth svg { flex-shrink: 0; }

/* ── Auth modal ─────────────────────────────────────────────────────────────── */
.nexab-auth-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; visibility: hidden; pointer-events: none; }
.nexab-auth-modal.is-open { visibility: visible; pointer-events: auto; }
.nexab-auth-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .22s; }
.nexab-auth-modal.is-open .nexab-auth-modal__backdrop { opacity: 1; }
.nexab-auth-modal__box { position: relative; background: #fff; border-radius: 14px; padding: 32px 28px 28px; width: 100%; max-width: 400px; margin: 16px; box-shadow: 0 24px 64px rgba(0,0,0,.18); transform: translateY(18px); transition: transform .22s, opacity .22s; opacity: 0; }
.nexab-auth-modal.is-open .nexab-auth-modal__box { transform: none; opacity: 1; }
.nexab-auth-modal__close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.4rem; color: #bbb; cursor: pointer; padding: 4px 8px; line-height: 1; }
.nexab-auth-modal__close:hover { color: #555; }
.nexab-auth-modal__tabs { display: flex; border-bottom: 2px solid #e9ecef; margin-bottom: 20px; }
.nexab-auth-modal__tab { padding: 8px 18px; border: none; background: none; font-size: .9rem; font-weight: 600; color: #888; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .15s; }
.nexab-auth-modal__tab.is-active { color: var(--nexa-global-accent-color, #007bff); border-bottom-color: var(--nexa-global-accent-color, #007bff); }
.nexab-auth-modal__form { display: none; }
.nexab-auth-modal__form.is-active { display: block; }
.nexab-auth-modal__field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.nexab-auth-modal__field label { font-size: .8rem; font-weight: 600; color: #555; }
.nexab-auth-modal__field input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 7px; font-size: .9rem; transition: border-color .15s; }
.nexab-auth-modal__field input:focus { outline: none; border-color: var(--nexa-global-accent-color, #007bff); }
.nexab-auth-modal__btn { display: block; width: 100%; padding: 11px; margin-top: 6px; background: var(--nexa-global-accent-color, #007bff); color: #fff; border: none; border-radius: 7px; font-size: .95rem; font-weight: 700; cursor: pointer; transition: opacity .15s; }
.nexab-auth-modal__btn:hover { opacity: .88; }
.nexab-auth-modal__btn:disabled { opacity: .5; cursor: not-allowed; }
.nexab-auth-modal__error { color: #e53e3e; font-size: .8rem; margin-top: 6px; min-height: 16px; }
.nexab-auth-modal__forgot { display: inline-block; margin-top: 10px; font-size: .8rem; color: #888; text-decoration: none; }
.nexab-auth-modal__forgot:hover { color: var(--nexa-global-accent-color, #007bff); }
/* ── Search ─────────────────────────────────────────────────────────────────── */
.nexab-header__search { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; background: none; border: none; cursor: pointer; color: inherit; transition: opacity .15s; }
.nexab-header__search:hover { opacity: .7; }
.nexab-search-backdrop { position: fixed; inset: 0; z-index: 9997; background: rgba(0,0,0,.35); opacity: 0; visibility: hidden; transition: opacity .22s, visibility .22s; }
.nexab-search-backdrop.is-open { opacity: 1; visibility: visible; }
.nexab-search-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 9998; background: #fff; box-shadow: 0 4px 24px rgba(0,0,0,.12); transform: translateY(-100%); transition: transform .25s cubic-bezier(.4,0,.2,1); padding: 20px 24px 16px; }
.nexab-search-panel.is-open { transform: translateY(0); }
.nexab-search-panel__inner { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; }
.nexab-search-panel__input { flex: 1; border: none; border-bottom: 2px solid #ddd; padding: 10px 0; font-size: 1.1rem; outline: none; background: transparent; }
.nexab-search-panel__input:focus { border-bottom-color: var(--nexa-global-accent-color, #007bff); }
.nexab-search-panel__close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #888; line-height: 1; padding: 4px; }
.nexab-search-panel__close:hover { color: #333; }
.nexab-search-panel__results { max-width: 760px; margin: 12px auto 0; display: flex; flex-direction: column; gap: 2px; }
.nexab-search-panel__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: inherit; transition: background .12s; }
.nexab-search-panel__item:hover { background: #f5f5f5; }
.nexab-search-panel__item-name { font-size: .95rem; font-weight: 500; }
.nexab-search-panel__item-section { font-size: .78rem; color: #999; margin-left: auto; white-space: nowrap; }
.nexab-search-panel__empty { text-align: center; color: #999; font-size: .9rem; padding: 12px 0; }

