/* CB4Y Header 1.5.4 – Moderne woningoverzichten (switch "listings_modern" / ?cb4y_preview=1).
   CSS only, everything scoped to body.cb4y-lm. Cards inside the already restyled carousels
   (homepage restyle, inner .cb4y-ilist) are excluded so they stay exactly as they are. */
body.cb4y-lm{--lm-ink:#141414;--lm-text:#45423b;--lm-muted:#7d776a;--lm-line:#ebe7de;--lm-soft:#f6f4ef;--lm-yellow:var(--cbh-yellow,#fdef00);--lm-r:16px;--lm-font:var(--cbh-sans,"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif)}

/* ---------- card ---------- */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *){position:relative;background:#fff!important;border:1px solid rgba(20,20,20,.06)!important;border-radius:var(--lm-r)!important;overflow:hidden!important;box-shadow:0 1px 2px rgba(20,20,20,.04),0 10px 28px -6px rgba(20,20,20,.12)!important;transition:transform .25s ease,box-shadow .25s ease;font-family:var(--lm-font)!important;isolation:isolate}
@media (hover:hover){body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *):hover{transform:translateY(-3px);box-shadow:0 2px 4px rgba(20,20,20,.05),0 18px 38px -8px rgba(20,20,20,.2)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *):hover .es-listing__image img{transform:scale(1.035)}}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image{position:relative;overflow:hidden;border-radius:0!important;background:var(--lm-soft)}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image img{display:block;width:100%;object-fit:cover;border-radius:0!important;transition:transform .6s ease}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image a,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image__slider{border-radius:0!important}

/* image slider: small round arrows + clean dots */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-prev,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-next{width:32px!important;height:32px!important;border-radius:50%!important;background:rgba(255,255,255,.92)!important;color:var(--lm-ink)!important;border:0!important;box-shadow:0 2px 10px rgba(0,0,0,.15);display:flex!important;align-items:center;justify-content:center;opacity:0;transition:opacity .2s;z-index:3}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-prev{left:10px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-next{right:10px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-prev .es-icon,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-next .es-icon{color:var(--lm-ink)!important;font-size:14px!important;position:static!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *):hover .slick-prev,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *):hover .slick-next,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .slick-prev:focus-visible,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .slick-next:focus-visible{opacity:1}
@media (hover:none){body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-prev,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .slick-next{opacity:.9}}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-slick-dots{bottom:10px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-slick-dots li button{width:6px!important;height:6px!important;background:rgba(255,255,255,.6)!important;border:0!important;border-radius:50%!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-slick-dots li.slick-active button{background:#fff!important;width:16px!important;border-radius:999px!important}

/* ---------- labels on the photo: pills, one palette ---------- */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badges{top:12px!important;left:12px!important;right:12px!important;display:flex!important;flex-wrap:wrap;gap:6px!important;z-index:4}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge{margin:0!important;padding:5px 11px!important;border-radius:999px!important;background:rgba(255,255,255,.95)!important;border:0!important;box-shadow:0 2px 8px rgba(0,0,0,.14);line-height:1.2!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge a{font:700 .72rem/1.2 var(--lm-font)!important;letter-spacing:.01em;color:var(--lm-ink)!important;text-decoration:none!important;text-transform:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/uitgelicht"]),body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/nieuw/"]){background:var(--lm-yellow)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/luxe-woning"]){background:var(--lm-ink)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/luxe-woning"]) a{color:#fff!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/scherp-geprijsd"]),body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/bijna-uitverkocht"]){background:var(--lm-ink)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/scherp-geprijsd"]) a,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image .es-badge:has(a[href*="/es_label/bijna-uitverkocht"]) a{color:var(--lm-yellow)!important}

/* ---------- content ---------- */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content{padding:0!important;background:#fff}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__inner{padding:16px 18px 4px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__title{margin:0 0 8px!important;font:700 1.08rem/1.25 var(--lm-font)!important;letter-spacing:-.01em;color:var(--lm-ink)!important;text-transform:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__title a{color:inherit!important;text-decoration:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__title a:hover{color:#000!important;text-decoration:underline!important;text-decoration-color:var(--lm-yellow)!important;text-decoration-thickness:3px!important;text-underline-offset:3px}

/* price: "Vanaf" pill before the amount */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content .es-badges{display:flex!important;align-items:center;gap:8px;margin:0 0 12px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-price{font:800 1.18rem/1.2 var(--lm-font)!important;color:var(--lm-ink)!important;letter-spacing:-.015em;margin:0!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content .es-badge--normal{order:-1;margin:0!important;padding:3px 9px!important;border-radius:999px!important;background:var(--lm-soft)!important;border:1px solid var(--lm-line)!important;color:var(--lm-muted)!important;font:700 .7rem/1.3 var(--lm-font)!important;letter-spacing:.02em}

/* icon rows */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta{display:flex!important;flex-wrap:wrap;gap:7px 16px;margin:0 0 12px!important;padding:0!important;list-style:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li{display:inline-flex!important;align-items:center;gap:6px;margin:0!important;padding:0!important;font:500 .86rem/1.35 var(--lm-font)!important;color:var(--lm-text)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li::before{display:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li b{font-weight:800;color:var(--lm-ink)}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta svg{width:15px!important;height:15px!important;flex:none}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta svg path{fill:#a39c86!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li[class*="meta-gebied"],body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li[class*="meta-referentie"]{font-size:.8rem!important;color:var(--lm-muted)!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__meta li[class*="meta-referentie"] b{color:var(--lm-text)}

/* footer line: Nieuwbouw • Appartement */
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__footer{margin:0!important;padding:11px 18px 14px!important;border-top:1px solid var(--lm-line)!important;background:#fff}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__terms{display:flex;flex-wrap:wrap;align-items:center;gap:4px 0;margin:0!important;padding:0!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__terms li,body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__terms a{font:600 .78rem/1.3 var(--lm-font)!important;color:var(--lm-muted)!important;text-decoration:none!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__terms a:hover{color:var(--lm-ink)!important}

/* ---------- list view ---------- */
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *),body.cb4y-lm .es-listings--list-sm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *){margin-bottom:22px!important}
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__right{display:flex!important;flex-direction:column;align-items:flex-end;gap:6px;padding-left:16px}
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__right .es-price{font-size:1.35rem!important}
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__right .es-badge--normal{order:-1}
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-excerpt{margin:0 0 12px!important;font:400 .9rem/1.55 var(--lm-font)!important;color:var(--lm-text)!important}
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__inner{padding:18px 20px 6px!important}

/* keep Estatik's own show/hide per layout (our display rules must not revive hidden parts) */
body.cb4y-lm .es-listings--list .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing--hide-on-list,body.cb4y-lm .es-listings--list-sm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing--hide-on-list{display:none!important}
body.cb4y-lm [class*="es-listings--grid"] .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing--hide-on-grid,body.cb4y-lm .es-properties-slider .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing--hide-on-grid{display:none!important}

/* ---------- toolbar: "135 resultaten", sort, grid/list ---------- */
body.cb4y-lm .es-listings-filter{display:flex!important;flex-wrap:wrap;align-items:center;gap:12px 16px;margin:0 0 24px!important;padding:0 0 18px!important;border-bottom:1px solid var(--lm-line);font-family:var(--lm-font)!important}
body.cb4y-lm .es-listings-filter .es-title{font:800 1.25rem/1.2 var(--lm-font)!important;color:var(--lm-ink)!important;letter-spacing:-.015em;margin:0!important}
body.cb4y-lm .es-listings-filter .es-total{display:inline-flex;align-items:center;padding:5px 12px;border-radius:999px;background:var(--lm-soft);border:1px solid var(--lm-line);font:700 .82rem/1.2 var(--lm-font)!important;color:var(--lm-text)!important;margin:0!important}
body.cb4y-lm .es-listings-filter .es-listings-filter__selects{display:flex!important;align-items:center;gap:12px;margin-left:auto!important}
body.cb4y-lm .es-listings-filter .es-field__sort label{display:flex!important;align-items:center;gap:10px;margin:0!important}
body.cb4y-lm .es-listings-filter .es-field__label{font:600 .84rem/1.2 var(--lm-font)!important;color:var(--lm-muted)!important;white-space:nowrap;margin:0!important}
body.cb4y-lm .es-listings-filter select{-webkit-appearance:none!important;appearance:none!important;height:44px!important;min-width:170px;padding:0 40px 0 18px!important;border:1px solid #dcd7cb!important;border-radius:999px!important;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center!important;font:600 .9rem/1 var(--lm-font)!important;color:var(--lm-ink)!important;box-shadow:0 1px 2px rgba(20,20,20,.04);cursor:pointer;transition:border-color .2s,box-shadow .2s}
body.cb4y-lm .es-listings-filter select:hover{border-color:#bdb6a5!important}
body.cb4y-lm .es-listings-filter select:focus{outline:none!important;border-color:var(--lm-ink)!important;box-shadow:0 0 0 3px rgba(253,239,0,.55)!important}
body.cb4y-lm .es-listings-filter .select2-container .select2-selection{height:44px!important;border:1px solid #dcd7cb!important;border-radius:999px!important;display:flex;align-items:center;padding:0 34px 0 14px}
body.cb4y-lm .es-listings-filter .es-control--layouts{display:flex!important;gap:6px;margin:0!important;padding:0!important;list-style:none!important}
body.cb4y-lm .es-listings-filter .es-control--layouts li{margin:0!important;padding:0!important}
body.cb4y-lm .es-listings-filter .es-control--layouts .es-btn{width:44px!important;height:44px!important;min-width:0!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center;border-radius:12px!important;background:#fff!important;border:1px solid #dcd7cb!important;color:var(--lm-ink)!important;box-shadow:0 1px 2px rgba(20,20,20,.04);transition:background .2s,border-color .2s}
body.cb4y-lm .es-listings-filter .es-control--layouts .es-btn:hover{border-color:var(--lm-ink)!important}
body.cb4y-lm .es-listings-filter .es-control--layouts .es-btn .es-icon{color:inherit!important;font-size:18px!important;margin:0!important}
body.cb4y-lm .es-listings-filter .es-control--layouts .es-btn--active,body.cb4y-lm .es-listings-filter .es-control--layouts .es-btn--active:hover{background:var(--lm-ink)!important;border-color:var(--lm-ink)!important;color:var(--lm-yellow)!important}

/* ---------- pagination ---------- */
body.cb4y-lm .es-pagination ul.page-numbers{display:flex!important;flex-wrap:wrap;justify-content:center;gap:6px;margin:28px 0 8px!important;padding:0!important}
body.cb4y-lm .es-pagination ul li{margin:0!important}
body.cb4y-lm .es-pagination .page-numbers:not(ul){min-width:42px;height:42px;padding:0 12px!important;display:inline-flex!important;align-items:center;justify-content:center;border-radius:999px!important;border:1px solid #dcd7cb!important;background:#fff!important;font:700 .9rem/1 var(--lm-font)!important;color:var(--lm-ink)!important;text-decoration:none!important;box-shadow:none!important}
body.cb4y-lm .es-pagination a.page-numbers:hover{border-color:var(--lm-ink)!important}
body.cb4y-lm .es-pagination .page-numbers.current{background:var(--lm-ink)!important;border-color:var(--lm-ink)!important;color:var(--lm-yellow)!important}
body.cb4y-lm .es-pagination .page-numbers.dots{border:0!important;background:none!important;min-width:24px}

/* ---------- mobile ---------- */
@media (max-width:720px){
body.cb4y-lm{--lm-r:14px}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__content__inner{padding:14px 15px 2px!important}
body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__footer{padding:10px 15px 12px!important}
body.cb4y-lm .es-listings-filter{gap:10px 12px}
body.cb4y-lm .es-listings-filter .es-title{width:100%}
body.cb4y-lm .es-listings-filter .es-listings-filter__selects{width:100%;margin-left:0!important;justify-content:space-between}
body.cb4y-lm .es-listings-filter .es-field__sort .es-field__label{display:none!important}
body.cb4y-lm .es-listings-filter select{min-width:0;width:100%}
body.cb4y-lm .es-listings-filter .es-listings-filter__selects .es-form{flex:1}
}
/* safety net: one card per row on small screens (Estatik normally switches to grid-1 via JS) */
@media (max-width:540px){body.cb4y-lm .es-listings[class*="es-listings--grid"]:not(.es-properties-slider){grid-template-columns:1fr!important}}
@media (prefers-reduced-motion:reduce){body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *),body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *) .es-listing__image img{transition:none!important}body.cb4y-lm .es-listing:not(.cb4y-ilist *):not(.cb4y-restyle .es-properties-slider *):hover{transform:none}}

/* 1.5.7: "Ref. nr." label on every card (same as the site's own card-label snippet, so it also works without it) */
body.cb4y-lm .es-listing .es-listing__meta-referentie-nummer>span>span{display:none!important}
body.cb4y-lm .es-listing .es-listing__meta-referentie-nummer>span>b::before{content:"Ref. nr. ";font-weight:400}
body.cb4y-lm .es-listing .es-listing__meta li.es-listing__meta-referentie-nummer{display:inline-flex!important}
/* 1.5.7: a card photo that cannot be loaded (file missing on the server) shows a neutral panel instead of an empty area */
body.cb4y-lm .es-listing .slick-slide:has(img.slick-lazyload-error){position:relative;background:#efe9dc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a59c88' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h3l2-2.5h6L17 7h3a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1z'/%3E%3Ccircle cx='12' cy='13' r='3.6'/%3E%3C/svg%3E") center calc(50% - 12px)/40px no-repeat!important}
body.cb4y-lm .es-listing .slick-slide:has(img.slick-lazyload-error)::after{content:"Geen foto beschikbaar";position:absolute;left:0;right:0;top:calc(50% + 18px);text-align:center;font:600 .82rem/1.3 var(--lm-font,inherit);color:#7a7262;pointer-events:none}
body.cb4y-lm .es-listing img.slick-lazyload-error{visibility:hidden}
