/* Casas — UX alinhada ao OTP houses */
#houses {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.45;
}
#houses *, #houses *::before, #houses *::after { box-sizing: border-box; }
#houses label {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  font-weight: inherit;
}
#houses i { float: none !important; }

#houses .ca-hero {
  padding: 18px 20px;
  border-radius: 12px;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e6f2;
  margin-bottom: 14px;
}
#houses .ca-hero h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  color: #243478;
}
#houses .ca-hero p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #666;
}

#houses .ca-card {
  padding: 4px 18px 18px;
  background: #fff;
  border: 1px solid #e2e6f2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(36, 52, 120, 0.07);
  margin-bottom: 14px;
}
#houses .ca-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e9edf7;
  font-size: 15px;
  font-weight: 700;
  color: #243478;
  flex-wrap: wrap;
}
#houses .ca-legend > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#houses .ca-legend > i,
#houses .ca-legend span > i { color: #4a5da8; }
#houses .ca-legend-hint {
  font-size: 12px;
  font-weight: 600;
  color: #9099b5;
}

#houses .ca-field { margin-bottom: 12px; }
#houses .ca-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #243478;
}
#houses .ca-label i { color: #4a5da8; }

#houses .ca-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#houses .ca-pick {
  position: relative;
  flex: 1 1 calc(25% - 6px);
  min-width: 100px;
  cursor: pointer;
}
#houses .ca-pick input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
#houses .ca-pick-box {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  background: #f7f8fd;
  border: 2px solid #dfe3f2;
  border-radius: 10px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
#houses .ca-pick:hover .ca-pick-box {
  border-color: #b9c2e5;
  background: #eef1fb;
}
#houses .ca-pick input:checked + .ca-pick-box {
  border-color: #243478;
  background: #eef1fb;
  box-shadow: 0 1px 5px rgba(36, 52, 120, 0.18);
}
#houses .ca-pick-name {
  font-size: 13px;
  font-weight: 700;
  color: #243478;
}
#houses .ca-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.08);
}

#houses .ca-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-top: 4px;
}
#houses .ca-input {
  position: relative;
  display: flex;
  align-items: center;
}
#houses .ca-input > i.ca-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95b8;
  z-index: 1;
  pointer-events: none;
}
#houses .ca-input select {
  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 12px 0 34px;
  background: #f7f8fd;
  border: 2px solid #dfe3f2;
  border-radius: 10px;
  color: #1f2a52;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
#houses .ca-input select:focus {
  outline: none;
  border-color: #243478;
  background: #fff;
}

#houses .ca-switch {
  display: flex !important;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  background: #f7f8fd;
  border: 2px solid #dfe3f2;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #243478;
  cursor: pointer;
  position: relative;
}
#houses .ca-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
#houses .ca-switch-track {
  position: relative;
  flex: none;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cfd5ea;
  transition: background .15s;
}
#houses .ca-switch-track::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: left .15s;
}
#houses .ca-switch input:checked + .ca-switch-track { background: #243478; }
#houses .ca-switch input:checked + .ca-switch-track::after { left: 17px; }
#houses .ca-switch-txt { flex: 1; min-width: 0; line-height: 1.25; }

#houses .ca-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: none;
  border-radius: 10px;
  background: #2f3f6a;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 3px 10px rgba(36, 52, 120, 0.22);
}
#houses .ca-submit:hover { background: #263457; }

#houses .hs-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a8470;
}
#houses .hs-head__lead { flex: none; width: 60px; }
#houses .hs-head__main {
  flex: 1;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
#houses .hs-head__main span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
#houses .hs-head i { color: #b3ab93; }
#houses .hs-head__val { flex: none; min-width: 70px; text-align: right; }

#houses .hs-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
#houses .hs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e9e2d0;
  border-radius: 10px;
  padding: 8px 12px;
}
#houses .hs-row:hover { border-color: #d0d7ec; }

#houses .house-map {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 1px solid #c8cdd8;
  background: #1a2030 center/cover no-repeat;
  image-rendering: pixelated;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b95b8;
  font-size: 22px;
  text-decoration: none;
  overflow: hidden;
}
#houses .house-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

#houses .hs-pinfo { flex: 1; min-width: 0; }
#houses .hs-name {
  font-size: 14px;
  font-weight: 800;
  color: #16204e;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
#houses .hs-name a {
  color: #16204e;
  text-decoration: none;
}
#houses .hs-name a:hover { text-decoration: underline; }
#houses .hs-meta {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #6b6480;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
#houses .hs-meta i { color: #9aa3b5; }
#houses .hs-dot { opacity: .5; }
#houses .hv-free { color: #2f9e44; font-weight: 700; }

#houses .hs-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  padding: 7px 12px;
  border: 1px solid #e9e2d0;
  border-radius: 999px;
  background: #fff;
  color: #243478 !important;
  text-decoration: none !important;
  cursor: pointer;
  font-family: inherit;
}
#houses .hs-more:hover {
  background: #243478;
  border-color: #243478;
  color: #fff !important;
}

#houses .hs-val {
  flex: none;
  font-weight: 800;
  color: #243478;
  font-size: 13px;
  background: #eef1fb;
  border: 1px solid #d8def3;
  border-radius: 999px;
  padding: 5px 14px;
  white-space: nowrap;
}

#houses .house-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  white-space: nowrap;
}
#houses .house-badge--warn {
  color: #8a6a3a;
  background: rgba(178, 106, 0, 0.12);
  border: 1px solid rgba(178, 106, 0, 0.28);
}
#houses .house-badge--free {
  color: #2e7d32;
  background: rgba(46, 125, 50, 0.12);
  border: 1px solid rgba(46, 125, 50, 0.28);
}

#houses .hs-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}
#houses .hs-pager a,
#houses .hs-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #e0e2ea;
  background: #f2f3f7;
  color: #3a4560 !important;
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 700;
}
#houses .hs-pager a:hover { background: #e2e7f8; }
#houses .hs-pager .is-current {
  background: #2f3f6a;
  border-color: #2f3f6a;
  color: #fff !important;
}

#houses .hs-empty {
  padding: 24px 16px;
  text-align: center;
  color: #666;
  font-weight: 600;
}

/* Detalhe da casa */
#houses .hv-detail {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: start;
}
#houses .hv-detail__map {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  border: 1px solid #e9e2d0;
  background: #1a2030;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b95b8;
  font-size: 36px;
}
#houses .hv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}
#houses .hv-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #e9e2d0;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #4a5568;
}
#houses .hv-tag i { color: #243478; }
#houses .hv-back {
  margin-top: 14px;
  text-align: center;
}
#houses .hv-back a {
  color: #243478;
  font-weight: 700;
  text-decoration: none;
}
#houses .hv-back a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  #houses .ca-pick { flex: 1 1 calc(50% - 4px); min-width: 0; }
  #houses .hs-row { flex-wrap: wrap; }
  #houses .hs-more, #houses .hs-val { width: 100%; justify-content: center; text-align: center; }
  #houses .hv-detail { grid-template-columns: 1fr; }
}
