/* --- PÁGINA DE TODAS AS CATEGORIAS --- */

.cat-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
}

.cat-back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--white);
    color: var(--text-dark);
    text-decoration: none;
    box-shadow: var(--shadow);
    font-size: 15px;
    flex-shrink: 0;
    transition: background-color 0.2s, transform 0.2s;
}

.cat-back-link:hover {
    background-color: var(--blue);
    color: var(--white);
    transform: translateX(-2px);
}

.page-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

/* --- GRID DE CATEGORIAS --- */
.all-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}

.all-categories-item {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px 10px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
    border: 1.5px solid transparent;
}

.all-categories-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
    border-color: var(--blue);
}

/* Ícone dentro de um círculo colorido */
.cat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: background-color 0.2s;
}

.all-categories-item:hover .cat-icon-wrap {
    background-color: var(--blue);
}

.cat-icon-wrap i {
    font-size: 24px;
    color: var(--blue);
    transition: color 0.2s;
}

.all-categories-item:hover .cat-icon-wrap i {
    color: var(--white);
}

.cat-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 4px;
}

/* Contagem de produtos — subtítulo discreto */
.cat-count {
    font-size: 11px;
    color: var(--gray-dark);
    font-weight: 500;
}

/* --- ESTADO VAZIO --- */
.cat-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 16px;
    border: 1px dashed var(--gray-medium);
}

.cat-empty i {
    font-size: 40px;
    color: var(--gray-medium);
    margin-bottom: 15px;
    display: block;
}

.cat-empty p {
    color: var(--gray-dark);
    margin-bottom: 12px;
}

.cat-empty a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

/* --- RESPONSIVO --- */
@media (min-width: 480px) {
    .all-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .page-title {
        font-size: 26px;
    }

    .all-categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .cat-icon-wrap {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .cat-icon-wrap i {
        font-size: 28px;
    }

    .cat-name {
        font-size: 14px;
    }
}

@media (min-width: 1024px) {
    .all-categories-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}