/* ── RESO IDX Front-end Styles ─────────────────────────────────── */

/* Grid layout */
.reso-listings-grid {
    display: grid;
    gap: 24px;
    margin: 24px 0;
}
.reso-cols-1 { grid-template-columns: 1fr; }
.reso-cols-2 { grid-template-columns: repeat(2, 1fr); }
.reso-cols-3 { grid-template-columns: repeat(3, 1fr); }
.reso-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .reso-cols-3, .reso-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .reso-listings-grid { grid-template-columns: 1fr !important; }
}

/* ── Card ─────────────────────────────────────────────────────── */
.reso-listing-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
    transition: box-shadow .2s ease, transform .2s ease;
    background: #fff;
}
.reso-listing-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    transform: translateY(-2px);
}

.reso-card-link { text-decoration: none; color: inherit; display: block; }

.reso-card-photo {
    height: 200px;
    background-color: #e8ecf0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.reso-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
}
.reso-status-active  { background: #27ae60; }
.reso-status-pending { background: #e67e22; }
.reso-status-closed  { background: #7f8c8d; }

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

.reso-card-price {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 4px;
}

.reso-card-address {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #34495e;
}

.reso-card-location {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0 0 12px;
}

.reso-card-stats {
    display: flex;
    gap: 16px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #636e72;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}
.reso-card-stats li span { font-weight: 700; color: #2c3e50; }

.reso-no-listings { color: #7f8c8d; font-style: italic; }

/* ── Detail view ──────────────────────────────────────────────── */
.reso-detail { max-width: 900px; margin: 0 auto; }

.reso-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 24px;
}
.reso-gallery img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
}
.reso-gallery img:first-child {
    grid-column: span 4;
    height: 320px;
}

.reso-detail-price {
    font-size: 28px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 8px;
}

.reso-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 24px;
    margin: 20px 0;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
}

.reso-detail-row { display: flex; flex-direction: column; }
.reso-detail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #7f8c8d; }
.reso-detail-value { font-size: 15px; font-weight: 600; color: #2c3e50; }

.reso-detail-remarks { margin-top: 24px; }
.reso-detail-remarks h3 { font-size: 16px; border-bottom: 2px solid #e8ecf0; padding-bottom: 8px; }

/* ── Search form ──────────────────────────────────────────────── */
.reso-search-wrap { margin: 20px 0; }

.reso-search-form { background: #f9fafb; border: 1px solid #ddd; border-radius: 8px; padding: 20px; }

.reso-search-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.reso-input {
    flex: 1 1 140px;
    padding: 9px 12px;
    border: 1px solid #c3c4c7;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
}
.reso-input:focus { border-color: #2271b1; outline: none; box-shadow: 0 0 0 2px rgba(34,113,177,.2); }

.reso-btn-search {
    padding: 9px 24px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.reso-btn-search:hover { background: #1a252f; }

#reso-search-results { margin-top: 20px; }
