/* ТОЧНАЯ КОПИЯ industriation.ru - БОКОВОЕ МЕНЮ */

.catalog-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.catalog-menu.active {
    display: block;
    opacity: 1;
}

.catalog-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.catalog-left {
    width: 320px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

.catalog-right {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    background: white;
    position: relative;
}

/* УБРАЛИ красную иконку закрытия - ее НЕТ на доноре! */

.parents {
    padding: 0;
    margin: 0;
    list-style: none;
    position: relative;
}

.parents::before {
    content: "КАТЕГОРИИ";
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    padding: 20px 20px 15px 20px;
    border-bottom: 2px solid #007bff;
    background: #f8f9fa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parent {
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.parent:hover {
    background: #e9ecef;
}

.parent.active {
    background: #007bff;
    color: white;
}

.parent-name {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.parent.active .parent-name {
    color: white;
    font-weight: 600;
}

.parent-name:hover {
    background: #e9ecef;
    color: #007bff;
}

.parent.active .parent-name:hover {
    background: #0056b3;
    color: white;
}

/* Иконки для категорий - как на industriation.ru */
.category-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    filter: brightness(0) invert(0.4);
}

.parent.active .category-icon {
    filter: brightness(0) invert(1);
}

.subcategories {
    display: none;
    padding: 20px;
    background: white;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

.subcategories.active {
    display: block;
}

.subcategories::before {
    content: "ПОДКАТЕГОРИИ";
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subcategories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subcategory {
    border-bottom: 1px solid #f5f5f5;
    margin-bottom: 3px;
}

.subcategory:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.subcategory a {
    display: block;
    padding: 12px 15px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.subcategory a:hover {
    background: #f8f9fa;
    color: #007bff;
    padding-left: 20px;
}

.no-subcategories, .loading, .error {
    padding: 30px 20px;
    text-align: center;
    color: #888;
    font-style: italic;
    font-size: 14px;
}

.loading {
    color: #007bff;
}

.error {
    color: #dc3545;
}

/* Адаптивность */
@media (max-width: 768px) {
    .catalog-content {
        max-width: 100%;
        flex-direction: column;
    }
    
    .catalog-left {
        width: 100%;
        height: 50%;
    }
    
    .catalog-right {
        height: 50%;
    }
}