/**
 * COL323 Real Estate - Frontend CSS
 * v1.0.0
 */

/* ── Grid Layout ── */
.col323-re-grid {
    display: grid;
    gap: 20px;
}

.col323-re-cols-2 { grid-template-columns: repeat(2, 1fr); }
.col323-re-cols-3 { grid-template-columns: repeat(3, 1fr); }
.col323-re-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Results Bar ── */
.col323-re-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

/* ── Property Card ── */
.col323-re-card-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    cursor: pointer;
}

.col323-re-card-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.col323-re-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.col323-re-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.col323-re-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: #9ca3af;
    font-size: 14px;
}

.col323-re-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.col323-re-card-badge-sale {
    background: #059669;
    color: #fff;
}

.col323-re-card-badge-rent {
    background: #2563eb;
    color: #fff;
}

.col323-re-card-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f59e0b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.col323-re-card-body {
    padding: 16px;
}

.col323-re-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    display: inline;
}

.col323-re-card-per-month {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.col323-re-card-title {
    margin: 8px 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
}

.col323-re-card-location {
    margin: 0 0 10px;
    color: #6b7280;
    font-size: 14px;
}

.col323-re-icon-pin::before {
    content: "\1F4CD";
    margin-right: 4px;
}

.col323-re-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.col323-re-spec {
    font-size: 13px;
    color: #4b5563;
}

.col323-re-spec-icon {
    margin-right: 2px;
}

.col323-re-card-type {
    margin: 6px 0 0;
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── List View ── */
.col323-re-list-item {
    display: flex;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.col323-re-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.col323-re-list-image {
    position: relative;
    width: 300px;
    min-height: 200px;
    flex-shrink: 0;
}

.col323-re-list-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.col323-re-list-body {
    padding: 20px;
    flex: 1;
}

.col323-re-list-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.col323-re-list-desc {
    margin: 8px 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Search Form ── */
.col323-re-search {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.col323-re-search-horizontal .col323-re-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.col323-re-search-vertical .col323-re-search-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.col323-re-search-field {
    flex: 1;
    min-width: 140px;
}

.col323-re-search-field input,
.col323-re-search-field select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
}

.col323-re-search-price-range {
    display: flex;
    align-items: center;
    gap: 5px;
}

.col323-re-search-price-range input {
    flex: 1;
}

.col323-re-search-sep {
    color: #9ca3af;
}

.col323-re-search-btn {
    width: 100%;
    padding: 10px 24px;
    background: #1f2937;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.col323-re-search-btn:hover {
    background: #374151;
}

/* ── Single Property ── */
.col323-re-single-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.col323-re-single-title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
    line-height: 1.3;
}

.col323-re-single-location {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.col323-re-single-price {
    font-size: 32px;
    font-weight: 700;
    color: #059669;
}

.col323-re-single-per-month {
    font-size: 14px;
    color: #6b7280;
    display: block;
}

/* Gallery */
.col323-re-gallery {
    margin-bottom: 30px;
}

.col323-re-gallery-main {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

.col323-re-gallery-main img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.col323-re-gallery-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.col323-re-gallery-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.col323-re-gallery-thumb.active,
.col323-re-gallery-thumb:hover {
    border-color: #1f2937;
}

.col323-re-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Single Content Layout */
.col323-re-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Specs Row */
.col323-re-single-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 25px;
}

.col323-re-single-spec {
    text-align: center;
    padding: 0 15px;
    border-right: 1px solid #e5e7eb;
}

.col323-re-single-spec:last-child {
    border-right: none;
}

.col323-re-single-spec-val {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
}

.col323-re-single-spec-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* Sections */
.col323-re-single-section {
    margin-bottom: 30px;
}

.col323-re-single-section h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.col323-re-single-description {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
}

/* Features Grid */
.col323-re-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.col323-re-feature-group h4 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.col323-re-feature-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.col323-re-feature-group li {
    padding: 5px 0;
    font-size: 14px;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.col323-re-feature-group li:last-child {
    border-bottom: none;
}

.col323-re-feature-val {
    color: #9ca3af;
    margin-left: 5px;
}

/* Tables */
.col323-re-costs-table,
.col323-re-details-table {
    width: 100%;
    border-collapse: collapse;
}

.col323-re-costs-table td,
.col323-re-details-table td {
    padding: 10px 15px;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
}

.col323-re-costs-table td:first-child,
.col323-re-details-table td:first-child {
    color: #6b7280;
    width: 40%;
}

.col323-re-costs-table td:last-child,
.col323-re-details-table td:last-child {
    font-weight: 600;
    color: #1f2937;
}

/* ── Agent Card ── */
.col323-re-agent-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.col323-re-agent-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.col323-re-agent-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.col323-re-agent-photo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.col323-re-agent-name {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.col323-re-agent-agency {
    margin: 4px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.col323-re-agent-bio {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 15px;
}

.col323-re-agent-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.col323-re-agent-btn {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.col323-re-agent-btn-phone {
    background: #1f2937;
    color: #fff;
}

.col323-re-agent-btn-phone:hover {
    background: #374151;
    color: #fff;
}

.col323-re-agent-btn-whatsapp {
    background: #25d366;
    color: #fff;
}

.col323-re-agent-btn-whatsapp:hover {
    background: #1da851;
    color: #fff;
}

.col323-re-agent-btn-email {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #e5e7eb;
}

.col323-re-agent-btn-email:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* ── Stats Widget ── */
.col323-re-stats {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.col323-re-stat-item {
    flex: 1;
    text-align: center;
}

.col323-re-stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.col323-re-stat-label {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

/* ── Map ── */
.col323-re-single-map {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.col323-re-single-map h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.col323-re-map-placeholder {
    padding: 30px;
    background: #f3f4f6;
    border-radius: 6px;
    text-align: center;
}

.col323-re-map-placeholder a {
    color: #2563eb;
    font-weight: 600;
}

/* ── Load More ── */
.col323-re-load-more-wrap {
    text-align: center;
    margin-top: 25px;
}

.col323-re-load-more-btn {
    padding: 12px 32px;
    background: #1f2937;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.col323-re-load-more-btn:hover {
    background: #374151;
}

.col323-re-load-more-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* ── No Results ── */
.col323-re-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
    font-size: 16px;
}

.col323-re-error {
    color: #dc2626;
    font-size: 14px;
}

/* ── Loading ── */
.col323-re-loading {
    text-align: center;
    padding: 30px;
    color: #6b7280;
}

/* ── Responsive ── */
@media screen and (max-width: 1024px) {
    .col323-re-single-content {
        grid-template-columns: 1fr;
    }

    .col323-re-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .col323-re-cols-3,
    .col323-re-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .col323-re-single-header {
        flex-direction: column;
    }

    .col323-re-single-price {
        font-size: 26px;
    }

    .col323-re-list-item {
        flex-direction: column;
    }

    .col323-re-list-image {
        width: 100%;
        height: 200px;
    }

    .col323-re-search-horizontal .col323-re-search-fields {
        flex-direction: column;
    }

    .col323-re-stats {
        flex-wrap: wrap;
    }

    .col323-re-stat-item {
        flex: 0 0 calc(50% - 10px);
    }
}

@media screen and (max-width: 480px) {
    .col323-re-cols-2,
    .col323-re-cols-3,
    .col323-re-cols-4 {
        grid-template-columns: 1fr;
    }

    .col323-re-card-image {
        height: 180px;
    }

    .col323-re-single-specs {
        flex-direction: column;
        gap: 10px;
    }

    .col323-re-single-spec {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        text-align: left;
    }

    .col323-re-single-spec:last-child {
        border-bottom: none;
    }
}
