/* ===== CARDCARD.CSS - CARDS DE VEÍCULOS (COMPARTILHADO) ===== */

.car-card {
    background: var(--branco);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(15, 107, 58, 0.15);
}

/* Container da imagem */
.car-image-container {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.car-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.car-card:hover .car-image {
    transform: scale(1.1);
}

/* Vídeo hover */
.car-hover-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

/* Badges */
.car-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-new {
    background: linear-gradient(135deg, var(--verde-primario), var(--verde-secundario));
    color: var(--branco);
}

.badge-negotiable {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: var(--branco);
}

.badge-sold {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--branco);
}

.badge-reserved {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: var(--branco);
}

/* Conteúdo do card */
.car-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Marca e modelo */
.car-make-model {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.car-make-model span:first-child {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--preto);
    line-height: 1.3;
}

.car-year {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cinza);
    background: var(--cinza-claro);
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Preço */
.car-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--verde-primario);
    margin: 12px 0;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
}

.price-currency {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--verde-secundario);
    margin-right: 2px;
}

.price-consult {
    font-size: 1rem;
    font-weight: 500;
    color: var(--cinza);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Lista de detalhes */
.car-details-list {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 15px 0;
    padding: 12px 0;
    border-top: 1px solid var(--borda);
    border-bottom: 1px solid var(--borda);
}

.car-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
}

.detail-icon {
    width: 38px;
    height: 38px;
    background: rgba(15, 107, 58, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--verde-primario);
    font-size: 1rem;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.car-card:hover .detail-icon {
    background: var(--verde-primario);
    color: var(--branco);
    transform: scale(1.05);
}

.detail-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--preto);
    margin-bottom: 2px;
}

.detail-label {
    font-size: 0.65rem;
    color: var(--cinza);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge de condição (novo/usado) */
.car-tipo-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: fit-content;
    margin-top: 10px;
    background: var(--verde-primario);
    color: var(--branco);
}

/* Botão Favorito (para área do cliente) */
.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn i {
    font-size: 1rem;
    color: #ccc;
    transition: all 0.3s ease;
}

.favorite-btn.active i {
    color: #e74c3c;
}

.favorite-btn.active {
    background: white;
}

/* ===== ESTADO DE LOADING E NO RESULTS ===== */
.loading {
    text-align: center;
    padding: 60px;
    background: var(--branco);
    border-radius: 20px;
    grid-column: 1 / -1;
}

.loading i {
    font-size: 3rem;
    color: var(--verde-primario);
    margin-bottom: 15px;
}

.loading p {
    font-size: 1rem;
    color: var(--cinza);
}

.no-results {
    text-align: center;
    padding: 60px;
    background: var(--branco);
    border-radius: 20px;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.3rem;
    color: var(--preto);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--cinza);
    margin-bottom: 25px;
}

.no-results button {
    padding: 12px 30px;
    background: var(--verde-primario);
    color: var(--branco);
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.no-results button:hover {
    background: var(--verde-secundario);
    transform: translateY(-3px);
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .car-image-container {
        height: 200px;
    }
    
    .car-make-model span:first-child {
        font-size: 1rem;
    }
    
    .car-year {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
    
    .car-price {
        font-size: 1.2rem;
    }
    
    .car-details-list {
        gap: 5px;
    }
    
    .detail-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
    
    .detail-value {
        font-size: 0.75rem;
    }
    
    .detail-label {
        font-size: 0.6rem;
    }
    
    .car-tipo-badge {
        padding: 6px 12px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .car-image-container {
        height: 180px;
    }
    
    .car-content {
        padding: 15px;
    }
    
    .car-make-model span:first-child {
        font-size: 0.9rem;
    }
    
    .car-price {
        font-size: 1.1rem;
    }
    
    .price-currency {
        font-size: 0.8rem;
    }
    
    .car-details-list {
        flex-wrap: wrap;
    }
    
    .car-detail {
        min-width: 70px;
    }
}