/* EPB Listings Demo: front end */
:root { --epb-navy: #1E3A5F; --epb-gold: #B08A3E; --epb-ink: #1B2230; --epb-muted: #5A6578; --epb-line: #D5DCE6; --epb-wa: #1F8F4E; }

.epb-badge { display: inline-block; padding: 4px 10px; border-radius: 3px; font-size: 13px; font-weight: 600; letter-spacing: .02em; background: #E8EDF3; color: var(--epb-navy); }
.epb-badge-for-sale { background: var(--epb-navy); color: #fff; }
.epb-badge-under-contract { background: var(--epb-gold); color: #fff; }
.epb-badge-sold { background: #5A6578; color: #fff; }
.epb-badge-for-rent { background: #2F6F8F; color: #fff; }
.epb-badge-rented { background: #8FA3BC; color: #fff; }

.epb-wa { display: inline-flex; align-items: center; gap: 8px; background: var(--epb-wa); color: #fff !important; text-decoration: none !important; font-weight: 600; border-radius: 4px; }
.epb-wa:hover { background: #17733E; }
.epb-wa-large { padding: 12px 20px; font-size: 16px; margin: 8px 0 24px; }
.epb-wa-small { padding: 6px 12px; font-size: 14px; margin-top: 10px; }
.epb-wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 50; padding: 12px 18px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.2); font-size: 15px; }
@media (max-width: 600px) { .epb-wa-float span { display: none; } .epb-wa-float { padding: 14px; } }

/* Single listing */
.epb-single-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.epb-price { font-size: 1.6em; font-weight: 700; color: var(--epb-navy); }
.epb-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-auto-rows: 180px; gap: 8px; margin-bottom: 24px; }
.epb-gallery-item { display: block; overflow: hidden; border-radius: 4px; }
.epb-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.epb-gallery-item:hover img { transform: scale(1.03); }
.epb-gallery-main { grid-row: span 2; }
.epb-gallery[data-count="1"] { grid-template-columns: 1fr; grid-auto-rows: 360px; }
.epb-gallery[data-count="1"] .epb-gallery-main { grid-row: auto; }
@media (max-width: 700px) { .epb-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 140px; } .epb-gallery-main { grid-column: 1 / -1; grid-row: auto; } }

.epb-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--epb-line); border-left: 1px solid var(--epb-line); margin: 0 0 16px; }
.epb-facts div { padding: 10px 14px; border-right: 1px solid var(--epb-line); border-bottom: 1px solid var(--epb-line); }
.epb-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--epb-muted); margin: 0; }
.epb-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--epb-ink); }
.epb-features { columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .epb-features { columns: 1; } }
.epb-map { width: 100%; height: 320px; border: 0; border-radius: 4px; }
.epb-back { margin-top: 28px; }

.epb-lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,18,30,.92); display: flex; align-items: center; justify-content: center; }
.epb-lightbox[hidden] { display: none; }
.epb-lightbox img { max-width: 88vw; max-height: 86vh; }
.epb-lightbox button { position: absolute; background: none; border: 0; color: #fff; font-size: 44px; cursor: pointer; padding: 10px 18px; }
.epb-lb-close { top: 10px; right: 10px; }
.epb-lb-prev { left: 10px; }
.epb-lb-next { right: 10px; }

/* Listings page */
.epb-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 16px; background: #F6F8FB; border: 1px solid var(--epb-line); border-radius: 4px; margin-bottom: 12px; }
.epb-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--epb-muted); flex: 1 1 140px; }
.epb-filters .epb-filter-q { flex: 2 1 220px; }
.epb-filters input, .epb-filters select { padding: 8px 10px; border: 1px solid var(--epb-line); border-radius: 3px; font-size: 15px; background: #fff; color: var(--epb-ink); }
.epb-filters button { padding: 10px 22px; background: var(--epb-navy); color: #fff; border: 0; border-radius: 3px; font-size: 15px; font-weight: 600; cursor: pointer; }
.epb-filters button:hover { background: #142A45; }
.epb-count { color: var(--epb-muted); margin: 0 0 12px; }
.epb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.epb-card { border: 1px solid var(--epb-line); border-radius: 4px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.epb-card-img { position: relative; display: block; aspect-ratio: 3 / 2; background: #E8EDF3; }
.epb-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.epb-card-img .epb-badge { position: absolute; top: 10px; left: 10px; }
.epb-card-body { padding: 14px 16px 16px; }
.epb-card-code { font-size: 12px; letter-spacing: .08em; color: var(--epb-gold); font-weight: 700; }
.epb-card h3 { margin: 4px 0 6px; font-size: 18px; line-height: 1.3; }
.epb-card h3 a { color: var(--epb-navy); text-decoration: none; }
.epb-card-price { font-weight: 700; color: var(--epb-ink); }
.epb-card-meta { font-size: 14px; color: var(--epb-muted); margin-top: 2px; }

/* Hide blog-style bylines and post navigation on listing pages (block themes) */
.single-epb_listing .wp-block-post-author-name,
.single-epb_listing .wp-block-group:has(> .wp-block-post-author-name),
.single-epb_listing .wp-block-group:has(> .wp-block-post-date),
.single-epb_listing .wp-block-post-navigation-link,
.single-epb_listing .wp-block-group:has(> .wp-block-post-navigation-link),
.single-epb_listing .wp-block-comments { display: none !important; }
