/* CSS для категорій-i з фото */
.categories-section {
    display: flex;
    gap: 15px;
    padding: 20px;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

/* Приховуємо скролбар в Webkit браузерах */
.categories-section::-webkit-scrollbar {
    display: none;
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
    min-width: 70px;
    flex-shrink: 0;
}

.category:hover {
    transform: translateY(-5px);
}

.category.active {
    transform: scale(1.05);
}

.category.active .category-icon {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

 /* Стилі для посилань категорій */
    .category-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        cursor: pointer;
        transition: transform 0.3s ease;
        min-width: 70px;
        flex-shrink: 0;
        text-decoration: none;
        color: inherit;
    }

    .category-link:hover {
        transform: translateY(-5px);
        text-decoration: none;
        color: inherit;
    }

    .category-link:visited {
        color: inherit;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        border: 2px solid rgba(255, 255, 255, 0.3);
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .category-link:hover .category-icon {
        background: rgba(59, 130, 246, 0.3);
        border-color: rgba(59, 130, 246, 0.5);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    }



/* Стилі для іконок з фото */
.category-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
}

.category:hover .category-icon {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

/* Стилі для зображень всередині іконок */
.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.category:hover .category-icon img {
    transform: scale(1.05);
}

/* Накладання для кращого контрасту тексту */
.category-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category:hover .category-icon::before {
    opacity: 1;
}

.category-name {
    font-size: 15px;
    text-align: center;
    opacity: 0.9;
    color: #cc1c1c;
    font-weight: 500;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Стилі для fallback іконок (якщо фото не завантажилось) */
.category-icon.fallback {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    font-size: 20px;
    color: white;
}

/* Індикатор завантаження */
.category-icon.loading {
    background: rgba(255, 255, 255, 0.1);
}

.category-icon.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 768px) {
    .categories-section {
        padding: 15px;
        gap: 12px;
    }
    
    .category {
        min-width: 65px;
    }
    
    .category-icon {
        width: 55px;
        height: 55px;
    }
    
    .category-icon.fallback {
        font-size: 18px;
    }
    
    .category-name {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .categories-section {
        padding: 10px;
        gap: 10px;
    }
    
    .category {
        min-width: 60px;
    }
    
    .category-icon {
        width: 50px;
        height: 50px;
    }
    
    .category-icon.fallback {
        font-size: 16px;
    }
    
    .category-name {
        font-size: 9px;
    }
}

/* Варіанти кольорових тем для фону */
.categories-section.blue-theme {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
}

.blue-theme .category-name {
    color: #93c5fd;
}

.categories-section.green-theme {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(21, 128, 61, 0.1));
}

.categories-section.pink-theme {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(190, 24, 93, 0.1));
}

/* Стилі для різних форм іконок */
.category-icon.square {
    border-radius: 15px;
}

.category-icon.square img {
    border-radius: 15px;
}

.category-icon.hexagon {
    border-radius: 15px;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.category-icon.rounded-square {
    border-radius: 20%;
}

.category-icon.rounded-square img {
    border-radius: 20%;
}

/* Синя тема */
    .categories-section.blue-theme {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(29, 78, 216, 0.1));
    }

    .blue-theme .category-icon {
        background: rgba(59, 130, 246, 0.2);
        border-color: rgba(59, 130, 246, 0.3);
    }

    .blue-theme .category:hover .category-icon {
        background: rgba(59, 130, 246, 0.3);
        border-color: rgba(59, 130, 246, 0.5);
    }
