/* ===== Уникальные блоки страницы категорий ===== */
.gk-all-categories-page {
    padding: 0 0 48px;
}

.gk-all-categories-hero {
    padding: 10px 10px 20px;
}

.gk-all-categories-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
}

.gk-all-categories-search-label {
    display: block;
    margin: 24px 0 8px;
    font-weight: 600;
}

.gk-all-categories-search {
    width: 100%;
    max-width: 520px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,.16);
    border-radius: 12px;
}

input.gk-all-categories-search {
    background: #f5f7f6;
    color: #000;
	border: 2px solid #5d976d;
}

.gk-all-categories-top {
    margin: 32px 0;
}

.gk-all-categories-top h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.gk-all-categories-subtops {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.gk-all-categories-subtop {
    padding: 18px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    background: #fff;
}

.gk-all-categories-subtop h3 {
    margin: 0 0 12px;
    font-size: 18px;
}

.gk-all-categories-subtop ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.gk-all-categories-subtop li + li {
    margin-top: 8px;
}

.gk-all-categories-subtop a {
    text-decoration: none;
}

.gk-all-categories-subtop[hidden],
.gk-all-categories-top[hidden] {
    display: none;
}

.gk-all-categories-inline-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    align-items: baseline;
}

.gk-all-categories-inline-list span {
    white-space: nowrap;
}

.gk-all-categories-inline-list span:not(:last-child)::after {
    content: ' ';
    margin-left: 4px;
}

@media (max-width: 480px) {
    .gk-all-categories-inline-list { gap: 6px 8px; }
    .gk-all-categories-inline-list span { white-space: normal; }
}

/* Кнопка переключения пустых категорий */
.gk-toggle-empty-btn {
    margin-top: 16px;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.gk-toggle-empty-btn:hover {
    background: #e0e0e0;
}

/* ===== Состояние пустых категорий ===== */
[data-gk-category-item][data-gk-count="0"] {
    opacity: 0.55;
    transition: opacity 0.15s ease;
}

[data-gk-category-item][data-gk-count="0"] a {
    color: #9aa4b2 !important;
    pointer-events: none;
    cursor: not-allowed;
    text-decoration: none !important;
}

[data-gk-category-item][data-gk-count="0"]:hover {
    opacity: 0.55;
}

.gk-all-categories-inline-list [data-gk-category-item][data-gk-count="0"] {
    color: #9aa4b2;
}
.gk-all-categories-inline-list [data-gk-category-item][data-gk-count="0"] a {
    color: #9aa4b2 !important;
}

.gk-all-categories-subtop ul [data-gk-category-item][data-gk-count="0"] {
    color: #9aa4b2;
}

.gk-all-categories-content:not(.is-filtering) [data-gk-category-item][data-gk-count="0"],
[data-gk-category-item][data-gk-count="0"]:not([hidden]) {
    opacity: 0.65;
}

@media (max-width: 782px) {
    [data-gk-category-item][data-gk-count="0"] { opacity: 0.7; }
    [data-gk-category-item][data-gk-count="0"] a { color: #7f8fa4 !important; }
}

/* ===== Переопределения шапки для страницы категорий ===== */
.gk-v4-shell {
    position: relative;
    isolation: isolate;
    padding: 0 8px 36px;
}

.gk-v4-shell .gk-v4-topbar {
    margin-bottom: 0;
}

.gk-v4-shell .gk-v4-topbar::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #073d52 0%, #06364a 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.gk-v4-shell .gk-v4-topbar__brand-row > a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.gk-v4-shell .gk-v4-topbar__brand {
    display: inline-flex;
    align-items: center;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.gk-v4-shell .gk-v4-topbar__menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    box-shadow: none;
}
.gk-v4-shell .gk-v4-topbar__menu-toggle:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.1);
}
.gk-v4-shell .gk-v4-topbar__menu-toggle svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.gk-v4-shell .gk-v4-topbar__nav {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-wrap: wrap;
}

/* Кастомное навигационное меню (вместо shared .gk-v4-navitem) */
.gk-v4-shell .gk-v4-topbar__nav-menu {
    position: relative;
    display: flex;
    align-items: center;
}
.gk-v4-shell .gk-v4-topbar__nav-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.gk-v4-shell .gk-v4-topbar__nav-trigger:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}
.gk-v4-shell .gk-v4-topbar__nav-trigger.is-active,
.gk-v4-shell .gk-v4-topbar__nav-menu.is-open .gk-v4-topbar__nav-trigger {
    border-color: rgba(159, 223, 137, 0.48);
    background: rgba(159, 223, 137, 0.16);
    color: #ffffff;
}
.gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron {
    width: 16px;
    height: 16px;
    color: currentColor;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
}
.gk-v4-shell .gk-v4-topbar__nav-menu.is-open .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron {
    transform: rotate(180deg);
}
.gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}
a.gk-v4-topbar__nav-trigger {
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gk-v4-shell .gk-v4-topbar__nav-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 9999;
    display: none;
    min-width: 280px;
    max-width: min(360px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    overflow: auto;
    padding: 8px;
    border: 1px solid rgba(6, 42, 57, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(6, 42, 57, 0.14);
}
.gk-v4-shell .gk-v4-topbar__nav-menu.is-open .gk-v4-topbar__nav-panel {
    display: grid;
    gap: 4px;
}
.gk-v4-shell .gk-v4-topbar__nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #073d52;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
}
.gk-v4-shell .gk-v4-topbar__nav-link:hover {
    background: #f3f8fa;
    color: #052f41;
}
.gk-v4-shell .gk-v4-topbar__nav-link.is-active {
    background: #eef8ee;
    color: #0f7149;
}
.gk-v4-shell .gk-v4-topbar__nav-link-label { min-width: 0; }
.gk-v4-shell .gk-v4-topbar__nav-link-count {
    flex: 0 0 auto;
    color: #6e7f8a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.gk-v4-shell .gk-v4-topbar__nav-empty {
    padding: 14px 16px;
    border-radius: 12px;
    color: #6e7f8a;
    font-size: 14px;
    line-height: 1.45;
}


/* ===== Адаптив для шапки категорий ===== */
@media (max-width: 1180px) {
    .gk-v4-shell .gk-v4-topbar { gap: 20px; }
    .gk-v4-shell .gk-v4-topbar__left { gap: 18px; }
    .gk-v4-shell .gk-v4-topbar__nav { gap: 10px; }
    .gk-v4-shell .gk-v4-topbar__nav-panel { min-width: 250px; }
}

@media (max-width: 960px) {
    .gk-v4-shell .gk-v4-topbar {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch !important;
        column-gap: 0 !important;
        row-gap: 12px !important;
        padding: 12px 0 14px !important;
    }
    .gk-v4-shell .gk-v4-topbar__left {
        display: grid !important;
        grid-template-columns: max-content max-content !important;
        align-items: center !important;
        column-gap: 12px !important;
        row-gap: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 !important;
    }
    .gk-v4-shell .gk-v4-topbar__brand-row {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 0 !important;
        gap: 0 !important;
    }
    .gk-v4-shell .gk-v4-topbar__brand-row > a {
        display: inline-flex !important;
        align-items: center !important;
        min-width: 0 !important;
        max-width: 100% !important;
        text-decoration: none !important;
    }
    .gk-v4-shell .gk-v4-topbar__brand {
        display: inline-flex !important;
        align-items: center !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        max-width: none !important;
        overflow: visible !important;
        text-overflow: clip !important;
    }
    .gk-v4-shell .gk-v4-topbar__menu-toggle { display: none !important; }
    .gk-v4-shell .gk-v4-topbar__nav {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        align-self: center !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        gap: 8px !important;
        overflow: visible !important;
        z-index: 4 !important;
    }
    .gk-v4-shell .gk-v4-topbar__nav::before,
    .gk-v4-shell .gk-v4-topbar__nav::after { content: none !important; }
    .gk-v4-shell .gk-v4-topbar__nav-menu {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        flex: 0 0 auto !important;
        min-width: 0 !important;
    }
    .gk-v4-shell .gk-v4-topbar__nav-trigger {
        width: auto !important;
        min-width: 0 !important;
        white-space: nowrap !important;
    }
    .gk-v4-shell .gk-v4-topbar__search {
        order: 2 !important;
        display: flex !important;
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
}

@media (max-width: 782px) {
    .gk-v4-shell .gk-v4-topbar { padding: 12px 0 14px; column-gap: 0; row-gap: 10px !important; }
    .gk-v4-shell .gk-v4-topbar__left { column-gap: 10px !important; }
    .gk-v4-shell .gk-v4-topbar__brand {
        max-width: 100%;
        font-size: clamp(18px, 4.1vw, 22px) !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .gk-v4-shell .gk-v4-topbar__brand-row,
    .gk-v4-shell .gk-v4-topbar__brand { min-height: 38px !important; }
    .gk-v4-shell .gk-v4-topbar__menu-toggle { display: none !important; }
    .gk-v4-shell .gk-v4-mobile-backdrop,
    .gk-v4-shell .gk-v4-mobile-backdrop[aria-hidden="false"] { display: none !important; opacity: 0 !important; pointer-events: none !important; }
    .gk-v4-shell .gk-v4-topbar__nav { gap: 6px !important; overflow: visible; }
    .gk-v4-shell .gk-v4-topbar__nav-trigger {
        min-height: 38px !important; padding: 0 9px !important; gap: 5px !important;
        border-radius: 11px !important; font-size: 12px !important;
    }
    .gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron,
    .gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron svg { width: 14px !important; height: 14px !important; }
    .gk-v4-shell .gk-v4-topbar__nav-panel {
        position: absolute !important; top: calc(100% + 8px) !important; left: 0 !important; right: auto !important;
        min-width: 260px !important; max-width: min(320px, calc(100vw - 20px)) !important;
        max-height: min(70vh, 440px); margin-top: 0; padding: 8px;
        border: 1px solid rgba(6, 42, 57, 0.08); border-radius: 16px;
        background: #ffffff; box-shadow: 0 18px 36px rgba(6, 42, 57, 0.16);
    }
    .gk-v4-shell .gk-v4-topbar__nav-menu:last-child .gk-v4-topbar__nav-panel { left: auto !important; right: 0 !important; }
    .gk-v4-shell .gk-v4-topbar__search input { min-height: 42px; padding: 0 46px 0 14px; font-size: 13px; }
    .gk-v4-shell .gk-v4-topbar__search button { right: 6px; }
}

@media (max-width: 460px) {
    .gk-v4-shell .gk-v4-topbar { column-gap: 0; row-gap: 8px !important; }
    .gk-v4-shell .gk-v4-topbar__left { column-gap: 8px !important; }
    .gk-v4-shell .gk-v4-topbar__brand { font-size: 17px !important; }
    .gk-v4-shell .gk-v4-topbar__brand-row,
    .gk-v4-shell .gk-v4-topbar__brand { min-height: 36px !important; }
    .gk-v4-shell .gk-v4-topbar__nav { gap: 4px !important; }
    .gk-v4-shell .gk-v4-topbar__nav-trigger {
        min-height: 36px !important; padding: 0 7px !important; gap: 4px !important;
        border-radius: 10px !important; font-size: 11px !important;
    }
    .gk-v4-shell .gk-v4-topbar__nav-panel {
        min-width: min(272px, calc(100vw - 16px));
        max-width: calc(100vw - 16px) !important;
    }
}

@media (max-width: 400px) {
    .gk-v4-shell .gk-v4-topbar { column-gap: 6px !important; }
    .gk-v4-shell .gk-v4-topbar__left { column-gap: 6px !important; }
    .gk-v4-shell .gk-v4-topbar__brand { font-size: 16px !important; }
    .gk-v4-shell .gk-v4-topbar__brand-row,
    .gk-v4-shell .gk-v4-topbar__brand { min-height: 34px !important; }
    .gk-v4-shell .gk-v4-topbar__nav { gap: 4px !important; }
    .gk-v4-shell .gk-v4-topbar__nav-trigger {
        min-height: 34px !important; padding: 0 6px !important; gap: 3px !important;
        font-size: 10px !important; border-radius: 10px !important;
    }
    .gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron,
    .gk-v4-shell .gk-v4-topbar__nav-trigger .gk-v4-icon--chevron svg { width: 12px !important; height: 12px !important; }
    .gk-v4-shell .gk-v4-topbar__nav-panel {
        min-width: min(272px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
    }
}