/* ============================================
   Fabricart Projects Filter - Styles
   ============================================ */

/* Importar fonte Asar do Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Asar&display=swap');

:root {
    --fabricart-primary: #8B6914;
    --fabricart-primary-hover: #6d5310;
    --fabricart-secondary: #f5f5f5;
    --fabricart-text: #333333;
    --fabricart-text-light: #666666;
    --fabricart-border: #e0e0e0;
    --fabricart-white: #ffffff;
    --fabricart-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --fabricart-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --fabricart-radius: 8px;
    --fabricart-radius-lg: 12px;
    --fabricart-transition: all 0.3s ease;
}

/* Container Principal */
.fabricart-projects-wrapper,
.fabricart-projects-wrapper * {
    font-family: 'Asar', sans-serif;
}

.fabricart-projects-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   Filtros
   ============================================ */
.fabricart-filters {
    background: var(--fabricart-white);
    border-radius: var(--fabricart-radius-lg);
    box-shadow: var(--fabricart-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

.fabricart-filters-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--fabricart-border);
}

.fabricart-filters-icon {
    color: var(--fabricart-primary);
    display: flex;
    align-items: center;
}

.fabricart-filters-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--fabricart-text);
}

.fabricart-filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.fabricart-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fabricart-filter-group label {
    font-size: 16px;
    font-weight: 500;
    color: var(--fabricart-text-light);
}

.fabricart-filter-select {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid var(--fabricart-border);
    border-radius: var(--fabricart-radius);
    background-color: var(--fabricart-white);
    color: var(--fabricart-text);
    cursor: pointer;
    transition: var(--fabricart-transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.fabricart-filter-select:hover {
    border-color: var(--fabricart-primary);
}

.fabricart-filter-select:focus {
    outline: none;
    border-color: var(--fabricart-primary);
    box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.fabricart-filters-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--fabricart-border);
}

/* Botões - Estilos Mínimos (Elementor controla o resto) */
.fabricart-btn {
    cursor: pointer;
    border: none;
}

#fabricart-apply-filters, #fabricart-clear-filters {
    border: none !important;
}

/* ============================================
   Contador de Resultados
   ============================================ */
.fabricart-results-info {
    font-size: 16px;
    color: var(--fabricart-text-light);
    margin-bottom: 20px;
    padding: 0 4px;
    word-spacing: normal;
    font-family: none;
}

.fabricart-results-info #fabricart-results-count {
    font-weight: 600;
    color: var(--fabricart-primary);
}

/* ============================================
   Grid de Projetos
   ============================================ */
.fabricart-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============================================
   Card do Projeto
   ============================================ */
.fabricart-project-card {
    background: var(--fabricart-white);
    transition: var(--fabricart-transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-width: 0px 8px 8px 0px;
    border-top-width: 0px;
    border-right-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 0px;
    border-color: #f6d6d6;
    border-style: solid;
    border-radius: 20px;
    overflow: hidden;
}

.fabricart-project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.fabricart-card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #fafafa;
}

.fabricart-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.fabricart-project-card:hover .fabricart-card-image img {
    transform: scale(1.05);
}

/* Badge de Dificuldade - Estilo Conforme Print */
.fabricart-difficulty-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    letter-spacing: 0.3px;
    border-radius: 999px;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Cores por Nível de Dificuldade */
.difficulty-iniciante,
.difficulty-facil {
    color: #5A3A29;
    background: #D8F0E2;
}

.difficulty-intermediario,
.difficulty-medio {
    color: #5A3A29;
    background: #D6E6F6;
}

.difficulty-avancado,
.difficulty-dificil {
    color: #5A3A29;
    background: #F6D6D6;
}

/* Conteúdo do Card */
.fabricart-card-content {
    padding: 20px;
    background: var(--fabricart-white);
    border-radius: 0 0 20px 20px;
}

.fabricart-card-title {
    font-size: 24px !important;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.3;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fabricart-card-influencer {
    font-size: 15px;
    color: #333333;
    text-align: left;
    margin: 0 0 16px 0;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.fabricart-card-button {
    display: block;
    width: 100%;
    text-decoration: none;
}

/* ============================================
   Sem Resultados
   ============================================ */
.fabricart-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--fabricart-secondary);
    border-radius: var(--fabricart-radius-lg);
}

.fabricart-no-results p {
    font-size: 16px;
    color: var(--fabricart-text-light);
    margin: 0;
}

/* ============================================
   Loading
   ============================================ */
.fabricart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--fabricart-text-light);
}

.fabricart-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--fabricart-border);
    border-top-color: var(--fabricart-primary);
    border-radius: 50%;
    animation: fabricart-spin 0.8s linear infinite;
}

@keyframes fabricart-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsivo
   ============================================ */
@media (max-width: 1024px) {
    .fabricart-filters-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .fabricart-projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .fabricart-projects-wrapper {
        padding: 16px;
    }
    
    .fabricart-filters {
        padding: 20px;
    }
    
    .fabricart-filters-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .fabricart-filters-actions {
        flex-direction: column;
    }
    
    .fabricart-btn {
        width: 100%;
        text-align: center;
    }
    
    .fabricart-projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .fabricart-projects-grid {
        grid-template-columns: 1fr;
    }
    
    .fabricart-card-content {
        padding: 16px;
    }
}

/* ============================================
   Animações
   ============================================ */
.fabricart-project-card {
    animation: fabricart-fadeIn 0.4s ease forwards;
    opacity: 0;
}

.fabricart-project-card:nth-child(1) { animation-delay: 0.05s; }
.fabricart-project-card:nth-child(2) { animation-delay: 0.1s; }
.fabricart-project-card:nth-child(3) { animation-delay: 0.15s; }
.fabricart-project-card:nth-child(4) { animation-delay: 0.2s; }
.fabricart-project-card:nth-child(5) { animation-delay: 0.25s; }
.fabricart-project-card:nth-child(6) { animation-delay: 0.3s; }
.fabricart-project-card:nth-child(7) { animation-delay: 0.35s; }
.fabricart-project-card:nth-child(8) { animation-delay: 0.4s; }

@keyframes fabricart-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estado de loading no grid */
.fabricart-projects-grid.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Filtro ativo */
.fabricart-filter-select.has-value {
    border-color: var(--fabricart-primary);
    background-color: rgba(139, 105, 20, 0.05);
}
