/* ==========================================================================
   Real Estate & Rentals — Frontend Styles
   Modern, mobile-first, scoped to .re2-* classes
   ========================================================================== */

/* Reset & Base */
.re2-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

.re2-container *, .re2-container *::before, .re2-container *::after {
    box-sizing: border-box;
}

.re2-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 20px;
    color: #2c3e50;
}

/* ---------- FILTER BAR ---------- */
.re2-filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.re2-filter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.re2-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.re2-filter-search {
    position: relative;
    flex: 2;
    min-width: 200px;
}

.re2-filter-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.re2-filter-search .re2-input {
    padding-left: 36px;
}

.re2-input, .re2-select {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.re2-input:focus, .re2-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    outline: none;
}

.re2-select {
    flex: 1;
    min-width: 140px;
    cursor: pointer;
}

.re2-select-sm, .re2-input-sm {
    flex: 0 1 140px;
    min-width: 100px;
}

/* ---------- BUTTONS ---------- */
.re2-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.re2-btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
}

.re2-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #2471a3);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.35);
    color: #fff;
    text-decoration: none;
}

.re2-btn-outline {
    background: transparent;
    color: #555;
    border: 1px solid #ddd;
}

.re2-btn-outline:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

.re2-btn-danger {
    background: #e74c3c;
    color: #fff;
}

.re2-btn-danger:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

.re2-btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.re2-btn-block {
    width: 100%;
    justify-content: center;
}

/* ---------- RESULTS HEADER ---------- */
.re2-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.re2-results-count {
    color: #777;
    font-size: 14px;
}

/* ---------- PROPERTY GRID ---------- */
.re2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ---------- PROPERTY CARD ---------- */
.re2-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}

.re2-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.re2-card-image-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.re2-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

.re2-card:hover .re2-card-image {
    transform: scale(1.05);
}

.re2-card-price {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.re2-card-body {
    padding: 16px;
}

.re2-card-type {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #3498db;
    font-weight: 600;
    margin-bottom: 4px;
}

.re2-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 4px 0 6px;
    line-height: 1.3;
}

.re2-card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.re2-card-title a:hover {
    color: #3498db;
}

.re2-card-location {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px;
}

.re2-card-location i {
    color: #e74c3c;
    margin-right: 4px;
}

.re2-card-features {
    display: flex;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

.re2-card-features span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.re2-card-features i {
    color: #3498db;
    font-size: 14px;
}

/* ---------- BADGES ---------- */
.re2-badge {
    position: absolute;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.re2-badge-featured {
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.re2-badge-status {
    top: 12px;
    right: 12px;
}

.re2-badge-for_sale { background: #e74c3c; }
.re2-badge-for_rent { background: #3498db; }
.re2-badge-sold { background: #95a5a6; }
.re2-badge-rented { background: #95a5a6; }

/* ---------- NO RESULTS ---------- */
.re2-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ---------- PAGINATION ---------- */
.re2-pagination {
    margin-top: 30px;
    text-align: center;
}

.re2-pagination a, .re2-pagination span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border-radius: 6px;
    font-size: 14px;
    text-decoration: none;
    color: #555;
    border: 1px solid #e0e0e0;
}

.re2-pagination a:hover {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* ---------- BREADCRUMB ---------- */
.re2-breadcrumb {
    margin-bottom: 20px;
    font-size: 13px;
    color: #888;
}

.re2-breadcrumb a {
    color: #3498db;
    text-decoration: none;
}

.re2-breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   PROPERTY DETAIL PAGE
   ========================================================================== */

/* Gallery */
.re2-detail-gallery {
    margin-bottom: 24px;
}

.re2-gallery-main {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.re2-gallery-main-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.re2-photo-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.re2-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.re2-gallery-nav:hover {
    background: #fff;
}

.re2-gallery-prev { left: 12px; }
.re2-gallery-next { right: 12px; }

.re2-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    overflow-x: auto;
    padding: 4px 0;
    scroll-behavior: smooth;
}

.re2-gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, border 0.2s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.re2-gallery-thumb:hover, .re2-gallery-thumb.active {
    opacity: 1;
    border-color: #3498db;
}

/* Detail Layout */
.re2-detail-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 30px;
}

.re2-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.re2-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 8px 0 4px;
    color: #2c3e50;
}

.re2-detail-location {
    color: #888;
    font-size: 15px;
}

.re2-detail-location i {
    color: #e74c3c;
}

.re2-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: #2c3e50;
    white-space: nowrap;
}

/* Feature boxes */
.re2-detail-features {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.re2-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
    text-align: center;
}

.re2-feature i {
    font-size: 24px;
    color: #3498db;
    margin-bottom: 6px;
}

.re2-feature-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
}

.re2-feature-label {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
}

/* Sections */
.re2-section {
    margin-bottom: 30px;
}

.re2-section h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.re2-description {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}

/* Details grid */
.re2-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.re2-details-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
}

.re2-details-label {
    color: #777;
    font-size: 14px;
}

.re2-details-value {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

/* Map */
.re2-map {
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
}

/* Actions */
.re2-detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* ---------- SIDEBAR / CONTACT ---------- */
.re2-contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.re2-contact-card h3 {
    font-size: 1.1rem;
    margin: 0 0 16px;
    color: #2c3e50;
}

.re2-contact-form .re2-form-group {
    margin-bottom: 12px;
}

.re2-contact-form .re2-input {
    width: 100%;
}

.re2-contact-form textarea.re2-input {
    resize: vertical;
    min-height: 100px;
}

.re2-login-message {
    color: #888;
    text-align: center;
    margin-bottom: 15px;
}

/* ==========================================================================
   BLOCK STYLES
   ========================================================================== */

.re2-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.re2-block-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s;
}

.re2-block-card:hover {
    transform: translateY(-2px);
}

.re2-block-image-link {
    display: block;
    position: relative;
}

.re2-block-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.re2-block-featured-star {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f39c12;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.re2-block-status {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
}

.re2-block-card-body {
    padding: 12px;
}

.re2-block-card-body h4 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.3;
}

.re2-block-card-body h4 a {
    color: #2c3e50;
    text-decoration: none;
}

.re2-block-card-body h4 a:hover {
    color: #3498db;
}

.re2-block-location {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px;
}

.re2-block-price {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.re2-block-features {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 10px;
}

.re2-block-footer {
    text-align: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.re2-block-view-all {
    color: #3498db;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.re2-block-view-all:hover {
    text-decoration: underline;
}

/* City list block */
.re2-city-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.re2-city-list li {
    padding: 0;
    margin: 0;
}

.re2-city-list a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s;
    font-size: 14px;
}

.re2-city-list a:hover {
    background: #f0f7ff;
    color: #3498db;
}

.re2-city-list a i {
    color: #e74c3c;
    width: 16px;
    text-align: center;
}

.re2-city-count {
    margin-left: auto;
    color: #aaa;
    font-size: 12px;
}

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

@media (max-width: 768px) {
    .re2-grid {
        grid-template-columns: 1fr;
    }

    .re2-detail-layout {
        grid-template-columns: 1fr;
    }

    .re2-detail-header {
        flex-direction: column;
    }

    .re2-detail-price {
        font-size: 1.5rem;
    }

    .re2-filter-row {
        flex-direction: column;
    }

    .re2-select, .re2-input, .re2-select-sm, .re2-input-sm {
        width: 100%;
        flex: unset;
    }

    .re2-gallery-main-img {
        max-height: 300px;
    }

    .re2-block-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .re2-block-grid {
        grid-template-columns: 1fr;
    }

    .re2-card-image {
        height: 180px;
    }
}

/* ---------- PRINT ---------- */
@media print {
    .re2-filter-bar, .re2-detail-sidebar, .re2-detail-actions,
    .re2-gallery-thumbs, .re2-gallery-nav, .re2-pagination { display: none; }
    .re2-detail-layout { grid-template-columns: 1fr; }
    .re2-card { box-shadow: none; border: 1px solid #ddd; }
}
