/**
 * CSS do Frontend - WPDEV Classificados
 * 
 * Estilos para a área pública do plugin.
 * Inclui estilos para filtros, listagens e páginas de veículos.
 */

/* ========================================
   ESTILOS GERAIS DO FRONTEND
   ======================================== */

.wpdev-classificados {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

.wpdev-classificados * {
    box-sizing: border-box;
}

/* ========================================
   FILTROS DE BUSCA
   ======================================== */

.wpdev-filter-form {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.wpdev-filter-form .filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.wpdev-filter-form .filter-row:last-child {
    margin-bottom: 0;
}

.wpdev-filter-form .filter-group {
    display: flex;
    flex-direction: column;
}

.wpdev-filter-form .filter-group label {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
    font-size: 14px;
}

.wpdev-filter-form .filter-group input,
.wpdev-filter-form .filter-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    width: 100%;
}

.wpdev-filter-form .filter-group input:focus,
.wpdev-filter-form .filter-group select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.wpdev-filter-form .filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.wpdev-filter-form .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.wpdev-filter-form .btn-primary {
    background: #007cba;
    color: #fff;
}

.wpdev-filter-form .btn-primary:hover {
    background: #005a87;
}

.wpdev-filter-form .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.wpdev-filter-form .btn-secondary:hover {
    background: #545b62;
}

/* ========================================
   LISTAGEM DE VEÍCULOS
   ======================================== */

.wpdev-veiculos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.wpdev-veiculo-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wpdev-veiculo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.wpdev-veiculo-card .card-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.wpdev-veiculo-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wpdev-veiculo-card:hover .card-image img {
    transform: scale(1.05);
}

.wpdev-veiculo-card .card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wpdev-veiculo-card .badge {
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    font-weight: 600;
}

.wpdev-veiculo-card .badge.badge-promocao {
    background: #dc3545;
}

.wpdev-veiculo-card .badge.badge-destaque {
    background: #28a745;
}

.wpdev-veiculo-card .card-content {
    padding: 20px;
}

.wpdev-veiculo-card .card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #333;
    text-decoration: none;
}

.wpdev-veiculo-card .card-title:hover {
    color: #007cba;
}

.wpdev-veiculo-card .card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.wpdev-veiculo-card .card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.wpdev-veiculo-card .card-prices {
    margin-bottom: 15px;
}

.wpdev-veiculo-card .price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.wpdev-veiculo-card .price-current {
    font-size: 20px;
    font-weight: 700;
    color: #28a745;
}

.wpdev-veiculo-card .price-fipe {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.wpdev-veiculo-card .card-actions {
    display: flex;
    gap: 10px;
}

.wpdev-veiculo-card .btn-ver-mais {
    flex: 1;
    padding: 10px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.wpdev-veiculo-card .btn-ver-mais:hover {
    background: #005a87;
    color: #fff;
}

/* ========================================
   PAGINAÇÃO
   ======================================== */

.wpdev-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px 0;
}

.wpdev-pagination .page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    color: #007cba;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.wpdev-pagination .page-link:hover {
    border-color: #007cba;
    background: #f8f9fa;
}

.wpdev-pagination .page-link.current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

.wpdev-pagination .page-link.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* ========================================
   MENSAGENS E ESTADOS
   ======================================== */

.wpdev-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.wpdev-loading .spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: wpdev-spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes wpdev-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpdev-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.wpdev-no-results .icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.wpdev-no-results h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.wpdev-no-results p {
    margin: 0;
    font-size: 14px;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media screen and (max-width: 768px) {
    .wpdev-filter-form .filter-row {
        grid-template-columns: 1fr;
    }
    
    .wpdev-filter-form .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wpdev-filter-form .btn {
        justify-content: center;
    }
    
    .wpdev-veiculos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wpdev-veiculo-card .card-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .wpdev-pagination {
        flex-wrap: wrap;
    }
}

@media screen and (max-width: 480px) {
    .wpdev-filter-form {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .wpdev-veiculo-card .card-content {
        padding: 15px;
    }
    
    .wpdev-veiculo-card .card-title {
        font-size: 16px;
    }
    
    .wpdev-veiculo-card .price-current {
        font-size: 18px;
    }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.wpdev-text-center { text-align: center; }
.wpdev-text-left { text-align: left; }
.wpdev-text-right { text-align: right; }

.wpdev-mb-0 { margin-bottom: 0 !important; }
.wpdev-mb-1 { margin-bottom: 10px !important; }
.wpdev-mb-2 { margin-bottom: 20px !important; }
.wpdev-mb-3 { margin-bottom: 30px !important; }

.wpdev-hidden { display: none !important; }
.wpdev-visible { display: block !important; }

/* ========================================
   TEMA ESCURO (opcional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .wpdev-classificados {
        color: #e9ecef;
    }
    
    .wpdev-filter-form {
        background: #343a40;
        border-color: #495057;
    }
    
    .wpdev-filter-form .filter-group input,
    .wpdev-filter-form .filter-group select {
        background: #495057;
        border-color: #6c757d;
        color: #e9ecef;
    }
    
    .wpdev-veiculo-card {
        background: #343a40;
        border-color: #495057;
    }
    
    .wpdev-veiculo-card .card-title {
        color: #e9ecef;
    }
}