/* ==================== TRANSACTIONS SECTION ==================== */
.transactions-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-tabs {
    display: flex;
    gap: 30px;
}

.filter-tab {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.filter-tab:hover {
    color: #333;
}

.filter-tab.active {
    color: #000;
    border-bottom: 2px solid #000;
}

.sort-dropdown {
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
}

.transactions-list {
    margin-bottom: 30px;
}

.transaction-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 1.5fr 1fr;
    gap: 20px;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.transaction-row:hover {
    background-color: #fafafa;
}

.transaction-address {
    font-size: 15px;
    line-height: 1.5;
    color: #333;
    text-align: left;
}

.transaction-bed,
.transaction-bath {
    color: #666;
    font-size: 14px;
}

.transaction-type {
    color: #666;
    font-size: 14px;
}

.transaction-price {
    text-align: right;
    font-weight: 600;
    font-size: 15px;
    color: #000;
}

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

.transactions-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.load-more-btn,
.load-all-btn {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover,
.load-all-btn:hover {
    background: #000;
    color: #fff;
}

/* ==================== LISTINGS SECTION ==================== */
.listings-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.listings-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.listing-filter-tab {
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #999;
    cursor: pointer;
    padding: 10px 0;
    margin-right: 30px;
    transition: color 0.3s ease;
}

.listing-filter-tab:hover {
    color: #333;
}

.listing-filter-tab.active {
    color: #000;
    border-bottom: 2px solid #000;
}

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

.listing-card {
    position: relative;
    display: block;
    width: 100%;
    padding-bottom: 125%; /* 4:5 aspect ratio (5/4 = 1.25 = 125%) */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.listing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0) 50%,
        rgba(0, 0, 0, 0.5) 80%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 25px;
}

.listing-info {
    color: #fff;
    width: 100%;
}

.listing-address {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.listing-city-state {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.95;
}

.listing-bed-bath {
    font-size: 13px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.listing-price {
    font-size: 20px;
    font-weight: 700;
    margin-top: 5px;
}

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

.listings-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.load-more-listings-btn,
.load-all-listings-btn {
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid #000;
    background: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-listings-btn:hover,
.load-all-listings-btn:hover {
    background: #000;
    color: #fff;
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Transactions responsive */
@media (max-width: 968px) {
    .transaction-row {
        grid-template-columns: 2fr 0.8fr 0.8fr 1.2fr 1fr;
        gap: 15px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .transactions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .transaction-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 20px 0;
    }
    
    .transaction-address {
        font-size: 14px;
        font-weight: 600;
        text-align: left;
    }
    
    .transaction-price {
        text-align: left;
        font-size: 16px;
        margin-top: 5px;
    }
    
    .transactions-buttons {
        flex-direction: column;
    }
    
    .load-more-btn,
    .load-all-btn {
        width: 100%;
    }
}

/* Listings responsive */
@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .listings-buttons {
        flex-direction: column;
    }
    
    .load-more-listings-btn,
    .load-all-listings-btn {
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1400px) {
    .listings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}