/* =======================
   ГЛОБАЛЬНАЯ ПАНЕЛЬ КАТЕГОРИЙ (overlay)
   Стиль: max-w 1400px, карточки #272728, grid 2 колонки
======================= */
.categories-panel-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    pointer-events: none;
}
.categories-panel-overlay.is-visible {
    display: block;
    pointer-events: auto;
}
@media (min-width: 768px) {
    .categories-panel-overlay { top: 68px; }
}
.categories-panel-backdrop {
    display: none;
}
.categories-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    padding: 16px 32px 32px;
    background: var(--bg-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.categories-panel-inner {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}
.categories-panel-body {
    display: flex;
    gap: 32px;
    min-height: 0;
    height: 100%;
}
.categories-nav-left {
    width: 20%;
    min-width: 80px;
    flex-shrink: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
}
.categories-nav-left::-webkit-scrollbar { width: 8px; }
.categories-nav-left::-webkit-scrollbar-track { background: var(--bg-primary); }
.categories-nav-left::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.categories-loading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.categories-skeleton-item {
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: categories-skeleton-shimmer 1.5s ease-in-out infinite;
}
.categories-skeleton-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 64px;
}
.categories-skeleton-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.categories-skeleton-title {
    height: 24px;
    width: 60%;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: categories-skeleton-shimmer 1.5s ease-in-out infinite;
}
.categories-skeleton-line {
    height: 20px;
    width: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: categories-skeleton-shimmer 1.5s ease-in-out infinite 0.2s;
}
@keyframes categories-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.categories-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    color: #777;
    text-decoration: none;
    font-size: 16px;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.categories-nav-item:hover {
    background: #272728;
    color: #fff;
}
.categories-nav-item.active {
    background: #272728;
    color: #fff;
}
.categories-nav-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}
.categories-nav-icon svg {
    width: 20px;
    height: 20px;
}
.categories-nav-right {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 32px;
}
.categories-nav-right::-webkit-scrollbar { width: 8px; }
.categories-nav-right::-webkit-scrollbar-track { background: var(--bg-primary); }
.categories-nav-right::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
.categories-children-panel {
    display: none;
}
.categories-children-panel.visible {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 64px;
}
.categories-children-panel .children-group {
    display: flex;
    flex-direction: column;
}
.categories-children-panel .children-group-link {
    text-decoration: none;
    transition: color 0.2s;
}
.categories-children-panel .children-group-link:hover .children-group-title {
    color: rgba(255, 255, 255, 0.8);
}
.categories-children-panel .children-group-title {
    color: #fff;
    font-size: 20px;
    font-family: Inter, system-ui, sans-serif;
    font-weight: 500;
    margin-bottom: 12px;
    transition: color 0.2s;
}
.categories-children-panel .children-group-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.categories-children-panel .children-link {
    display: block;
    color: #777;
    font-size: 16px;
    font-family: Inter, system-ui, sans-serif;
    line-height: 28px;
    text-decoration: none;
    transition: color 0.2s;
}
.categories-children-panel .children-link:hover {
    color: #fff;
}
.categories-children-panel .children-link.active {
    color: var(--accent);
}
.categories-empty-msg {
    padding: 32px;
    text-align: center;
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    .categories-panel-body {
        flex-direction: column;
    }
    .categories-nav-left {
        width: 100%;
    }
    .categories-nav-right {
        padding-left: 0;
        padding-top: 24px;
    }
    .categories-children-panel.visible {
        grid-template-columns: 1fr;
    }
}
