/* ═══════════════════════════════════════════════════
   Prestige Realty Listings — listings.css
   ═══════════════════════════════════════════════════ */

.prl-wrap {
    --prl-accent:       #C8A96A;
    --prl-dark:         #12192c;
    --prl-mid:          #1e2d3d;
    --prl-radius:       10px;
    --prl-border:       #e2e8f0;
    --prl-shadow:       0 1px 3px rgba(0,0,0,.05), 0 4px 14px rgba(0,0,0,.06);
    --prl-shadow-hover: 0 8px 36px rgba(0,0,0,.14);
    /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;*/
    font-size: 15px;
    color: #1a1a2e;
    margin: 0 0 2rem;
    box-sizing: border-box;
}
.prl-wrap *, .prl-wrap *::before, .prl-wrap *::after { box-sizing: inherit; }

/* ── Notices ── */
.prl-notice {
    padding: 11px 16px;
    border-radius: var(--prl-radius);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid;
}
.prl-notice--warn { background: #fff8e1; border-color: #f5c242; color: #7a5a00; }
.prl-notice--info { background: #e8f0fe; border-color: #7aadfa; color: #1a4a8a; }
.prl-notice a     { color: inherit; font-weight: 600; }

/* ── Hero Search Bar ── */
.prl-search-bar {
    background: linear-gradient(140deg, #12192c 0%, #1e2d3d 100%);
    padding: 32px 36px 26px;
    border-radius: 14px 14px 0 0;
    border-bottom: 1px solid rgba(200,169,106,.2);
}
.prl-search-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--prl-accent);
    margin-bottom: 7px;
}
.prl-search-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 22px;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.prl-search-inner {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.prl-input,
.prl-select {
    height: 46px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 8px;
    padding: 0 16px;
    font-size: 14px;
    background: rgba(255,255,255,.08);
    color: #fff;
    outline: none;
    transition: border-color .15s, background .15s;
}
.prl-input           { flex: 1; min-width: 200px; }
.prl-input:focus,
.prl-select:focus    { border-color: var(--prl-accent); background: rgba(255,255,255,.13); }
.prl-input::placeholder { color: rgba(255,255,255,.38); }
.prl-select          { min-width: 150px; cursor: pointer; }
.prl-select option   { background: #1e2d3d; color: #fff; }
.prl-btn {
    height: 46px;
    padding: 0 28px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    letter-spacing: .02em;
}
.prl-btn--primary       { background: var(--prl-accent); color: #12192c; }
.prl-btn--primary:hover { opacity: .88; transform: translateY(-1px); }

/* ── Body ── */
.prl-body {
    display: flex;
    align-items: flex-start;
    border: 1px solid var(--prl-border);
    border-top: none;
    background: #f5f7fb;
}

.prl-listings-panel {
    flex: 1;
    min-width: 0;
    padding: 22px;
    position: relative;
}

.prl-map-panel {
    width: 42%;
    min-width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 640px;
    border-left: 1px solid var(--prl-border);
    background: #dde3ef;
}
#prl-map { width: 100%; height: 640px; display: block; }
.prl-map-pin { background: none !important; border: none !important; }

/* ── Toolbar ── */
.prl-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}
.prl-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.prl-filter {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1.5px solid #dde1ea;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    transition: all .15s;
    letter-spacing: .01em;
}
.prl-filter:hover  { border-color: #aab2c8; color: #374151; }
.prl-filter.active { background: var(--prl-dark); color: #fff; border-color: var(--prl-dark); }
.prl-result-meta   { font-size: 12px; color: #9ca3af; white-space: nowrap; font-weight: 500; }

/* ── Card Grid (2-column) ── */
.prl-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ── Card ── */
.prl-card {
    background: #fff;
    border-radius: var(--prl-radius);
    overflow: hidden;
    border: 1px solid var(--prl-border);
    box-shadow: var(--prl-shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.prl-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--prl-shadow-hover);
    border-color: #c5cede;
}
.prl-card--featured {
    border: 2px solid var(--prl-accent);
}
.prl-card--active {
    border: 2px solid var(--prl-dark);
    box-shadow: 0 0 0 3px rgba(18,25,44,.1);
}

/* Card image — full-width top */
.prl-card-img {
    position: relative;
    width: 100%;
    min-width: 0;
    height: 195px;
    overflow: hidden;
    background: #e4eaf4;
    flex-shrink: 0;
}
.prl-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.prl-card:hover .prl-card-img img { transform: scale(1.07); }
.prl-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0cbdc;
}

/* Badges — pill style */
.prl-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: .06em;
    z-index: 1;
}
.prl-badge--sale     { background: rgba(22,101,52,.88); color: #fff; }
.prl-badge--rent     { background: rgba(30,64,175,.88); color: #fff; }
.prl-badge--comm     { background: rgba(120,53,15,.88); color: #fff; }
.prl-badge--featured { left: auto; right: 10px; background: var(--prl-accent); color: #12192c; font-weight: 800; }

/* Card body */
.prl-card-body {
    padding: 15px 17px 17px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.prl-price {
    font-size: 20px;
    font-weight: 800;
    color: #12192c;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 4px;
}
.prl-address {
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.45;
    margin-bottom: 11px;
}
.prl-card-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f2f7;
    margin-bottom: 10px;
}
.prl-card-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #4b5563;
    font-weight: 600;
}
.prl-card-stat svg { color: #9ca3af; flex-shrink: 0; }
.prl-meta {
    font-size: 12px;
    color: #9ca3af;
    padding-top: 10px;
    border-top: 1px solid #f0f2f7;
    margin-bottom: 10px;
}
.prl-view-details {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--prl-accent);
    text-transform: uppercase;
    letter-spacing: .07em;
    cursor: pointer;
    margin-top: auto;
}
.prl-view-details:hover { text-decoration: underline; }

/* ── Load more ── */
.prl-load-more-wrap {
    text-align: center;
    padding: 26px 0 6px;
}
.prl-load-more {
    padding: 13px 52px;
    background: #fff;
    color: var(--prl-dark);
    border: 2px solid var(--prl-dark);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, color .15s;
    letter-spacing: .04em;
}
.prl-load-more:hover   { background: var(--prl-dark); color: #fff; }
.prl-load-more.hidden  { display: none; }

/* ── Empty state ── */
.prl-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    background: #fff;
    border-radius: var(--prl-radius);
    border: 1px solid var(--prl-border);
}
.prl-empty strong { color: #374151; }

/* ── Loading overlay ── */
.prl-loading {
    display: none;
    position: absolute;
    inset: 0;
    background: rgba(245,247,251,.9);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: #6b7280;
    z-index: 10;
    border-radius: var(--prl-radius);
}
.prl-loading.active { display: flex; }
.prl-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--prl-accent);
    border-radius: 50%;
    animation: prl-spin .7s linear infinite;
}
@keyframes prl-spin { to { transform: rotate(360deg); } }

/* ── Legend ── */
.prl-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding: 11px 24px;
    background: #fff;
    border: 1px solid var(--prl-border);
    border-top: none;
    border-radius: 0 0 14px 14px;
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}
.prl-legend-item { display: flex; align-items: center; gap: 7px; }
.prl-legend-dot  { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Map info window ── */
.prl-info-window {
    /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;*/
    font-size: 13px;
    min-width: 200px;
    line-height: 1.5;
    padding: 4px 2px 2px;
}
.prl-info-window .piw-price   { font-size: 16px; font-weight: 800; color: #12192c; letter-spacing: -.02em; }
.prl-info-window .piw-address { font-size: 12px; color: #6b7280; margin: 3px 0 5px; }
.prl-info-window .piw-meta    { font-size: 12px; color: #9ca3af; }
.prl-info-window .piw-link    { display: inline-block; margin-top: 9px; font-size: 12px; font-weight: 700; color: var(--prl-accent, #C8A96A); text-decoration: none; }
.prl-info-window .piw-detail-btn { background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }

/* ══════════════════════════════════════════
   Property Detail Modal
   ══════════════════════════════════════════ */

.prl-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5,10,20,.78);
    z-index: 99999;
    overflow-y: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px 60px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.prl-modal-overlay.active { opacity: 1; pointer-events: auto; }

.prl-modal {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 880px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 32px 96px rgba(0,0,0,.45);
    transform: translateY(28px) scale(.98);
    transition: transform .28s cubic-bezier(.22,.68,0,1.2);
}
.prl-modal-overlay.active .prl-modal { transform: translateY(0) scale(1); }

.prl-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    z-index: 10;
    width: 36px; height: 36px;
    background: rgba(0,0,0,.48);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s;
}
.prl-modal-close:hover { background: rgba(0,0,0,.78); }

/* Gallery loading */
.prl-gallery-loading {
    width: 100%;
    height: 460px;
    background: #0d1421;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.prl-gallery-loading span { font-size: 13px; color: rgba(255,255,255,.3); }
.prl-gallery-loading-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--prl-accent, #C8A96A);
    border-radius: 50%;
    animation: prl-spin .7s linear infinite;
}

/* Gallery */
.prl-modal-gallery  { width: 100%; background: #0d1421; }
.prl-gallery-main   {
    width: 100%;
    height: 460px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1421;
}
.prl-gallery-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.prl-gallery-thumbs {
    display: flex;
    gap: 4px;
    padding: 5px 6px;
    overflow-x: auto;
    background: #060c18;
    scrollbar-width: thin;
    scrollbar-color: #2a3450 #060c18;
}
.prl-gallery-thumbs:empty { display: none; }
.prl-gallery-thumb {
    width: 90px;
    height: 62px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: .5;
    transition: opacity .15s;
    flex-shrink: 0;
    border: 2px solid transparent;
}
.prl-gallery-thumb:hover  { opacity: .8; }
.prl-gallery-thumb.active { opacity: 1; border-color: var(--prl-accent); }
.prl-gallery-placeholder  {
    width: 100%;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f7f8fc;
    gap: 8px;
}
.prl-gallery-placeholder span { font-size: 13px; color: #9ca3af; }

/* Modal content */
.prl-modal-content  { padding: 26px 30px 32px; }

.prl-modal-header   {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f2f7;
}
.prl-modal-price    { font-size: 28px; font-weight: 800; color: #12192c; line-height: 1.15; letter-spacing: -.03em; }
.prl-modal-address  { font-size: 14px; color: #6b7280; margin-top: 5px; line-height: 1.4; }

/* Stats row */
.prl-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.prl-modal-stat {
    background: #f5f7fb;
    border-radius: 8px;
    text-align: center;
    padding: 13px 8px;
    border: 1px solid #e8ecf5;
}
.prl-stat-value { font-size: 17px; font-weight: 800; color: #12192c; display: block; letter-spacing: -.01em; }
.prl-stat-label { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; display: block; font-weight: 600; }

.prl-modal-section         { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid #f0f2f7; }
.prl-modal-section-title   { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: #9ca3af; margin: 0 0 12px; }
.prl-modal-desc-text       { font-size: 14px; color: #4b5563; line-height: 1.75; margin: 0; }

.prl-modal-details         { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.prl-detail-item           { background: #f5f7fb; border-radius: 7px; padding: 11px 14px; border: 1px solid #e8ecf5; }
.prl-detail-label          { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 4px; font-weight: 600; }
.prl-detail-value          { font-size: 14px; font-weight: 700; color: #12192c; }

/* Contact block */
.prl-modal-contact {
    background: #faf8f4;
    border-radius: var(--prl-radius);
    padding: 22px 24px;
    margin-top: 4px;
    border-left: 3px solid var(--prl-accent);
}
.prl-modal-contact .prl-modal-section-title { margin-bottom: 16px; }
.prl-contact-info    { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.prl-contact-agent   { flex: 1; min-width: 200px; }
.prl-contact-name    { font-size: 16px; font-weight: 700; color: #12192c; }
.prl-contact-role    { font-size: 13px; color: #9ca3af; margin-top: 2px; }
.prl-contact-links   { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; }
.prl-contact-link    { font-size: 14px; color: #374151; text-decoration: none; display: flex; align-items: center; gap: 8px; transition: color .15s; }
.prl-contact-link:hover { color: var(--prl-accent); }
.prl-contact-cta-wrap { flex-shrink: 0; }
.prl-contact-cta {
    display: inline-block;
    padding: 13px 30px;
    background: var(--prl-accent);
    color: #12192c;
    font-weight: 700;
    font-size: 14px;
    border-radius: 100px;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
    letter-spacing: .02em;
}
.prl-contact-cta:hover { opacity: .88; transform: translateY(-1px); }

/* ── Responsive ── */
@media (max-width: 960px) {
    .prl-map-panel { width: 40%; min-width: 260px; }
    .prl-grid      { grid-template-columns: 1fr; }
    .prl-card-img  { height: 210px; }
}
@media (max-width: 700px) {
    .prl-body           { flex-direction: column-reverse; align-items: stretch; }
    .prl-map-panel      { width: 100%; height: 300px; position: relative; border-left: none; border-bottom: 1px solid var(--prl-border); }
    .prl-search-bar     { padding: 24px 20px 20px; border-radius: 10px 10px 0 0; }
    .prl-search-title   { font-size: 18px; margin-bottom: 16px; }
    .prl-search-inner   { flex-direction: column; }
    .prl-input, .prl-select, .prl-btn { width: 100%; }
    .prl-grid           { grid-template-columns: 1fr; gap: 12px; }
    .prl-toolbar        { flex-direction: column; align-items: flex-start; gap: 8px; }
    .prl-modal-overlay  { padding: 0; align-items: stretch; }
    .prl-modal          { border-radius: 0; max-width: 100%; min-height: 100dvh; }
    .prl-gallery-loading { height: 260px; }
    .prl-gallery-main   { height: 260px; }
    .prl-modal-content  { padding: 20px 18px 28px; }
    .prl-modal-header   { flex-direction: column; align-items: flex-start; padding-bottom: 16px; }
    .prl-modal-stats    { display: none; }
    .prl-contact-info   { flex-direction: column; align-items: flex-start; }
    .prl-contact-cta-wrap { width: 100%; }
    .prl-contact-cta    { width: 100%; text-align: center; display: block; }
}
@media (max-width: 480px) {
    .prl-search-eyebrow { display: none; }
    .prl-card-img       { height: 180px; }
}
