/* Responsive Categories Navigation */

/* Categories wrapper for scroll buttons */
.categories-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Core categories styles */
.categories {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
}

.categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
    user-select: none;
}

.category-link i {
    font-size: 1rem;
}

.category-link:hover,
.category-link.active {
    background: #f8f9fa;
    color: #0071bd;
}

.category-link.active {
    background: rgba(0, 113, 189, 0.1);
    font-weight: 500;
}

/* Scroll buttons for categories */
.categories-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    z-index: 2;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.categories-scroll-btn.scroll-left {
    left: 5px;
}

.categories-scroll-btn.scroll-right {
    right: 5px;
}

.categories-scroll-btn:hover {
    background: #f8f9fa;
    color: #0071bd;
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.categories-scroll-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Category more dropdown */
.category-more {
    position: relative;
}

.category-more-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-more-btn:hover {
    background: #f8f9fa;
    color: #0071bd;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.category-more.active .category-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.dropdown-category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.dropdown-category-link:hover,
.dropdown-category-link.active {
    background: #f8f9fa;
    color: #0071bd;
}

/* Responsive adaptations */
@media (max-width: 768px) {
    .categories {
        padding: 12px 40px;
        gap: 8px;
    }
    
    .category-link {
        padding: 7px 14px;
        font-size: 0.9rem;
    }
    
    .category-link i {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .categories {
        padding: 10px 35px;
        gap: 5px;
    }
    
    .category-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .categories-scroll-btn {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
}

@media (max-width: 375px) {
    .categories {
        padding: 8px 30px;
    }
    
    .category-link {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .category-link i {
        font-size: 0.8rem;
    }
}
