/* Shared UI enhancements: clickable cards, map toggle, pin previews, detail layout. */
.listing-card, .kenya-property-card, .property-card { position: relative; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.listing-card:hover, .kenya-property-card:hover, .property-card:hover { box-shadow: 0 10px 24px rgba(15,23,42,.12); transform: translateY(-2px); }
.listing-card h3 a::after, .kenya-property-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.listing-card a:not(h3 a), .kenya-property-card a:not(h3 a), .listing-card button, .kenya-property-card button { position: relative; z-index: 2; }

.nke-map-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.nke-map-head > h2 { margin-bottom: 0 !important; }
.nke-map-toggle { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; margin: 0 0 12px; }
.nke-map-head .nke-map-toggle { margin: 0; }
.nke-map-toggle button { border: 0; background: transparent; color: #334155; font: 600 14px/1 "Plus Jakarta Sans", system-ui, sans-serif; padding: 9px 16px; border-radius: 999px; cursor: pointer; }
.nke-map-toggle button:hover { background: #e2e8f0; }
.nke-map-toggle button[aria-pressed="true"] { background: var(--nke-green); color: #fff; box-shadow: 0 2px 6px rgba(21,128,61,.35); }

.nke-price-pin { background: transparent; border: 0; }
.nke-price-pin span { display: inline-block; white-space: nowrap; transform: translate(-50%, -100%); background: var(--nke-green); color: #fff; font: 700 12px/1 "Plus Jakarta Sans", system-ui, sans-serif; padding: 6px 9px; border-radius: 999px; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); cursor: pointer; position: relative; }
.nke-price-pin span::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--nke-green); border-bottom: 0; }
.nke-price-pin:hover span, .nke-price-pin:focus span { background: var(--nke-black); z-index: 1000; }
.nke-price-pin:hover span::after { border-top-color: var(--nke-black); }
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 12px; }
a.nke-pin-popup, div.nke-pin-popup { display: block; min-width: 220px; color: var(--nke-black) !important; text-decoration: none; font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.nke-pin-popup img, .nke-pin-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 120px; object-fit: cover; margin: 0; border-radius: 0; background: var(--nke-green-soft); color: var(--nke-green); font-size: 18px; }
.nke-pin-text { display: block; padding: 10px 12px 12px; }
.nke-pin-text strong { display: block; color: var(--nke-green); font-size: 16px; margin-bottom: 2px; }
.nke-pin-title { display: block; font-weight: 600; font-size: 13px; line-height: 1.3; }
.nke-pin-where, .nke-pin-note { display: block; color: #64748b; font-size: 12px; margin-top: 3px; }
.nke-pin-cta { display: block; margin-top: 6px; color: var(--nke-green); font-weight: 700; font-size: 13px; }

.nke-detail-wrap { padding-top: 20px; padding-bottom: 40px; }
.nke-detail-crumbs { margin: 0 0 14px; font-size: 14px; color: #475569; display: flex; flex-wrap: wrap; gap: 6px; }
.nke-detail-crumbs a { color: var(--nke-green); }
.nke-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.nke-detail-main-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.nke-detail-main-card .detail-gallery { margin: 0; border-radius: 0; }
.nke-detail-main-card .detail-gallery-primary { display: flex; width: 100%; height: 440px; object-fit: contain; border-radius: 0; background: var(--nke-black); }
.nke-detail-thumbs { display: flex; gap: 8px; padding: 12px 16px 0; overflow-x: auto; }
.nke-detail-thumb { flex: 0 0 auto; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.nke-detail-thumb.is-active { border-color: var(--nke-green); }
.nke-detail-thumb img { display: block; width: 88px; height: 64px; object-fit: cover; }
.nke-detail-body { padding: 18px 20px 22px; }
.nke-detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.nke-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--nke-green-soft); color: #075985; }
.nke-badge-warn { background: var(--nke-red-soft); color: var(--nke-red-dark); }
.nke-badge-ok { background: var(--nke-green-soft); color: var(--nke-green); }
.nke-detail-titlerow { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.nke-detail-titlerow h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.25; color: var(--nke-black); }
.nke-detail-price { margin: 0; white-space: nowrap; font-size: 26px; font-weight: 800; color: var(--nke-green); }
.nke-detail-body .detail-location { color: #475569; margin: 6px 0 2px; }
.nke-detail-body .detail-date { color: #64748b; font-size: 14px; margin: 0 0 14px; }
.nke-detail-body .detail-facts { margin: 0 0 16px; }
.nke-detail-subhead { font-size: 18px; margin: 8px 0 6px; color: var(--nke-black); }
.nke-detail-side { position: sticky; top: 16px; }
.nke-side-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; padding: 18px; }
.nke-side-price { font-size: 24px; font-weight: 800; color: var(--nke-green); margin: 0; }
.nke-side-meta { color: #64748b; margin: 2px 0 12px; font-size: 14px; }
.nke-side-title { font-size: 17px; margin: 6px 0 8px; color: var(--nke-black); }
.nke-side-card .detail-source { margin: 0 0 12px; padding: 0; border: 0; background: none; font-size: 14px; }
.nke-side-card .detail-source .button-secondary { display: block; text-align: center; margin: 10px 0; padding: 11px 14px; border-radius: 10px; background: var(--nke-green); color: #fff !important; font-weight: 700; text-decoration: none; }
.nke-side-card .detail-source .button-secondary:hover { background: var(--nke-green); }
.nke-side-card .detail-source-note { background: var(--nke-red-soft); border: 1px solid var(--nke-red-line); color: var(--nke-red-dark); padding: 8px 10px; border-radius: 10px; font-size: 13px; }
.nke-side-card .detail-actions { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.nke-side-card .detail-action { display: block; text-align: center; width: 100%; box-sizing: border-box; }
@media (max-width: 900px) {
  .nke-detail-layout { grid-template-columns: 1fr; }
  .nke-detail-side { position: static; }
  .nke-detail-main-card .detail-gallery-primary { height: 260px; }
  .nke-detail-titlerow { flex-direction: column; gap: 4px; }
  .nke-detail-titlerow h1 { font-size: 22px; }
  .nke-detail-price { font-size: 22px; }
}

/* Detail page, MakaUG-style order: hero photo, title, location, price, quick facts, key facts, description. Kenyan flag colours. */
.nke-back-link { display: inline-block; margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--nke-red, #bb0000); }
.nke-gallery-hero { position: relative; background: var(--nke-black, #111); }
.nke-gallery-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, #111 0 33%, #bb0000 33% 66%, var(--nke-flag-green, #006600) 66%); }
.nke-gallery-credit, .nke-gallery-count { position: absolute; bottom: 12px; padding: 4px 9px; border-radius: 999px; background: rgba(17,17,17,.78); color: #fff; font-size: 12px; font-weight: 600; }
.nke-gallery-credit { left: 12px; }
.nke-gallery-count { right: 12px; }
.nke-detail-body h1.detail-card-title { margin: 0 0 4px; font-size: 28px; font-weight: 800; line-height: 1.25; color: var(--nke-black, #111); }
.nke-detail-location { margin: 0 0 10px; color: var(--nke-red, #bb0000); font-weight: 700; }
.nke-detail-body .nke-detail-price { white-space: normal; margin: 0 0 6px; }
.nke-detail-quickfacts { margin: 0 0 8px; color: #334155; font-weight: 600; }
.nke-found-online { margin: 16px 0 0; padding: 10px 12px; border: 1px solid #fecaca; border-left: 4px solid var(--nke-red, #bb0000); border-radius: 10px; background: #fff7f7; color: #7f1d1d; font-size: 14px; font-weight: 600; }
@media (max-width: 640px) {
  .nke-detail-main-card .detail-gallery-primary { height: 280px; }
  .nke-detail-body h1.detail-card-title { font-size: 22px; }
}
