/* Home page categories component */

/* Categories */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
    gap: 0.6rem;
    padding: 1rem 0;
    align-items: stretch;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
    min-height: 84px;
    padding: 0.85rem 0.45rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
}

.category-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.category-btn span {
    display: -webkit-box;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    width: 100%;
    max-width: none;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: anywhere;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.category-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.category-btn svg * {
    vector-effect: non-scaling-stroke;
}

.category-btn svg image {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .categories {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
        padding: 0.85rem 0;
    }

    .category-btn {
        min-height: 82px;
        padding: 0.75rem 0.45rem;
        border-radius: 16px;
    }

    .category-btn span { font-size: 0.84rem; }
    .category-btn svg { width: 20px; height: 20px; }
}

@media (max-width: 520px) {
    .hero-categories-section .categories {
        display: flex;
        flex-wrap: nowrap;
        gap: 0.7rem;
        padding: 0.8rem 0 0.35rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .hero-categories-section .categories::-webkit-scrollbar {
        display: none;
    }

    .hero-categories-section .category-btn {
        flex: 0 0 124px;
        width: 124px;
        min-height: 76px;
        padding: 0.65rem 0.4rem;
        border-radius: 14px;
        scroll-snap-align: start;
    }

    .hero-categories-section .category-btn span { font-size: 0.78rem; line-height: 1.15; }
    .hero-categories-section .category-btn svg { width: 18px; height: 18px; }
}

@media (max-width: 375px) {
    .hero-categories-section .categories { gap: 0.6rem; padding: 0.75rem 0 0.3rem; }
    .hero-categories-section .category-btn { flex-basis: 116px; width: 116px; min-height: 72px; border-radius: 13px; }
    .hero-categories-section .category-btn span { font-size: 0.74rem; }
    .hero-categories-section .category-btn svg { width: 17px; height: 17px; }
}
