/**
 * RE/MAX Property Display Styles
 * File: assets/style.css
 * Version: 1.8.0
 */

/* Grid Layout */
.remax-properties-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.remax-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.remax-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.remax-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
    .remax-columns-3,
    .remax-columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .remax-properties-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
}

/* Property Card - UPDATED FOR ALIGNMENT */
.remax-property-card {
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.remax-property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.remax-property-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Property Image - UPDATED FOR ALIGNMENT */
.remax-property-image {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.remax-property-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* Status Badges */
.remax-property-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    color: #fff;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    z-index: 1;
}

/* Blue badge for "New" */
.remax-badge-new {
    background: #164af5;
}

/* Dark blue badge for "New Property" */
.remax-badge-new-property {
    background: #020e33;
}

/* Dark badge for "Open House" */
.remax-badge-open-house {
    background: #020e33;
}

/* Red badge for "Price Reduced" */
.remax-badge-price-reduced {
    background: #c2161b;
}

/* Red badge for "Sold" */
.remax-badge-sold {
    background: #c2161b;
}

/* Property Details - UPDATED FOR ALIGNMENT */
.remax-property-details {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ULS Number */
.remax-property-uls {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0 0 8px 0;
    font-weight: 500;
}

/* Property Title */
.remax-property-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #2c3e50;
    line-height: 1.3;
}

/* Property Address - UPDATED FOR ALIGNMENT */
.remax-property-address {
    font-size: 15px;
    font-weight: 500;
    color: #7f8c8d;
    margin: 0 0 12px 0;
    line-height: 1.4;
    min-height: 36px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Property Price - UPDATED FOR ALIGNMENT */
.remax-property-price {
    font-size: 18px;
    font-weight: 700;
    color: #e30613;
    margin: 0 0 12px 0;
    margin-top: auto;
}

/* Property Features */
.remax-property-features {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #ecf0f1;
}

.remax-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #34495e;
    font-weight: 500;
}

.remax-feature i {
    color: #bc3531;
    font-size: 16px;
    width: 18px;
    text-align: center;
}

/* No Properties Message */
.remax-no-properties {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}

.remax-no-properties a {
    color: #0066cc;
    text-decoration: none;
}

.remax-no-properties a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .remax-property-details {
        padding: 14px;
    }
    
    .remax-property-title {
        font-size: 15px;
    }
    
    .remax-property-price {
        font-size: 18px;
    }
    
    .remax-property-features {
        gap: 12px;
    }
    
    .remax-feature {
        font-size: 12px;
    }
    
    .remax-property-badge {
        font-size: 12px;
        padding: 5px 12px;
    }
    
    .remax-property-address {
        min-height: 34px;
    }
}

/* Lazy Load Styles */
.remax-properties-wrapper {
    position: relative;
}

.remax-loading-container {
    margin-top: 30px;
    text-align: center;
}

.remax-loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    background: #fef0f0;
    color: #CE2227;
}

.remax-loading-spinner i {
    font-size: 18px;
    color: #CE2227;
    animation: spin 1s linear infinite;
}

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

.remax-load-trigger {
    height: 1px;
    margin-top: 100px;
    visibility: hidden;
}

/* Smooth fade-in animation for new properties */
.remax-property-card {
    transition: opacity 0.5s ease, transform 0.5s ease;
}