/* ===================================================================
   MÓDULO PRODUTOS E SERVIÇOS - ESTILOS ESPECÍFICOS
   Versão: 1.0.0
   Data: 2024-12-30
   =================================================================== */

/* Grid de Produtos */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

/* Card de Produto */
.produto-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.produto-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #4f46e5;
}

/* Header do Produto */
.produto-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.produto-info {
    flex: 1;
}

.produto-nome {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.produto-codigo {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: monospace;
}

/* Preço do Produto */
.produto-preco {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    white-space: nowrap;
}

.produto-preco-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 400;
    display: block;
}

/* Descrição */
.produto-descricao {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detalhes */
.produto-detalhes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.produto-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    border-radius: 9999px;
    font-size: 0.75rem;
    color: #4b5563;
}

.produto-badge i {
    font-size: 0.875rem;
}

/* Badges por Tipo */
.badge-produto {
    background: #dbeafe;
    color: #1e40af;
}

.badge-servico {
    background: #d1fae5;
    color: #065f46;
}

.badge-ativo {
    background: #d1fae5;
    color: #065f46;
}

.badge-inativo {
    background: #fee2e2;
    color: #991b1b;
}

/* Ações do Produto */
.produto-acoes {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

.produto-acoes button {
    flex: 1;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-visualizar {
    background: #f3f4f6;
    color: #374151;
}

.btn-visualizar:hover {
    background: #e5e7eb;
}

.btn-editar {
    background: #4f46e5;
    color: white;
}

.btn-editar:hover {
    background: #4338ca;
}

.btn-excluir {
    background: #ef4444;
    color: white;
}

.btn-excluir:hover {
    background: #dc2626;
}

.btn-duplicar {
    background: #10b981;
    color: white;
}

.btn-duplicar:hover {
    background: #059669;
}

/* Filtros */
.filtros-produtos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filtro-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filtro-select,
.filtro-input {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    min-width: 150px;
}

.filtro-select:focus,
.filtro-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Estatísticas */
.produtos-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.produtos {
    background: #dbeafe;
    color: #1e40af;
}

.stat-icon.servicos {
    background: #d1fae5;
    color: #065f46;
}

.stat-icon.ativos {
    background: #fef3c7;
    color: #92400e;
}

.stat-icon.inativos {
    background: #fee2e2;
    color: #991b1b;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
}

/* Modo Lista */
.produtos-lista {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.produto-item-lista {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    transition: all 0.2s;
}

.produto-item-lista:hover {
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Loading State */
.produtos-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #6b7280;
}

.produtos-loading i {
    animation: spin 1s linear infinite;
    font-size: 2rem;
    margin-right: 1rem;
}

/* Empty State */
.produtos-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.produtos-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.produtos-empty h3 {
    font-size: 1.25rem;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .produtos-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }
    
    .filtros-produtos {
        flex-direction: column;
    }
    
    .produtos-stats {
        grid-template-columns: 1fr;
    }
    
    .produto-item-lista {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .produto-acoes {
        flex-direction: column;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .produto-card,
    .filtros-produtos,
    .stat-card,
    .produto-item-lista {
        background: #1f2937;
        border-color: #374151;
    }
    
    .produto-nome,
    .stat-value {
        color: #f9fafb;
    }
    
    .produto-descricao,
    .produto-codigo,
    .stat-label {
        color: #d1d5db;
    }
}
