/* ============================================================
   Doorloom brand-website V2 — home (property listing) page.
   ============================================================ */

/* ---------- search ---------- */
.search { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; }
.searchbar { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 999px; padding: 12px 18px; box-shadow: var(--shadow); background: var(--surface); color: var(--text); text-align: left; }
.searchbar > svg { width: 19px; height: 19px; color: var(--accent); flex: none; }
.searchbar .txt { min-width: 0; }
.searchbar .st { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.searchbar .ss { font-size: .78rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filterbtn { width: 47px; height: 47px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); display: grid; place-items: center; flex: none; position: relative; }
.filterbtn:hover { background: var(--surface-2); }
.filterbtn svg { width: 19px; height: 19px; }
.filterbtn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: none; }
.filterbtn.active .dot { display: block; }
.dsearch { display: none; }

/* ---------- results row ---------- */
.resrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 12px; }
.resrow .c { font-weight: 600; font-size: 1.05rem; }
.maptoggle { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 9px 16px; font-weight: 600; font-size: .85rem; background: var(--text); color: var(--bg); flex: none; }
.maptoggle svg { width: 15px; height: 15px; }

/* ---------- grid ---------- */
.grid { display: grid; grid-template-columns: 1fr; gap: 22px; padding-bottom: 20px; }
@media (min-width: 620px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- map view ---------- */
.mapview[hidden] { display: none; }
.mapwrap { position: relative; border-radius: 16px; overflow: hidden; height: 54vh; min-height: 360px; border: 1px solid var(--line); background: var(--surface-2); }
.mapwrap .lmap { position: absolute; inset: 0; }
.mappin { background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: .8rem; box-shadow: var(--shadow-md); cursor: pointer; white-space: nowrap; transition: .15s; width: max-content !important; height: auto !important; display: inline-block; }
.mappin:hover, .mappin.on { background: var(--text); color: var(--bg); border-color: var(--text); z-index: 500 !important; }
.mapstrip { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin-top: 14px; padding-bottom: 6px; }
.mapstrip::-webkit-scrollbar { display: none; }
.mcard { flex: 0 0 235px; border: 1px solid var(--border-accent); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.mcard img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.mcard .mb { padding: 10px 12px; }
.mcard .mn { font-weight: 600; font-size: .92rem; }
.mcard .mm { font-size: .8rem; color: var(--text-2); margin-top: 1px; }
.mcard .mp { font-weight: 600; font-size: .9rem; margin-top: 6px; }
.mcard .mp .u { font-weight: 400; color: var(--text-2); font-size: .8rem; }

/* location pills use the solid style */
#locPills .pill.on { background: var(--text); color: var(--bg); border-color: var(--text); }
#locPills .pill.on::before { display: none; }

/* ---------- tablet and up ---------- */
@media (min-width: 768px) {
  .search { max-width: 760px; margin: 28px auto 6px; }
  .searchbar { padding: 15px 22px; }
  .searchbar > svg { width: 20px; height: 20px; }
  .searchbar .st { font-size: .98rem; }
  .searchbar .ss { font-size: .82rem; }
  .filterbtn { width: 52px; height: 52px; }
  .resrow { margin: 28px 0 14px; }
  .resrow .c { font-size: 1.15rem; }
  .chips { margin-bottom: 26px; }
  .grid { gap: 26px; padding-bottom: 28px; }
  .mapwrap { height: 60vh; }
}

/* ---------- laptop / desktop: segmented search bar + anchored dropdown ---------- */
@media (min-width: 1024px) {
  .search { max-width: 960px; margin-top: 32px; gap: 14px; }
  .grid { gap: 30px; }

  #searchOpen { display: none; }
  .dsearch { display: flex; align-items: stretch; flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--shadow-card); padding: 6px 6px 6px 4px; }
  .dseg { display: flex; flex-direction: column; justify-content: center; gap: 1px; flex: 1; min-width: 0; background: none; border: 0; text-align: left; padding: 9px 22px; border-radius: 999px; transition: background .15s; }
  .dseg--where { flex: 1.6; }
  .dseg--who { flex: 1.15; }
  .dseg:hover { background: var(--surface-2); }
  .dseg__l { font-size: .75rem; font-weight: 600; color: var(--text); }
  .dseg__v { font-size: .9rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dseg__v.filled { color: var(--text); }
  .dseg__div { width: 1px; flex: none; align-self: center; height: 32px; background: var(--line); }
  .dsearch__go { flex: none; align-self: center; width: 48px; height: 48px; margin-left: 8px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--gradient-accent); color: #fff; transition: background .15s; }
  .dsearch__go:hover { background: var(--accent-press); }
  .dsearch__go svg { width: 19px; height: 19px; }

  #searchSheet.as-dropdown .sheet__bd { background: transparent; }
  #searchSheet.as-dropdown .sheet__p { position: fixed; left: auto; right: auto; top: auto; bottom: auto; transform: none; margin: 0; width: auto; max-width: none; max-height: 72vh; border-radius: 20px; animation: drop .18s ease; }
  #searchSheet.as-dropdown .sheet__grab { display: none; }
  #searchSheet.as-dropdown .acc { border: 0; margin: 0; overflow: visible; }
  #searchSheet.as-dropdown .acc__head { display: none; }
  #searchSheet.as-dropdown .acc__body { display: block; padding: 6px 2px 2px; }
  #searchSheet.as-dropdown[data-scope="where"] #accWhen,
  #searchSheet.as-dropdown[data-scope="where"] #accWho,
  #searchSheet.as-dropdown[data-scope="when"] #accWhere,
  #searchSheet.as-dropdown[data-scope="when"] #accWho,
  #searchSheet.as-dropdown[data-scope="who"] #accWhere,
  #searchSheet.as-dropdown[data-scope="who"] #accWhen { display: none; }
  #searchSheet.as-dropdown .cal__nav { margin: 0 0 8px; }
  #searchSheet.as-dropdown .cal__d { font-size: .86rem; }
  #searchSheet.as-dropdown .cal__grid { gap: 2px; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- wider desktop ---------- */
@media (min-width: 1280px) {
  :root { --maxw: 1200px; }
  .search { max-width: 1040px; }
}

@media (min-width: 1440px) {
  :root { --maxw: 1320px; }
  .search { max-width: 1140px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
}
