/**
 * AlmeidaImob - Property Cards CSS
 * Estilos para cards de imóveis (grid e carrossel)
 */

/* ===== PROPERTY CARD BASE ===== */
.property-card {
    background: var(--white, #fff);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

/* ===== IMAGEM DO CARD ===== */
.property-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--neutral-100, #f5f5f5);
}

.property-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.property-image-container img,
.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image-container img,
.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-image.fallback {
    object-fit: contain;
    padding: 2rem;
    background: var(--neutral-100, #f5f5f5);
}

.property-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-overlay {
    opacity: 1;
}

/* ===== BADGES E TAGS ===== */
.property-operation {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-md, 8px);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.property-operation.sale {
    background: var(--primary-color, #1a5f4a);
    color: white;
}

.property-operation.rent {
    background: var(--info-color, #3b82f6);
    color: white;
}

.property-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: var(--radius-md, 8px);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.property-status.sold {
    background: var(--danger-color, #ef4444);
    color: white;
}

.property-status.rented {
    background: var(--warning-color, #f59e0b);
    color: white;
}

.property-code {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    font-weight: 500;
    z-index: 2;
}

.property-image-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: var(--radius-sm, 4px);
    font-size: 11px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-badge {
    position: absolute;
    top: 50px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-sm, 4px);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
}

.property-badge.featured {
    background: var(--secondary-color, #c9a227);
    color: var(--neutral-900, #171717);
}

.property-badge.exclusive {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    color: white;
}

/* ===== CONTEÚDO DO CARD ===== */
.property-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-header {
    margin-bottom: 0.75rem;
}

.property-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
    color: var(--neutral-800, #262626);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.property-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.property-title a:hover {
    color: var(--primary-color, #1a5f4a);
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--neutral-500, #737373);
}

.property-location i {
    color: var(--primary-color, #1a5f4a);
    font-size: 0.75rem;
}

/* ===== PREÇO ===== */
.property-price {
    margin: 0.75rem 0;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.property-price .price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color, #1a5f4a);
}

.property-price .price-period {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--neutral-500, #737373);
}

/* ===== CARACTERÍSTICAS ===== */
.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.property-features span,
.property-features .feature {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--neutral-600, #525252);
    background: var(--neutral-100, #f5f5f5);
    padding: 4px 8px;
    border-radius: var(--radius-sm, 4px);
}

.property-features i {
    color: var(--neutral-500, #737373);
    font-size: 0.75rem;
}

/* ===== AÇÃO ===== */
.property-action {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--neutral-200, #e5e5e5);
}

.btn-view-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color, #1a5f4a);
    color: white;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view-details:hover {
    background: var(--primary-dark, #144a3a);
    color: white;
    transform: translateY(-1px);
}

.btn-view-details i {
    transition: transform 0.2s ease;
}

.btn-view-details:hover i {
    transform: translateX(3px);
}

/* ===== GRID ===== */
.property-grid {
    margin-bottom: 2rem;
}

.property-grid .row {
    display: flex;
    flex-wrap: wrap;
}

/* Grid controlado por property-listing-modern.css */
#imoveis-container {
    /* display: grid definido em property-listing-modern.css */
}

#imoveis-container.updating {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== PAGINAÇÃO ===== */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md, 8px);
    background: var(--white, #fff);
    border: 1px solid var(--neutral-300, #d4d4d4);
    color: var(--neutral-700, #404040);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    background: var(--neutral-100, #f5f5f5);
    border-color: var(--primary-color, #1a5f4a);
    color: var(--primary-color, #1a5f4a);
}

.page-item.active .page-link {
    background: var(--primary-color, #1a5f4a);
    border-color: var(--primary-color, #1a5f4a);
    color: white;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 3rem;
}

.no-results h3 {
    color: var(--neutral-700, #404040);
    margin-bottom: 0.5rem;
}

/* ===== LOADING ===== */
#loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 3px;
}

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900, #171717);
    margin: 0;
}

.result-counter {
    font-size: 0.9rem;
    color: var(--neutral-500, #737373);
}

.sort-select {
    max-width: 200px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--neutral-300, #d4d4d4);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 991px) {
    .property-image-container {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .property-image-container {
        height: 200px;
    }

    .property-features {
        gap: 0.5rem;
    }

    .property-features span {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
}

/* ===== ANIMAÇÕES ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.col-md-6.col-lg-3.mb-4 {
    animation: fadeIn 0.3s ease forwards;
}

/* ===== CARROSSEL CARDS ===== */
.featured-carousel-item .property-card-modern {
    margin: 0 0.5rem;
}

.property-card-modern {
    background: var(--white, #fff);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.property-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, 0.1));
}

.property-image-modern {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--neutral-100, #f5f5f5);
    border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

.property-image-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Efeito de zoom na imagem ao passar o mouse */
.property-card-modern:hover .property-image-modern img {
    transform: scale(1.08);
}

.property-badges-modern {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge-modern {
    padding: 4px 10px;
    border-radius: var(--radius-sm, 4px);
    font-size: 10px;
    font-weight: 700;
}

.badge-destaque {
    background: var(--secondary-color, #c9a227);
    color: var(--neutral-900, #171717);
}

.badge-exclusivo {
    background: linear-gradient(135deg, #9333ea, #7c3aed);
    color: white;
}

.badge-financiavel {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm, 4px);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.property-content-modern {
    padding: 1rem;
}

.property-title-modern {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    color: var(--neutral-800, #262626);
}

.property-location-modern {
    font-size: 0.8rem;
    color: var(--neutral-500, #737373);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.property-location-modern i {
    color: var(--primary-color, #1a5f4a);
}

.property-details-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.property-price-modern {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color, #1a5f4a);
}

.property-area-modern {
    font-size: 0.85rem;
    color: var(--neutral-600, #525252);
}

.property-features-modern {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feature-modern {
    font-size: 0.8rem;
    color: var(--neutral-600, #525252);
    display: flex;
    align-items: center;
    gap: 4px;
}

.feature-modern i {
    color: var(--neutral-500, #737373);
}

.property-action-modern {
    padding-top: 0.75rem;
    border-top: 1px solid var(--neutral-200, #e5e5e5);
}

.btn-view-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 0.6rem;
    background: var(--primary-color, #1a5f4a);
    color: white;
    border-radius: var(--radius-md, 8px);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view-modern:hover {
    background: var(--primary-dark, #144a3a);
    color: white;
}