/* Навигация по категориям */
.category-nav {
    position: fixed;
    top: 50%;
    left: 2%;
    transform: translateY(-50%) translateX(-120%);
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 100;
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
    pointer-events: none;
}

.category-nav.visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: all;
}

.category-nav-item {
    position: relative;
    text-decoration: none;
    color: #666;
    font-size: 1.1em;
    font-weight: 500;
    padding: 0.5rem 1rem 0.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 25px 25px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border-left: 3px solid transparent;
}

.category-nav-item::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ccc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-nav-item:hover {
    color: #ff6b00;
    padding-left: 2.5rem;
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.2);
    border-left-color: #ff6b00;
}

.category-nav-item:hover::before {
    background: #ff6b00;
    transform: translateY(-50%) scale(1.3);
}

.category-nav-item.active {
    color: #ff6b00;
    font-weight: 600;
    padding-left: 2.5rem;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.3);
    border-left-color: #ff6b00;
}

.category-nav-item.active::before {
    background: linear-gradient(135deg, #ff6b00, #ff8c00);
    transform: translateY(-50%) scale(1.5);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

/* Анимация появления элементов */
.category-nav.visible .category-nav-item {
    animation: slideInLeft 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.category-nav.visible .category-nav-item:nth-child(1) { animation-delay: 0.05s; }
.category-nav.visible .category-nav-item:nth-child(2) { animation-delay: 0.1s; }
.category-nav.visible .category-nav-item:nth-child(3) { animation-delay: 0.15s; }
.category-nav.visible .category-nav-item:nth-child(4) { animation-delay: 0.2s; }
.category-nav.visible .category-nav-item:nth-child(5) { animation-delay: 0.25s; }
.category-nav.visible .category-nav-item:nth-child(6) { animation-delay: 0.3s; }
.category-nav.visible .category-nav-item:nth-child(7) { animation-delay: 0.35s; }
.category-nav.visible .category-nav-item:nth-child(8) { animation-delay: 0.4s; }

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .category-nav {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        justify-content: space-around;
        background: rgba(255, 255, 255, 0.98);
        padding: 0.5rem 0.3rem;
        transform: translateY(120%);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(15px);
        gap: 0.3rem;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .category-nav.visible {
        transform: translateY(0);
    }

    .category-nav-item {
        font-size: 0.85em;
        padding: 0.6rem 0.8rem;
        border-radius: 20px;
        border-left: none;
        border-bottom: 3px solid transparent;
        flex-shrink: 0;
        min-width: fit-content;
    }

    .category-nav-item::before {
        display: none;
    }

    .category-nav-item:hover,
    .category-nav-item.active {
        padding-left: 0.8rem;
        border-bottom-color: #ff6b00;
    }

    .category-nav.visible .category-nav-item {
        animation: slideInUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    }

    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Скрываем скроллбар на мобильных */
@media (max-width: 768px) {
    .category-nav::-webkit-scrollbar {
        display: none;
    }
    .category-nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}
