/* FILTRO CATEGORIA W11 MODERNO COM + E - */
.filtro-categoria-moderno {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

/* HEADER W11 */
.filtro-header-moderno {
    background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
    padding: 20px 24px;
    position: relative;
    border-bottom: 1px solid #e1e5e9;
}

.filtro-titulo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filtro-titulo-moderno {
    color: white;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.filtro-icone {
    font-size: 1.1em;
    opacity: 0.9;
}

.filtro-contador-total {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* LISTA DE CATEGORIAS */
.filtro-categorias-moderno {
    max-height: 500px;
    overflow-y: auto;
    padding: 8px 0;
}

.categorias-lista-moderno {
    padding: 0;
    margin: 0;
}

/* CATEGORIA PAI - ESTILO W11 COM + E - */
.categoria-item-pai {
    margin: 0 8px 4px 8px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.categoria-item-pai:hover {
    background: #f8f9fa;
    border-color: #e1e5e9;
}

.categoria-item-pai.categoria-ativa {
    background: #f3f9ff;
    border-color: #0078d4;
}

.categoria-item-pai.aberto {
    background: #f8f9fa;
    border-color: #e1e5e9;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.categoria-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 48px;
}

.categoria-header:hover {
    background: transparent;
}

.categoria-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* ÍCONE + E - DENTRO DA BOLA */
.categoria-icone-expandir {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.3);
    flex-shrink: 0;
    position: relative;
}

.categoria-icone-expandir::before {
    content: '+';
    transition: all 0.3s ease;
}

.categoria-item-pai.aberto .categoria-icone-expandir::before {
    content: '-';
}

.categoria-item-pai.aberto .categoria-icone-expandir {
    background: linear-gradient(135deg, #107c10, #1e6e1e);
    transform: scale(1.1);
}

.categoria-link-pai {
    text-decoration: none;
    color: #323130;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.2s ease;
    flex: 1;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.categoria-link-pai:hover {
    color: #0078d4;
}

.categoria-item-pai.categoria-ativa .categoria-link-pai {
    color: #0078d4;
    font-weight: 600;
}

.categoria-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CONTAGEM EM CÍRCULO - APENAS QUANTIDADE DE PRODUTOS */
.categoria-contador {
    background: linear-gradient(135deg, #0078d4, #106ebe);
    color: white;
    padding: 0;
    border-radius: 50%;
    font-size: 0.75em;
    font-weight: 600;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 120, 212, 0.3);
    flex-shrink: 0;
}

/* REMOVER BADGE DE QUANTIDADE DE FILHOS */
.categoria-badge-filhos {
    display: none;
}

/* SUBCATEGORIAS - OCULTAS INICIALMENTE */
.subcategorias-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
    margin: 0 8px;
    border-radius: 0 0 8px 8px;
}

.subcategorias-container.aberto {
    max-height: 1000px;
    border-top: 1px solid #e1e5e9;
}

.subcategorias-lista {
    padding: 8px 0;
}

.subcategoria-item {
    margin: 0 8px 2px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.subcategoria-item:hover {
    background: white;
    border-color: #e1e5e9;
    transform: translateX(4px);
}

.subcategoria-item.subcategoria-ativa {
    background: white;
    border-color: #0078d4;
    box-shadow: 0 1px 4px rgba(0, 120, 212, 0.1);
}

.subcategoria-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: #605e5c;
    transition: all 0.2s ease;
    border-radius: 6px;
    font-size: 0.9em;
}

.subcategoria-link:hover {
    color: #0078d4;
    background: #f8f9fa;
}

.subcategoria-icone {
    color: #a19f9d;
    font-size: 0.8em;
    width: 16px;
    text-align: center;
}

.subcategoria-item:hover .subcategoria-icone {
    color: #0078d4;
}

.subcategoria-nome {
    flex: 1;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* CONTADOR SUBCATEGORIA EM CÍRCULO */
.subcategoria-contador {
    background: #f3f2f1;
    color: #605e5c;
    padding: 0;
    border-radius: 50%;
    font-size: 0.7em;
    font-weight: 600;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.subcategoria-item:hover .subcategoria-contador {
    background: #0078d4;
    color: white;
    transform: scale(1.1);
}

.subcategoria-item.subcategoria-ativa .subcategoria-contador {
    background: #0078d4;
    color: white;
    transform: scale(1.1);
}

/* BOTÃO LIMPAR W11 */
.filtro-acoes-moderno {
    padding: 16px 24px;
    background: #fafbfc;
    border-top: 1px solid #e1e5e9;
}

.botao-limpar-moderno {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    color: #605e5c;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.2s ease;
    border: 1px solid #e1e5e9;
    cursor: pointer;
}

.botao-limpar-moderno:hover {
    background: white;
    color: #d13438;
    border-color: #d13438;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(209, 52, 56, 0.1);
}

.limpar-icone {
    font-size: 1em;
}

/* SEM CATEGORIAS */
.sem-categorias-moderno {
    text-align: center;
    padding: 40px 24px;
    color: #a19f9d;
}

.sem-categorias-icone {
    font-size: 2.5em;
    display: block;
    margin-bottom: 12px;
    opacity: 0.5;
}

.sem-categorias-moderno p {
    margin: 0;
    font-style: italic;
    font-size: 0.9em;
}

/* SCROLLBAR W11 */
.filtro-categorias-moderno::-webkit-scrollbar {
    width: 8px;
}

.filtro-categorias-moderno::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.filtro-categorias-moderno::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.filtro-categorias-moderno::-webkit-scrollbar-thumb:hover {
    background: #a19f9d;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ANIMAÇÕES W11 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.categoria-item-pai {
    animation: fadeIn 0.3s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.categoria-icone-expandir:hover {
    animation: pulse 0.6s ease-in-out;
}

/* EFEITOS DE PROFUNDIDADE */
.filtro-categoria-moderno {
    position: relative;
}

.filtro-categoria-moderno::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 120, 212, 0.2), transparent);
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .filtro-categoria-moderno {
        border-radius: 8px;
        margin: 8px;
    }
    
    .filtro-header-moderno {
        padding: 16px 20px;
    }
    
    .filtro-titulo-moderno {
        font-size: 1.1em;
    }
    
    .categoria-header {
        padding: 12px 14px;
        min-height: 44px;
    }
    
    .categoria-icone-expandir {
        width: 22px;
        height: 22px;
        font-size: 0.8em;
    }
    
    .categoria-contador {
        width: 26px;
        height: 26px;
        font-size: 0.7em;
    }
    
    .subcategoria-contador {
        width: 22px;
        height: 22px;
        font-size: 0.65em;
    }
    
    .subcategorias-lista {
        padding: 6px 0;
    }
    
    .filtro-acoes-moderno {
        padding: 12px 20px;
    }
    
    .subcategoria-link {
        padding: 8px 12px;
        font-size: 0.85em;
    }
}

/* ESTADO FOCUS PARA ACESSIBILIDADE */
.categoria-header:focus,
.subcategoria-link:focus,
.botao-limpar-moderno:focus {
    outline: 2px solid #0078d4;
    outline-offset: 2px;
}
/* ANIMAÇÃO DE CARREGAMENTO SUAVE */
.categoria-item-pai.categoria-ativa .subcategorias-container {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.categoria-item-pai.categoria-ativa.aberto .subcategorias-container,
.categoria-item-pai.categoria-ativa .subcategorias-container[style*="display: block"] {
    opacity: 1;
}

/* INDICADOR VISUAL DE EXPANSÃO AUTOMÁTICA */
@keyframes expandirSuave {
    0% {
        background: rgba(0, 120, 212, 0.1);
    }
    100% {
        background: transparent;
    }
}

.categoria-item-pai.categoria-ativa {
    animation: expandirSuave 1s ease-in-out;
}