/* Навигация каталога: мегаменю и футер (ADR-015 §4) */

/* ── Scoped isolation: мегаменю каталога/брендов не наследует тесные DS-плитки шапки ── */
.nfs-megamenu--catalog-only,
.nfs-megamenu--brands-panel,
.nfs-megamenu--catalog-only *,
.nfs-megamenu--brands-panel * {
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    /* Не считать layout закрытых панелей до первого hover (P2 lazy megamenu) */
    .nfs-header-main .nfs-nav-item:not(.is-open) > .nfs-megamenu {
        content-visibility: auto;
        contain-intrinsic-size: 0 420px;
    }

    /* При открытии сразу полный paint — иначе content-visibility даёт вспышку при switch */
    .nfs-header-main .nfs-nav-item.is-open > .nfs-megamenu {
        content-visibility: visible;
    }
}

@media (min-width: 1024px) {
    .nfs-header-main .nfs-megamenu.nfs-megamenu--catalog-only,
    .nfs-header-main .nfs-megamenu.nfs-megamenu--brands-panel {
        padding: 10px 12px !important;
        min-height: 0 !important;
        background: #ffffff !important;
        border: 1px solid rgba(26, 95, 217, 0.14);
        border-radius: 14px;
        box-shadow: 0 18px 48px -16px rgba(15, 23, 42, 0.28);
        overflow: hidden;
        z-index: 5000;
    }
}

/* ── Каталог: одна панель (только пригон) ── */
.nfs-megamenu--catalog-only {
    display: block;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.nfs-megamenu--catalog-only .nfs-megamenu-col--categories {
    width: 100%;
    border-right: none;
    padding: 0;
    background: transparent;
    color: var(--nfs-t1, #0d1117);
    box-sizing: border-box;
}

/* ADR-036/038: 4 колонки витрины
   Важно: .nfs-nav-item a в nfs_header.css даёт светлый цвет (шапка) —
   здесь перебиваем тёмным текстом на белой панели. */
.nfs-megamenu--catalog-only .nfs-megamenu-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 20px;
    width: 100%;
    min-width: 0;
    color: #0f172a;
}

/* ADR-038: крупные flag-кнопки стран импорта */
.nfs-megamenu--catalog-only .nfs-megamenu-geo-flags {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-geo-flag {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    color: #0f172a !important;
    text-decoration: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    min-height: 72px;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-geo-flag:hover,
.nfs-megamenu--catalog-only a.nfs-megamenu-geo-flag:focus-visible {
    border-color: rgba(26, 95, 217, 0.35);
    box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.35);
    transform: translateY(-1px);
    outline: none;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-flag__flag {
    flex: 0 0 auto;
    width: 44px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-flag__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-flag__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-flag__label {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-flag__count {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column--sorts .nfs-megamenu-column__footer-link {
    margin-top: 10px;
}

/* Mobile: цветные бейджи стран в drill-down */
.nfs-mobile-geo-flag-badge {
    display: inline-block;
    width: 22px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    background-size: cover;
}
.nfs-mobile-geo-flag-badge--korea {
    background: linear-gradient(180deg, #fff 0%, #fff 45%, #cd2e3a 45%, #cd2e3a 55%, #0047a0 55%, #0047a0 100%);
}
.nfs-mobile-geo-flag-badge--china {
    background: #de2910;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 8px;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__subtitle {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin: 10px 0 4px;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a !important;
    min-width: 0;
    background: transparent;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__link:hover,
.nfs-megamenu--catalog-only a.nfs-megamenu-column__link:focus-visible {
    background: rgba(26, 95, 217, 0.06);
    color: #1a5fd9 !important;
    outline: none;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__link-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: inherit;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__label {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__count {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #64748b !important;
    font-variant-numeric: tabular-nums;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__link:hover .nfs-megamenu-column__count {
    color: #64748b !important;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__link--muted {
    color: #334155 !important;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__link--soon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    color: #94a3b8 !important;
    cursor: default;
    opacity: 0.85;
    pointer-events: none;
    user-select: none;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__link--soon .nfs-megamenu-column__count {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #94a3b8;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__link .nfs-nav-cat-ico,
.nfs-megamenu--catalog-only .nfs-megamenu-column__link .nfs-megamenu-ico,
.nfs-megamenu--catalog-only .nfs-megamenu-column__link .tabler-icon {
    color: #1a5fd9;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.nfs-megamenu--catalog-only .nfs-megamenu-column__link .nfs-megamenu-ico use {
    /* stroke наследуется с svg */
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__footer-link {
    display: inline-block;
    margin-top: 10px;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a5fd9 !important;
    text-decoration: none;
    background: transparent;
}

.nfs-megamenu--catalog-only a.nfs-megamenu-column__footer-link:hover {
    text-decoration: underline;
    color: #1248b0 !important;
}

@media (max-width: 1100px) {
    .nfs-megamenu--catalog-only .nfs-megamenu-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Явная сетка внутри catalog-only — не зависит от legacy .nfs-megamenu--catalog */
.nfs-megamenu--catalog-only .nfs-megamenu-catalog-geo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #0f172a !important;
    background: #f3f7ff;
    border: 1px solid rgba(26, 95, 217, 0.12);
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact .nfs-megamenu-geo-hub__main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact .nfs-nav-cat-ico--geo {
    color: #1a5fd9;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact[href*="/china/"] .nfs-nav-cat-ico--geo {
    color: #c41e3a;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact:hover {
    color: #1a5fd9 !important;
    border-color: rgba(26, 95, 217, 0.28);
    background: #eaf2ff;
}

.nfs-megamenu--catalog-only .nfs-megamenu-geo-hub--compact .nfs-megamenu-geo-hub__label {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    color: inherit !important;
    white-space: nowrap;
}

/* ── Бренды: отдельная вкладка ── */
.nfs-megamenu--brands-panel {
    display: block;
    width: 100%;
    padding: 0;
}

.nfs-megamenu--brands-panel .nfs-megamenu-col--brands {
    width: 100%;
    border-right: none;
    padding: 0;
    /* Высота по контенту — иначе обрезает сетку марок (cards layout) */
    max-height: none;
    overflow: visible;
}

.nfs-megamenu--brands-panel .nfs-megamenu-col-title {
    margin: 0 0 8px;
    padding: 0;
    font-size: 0.65rem;
    color: #64748b !important;
}

.nfs-megamenu-brands-import {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.nfs-megamenu-brands-import__col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: #f6f8fc;
    border: 1px solid rgba(26, 95, 217, 0.1);
}

.nfs-megamenu-brands-import__hub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(26, 95, 217, 0.1);
    text-decoration: none;
    color: var(--nfs-t1, #0d1117);
}

.nfs-megamenu-brands-import__hub-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
}

.nfs-megamenu-brands-import__arrow {
    flex-shrink: 0;
    color: var(--nfs-t4, #8a94ac);
}

.nfs-megamenu-brands-import__hub:hover {
    color: var(--nfs-blue, #1a5fd9);
}

.nfs-megamenu-brands-import__hub:hover .nfs-megamenu-brands-import__arrow {
    color: var(--nfs-blue, #1a5fd9);
    transform: translateX(2px);
}

.nfs-megamenu-brands-grid--import {
    max-height: min(280px, 42vh);
}

.nfs-megamenu-brands-all--footer {
    display: inline-flex;
    margin-top: 12px;
}

.nfs-megamenu-brands-silo {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Silo-бренды: 4 колонки — длинные имена (Mercedes-Benz, Volkswagen) читаются */
.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid.nfs-megamenu-brands-grid--silo {
    display: grid !important;
    flex-wrap: unset !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
    max-height: min(520px, 66vh);
    margin-bottom: 0;
    overflow: auto;
    padding-right: 2px;
    isolation: auto;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-link--brand-tile.nfs-megamenu-link--brand-with-logo,
.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-link--brand-tile.nfs-megamenu-link--brand-name-only {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 52px !important;
    max-height: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    box-shadow: none !important;
    color: #111827 !important;
    opacity: 1 !important;
    position: static !important;
    z-index: auto !important;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-link--brand-tile:hover {
    border-color: rgba(26, 95, 217, 0.32) !important;
    background: #f5f9ff !important;
    box-shadow: 0 4px 12px rgba(26, 95, 217, 0.1) !important;
    transform: none !important;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-logo-wrap {
    flex: 0 0 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    position: relative !important;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-logo {
    width: 32px !important;
    height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    object-fit: contain;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-fallback {
    font-size: 11px !important;
    border-radius: 6px !important;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-text {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    color: #111827 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    opacity: 1 !important;
    display: block !important;
}

.nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-count {
    flex-shrink: 0 !important;
    margin-left: auto !important;
    padding: 2px 5px !important;
    border-radius: 999px !important;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #1558c7 !important;
    background: rgba(26, 95, 217, 0.1) !important;
    border: 1px solid rgba(26, 95, 217, 0.12) !important;
    opacity: 1 !important;
}

.nfs-megamenu-brand-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.nfs-megamenu-brand-sources {
    display: flex;
    gap: 3px;
    min-width: 0;
}

.nfs-megamenu-brand-source {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1.25;
    color: #1558c7;
    background: rgba(26, 95, 217, 0.1);
    opacity: 1 !important;
}

.nfs-megamenu-brand-source--china {
    color: #0f766e;
    background: rgba(15, 118, 110, 0.09);
}

.nfs-megamenu-brand-count {
    flex-shrink: 0;
    padding: 3px 7px;
    border-radius: 999px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    color: #1558c7;
    background: rgba(26, 95, 217, 0.1);
    border: 1px solid rgba(26, 95, 217, 0.14);
    opacity: 1 !important;
}

.nfs-megamenu-brand-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 0;
}

.nfs-megamenu-brand-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--nfs-t2, #2a3144);
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.nfs-megamenu-brand-filter:hover {
    color: var(--nfs-blue, #1a5fd9);
    border-color: rgba(26, 95, 217, 0.35);
}

/* ── Мегаменю: пропорции колонок (legacy cols) ── */
.nfs-megamenu--catalog.nfs-megamenu--cols {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.nfs-megamenu--catalog .nfs-megamenu-col--categories {
    padding: 16px 18px;
    gap: 0;
    overflow: hidden;
}

.nfs-megamenu--catalog .nfs-megamenu-col--brands {
    padding: 16px 18px;
    max-height: min(420px, 58vh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ── География: Корея | Китай ── */
.nfs-megamenu-catalog-geo {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.nfs-megamenu-geo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

.nfs-megamenu-geo-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(26, 95, 217, 0.1);
}

.nfs-megamenu-geo-hub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 0 8px;
    text-decoration: none;
    color: var(--nfs-t1, #0d1117);
    border-bottom: 1px solid rgba(26, 95, 217, 0.1);
}

.nfs-megamenu-geo-hub__main {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.nfs-megamenu-geo-hub__label {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a !important;
    opacity: 1 !important;
}

.nfs-megamenu-geo-hub__arrow {
    flex-shrink: 0;
    color: var(--nfs-t4, #8a94ac);
    transition: transform 0.15s ease, color 0.15s ease;
}

.nfs-megamenu-geo-hub:hover {
    color: var(--nfs-blue, #1a5fd9);
}

.nfs-megamenu-geo-hub:hover .nfs-megamenu-geo-hub__label,
.nfs-megamenu-geo-hub:hover .nfs-megamenu-geo-hub__arrow {
    color: var(--nfs-blue, #1a5fd9);
}

.nfs-megamenu-geo-hub:hover .nfs-megamenu-geo-hub__arrow {
    transform: translateX(2px);
}

.nfs-megamenu-geo-children {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 8px;
    width: 100%;
}

.nfs-megamenu-geo-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 6px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--nfs-t2, #2a3144);
    font-size: 0.8125rem;
    line-height: 1.25;
    transition: background 0.12s ease, color 0.12s ease;
}

.nfs-megamenu-geo-child:hover {
    background: rgba(26, 95, 217, 0.07);
    color: var(--nfs-blue, #1a5fd9);
}

.nfs-megamenu-geo-child__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--nfs-t2, #2a3144);
}

.nfs-megamenu-geo-more {
    align-self: flex-start;
    margin-top: auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--nfs-blue, #1a5fd9);
    background: rgba(26, 95, 217, 0.08);
    text-decoration: none;
    opacity: 0.9;
}

.nfs-megamenu-geo-more:hover {
    opacity: 1;
    background: rgba(26, 95, 217, 0.12);
    text-decoration: none;
}

/* Счётчики в мегаменю (legacy cols + catalog-only) */
.nfs-megamenu--catalog .nfs-megamenu-link-count,
.nfs-megamenu--catalog-only .nfs-megamenu-link-count,
.nfs-megamenu-geo-count {
    flex-shrink: 0;
    margin-left: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    color: var(--nfs-blue, #1a5fd9);
    background: rgba(26, 95, 217, 0.1);
    border: 1px solid rgba(26, 95, 217, 0.14);
    font-family: 'Share Tech Mono', monospace;
}

/* В шапке хаба счётчик прижимается к стрелке, не к краю панели */
.nfs-megamenu-geo-hub__main .nfs-megamenu-geo-count,
.nfs-megamenu-geo-hub__main .nfs-megamenu-link-count {
    margin-left: auto;
}

/* Сквозные категории — компактная сетка */
.nfs-megamenu--catalog-only .nfs-megamenu-global-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 0;
}

.nfs-megamenu-global-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 0;
}

.nfs-megamenu-global-row__title {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b !important;
    opacity: 1 !important;
}

.nfs-megamenu-global-chips,
.nfs-megamenu-global-chips--compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.nfs-megamenu-global-chip {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: #111827 !important;
    background: #ffffff !important;
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: none;
    opacity: 1 !important;
    transition: border-color 0.12s ease, background 0.12s ease;
    max-width: 100%;
}

.nfs-megamenu-global-chip__main {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.nfs-nav-cat-ico {
    flex-shrink: 0;
    color: #64748b;
}

.nfs-megamenu-global-chip:hover .nfs-nav-cat-ico,
.nfs-megamenu-global-chip:focus-visible .nfs-nav-cat-ico {
    color: #1a5fd9;
}

.nfs-megamenu-global-chip:focus-visible {
    outline: 2px solid rgba(26, 95, 217, 0.45);
    outline-offset: 2px;
}

.nfs-megamenu-global-chip__label {
    flex: 0 1 auto;
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    color: #111827 !important;
    opacity: 1 !important;
}

.nfs-megamenu-global-chip:hover {
    color: #1a5fd9 !important;
    border-color: rgba(26, 95, 217, 0.32);
    background: #f5f9ff !important;
    box-shadow: none;
    transform: none;
}

.nfs-megamenu-global-chip__count {
    flex-shrink: 0;
    padding: 2px 5px;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1558c7 !important;
    background: rgba(26, 95, 217, 0.1);
    border: 1px solid rgba(26, 95, 217, 0.12);
    opacity: 1;
}

.nfs-megamenu-global-chip--muted {
    color: #475569 !important;
    font-weight: 500;
}

/* ── Колонка марок ── */
.nfs-megamenu-brands-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
    scrollbar-width: thin;
}

.nfs-megamenu-brand-market__title {
    margin: 0 0 6px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nfs-t4, #8a94ac);
}

.nfs-megamenu-brands-grid--market {
    max-height: none;
    margin-bottom: 0;
}

.nfs-megamenu-brands-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nfs-blue, #1a5fd9);
    text-decoration: none;
    border-top: 1px solid rgba(26, 95, 217, 0.1);
}

.nfs-megamenu-brands-all:hover {
    text-decoration: underline;
}

/* ── Футер: колонки и бейджи (сетка в nfs-footer-glow.css) ── */
.nfs-footer__links a {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
    line-height: 1.35;
}

.nfs-footer__link-text {
    min-width: 0;
}

.nfs-footer__count {
    flex-shrink: 0;
    font-family: 'Share Tech Mono', ui-monospace, monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    color: var(--nfs-blue, #1a5fd9);
    background: rgba(26, 95, 217, 0.08);
    border: 1px solid rgba(26, 95, 217, 0.14);
}

/* legacy alias (до полной чистки glow) */
.nfs-footer-glow__links a {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem 0.5rem;
    max-width: 100%;
    line-height: 1.35;
}

.nfs-footer-glow__link-text {
    min-width: 0;
}

.nfs-footer-glow__count {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    padding: 2px 7px;
    border-radius: 999px;
    color: var(--nfs-blue, #1a5fd9);
    background: rgba(26, 95, 217, 0.08);
    border: 1px solid rgba(26, 95, 217, 0.14);
}

.nfs-footer-glow__col--service .nfs-footer-glow__links a {
    display: inline-flex;
}

/* Mobile drawer */
.nfs-mobile-nav-sub--hub {
    font-weight: 600;
}

/* Узкие экраны: мегаменю в одну колонку географии */
@media (max-width: 1100px) {
    .nfs-megamenu-geo-grid,
    .nfs-megamenu--catalog-only .nfs-megamenu-geo-grid,
    .nfs-megamenu--catalog-only .nfs-megamenu-geo-row {
        grid-template-columns: 1fr;
    }

    .nfs-megamenu--brands-panel .nfs-megamenu-brands-grid.nfs-megamenu-brands-grid--silo {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .nfs-megamenu--brands-panel .nfs-megamenu-brands-grid--silo .nfs-megamenu-brand-text {
        font-size: 0.75rem !important;
    }

    .nfs-megamenu-geo-children,
    .nfs-megamenu--catalog-only .nfs-megamenu-geo-children {
        grid-template-columns: 1fr;
    }

    .nfs-megamenu--catalog.nfs-megamenu--cols {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .nfs-megamenu-brands-import,
    .nfs-megamenu--brands-panel .nfs-megamenu-brands-grid.nfs-megamenu-brands-grid--silo {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
