/* ============================================================
   Glyphora — Explore Properties Page
   Reuses vars from buyer.css (loaded first in layout).
   ============================================================ */

/* ── Page Shell ─────────────────────────────────────────────────────── */
.explore-page {
    padding-top: 82px;
    min-height: 100vh;
}

/* ── Full-width layout wrapper ──────────────────────────────────────── */
.explore-layout {
    max-width: var(--buyer-container);
    margin: 0 auto;
    padding: 28px 28px 80px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

/* ══════════════════════════════════════════════════════════
   LEFT SIDEBAR  — no internal scroll, all filters visible
══════════════════════════════════════════════════════════ */
.explore-sidebar {
    background: rgba(22, 32, 50, 0.65);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 12px 12px 60px;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* NO max-height, NO overflow — no internal scrollbar */
}

/* Sidebar top row */
.explore-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.explore-sidebar-heading {
    font-size: 13px;
    font-weight: 700;
    color: var(--buyer-text);
    margin: 0;
}
.explore-reset-btn {
    font-size: 11px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}
.explore-reset-btn:hover { color: var(--buyer-accent); }

/* ── Filter section ─────────────────────────────────────────────────── */
.explore-filter-section {
    padding: 0 0 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.045);
}
.explore-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.explore-filter-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--buyer-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 10px;
    display: block;
}

/* ── Generic chip row (wrapping) ─────────────────────────────────────── */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 11px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
    line-height: 1.5;
}
.filter-chip img {
    width: 14px; height: 14px; flex-shrink: 0;
    filter: brightness(0) invert(1); opacity: .45;
    transition: filter 0.18s, opacity 0.18s;
}
.filter-chip:hover { border-color: rgba(255,255,255,0.2); color: var(--buyer-text); }
.filter-chip:hover img { opacity: .75; }
.filter-chip.active {
    background: rgba(215,178,157,0.12);
    border-color: rgba(215,178,157,0.45);
    color: var(--buyer-accent);
    font-weight: 600;
}
.filter-chip.active img {
    filter: brightness(0) saturate(200%) invert(76%) sepia(24%) saturate(500%) hue-rotate(320deg);
    opacity: 1;
}

/* ── Search input (area search) ──────────────────────────────────────── */
.filter-search-wrap {
    position: relative;
    margin-bottom: 5px;
}
.filter-search-wrap i {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--buyer-text-muted);
    font-size: 10px;
    pointer-events: none;
}
.filter-search-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 7px;
    padding: 5px 8px 5px 24px;
    font-size: 11px;
    color: var(--buyer-text);
    font-family: var(--buyer-font);
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.filter-search-input::placeholder { color: var(--buyer-text-muted); }
.filter-search-input:focus { border-color: rgba(215,178,157,0.35); }

/* ── Property Category — tab box ─────────────────────────────────────── */
.filter-cat-box {
    display: flex;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 8px;
    overflow: hidden;
    padding: 3px;
    gap: 2px;
}
.filter-cat-btn {
    flex: 1;
    padding: 5px 2px;
    border-radius: 6px;
    border: none;
    background: none;
    font-size: 9px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.18s;
    white-space: nowrap;
}
.filter-cat-btn.active {
    background: rgba(255,255,255,0.09);
    color: var(--buyer-text);
    font-weight: 700;
}
.filter-cat-btn:hover:not(.active) { color: var(--buyer-text); }

/* ── Budget price range chips ────────────────────────────────────────── */
.filter-budget-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
}

/* ── Min / Max price inputs (2-col) ──────────────────────────────────── */
.filter-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.filter-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 7px;
    padding: 5px 6px;
    font-size: 10px;
    color: var(--buyer-text);
    font-family: var(--buyer-font);
    outline: none;
    transition: border-color 0.2s;
    text-align: center;
    box-sizing: border-box;
}
.filter-input::placeholder { color: var(--buyer-text-muted); font-size: 9px; }
.filter-input:focus { border-color: rgba(215,178,157,0.35); }

/* ── Beds / Baths pills ──────────────────────────────────────────────── */
.filter-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.filter-pill {
    min-width: 28px;
    height: 26px;
    padding: 0 7px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    font-size: 10px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}
.filter-pill.active {
    border-color: var(--buyer-accent);
    background: rgba(215,178,157,0.12);
    color: var(--buyer-accent);
    font-weight: 600;
}
.filter-pill:hover:not(.active) { border-color: rgba(255,255,255,0.2); color: var(--buyer-text); }

/* ── Sort By chips ───────────────────────────────────────────────────── */
.filter-sort-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.filter-sort-chip {
    padding: 8px 28px;
    border-radius: 241px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 11px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    cursor: pointer;
    transition: all 0.18s;
    white-space: nowrap;
}
.filter-sort-chip.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
    color: var(--buyer-text);
    font-weight: 600;
}
.filter-sort-chip:hover:not(.active) { border-color: rgba(255,255,255,0.2); color: var(--buyer-text); }

/* ══════════════════════════════════════════════════════════
   RIGHT — RESULTS AREA
══════════════════════════════════════════════════════════ */
.explore-results {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Page header: title + sort */
.explore-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.explore-results-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--buyer-text);
    margin: 0;
}
.explore-results-title span {
    font-size: 13px;
    font-weight: 400;
    color: var(--buyer-text-muted);
    margin-left: 8px;
}
.explore-sort-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.explore-sort-label {
    font-size: 12px;
    color: var(--buyer-text-muted);
    white-space: nowrap;
}
.explore-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.05) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 16 16'%3E%3Cpath fill='%238a95a7' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 7px 28px 7px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--buyer-text);
    font-family: var(--buyer-font);
    cursor: pointer;
    outline: none;
    min-width: 130px;
}
.explore-sort-select option { background: #162032; color: var(--buyer-text); }

/* ── Property List ───────────────────────────────────────────────────── */
.explore-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ══════════════════════════════════════════════════════════
   EXPLORE CARD  — horizontal list card (image left, content right)
   Completely independent from .property-card
══════════════════════════════════════════════════════════ */
.ec {
    display: flex;
    flex-direction: row;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
    min-height: 170px;
    position: relative;
}
.ec:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.18);
}

/* ── Image panel ─────────────────────────────────────────────────────── */
.ec-img {
    width: 220px;
    min-width: 220px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.ec-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.38s;
}
.ec:hover .ec-img img { transform: scale(1.05); }

/* Delivery badge */
.ec-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}
.ec-badge--ready    { background: rgba(52,199,89,0.22); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.ec-badge--offplan  { background: rgba(215,178,157,0.18); color: var(--buyer-accent); border: 1px solid rgba(215,178,157,0.3); }

/* Wishlist button */
.ec-wish {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s;
}
.ec-wish:hover, .ec-wish.active { background: rgba(229,115,115,0.75); }

/* ── Content panel ───────────────────────────────────────────────────── */
.ec-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 18px 14px 16px;
    gap: 0;
}

.ec-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--buyer-text);
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ec-location {
    font-size: 12px;
    color: var(--buyer-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}
.ec-location i { font-size: 10px; color: var(--buyer-accent); }

/* Specs row */
.ec-specs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
}
.ec-spec {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--buyer-text-muted);
}
.ec-spec svg { flex-shrink: 0; }

/* Amenities */
.ec-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}
.ec-amenity {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    font-size: 10px;
    font-weight: 400;
    color: var(--buyer-text-muted);
    white-space: nowrap;
}

/* Footer: price + arrow */
.ec-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
}
.ec-price-block { display: flex; flex-direction: column; gap: 1px; }
.ec-price {
    display: flex;
    align-items: baseline;
    gap: 3px;
}
.ec-price-currency,
.ec-price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #C8A68D;
    letter-spacing: -0.3px;
}
.ec-time {
    font-size: 11px;
    color: var(--buyer-text-muted);
    margin-top: 1px;
}
.ec-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--buyer-text);
    font-size: 14px;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.ec:hover .ec-arrow {
    background: var(--buyer-accent);
    border-color: var(--buyer-accent);
    color: var(--buyer-bg);
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) { .ec-img { width: 185px; min-width: 185px; } }
@media (max-width: 560px) {
    .ec { flex-direction: column; min-height: unset; }
    .ec-img { width: 100%; min-width: unset; height: 180px; }
    .ec-img img { position: absolute; }
}

/* ── Pagination ──────────────────────────────────────────────────────── */
.explore-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-top: 30px;
}
.explore-page-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.03);
    font-size: 12px;
    font-weight: 500;
    color: var(--buyer-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.explore-page-btn.active {
    background: var(--buyer-accent);
    border-color: var(--buyer-accent);
    color: var(--buyer-bg);
    font-weight: 700;
}
.explore-page-btn:hover:not(.active):not(:disabled) { border-color: rgba(255,255,255,0.2); color: var(--buyer-text); }
.explore-page-btn:disabled { opacity: 0.3; cursor: default; }
.explore-page-dots { color: var(--buyer-text-muted); font-size: 13px; padding: 0 2px; }

/* ── Empty State ─────────────────────────────────────────────────────── */
.explore-empty { text-align: center; padding: 60px 20px; }
.explore-empty i { font-size: 40px; color: var(--buyer-text-muted); opacity: 0.35; display: block; margin-bottom: 14px; }
.explore-empty h3 { font-size: 16px; font-weight: 600; color: var(--buyer-text); margin-bottom: 6px; }
.explore-empty p { font-size: 13px; color: var(--buyer-text-muted); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .explore-layout { grid-template-columns: 200px 1fr; gap: 18px; }
}
@media (max-width: 800px) {
    .explore-layout { grid-template-columns: 1fr; padding: 20px 16px 60px; }

    /* Sidebar becomes a fixed left-drawer on mobile */
    .explore-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        width: 88vw;
        max-width: 340px;
        z-index: 1100;
        border-radius: 0 20px 20px 0;
        overflow-y: auto;
        transform: translateX(-110%);
        transition: transform 0.32s cubic-bezier(.4,0,.2,1);
        display: flex !important;      /* always in DOM — controlled by transform */
        padding-bottom: 80px;
    }
    .explore-sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* ── Mobile backdrop ─────────────────────────────────────────────────── */
.explore-mob-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1099;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.explore-mob-backdrop.visible {
    display: block;
    opacity: 1;
}

/* ── Mobile: close button inside sidebar ───────────────────────────── */
.explore-sidebar-close {
    display: none;
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
    flex-shrink: 0;
}
.explore-sidebar-close:hover { background: rgba(255,255,255,0.14); color: #fff; }
@media (max-width: 800px) {
    .explore-sidebar-close { display: flex; }
}

/* ── Mobile: "Filters" trigger button above results ─────────────────── */
.explore-mob-filter-btn {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: var(--buyer-text);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--buyer-font);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.explore-mob-filter-btn:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.22);
}
.explore-mob-filter-btn .emfb-badge {
    background: var(--buyer-accent);
    color: #0a1929;
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 1px 6px;
    display: none;
}
.explore-mob-filter-btn .emfb-badge.has-filters { display: inline-block; }
@media (max-width: 800px) {
    .explore-mob-filter-btn { display: inline-flex; }
}

/* ── Results wrap (holds mobile trigger + results) ───────────────────── */
.explore-results-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Results loading overlay ─────────────────────────────────────────── */
.explore-results {
    position: relative;
}
.explore-results-loader {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, 0.72);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: 12px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}
.explore-results-loader.visible {
    opacity: 1;
    pointer-events: all;
}
.explore-results-loader-spinner {
    width: 38px;
    height: 38px;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--buyer-accent);
    border-radius: 50%;
    animation: explore-spin 0.65s linear infinite;
}
@keyframes explore-spin { to { transform: rotate(360deg); } }

/* ── Apply Filters button ────────────────────────────────────────────── */
.explore-apply-btn {
    width: 100%; padding: 10px 16px; border: none; border-radius: 10px;
    background: var(--buyer-accent, #2e7d9a); color: #fff;
    font-size: 13px; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 7px;
    transition: opacity .15s;
}
.explore-apply-btn:hover { opacity: .88; }

/* ── Pagination links ────────────────────────────────────────────────── */
.explore-pagination a.explore-page-btn {
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
