/* ================================================================
   BFP IDX Plugin Styles  v1.0.6
   Matches brunofineproperties.com gold + dark palette
   Unified Search: searchbar + filter row + map on top, cards below
   ================================================================ */

:root {
  --bfp-gold:    #C9A84C;
  --bfp-gold-dk: #b8963c;
  --bfp-dark:    #1a1a2e;
  --bfp-navy:    #0A1628;
  --bfp-gray:    #f5f5f5;
  --bfp-border:  #e0e0e0;
  --bfp-text:    #333;
  --bfp-muted:   #777;
  --bfp-radius:  8px;
  --bfp-shadow:  0 2px 12px rgba(0,0,0,.10);
  --bfp-shadow-lg: 0 12px 36px rgba(0,0,0,.18);
}

/* ---- Spinner ---- */
.bfp-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.bfp-spinner::after {
  content: '';
  width: 40px; height: 40px;
  border: 3px solid var(--bfp-border);
  border-top-color: var(--bfp-gold);
  border-radius: 50%;
  animation: bfp-spin .7s linear infinite;
}
@keyframes bfp-spin { to { transform: rotate(360deg); } }

/* ================================================================
   FEATURED GRID  [bfp_featured]  +  shared bfp-grid
   ================================================================ */
.bfp-featured { width: 100%; }
.bfp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Property Card ---- */
.bfp-card {
  background: #fff;
  border-radius: var(--bfp-radius);
  box-shadow: var(--bfp-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.bfp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  text-decoration: none;
  color: inherit;
}
.bfp-card__photo {
  position: relative;
  padding-top: 66%;
  background: var(--bfp-gray);
  overflow: hidden;
}
.bfp-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.bfp-card__photo .bfp-no-photo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bfp-muted);
  font-size: 13px;
}
.bfp-card__status {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--bfp-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 4px;
}
.bfp-card__body { padding: 16px; }
.bfp-card__price {
  font-size: 22px;
  font-weight: 700;
  color: var(--bfp-dark);
  margin: 0 0 4px;
}
.bfp-card__address {
  font-size: 14px;
  color: var(--bfp-muted);
  margin: 0 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bfp-card__facts {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--bfp-text);
  border-top: 1px solid var(--bfp-border);
  padding-top: 12px;
  margin-top: 4px;
}
.bfp-card__fact {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bfp-card__fact svg {
  width: 14px; height: 14px;
  fill: var(--bfp-gold);
  flex-shrink: 0;
}

/* ================================================================
   SEARCH PAGE  [bfp_search]
   ================================================================ */
.bfp-search-root {
  width: 100%;
}

/* ---- Location search bar (full width) ---- */
.bfp-searchbar {
  position: relative;
  margin-bottom: 14px;
}
.bfp-searchbar__icon {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bfp-searchbar__icon svg {
  width: 18px; height: 18px;
  fill: var(--bfp-muted);
}
.bfp-searchbar input {
  width: 100%;
  box-sizing: border-box;
  /* Right-padding reserves space for the icon at the right edge of the bar.
     v1.0.18: moved icon from left → right to stop it overlapping the
     placeholder/typed text. */
  padding: 14px 46px 14px 18px;
  font-size: 15px;
  border: 1px solid var(--bfp-border);
  border-radius: 28px;
  background: #fff;
  color: var(--bfp-text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.bfp-searchbar input:focus {
  border-color: var(--bfp-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.18);
}

/* autosuggest dropdown */
.bfp-suggest-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 14px; right: 14px;
  background: #fff;
  border: 1px solid var(--bfp-border);
  border-radius: var(--bfp-radius);
  box-shadow: var(--bfp-shadow-lg);
  z-index: 1500;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  margin: 0; padding: 4px 0;
}
.bfp-suggest-list li {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.bfp-suggest-list li:last-child { border-bottom: none; }
.bfp-suggest-list li:hover,
.bfp-suggest-list li.active { background: var(--bfp-gray); }
.bfp-suggest-list .bfp-suggest-type {
  font-size: 11px;
  color: var(--bfp-muted);
  text-transform: capitalize;
  white-space: nowrap;
  align-self: center;
}

/* ---- Filter row (Price / Beds / Baths / More / Search) ---- */
.bfp-filter-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  align-items: center;
}
.bfp-pop-btn {
  background: #fff;
  color: var(--bfp-dark);
  border: 1px solid var(--bfp-border);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: inherit;
  min-height: 40px;
}
.bfp-pop-btn:hover {
  border-color: var(--bfp-gold);
}
.bfp-pop-btn--open {
  border-color: var(--bfp-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.18);
}
.bfp-pop-btn--active {
  background: var(--bfp-gold);
  color: #fff;
  border-color: var(--bfp-gold);
}
.bfp-pop-btn--active:hover {
  background: var(--bfp-gold-dk);
  border-color: var(--bfp-gold-dk);
}

.bfp-btn-search {
  background: var(--bfp-gold);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 26px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  font-family: inherit;
  min-height: 40px;
  margin-left: auto;
}
.bfp-btn-search:hover { background: var(--bfp-gold-dk); }

.bfp-btn-reset {
  background: transparent;
  color: var(--bfp-muted);
  border: 1px solid var(--bfp-border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  font-family: inherit;
  min-height: 40px;
}
.bfp-btn-reset:hover {
  color: var(--bfp-dark);
  border-color: var(--bfp-dark);
}

/* ---- Popovers (Price / Beds / Baths) ---- */
.bfp-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid var(--bfp-border);
  border-radius: var(--bfp-radius);
  box-shadow: var(--bfp-shadow-lg);
  z-index: 1400;
  padding: 14px;
  min-width: 280px;
}
.bfp-popover[hidden] { display: none; }

.bfp-popover--price { min-width: 360px; }

/* Each filter button + its popover is wrapped so the popover anchors
   relative to its own button, not the whole filter row. */
.bfp-pop-wrap { position: relative; display: inline-flex; }

.bfp-pop-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.bfp-pop-row input {
  flex: 1;
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--bfp-text);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
  min-width: 0;
}
.bfp-pop-row input:focus { border-color: var(--bfp-gold); }
.bfp-pop-sep { color: var(--bfp-muted); font-weight: 600; }

.bfp-pop-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 240px;
  overflow-y: auto;
}
.bfp-pop-quickpicks {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}
.bfp-pop-quickpicks li {
  list-style: none !important;
  list-style-type: none !important;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--bfp-text);
  cursor: pointer;
  border-radius: 4px;
  transition: background .12s;
}
.bfp-pop-quickpicks li::marker { content: ''; }
.bfp-pop-quickpicks li:hover {
  background: var(--bfp-gray);
  color: var(--bfp-gold);
}

.bfp-pop-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--bfp-border);
  padding-top: 12px;
}
.bfp-pop-clear-btn {
  background: transparent;
  border: none;
  color: var(--bfp-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  font-family: inherit;
}
.bfp-pop-clear-btn:hover { color: var(--bfp-dark); }
.bfp-pop-apply-btn {
  background: var(--bfp-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s;
}
.bfp-pop-apply-btn:hover { background: var(--bfp-gold-dk); }

.bfp-popover--narrow { min-width: 240px; }
.bfp-pop-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bfp-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.bfp-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.bfp-pill-pick {
  background: #fff;
  color: var(--bfp-text);
  border: 1px solid var(--bfp-border);
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.bfp-pill-pick:hover { border-color: var(--bfp-gold); color: var(--bfp-gold); }
.bfp-pill-pick.active {
  background: var(--bfp-gold);
  color: #fff;
  border-color: var(--bfp-gold);
}

/* ---- More Filters modal ---- */
.bfp-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bfp-modal[hidden] { display: none; }
.bfp-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, .55);
}
.bfp-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: var(--bfp-radius);
  width: min(720px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  padding: 28px 32px;
  box-shadow: var(--bfp-shadow-lg);
}
.bfp-modal__close {
  position: absolute;
  top: 14px; right: 18px;
  background: transparent;
  border: none;
  color: var(--bfp-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  font-family: inherit;
}
.bfp-modal__close:hover { color: var(--bfp-dark); background: var(--bfp-gray); }
.bfp-modal__title {
  margin: 0 0 18px;
  color: var(--bfp-dark);
  font-size: 22px;
  font-weight: 700;
}
.bfp-modal__type {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 1px solid var(--bfp-border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}
.bfp-modal__type button {
  background: #fff;
  border: none;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: var(--bfp-muted);
  transition: background .15s, color .15s;
  font-family: inherit;
}
.bfp-modal__type button:not(:last-child) { border-right: 1px solid var(--bfp-border); }
.bfp-modal__type button.active {
  background: var(--bfp-gold);
  color: #fff;
}
.bfp-modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.bfp-modal__section {
  margin-bottom: 22px;
}
.bfp-modal__section:last-of-type {
  margin-bottom: 16px;
}
.bfp-modal__section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--bfp-muted);
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--bfp-border);
}
.bfp-modal__checkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 4px 0 2px;
}
.bfp-modal__checkrow label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  text-transform: none;
  color: var(--bfp-text);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  cursor: pointer;
}
.bfp-modal__checkrow input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--bfp-gold);
  margin: 0;
  cursor: pointer;
}
.bfp-modal__grid input[type="text"] {
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--bfp-text);
  background: #fff;
  outline: none;
  font-family: inherit;
}
.bfp-modal__grid input[type="text"]:focus { border-color: var(--bfp-gold); }
.bfp-modal__conditional[hidden] { display: none !important; }

/* ── For Sale / Sold / All Listings radio (ShowcaseIDX-style pills) ── */
.bfp-modal__radiorow {
  display: flex;
  gap: 10px;
  padding: 4px 0 14px;
  flex-wrap: wrap;
}
.bfp-radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--bfp-border);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--bfp-text);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.bfp-radio-pill input[type="radio"] {
  accent-color: var(--bfp-gold);
  margin: 0;
  cursor: pointer;
}
.bfp-radio-pill:hover { border-color: var(--bfp-gold); }
.bfp-radio-pill:has(input:checked) {
  border-color: var(--bfp-gold);
  background: rgba(201,168,76,.10);
  color: var(--bfp-navy, var(--bfp-text));
}

/* ── Listing Type checkbox grid (raw.Disclosures multi-select) ── */
.bfp-modal__checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px 18px;
  padding: 4px 0 2px;
}
.bfp-modal__checkgrid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bfp-text);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.bfp-modal__checkgrid input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--bfp-gold);
  margin: 0;
  cursor: pointer;
}
.bfp-modal__grid label {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--bfp-muted);
  gap: 5px;
}
.bfp-modal__grid select {
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--bfp-text);
  background: #fff;
  outline: none;
  font-family: inherit;
}
.bfp-modal__grid select:focus { border-color: var(--bfp-gold); }
.bfp-modal__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--bfp-border);
  padding-top: 18px;
}

/* ================================================================
   MAP (full width, on top, above results grid)
   ================================================================ */
.bfp-map-wrap {
  position: relative;
  border-radius: var(--bfp-radius);
  overflow: hidden;
  border: 1px solid var(--bfp-border);
  margin-bottom: 20px;
}
#bfp-map {
  height: 480px;
  width: 100%;
  z-index: 1;
}
.bfp-map-search-area {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}
.bfp-map-search-area[hidden] { display: none; }
#bfp-search-area-btn {
  background: #fff;
  color: var(--bfp-dark);
  border: 1.5px solid var(--bfp-gold);
  border-radius: 20px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  transition: background .15s, color .15s;
  white-space: nowrap;
  font-family: inherit;
}
#bfp-search-area-btn:hover { background: var(--bfp-gold); color: #fff; }

/* Map price-pill markers */
.bfp-map-pill {
  background: var(--bfp-gold);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0,0,0,.30);
  cursor: pointer;
  transition: background .15s, transform .1s;
  border: 2px solid #fff;
  line-height: 1.3;
}
.bfp-map-pill:hover {
  background: var(--bfp-dark);
  transform: scale(1.08);
}

/* Map popup */
.bfp-map-popup { font-family: inherit; overflow: hidden; }
.bfp-map-popup img {
  width: calc(100% + 20px);
  height: 140px;
  object-fit: cover;
  display: block;
  margin: -10px -10px 10px -10px;
  border-radius: 4px 4px 0 0;
}
.bfp-map-popup__nophoto {
  height: 80px;
  background: var(--bfp-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--bfp-muted);
  margin: -10px -10px 10px -10px;
  width: calc(100% + 20px);
}
.bfp-map-popup__body { padding: 0 2px 4px; }
.bfp-map-popup__price {
  font-size: 18px;
  font-weight: 700;
  color: var(--bfp-dark);
  margin: 0 0 4px;
}
.bfp-map-popup__addr {
  font-size: 13px;
  color: var(--bfp-muted);
  margin: 0 0 4px;
}
.bfp-map-popup__facts {
  font-size: 12px;
  color: var(--bfp-text);
  margin: 0 0 10px;
}
.bfp-map-popup__link {
  display: inline-block;
  background: var(--bfp-gold);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 5px;
  transition: background .15s;
}
.bfp-map-popup__link:hover { background: var(--bfp-gold-dk); color: #fff; text-decoration: none; }
.leaflet-popup-content { margin: 10px 10px 6px; min-width: 220px; }

/* ================================================================
   RESULTS HEADER + GRID + PAGINATION
   ================================================================ */
.bfp-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}
.bfp-results-count {
  font-size: 15px;
  color: var(--bfp-dark);
  font-weight: 600;
}
.bfp-results-sort select,
.bfp-results-actions select {
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--bfp-text);
  background: #fff;
  cursor: pointer;
  font-family: inherit;
}
.bfp-results-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.bfp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--bfp-dark);
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.bfp-share-btn:hover {
  border-color: var(--bfp-gold);
  color: var(--bfp-gold);
}
.bfp-share-btn svg { flex-shrink: 0; }

/* Toast confirmation for Share button */
.bfp-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--bfp-dark);
  color: #fff;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  z-index: 99999;
  max-width: 90vw;
  pointer-events: none;
}
.bfp-toast--show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.bfp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.bfp-page-btn {
  border: 1px solid var(--bfp-border);
  background: #fff;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--bfp-text);
  transition: all .15s;
  font-family: inherit;
}
.bfp-page-btn:hover:not(:disabled),
.bfp-page-btn.active {
  background: var(--bfp-gold);
  border-color: var(--bfp-gold);
  color: #fff;
}
.bfp-page-btn:disabled { opacity: .4; cursor: default; }

/* ================================================================
   LISTING DETAIL  [bfp_listing]
   ================================================================ */
.bfp-listing-detail { width: 100%; }

/* Photo carousel */
.bfp-carousel {
  position: relative;
  border-radius: var(--bfp-radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}
.bfp-carousel__main {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}
.bfp-carousel__count {
  position: absolute;
  bottom: 12px; right: 12px;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 20px;
}
.bfp-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.bfp-carousel__btn:hover { background: rgba(0,0,0,.8); }
.bfp-carousel__btn--prev { left: 12px; }
.bfp-carousel__btn--next { right: 12px; }

/* Detail layout */
.bfp-detail-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) {
  .bfp-detail-wrap { grid-template-columns: 1fr; }
}

.bfp-detail__price {
  font-size: 32px;
  font-weight: 700;
  color: var(--bfp-dark);
  margin: 0 0 4px;
}
.bfp-detail__address {
  font-size: 18px;
  color: var(--bfp-muted);
  margin: 0 0 20px;
}
.bfp-detail__facts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.bfp-detail__fact { text-align: center; }
.bfp-detail__fact-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--bfp-dark);
}
.bfp-detail__fact-lbl {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--bfp-muted);
  letter-spacing: .05em;
}

.bfp-detail__section { margin-bottom: 28px; }
.bfp-detail__section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--bfp-dark);
  border-bottom: 2px solid var(--bfp-gold);
  padding-bottom: 6px;
  margin: 0 0 14px;
}
.bfp-detail__fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.bfp-detail__field { font-size: 13px; }
.bfp-detail__field-lbl {
  color: var(--bfp-muted);
  margin-bottom: 2px;
}
.bfp-detail__field-val {
  color: var(--bfp-text);
  font-weight: 500;
}

/* Contact sidebar */
.bfp-contact-card {
  background: #fff;
  border: 1px solid var(--bfp-border);
  border-radius: var(--bfp-radius);
  padding: 24px;
  box-shadow: var(--bfp-shadow);
  position: sticky;
  top: 100px;
}
.bfp-contact-card h3 {
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--bfp-dark);
}
.bfp-contact-card input,
.bfp-contact-card textarea {
  width: 100%;
  border: 1px solid var(--bfp-border);
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
  font-family: inherit;
  outline: none;
}
.bfp-contact-card input:focus,
.bfp-contact-card textarea:focus { border-color: var(--bfp-gold); }
.bfp-contact-card textarea { height: 80px; resize: vertical; }
.bfp-contact-card button {
  width: 100%;
  background: var(--bfp-gold);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  font-family: inherit;
}
.bfp-contact-card button:hover { background: var(--bfp-gold-dk); }
.bfp-contact-card .bfp-phone {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 15px;
  color: var(--bfp-dark);
  text-decoration: none;
  font-weight: 600;
}
.bfp-contact-card .bfp-phone:hover { color: var(--bfp-gold); }

/* Error state */
.bfp-error {
  text-align: center;
  padding: 40px;
  color: var(--bfp-muted);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .bfp-popover { min-width: 260px; }
  .bfp-popover--price { min-width: 320px; }
}
@media (max-width: 768px) {
  .bfp-filter-row { gap: 8px; }
  .bfp-pop-btn { padding: 9px 12px; font-size: 13px; }
  .bfp-btn-search { padding: 9px 18px; margin-left: 0; flex: 1 1 100%; }
  #bfp-map { height: 380px; }
  .bfp-popover {
    position: fixed;
    top: auto !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px;
    min-width: 0;
    max-height: 70vh;
    overflow-y: auto;
  }
  .bfp-modal__dialog { padding: 22px 18px; }
  .bfp-modal__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .bfp-grid { grid-template-columns: 1fr; }
  .bfp-detail__facts { gap: 16px; }
  .bfp-modal__grid { grid-template-columns: 1fr; }
  #bfp-map { height: 320px; }
}
