/* ============================================================
   Homes Grid + Home Detail Styles
   ============================================================ */

/* ── Shared font ─────────────────────────────────────────── */
.chub-hgrid-wrapper,
.chub-hd-wrapper {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
  max-width: 100%;
}

/* =============================================================
   ALL-HOMES GRID
   ============================================================= */

/* Top bar */
.chub-hgrid-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.chub-hgrid-rent-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chub-hgrid-toggle {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #888;
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}
.chub-hgrid-toggle.chub-toggle--active {
  color: #6c5ce7;
  font-weight: 700;
}
.chub-hgrid-toggle:hover {
  color: #6c5ce7;
}
.chub-hgrid-divider {
  color: #ccc;
  font-size: 14px;
  user-select: none;
}

.chub-hgrid-sort {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chub-hgrid-sort label {
  font-size: 14px;
  font-weight: 500;
  color: #555;
  margin: 0;
  white-space: nowrap;
}
.chub-hgrid-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.chub-hgrid-sort-select {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0 28px 0 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  outline: none;
  line-height: 1;
}
.chub-hgrid-sort-wrap > svg {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: #888;
  pointer-events: none;
}

/* Filter bar */
.chub-hgrid-filters {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.chub-hgrid-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
}

.chub-hgrid-col {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-right: 12px;
  border-right: 1px solid #e5e7eb;
  flex: 1 1 150px;
  min-width: 0;
}
.chub-hgrid-col:last-of-type,
.chub-hgrid-col--btn {
  border-right: none;
}
.chub-hgrid-col--search {
  flex: 3 1 240px;
}
.chub-hgrid-col--btn {
  flex: 0 0 auto;
  padding-left: 16px;
  justify-content: flex-end;
  align-self: flex-end;
}
.chub-hgrid-col + .chub-hgrid-col {
  padding-left: 12px;
}

.chub-hgrid-label {
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  line-height: 1;
  padding-top: 2px;
}

.chub-hgrid-field {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  min-width: 0;
}

.chub-hgrid-field > svg:first-child {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #9ca3af;
}

.chub-hgrid-input,
.chub-hgrid-select {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: #555;
  width: 100%;
  min-width: 0;
  cursor: pointer;
  padding: 0;
}
.chub-hgrid-input {
  cursor: text;
}
.chub-hgrid-input::placeholder {
  color: #9ca3af;
}
.chub-hgrid-select {
  padding-right: 2px;
}

.chub-hgrid-arrow {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  color: #9ca3af;
  pointer-events: none;
  flex-shrink: 0;
}

.chub-hgrid-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 22px;
  background: #6c5ce7;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition:
    background 0.2s,
    transform 0.1s;
}
.chub-hgrid-search-btn svg {
  width: 15px;
  height: 15px;
}
.chub-hgrid-search-btn:hover {
  background: #5a4bd1;
}
.chub-hgrid-search-btn:active {
  transform: scale(0.97);
}

/* Results meta */
.chub-hgrid-meta {
  font-size: 13px;
  color: #777;
  text-align: center;
  margin-bottom: 22px;
}
.chub-hgrid-meta strong {
  color: #333;
}

/* Grid */
.chub-hgrid {
  display: grid;
  gap: 24px;
}
.chub-hgrid--cols-1 {
  grid-template-columns: 1fr;
}
.chub-hgrid--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}
.chub-hgrid--cols-3 {
  grid-template-columns: repeat(3, 1fr);
}
.chub-hgrid--cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Card */
.chub-hgrid-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  transition:
    box-shadow 0.25s,
    transform 0.25s,
    border-color 0.25s;
  display: flex;
  flex-direction: column;
  animation: chubHgFadeUp 0.4s ease both;
}
.chub-hgrid-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

@keyframes chubHgFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chub-hgrid-card:nth-child(1) {
  animation-delay: 0.04s;
}
.chub-hgrid-card:nth-child(2) {
  animation-delay: 0.08s;
}
.chub-hgrid-card:nth-child(3) {
  animation-delay: 0.12s;
}
.chub-hgrid-card:nth-child(4) {
  animation-delay: 0.16s;
}
.chub-hgrid-card:nth-child(5) {
  animation-delay: 0.2s;
}
.chub-hgrid-card:nth-child(6) {
  animation-delay: 0.24s;
}
.chub-hgrid-card:nth-child(7) {
  animation-delay: 0.28s;
}
.chub-hgrid-card:nth-child(8) {
  animation-delay: 0.32s;
}
.chub-hgrid-card:nth-child(9) {
  animation-delay: 0.36s;
}

.chub-hgrid-card__img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.chub-hgrid-card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.chub-hgrid-card:hover .chub-hgrid-card__img {
  transform: scale(1.04);
}
.chub-hgrid-card__img-ph {
  width: 100%;
  height: 220px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chub-hgrid-card__img-ph svg {
  width: 60px;
  height: 45px;
}

/* Badge overlay */
.chub-hgrid-badge-wrap {
  position: absolute;
  top: 12px;
  left: 12px;
}
.chub-hgrid-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chub-hgrid-badge--sale {
  background: #6c5ce7;
  color: #fff;
}
.chub-hgrid-badge--rent {
  background: #0891b2;
  color: #fff;
}
.chub-hgrid-badge--both {
  background: #059669;
  color: #fff;
}

/* Card body */
.chub-hgrid-card__body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.chub-hgrid-card__price {
  font-size: 22px;
  font-weight: 800;
  color: #6c5ce7;
  line-height: 1;
}
.chub-hgrid-card__addr {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Community / location row */
.chub-hgrid-card__loc {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chub-hgrid-card__comm,
.chub-hgrid-card__city {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
}
.chub-hgrid-card__comm svg,
.chub-hgrid-card__city svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #6c5ce7;
}

/* Specs */
.chub-hgrid-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}
.chub-hgrid-spec {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #374151;
  font-weight: 500;
}
.chub-hgrid-spec svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #6c5ce7;
}

/* Tags */
.chub-hgrid-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chub-hgrid-tag {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 500;
}

/* Button */
.chub-hgrid-card__footer {
  margin-top: auto;
  padding-top: 10px;
}
.chub-hgrid-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 25px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  line-height: 1;
  font-family: inherit;
}
.chub-hgrid-card__btn svg {
  width: 14px;
  height: 14px;
}
.chub-hgrid-card__btn:hover {
  background: #5a4bd1;
  color: #fff;
  text-decoration: none;
}
.chub-hgrid-card__btn:active {
  transform: scale(0.97);
}

/* No results / loading */
.chub-hgrid-no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px;
  color: #9ca3af;
  font-size: 15px;
}
.chub-hgrid.chub-hgrid-loading {
  position: relative;
  min-height: 120px;
  opacity: 0.45;
  pointer-events: none;
}
.chub-hgrid.chub-hgrid-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.55)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 50 50'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%236c5ce7' stroke-width='4' stroke-dasharray='31.4' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' dur='0.8s' from='0 25 25' to='360 25 25' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E")
    center/40px no-repeat;
  border-radius: inherit;
}

/* Pagination */
.chub-hgrid-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.chub-hgrid-page-btn {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}
.chub-hgrid-page-btn svg {
  width: 16px;
  height: 16px;
}
.chub-hgrid-page-btn:hover:not([disabled]) {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.chub-hgrid-page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}
.chub-hgrid-page-numbers {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.chub-hgrid-page-num {
  width: 36px;
  height: 36px;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chub-hgrid-page-num:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.chub-hgrid-page-num.chub-hgrid-active {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #fff;
}
.chub-hgrid-page-dots {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #d1d5db;
  font-size: 14px;
}

/* Responsive grid */
@media (max-width: 1100px) {
  .chub-hgrid-filter-row {
    flex-wrap: wrap;
  }
  .chub-hgrid-col {
    flex: 1 1 140px;
    border-right: none;
    padding: 0 0 10px;
    border-bottom: 1px solid #e5e7eb;
  }
  .chub-hgrid-col--btn {
    border-bottom: none;
    padding: 8px 0 0;
  }
  .chub-hgrid-field {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 7px 10px;
    background: #fff;
  }
  .chub-hgrid-arrow {
    right: 9px;
  }
  .chub-hgrid-select {
    padding-right: 22px;
  }
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .chub-hgrid--cols-2,
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4 {
    grid-template-columns: 1fr;
  }
  .chub-hgrid-top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .chub-hgrid-col {
    flex: 1 1 100%;
  }
}

/* =============================================================
   HOME DETAIL PAGE
   ============================================================= */

.chub-hd-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Back link */
.chub-hd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #6c5ce7;
  text-decoration: none;
  transition: color 0.2s;
}
.chub-hd-back svg {
  width: 16px;
  height: 16px;
}
.chub-hd-back:hover {
  color: #5a4bd1;
}

/* Two-column layout */
.chub-hd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.chub-hd-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.chub-hd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Carousel ─────────────────────────────────────────────── */
.chub-hd-carousel-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chub-hd-carousel {
  position: relative;
  height: 500px;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

.chub-hd-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.chub-hd-slide.chub-hd-slide-active {
  opacity: 1;
}

.chub-hd-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chub-hd-arrow:hover {
  background: rgba(255, 255, 255, 0.35);
}
.chub-hd-arrow svg {
  width: 20px;
  height: 20px;
}
.chub-hd-arrow-prev {
  left: 14px;
}
.chub-hd-arrow-next {
  right: 14px;
}

.chub-hd-slide-counter {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 2;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Thumbnails */
.chub-hd-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.chub-hd-thumbs::-webkit-scrollbar {
  display: none;
}

.chub-hd-thumb {
  flex: 0 0 80px;
  height: 72px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    border-color 0.2s,
    opacity 0.2s;
  opacity: 0.65;
}
.chub-hd-thumb.chub-hd-thumb-active {
  border-color: #6c5ce7;
  opacity: 1;
}
.chub-hd-thumb:hover {
  opacity: 1;
}

/* ── Price / Hero Bar ─────────────────────────────────────── */
.chub-hd-hero {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.chub-hd-hero__left {
  flex: 1;
}
.chub-hd-price {
  font-size: 30px;
  font-weight: 800;
  color: #6c5ce7;
  line-height: 1;
  margin-bottom: 6px;
}
.chub-hd-address {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin: 0 0 6px;
  line-height: 1.3;
}
.chub-hd-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}
.chub-hd-location svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #6c5ce7;
}

.chub-hd-hero__right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

/* Badges */
.chub-hd-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.chub-hd-badge--sale {
  background: #6c5ce7;
  color: #fff;
}
.chub-hd-badge--rent {
  background: #0891b2;
  color: #fff;
}
.chub-hd-badge--both {
  background: #059669;
  color: #fff;
}
.chub-hd-status-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #f3f4f6;
  color: #374151;
}

/* ── Specs Row ────────────────────────────────────────────── */
.chub-hd-specs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chub-hd-spec-box {
  flex: 1 1 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  min-width: 80px;
}
.chub-hd-spec-box svg {
  width: 22px;
  height: 22px;
  color: #6c5ce7;
  margin-bottom: 2px;
}
.chub-hd-spec-val {
  font-size: 16px;
  font-weight: 700;
  color: #111;
  line-height: 1.1;
}
.chub-hd-spec-key {
  font-size: 11px;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Panels (Description, Details) ───────────────────────── */
.chub-hd-panel {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 24px 26px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.chub-hd-panel-title {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0 0 14px;
  line-height: 1.3;
}

.chub-hd-panel-text {
  font-size: 15px;
  color: #555;
  line-height: 1.75;
}
.chub-hd-panel-text p {
  margin: 0 0 12px;
}
.chub-hd-panel-text p:last-child {
  margin-bottom: 0;
}

/* Details grid */
.chub-hd-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
}

.chub-hd-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  gap: 16px;
}
.chub-hd-detail-row:last-child {
  border-bottom: none;
}

.chub-hd-detail-key {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
}
.chub-hd-detail-val {
  font-size: 13px;
  color: #6b7280;
  text-align: right;
}

/* ── Sidebar Cards ────────────────────────────────────────── */
.chub-hd-side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* CTA card */
.chub-hd-cta-card {
  position: sticky;
  top: 80px;
}
.chub-hd-side-price {
  font-size: 26px;
  font-weight: 800;
  color: #6c5ce7;
  line-height: 1;
}

.chub-hd-cta-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chub-hd-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.1s;
  line-height: 1;
  border: 2px solid transparent;
}
.chub-hd-cta svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.chub-hd-cta:active {
  transform: scale(0.97);
}

.chub-hd-cta--primary {
  background: #6c5ce7;
  color: #fff;
  border-color: #6c5ce7;
}
.chub-hd-cta--primary:hover {
  background: #5a4bd1;
  border-color: #5a4bd1;
  color: #fff;
  text-decoration: none;
}

.chub-hd-cta--secondary {
  background: transparent;
  color: #6c5ce7;
  border-color: #6c5ce7;
}
.chub-hd-cta--secondary:hover {
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
}

/* Community card */
.chub-hd-comm-img-wrap {
  display: block;
  overflow: hidden;
  border-radius: 10px;
  text-decoration: none;
  margin-bottom: 4px;
}
.chub-hd-comm-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.chub-hd-comm-img-wrap:hover .chub-hd-comm-img {
  transform: scale(1.04);
}

.chub-hd-comm-name {
  font-size: 16px;
  font-weight: 700;
  color: #6c5ce7;
  text-decoration: none;
  display: block;
  line-height: 1.3;
  transition: color 0.2s;
}
.chub-hd-comm-name:hover {
  color: #5a4bd1;
  text-decoration: underline;
}

.chub-hd-comm-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #555;
}
.chub-hd-comm-meta svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: #6c5ce7;
}
.chub-hd-comm-meta a {
  color: #6c5ce7;
  text-decoration: none;
  font-weight: 500;
}
.chub-hd-comm-meta a:hover {
  text-decoration: underline;
}

.chub-hd-comm-link {
  font-size: 13px;
  font-weight: 600;
  color: #6c5ce7;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.2s;
}
.chub-hd-comm-link:hover {
  color: #5a4bd1;
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .chub-hd-layout {
    grid-template-columns: 1fr;
  }
  .chub-hd-sidebar {
    order: -1;
  }
  .chub-hd-cta-card {
    position: static;
  }
  .chub-hd-cta-btns {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .chub-hd-cta {
    flex: 1 1 140px;
  }
  .chub-hd-details-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .chub-hd-carousel {
    height: 300px;
  }
  .chub-hd-specs-row {
    gap: 8px;
  }
  .chub-hd-spec-box {
    flex: 1 1 80px;
    padding: 10px 12px;
  }
  .chub-hd-spec-val {
    font-size: 14px;
  }
  .chub-hd-panel {
    padding: 18px 20px;
  }
  .chub-hd-hero {
    padding: 16px 18px;
  }
}

/* ── ADDITIONS v2.0 ──────────────────────────────────────────────────────── */

/* Toggle buttons — now fully styleable (not just text links) */
.chub-hgrid-toggle {
  border: 2px solid transparent;
  padding: 6px 14px;
  line-height: 1.3;
}
.chub-hgrid-toggle.chub-toggle--active {
  border-color: transparent; /* overridden by Elementor control */
}

/* Filter bar — multi-row wrapping on smaller screens built in */
.chub-hgrid-filter-row {
  flex-wrap: wrap;
}

/* Input border for price fields */
.chub-hgrid-field input[type="number"] {
  -moz-appearance: textfield;
}
.chub-hgrid-field input[type="number"]::-webkit-outer-spin-button,
.chub-hgrid-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

/* Clear button */
.chub-hgrid-clear-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  background: transparent;
  color: #374151;
  border: 1.5px solid #d1d5db;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.chub-hgrid-clear-btn:hover {
  background: #f3f4f6;
  color: #111;
  border-color: #9ca3af;
}

/* Secondary card button */
.chub-hgrid-card__btn--secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 9px 18px;
  background: transparent;
  color: #6c5ce7;
  border: 2px solid #6c5ce7;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.1s;
}
.chub-hgrid-card__btn--secondary:hover {
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
}
.chub-hgrid-card__btn--secondary:active {
  transform: scale(0.97);
}

/* Card footer with multiple buttons */
.chub-hgrid-card__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
}

/* Amenities tags on card */
.chub-hgrid-card__amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

.chub-hgrid-amenity {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f5f3ff;
  color: #6c5ce7;
  border: 1px solid #ddd6fe;
  font-size: 11px;
  font-weight: 500;
}
.chub-hgrid-amenity svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}

/* Description on card */
.chub-hgrid-card__desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
}

/* Tag border support */
.chub-hgrid-tag {
  border: 1px solid transparent;
}

/* Responsive: filter wraps to 2-col on medium */
@media (max-width: 1200px) {
  .chub-hgrid-col {
    flex: 1 1 160px;
    border-right: none;
    padding: 0 0 10px;
    border-bottom: 1px solid #e5e7eb;
  }
  .chub-hgrid-col + .chub-hgrid-col {
    padding-left: 0;
  }
  .chub-hgrid-col--btn {
    border-bottom: none;
    flex-direction: row;
    gap: 8px;
    padding-top: 6px;
  }
  .chub-hgrid-field {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 7px 10px;
    background: #fff;
  }
  .chub-hgrid-arrow {
    right: 9px;
  }
  .chub-hgrid-select {
    padding-right: 22px;
  }
}

/* ── ADDITIONS v2.1 ──────────────────────────────────────────────────────── */

/* Button footer — flex container supports both stacked and side-by-side */
.chub-hgrid-card__footer {
  display: flex;
  flex-direction: column; /* default; overridden by Elementor to 'row' for side-by-side */
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  flex-wrap: wrap;
}

/* When side-by-side, buttons share space equally unless width overridden */
.chub-hgrid-card__footer.chub-btns-row {
  flex-direction: row;
  align-items: center;
}

/* Primary button — base state, width controllable */
.chub-hgrid-card__btn--primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%; /* default full-width; Elementor overrides to auto */
  padding: 10px 18px;
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.1s;
  white-space: nowrap;
}
.chub-hgrid-card__btn--primary svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.chub-hgrid-card__btn--primary:hover {
  background: #5a4bd1;
  color: #fff;
  text-decoration: none;
}
.chub-hgrid-card__btn--primary:active {
  transform: scale(0.97);
}

/* Secondary button — base state, width controllable */
.chub-hgrid-card__btn--secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%; /* default full-width */
  padding: 9px 18px;
  background: transparent;
  color: #6c5ce7;
  border: 2px solid #6c5ce7;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.1s;
  white-space: nowrap;
}
.chub-hgrid-card__btn--secondary:hover {
  background: #6c5ce7;
  color: #fff;
  text-decoration: none;
}
.chub-hgrid-card__btn--secondary:active {
  transform: scale(0.97);
}

/* Separate icon colors for community vs city */
.chub-hgrid-card__comm svg {
  color: #6c5ce7;
}
.chub-hgrid-card__city svg {
  color: #6c5ce7;
}

/* Image — ensure transition still applies when object-fit/position overridden */
.chub-hgrid-card__img {
  transition: transform 0.4s ease;
}
.chub-hgrid-card:hover .chub-hgrid-card__img {
  /* transform controlled by Elementor hover zoom selector */
}

/* Image wrap radius — applied via Elementor DIMENSIONS control */
.chub-hgrid-card__img-wrap {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* ── SEARCH BAR WRAPPER (v2.2) ───────────────────────────────────────────── */

/* Parent container — groups row1, row2, row3 */
.chub-hgrid-search-bar {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

/* Row 1 override — remove standalone bottom margin; spacing handled by row2 border-radius gap */
.chub-hgrid-sb-row1.chub-hgrid-top-bar {
  margin-bottom: 14px;
}

/* Row 2 — inherits .chub-hgrid-filters styles; remove its own bottom margin */
.chub-hgrid-sb-row2.chub-hgrid-filters {
  margin-bottom: 0;
}

/* Row 3 — results info, sits flush below the filter row */
.chub-hgrid-sb-row3 {
  padding-top: 12px;
}
.chub-hgrid-sb-row3 .chub-hgrid-meta {
  margin-bottom: 0;
  text-align: left;
}

/* Button column — invisible spacer label keeps inputs & buttons on same baseline */
.chub-hgrid-label--hidden {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

/* Button field — row of Search + Clear side by side, aligned with inputs */
.chub-hgrid-field--btns {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

/* Responsive adjustments for the new structure */
@media (max-width: 768px) {
  .chub-hgrid-sb-row1.chub-hgrid-top-bar {
    flex-direction: column;
    align-items: flex-start;
  }
  .chub-hgrid-sb-row3 .chub-hgrid-meta {
    text-align: center;
  }
}

/* ── LISTING GRID COLUMN OVERRIDE (v2.3) ─────────────────────────────────── */

/* Desktop: 2 columns, 80px gap */
.chub-hgrid--cols-1,
.chub-hgrid--cols-2,
.chub-hgrid--cols-3,
.chub-hgrid--cols-4 {
  grid-template-columns: repeat(2, 1fr);
  gap: 80px;
}

/* Tablet: 2 columns, 40px gap */
@media (max-width: 1024px) {
  .chub-hgrid--cols-1,
  .chub-hgrid--cols-2,
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

/* Mobile: 1 column, 40px gap */
@media (max-width: 767px) {
  .chub-hgrid--cols-1,
  .chub-hgrid--cols-2,
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4 {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ── FIND A HOME VISUAL STYLES ───────────────────────────────────────────── */

.chub-hgrid-search-bar {
  background: #fff;
  box-shadow: 0 12px 19.5px 0 rgba(0, 0, 0, 0.25) !important;
  padding: 4vw 6vw;
}

/* Input / field pill styling — !important needed to override responsive border/radius/padding rules */
.chub-hgrid-search-bar > input[type="text"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="reset"],
input[type="tel"],
input[type="date"],
select,
textarea,
.chub-hgrid-field,
.chub-hgrid-input {
  box-shadow: none !important;
  border-radius: 100px !important;
  border: none !important;
  background-color: #f5f5f7 !important;
  padding: 5px 10px !important;
}

/* Button column has no background — only input fields get the pill style */
.chub-hgrid-field--btns,
.chub-hgrid-col--btn .chub-hgrid-field {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.chub-hgrid-filter-row {
  gap: 20px;
  border: none;
}

.chub-hgrid-col {
  border: none !important;
}

.chub-hgrid-toggle {
  background-color: transparent;
}

.chub-hgrid-rent-toggle button {
  box-shadow: none !important;
}

.chub-hgrid-sort-select {
  background-color: transparent;
}

.chub-hgrid-arrow {
  display: none !important;
}

/* Custom dropdown icon via ::after on all fields */
.chub-hgrid-field::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-image: url("https://inspirecommunities.bald-staging.dev/wp-content/uploads/2026/04/Sort-Icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

.chub-hgrid-field {
  max-width: 200px;
}

/* Extra right padding so select text doesn't sit under the custom icon */
.chub-hgrid-filters .chub-hgrid-select {
  padding-right: 28px;
}

.chub-hgrid-meta {
  justify-self: center;
}

/* Suppress ::after sort icon on number inputs (price fields) — only selects need it */
.chub-hgrid-field:has(input[type="number"])::after,
.chub-hgrid-field:has(#chub-hgrid-price-min-input)::after,
.chub-hgrid-field:has(#chub-hgrid-price-max-input)::after {
  display: none !important;
  content: none !important;
}

/* Search field gets a location icon instead of the sort icon */
.chub-hgrid-field:has(#chub-hgrid-search)::after {
  background-image: url("https://inspirecommunities.bald-staging.dev/wp-content/uploads/2026/04/my_location.svg");
}

/* Hide all inline SVGs inside fields — replaced by ::after icons */
.chub-hgrid-field svg {
  display: none !important;
}

.chub-hgrid-filters #chub-hgrid-search {
  padding-right: 30px;
}

/* Sort wrap: hide chevron SVG, inject custom icon */
.chub-hgrid-sort-wrap svg {
  display: none !important;
}

.chub-hgrid-sort-wrap::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-image: url("https://inspirecommunities.bald-staging.dev/wp-content/uploads/2026/04/Sort-Icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}

/* Button column — wider to fit Search + Clear side by side */
.chub-hgrid-field:has(#chub-hgrid-filter-btn) {
  max-width: 400px;
}

/* Suppress the ::after icon on the button field */
.chub-hgrid-field--btns::after {
  display: none !important;
}

/* Search + Clear buttons shared pill style */
.chub-hgrid-field--btns button {
  border-radius: 100px !important;
  background: #5f5af2 !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: flex !important;
  width: 140px !important;
  height: 44px !important;
  padding: 8px 20px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px;
  margin: 0 !important;
}

/* Card image — rounded top corners */
.chub-hgrid-card__img-wrap img {
  border-radius: 33px 33px 0 0 !important;
}

/* Card body — rounded bottom corners + border */
.chub-hgrid-card__body {
  border-radius: 0 0 30px 30px !important;
  border: 2px solid #e1e5e5 !important;
  display: flex;
  flex-direction: column;
}

/* For Sale badge */
.chub-hgrid-badge--sale {
  border-radius: 100px !important;
  background: #f2683e !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: inline-flex !important;
  height: 44px !important;
  padding: 8px 40px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 16px !important;
}

/* For Sale + Rent badge */
.chub-hgrid-badge--both {
  border-radius: 100px !important;
  background: #57a430 !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: inline-flex !important;
  height: 44px !important;
  padding: 8px 40px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 16px !important;
}

/* For Rent badge — same green pill as For Sale/Rent */
.chub-hgrid-badge--rent {
  border-radius: 100px !important;
  background: #57a430 !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: inline-flex !important;
  height: 44px !important;
  padding: 8px 40px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 16px !important;
}

/* Grid outer padding */
.chub-hgrid {
  padding: 4vw 6vw;
}

/* Primary + secondary card buttons */
.chub-hgrid-card__btn--primary svg,
.chub-hgrid-card__btn--secondary svg {
  display: none !important;
}

.chub-hgrid-card__btn--primary {
  border-radius: 100px !important;
  background: #5f5af2 !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: inline-flex !important;
  height: 44px !important;
  padding: 8px 20px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 16px !important;
  border: none !important;
  max-width: 200px;
}

.chub-hgrid-card__btn--secondary {
  border-radius: 100px !important;
  background: rgba(38, 36, 96, 0.1) !important;
  box-shadow:
    0 32px 24px 0 rgba(255, 255, 255, 0.05) inset,
    0 2px 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 0 0 1px rgba(5, 5, 12, 0.15) inset,
    0 -2px 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 1px 2px 0 rgba(5, 5, 12, 0.05) !important;
  display: inline-flex !important;
  height: 44px !important;
  padding: 8px 20px !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 16px !important;
  border: none !important;
  max-width: 160px;
}

.chub-hgrid-clear-btn:hover {
  color: #fff;
}

/* Address appears above price in card body */
.chub-hgrid-card__addr,
.chub-hgrid-card__price {
  display: inline-flex !important;
  align-items: center !important;
}

.chub-hgrid-card__addr {
  order: -2 !important;
}
.chub-hgrid-card__price {
  order: -1 !important;
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .chub-hgrid-field {
    max-width: 100% !important;
  }

  .chub-hgrid-field--btns {
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #chub-hgrid-filter-btn,
  #chub-hgrid-clear-btn {
    width: 100% !important;
  }

  .chub-hgrid-sb-row1 {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 8px;
  }

  .chub-hgrid-toggle {
    padding: 0 !important;
  }

  .chub-hgrid-sb-row2 {
    padding: 30px 0 !important;
  }
}

/* ── Schedule a Tour button ───────────────────────────────────────────────── */
.chub-hgrid-card__btn--tour {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  background: transparent;
  color: #6c5ce7;
  border: 2px solid #6c5ce7;
  border-radius: 25px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
  line-height: 1;
  font-family: inherit;
  margin-top: 6px;
  box-sizing: border-box;
}
.chub-hgrid-card__btn--tour:hover {
  background: #6c5ce7;
  color: #fff !important;
}
.chub-hgrid-card__btn--tour svg {
  flex-shrink: 0;
  width: 14px !important;
  height: 14px !important;
}

/* ── SVG size reset — prevent theme font-icon injection blowing up SVGs ─── */
.chub-hgrid-wrapper svg,
.chub-hgrid-search-bar svg,
.chub-hgrid-sort svg {
  max-width: none !important;
  max-height: none !important;
}
.chub-hgrid-sort-wrap svg,
.chub-hgrid-sort-wrap > svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.chub-hgrid-arrow {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  pointer-events: none;
  flex-shrink: 0;
}
.chub-hgrid-search-bar .chub-hgrid-field svg {
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  min-width: 0 !important;
  flex-shrink: 0;
}
/* Kill ::before/::after pseudo injection from theme icon fonts */
.chub-hgrid-wrapper .chub-hgrid-sort-wrap svg::before,
.chub-hgrid-wrapper .chub-hgrid-sort-wrap svg::after,
.chub-hgrid-wrapper .chub-hgrid-field svg::before,
.chub-hgrid-wrapper .chub-hgrid-field svg::after {
  content: none !important;
  display: none !important;
}

/* ── Advanced Filter Button ──────────────────────────────────────────────── */
.chub-hgrid-adv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s;
}
.chub-hgrid-adv-btn:hover,
.chub-hgrid-adv-btn--active {
  border-color: #6c5ce7;
  color: #6c5ce7;
  background: #f5f3ff;
}

/* Map View Button */
.chub-hgrid-map-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.chub-hgrid-map-btn:hover,
.chub-hgrid-map-btn--active {
  border-color: #6c5ce7;
  color: #6c5ce7;
  background: #f5f3ff;
}
.chub-hgrid-map-btn svg { stroke: currentColor; }

/* ── Advanced Filter Panel ───────────────────────────────────────────────── */
.chub-hgrid-adv-panel {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 12px;
}
.chub-hgrid-adv-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.chub-hgrid-adv-col {
  flex: 1 1 260px;
  min-width: 0;
}
.chub-hgrid-adv-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

/* Dual Range Slider */
.chub-hgrid-range-wrap {
  position: relative;
  height: 36px;
  margin-bottom: 4px;
}
.chub-hgrid-range-track {
  position: absolute;
  left: 0; right: 0;
  top: 50%; transform: translateY(-50%);
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  pointer-events: none;
  z-index: 0;
}
.chub-hgrid-range-fill {
  position: absolute;
  height: 100%;
  background: #6c5ce7;
  border-radius: 2px;
}
/* Both range inputs stacked — each handles only its own thumb */
.chub-hgrid-range {
  position: absolute;
  left: 0;
  width: 100%;
  top: 50%; transform: translateY(-50%);
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  pointer-events: none;   /* track clicks ignored */
  height: 4px;
  outline: none;
  margin: 0; padding: 0;
  z-index: 2;
}
/* Only the thumb is interactive */
.chub-hgrid-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6c5ce7;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.25);
  cursor: grab;
  pointer-events: all;    /* thumb is clickable */
  position: relative;
  z-index: 3;
}
.chub-hgrid-range::-webkit-slider-thumb:active { cursor: grabbing; }
.chub-hgrid-range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #6c5ce7;
  border: 2px solid #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.25);
  cursor: grab;
  pointer-events: all;
}

/* Amenities Checkboxes */
.chub-hgrid-adv-amenities {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-bottom: 16px;
}
.chub-hgrid-amenity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 16px;
  margin-top: 10px;
}
.chub-hgrid-amenity-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
  line-height: 1.3;
}
.chub-hgrid-amenity-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: #6c5ce7;
  cursor: pointer;
}

/* Advanced Filter Footer */
.chub-hgrid-adv-footer {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  text-align: right;
}
.chub-hgrid-adv-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.2s, border-color 0.2s;
}
.chub-hgrid-adv-clear-btn:hover { color: #ef4444; border-color: #ef4444; }

/* ── Map Container ───────────────────────────────────────────────────────── */
.chub-hgrid-map-container {
  margin-top: 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}
.chub-hgrid-map {
  width: 100%;
  height: 560px;
  border-radius: 12px;
}
/* Google Maps tile fix — prevent parent overflow/transform from clipping tiles */
.chub-hgrid-map * { max-width: none !important; }
.chub-hgrid-map img { max-width: none !important; display: inline !important; }

@media (max-width: 768px) {
  .chub-hgrid-adv-row { flex-direction: column; gap: 20px; }
  .chub-hgrid-amenity-grid { grid-template-columns: repeat(2, 1fr); }
  .chub-hgrid-map { height: 400px; }
}

/* ── Home Grid Card Redesign ─────────────────────────────────────────────── */

/* Image wrap — fixed height */
.chub-hgrid-card__img-wrap {
  display: block;
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  border-radius: 16px 16px 0 0;
}
.chub-hgrid-card__img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  transition: transform 0.4s ease;
}
.chub-hgrid-card:hover .chub-hgrid-card__img { transform: scale(1.03); }

/* Card body */
.chub-hgrid-card__body {
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header row: name + price */
.chub-hgrid-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.chub-hgrid-card__name {
  font-size: 16px;
  font-weight: 700;
  color: #6c5ce7;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.chub-hgrid-card__price-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  white-space: nowrap;
}
.chub-hgrid-card__price-tag svg { stroke: #6c5ce7; }
.chub-hgrid-card__price {
  font-size: 16px;
  font-weight: 700;
  color: #6c5ce7;
}

/* Divider */
.chub-hgrid-card__divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 0 0 12px;
}

/* Location */
.chub-hgrid-card__loc {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.chub-hgrid-card__comm,
.chub-hgrid-card__city {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
}
.chub-hgrid-card__comm svg,
.chub-hgrid-card__city svg {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
  stroke: #6c5ce7;
}

/* Description */
.chub-hgrid-card__desc {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.55;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Footer row */
.chub-hgrid-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.chub-hgrid-card__btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Primary button */
.chub-hgrid-card__btn--primary {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: #6c5ce7;
  color: #fff !important;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s;
  line-height: 1;
  white-space: nowrap;
}
.chub-hgrid-card__btn--primary:hover { background: #5a4bd1; }

/* Secondary button (Schedule a Tour) */
.chub-hgrid-card__btn--secondary {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: transparent;
  color: #374151 !important;
  border: 1.5px solid #d1d5db;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  transition: border-color 0.2s, color 0.2s;
  line-height: 1;
  white-space: nowrap;
}
.chub-hgrid-card__btn--secondary:hover { border-color: #6c5ce7; color: #6c5ce7 !important; }

/* Action icons (share + print) */
.chub-hgrid-card__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.chub-hgrid-card__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #9ca3af;
  border-radius: 50%;
  padding: 0;
  transition: color 0.2s, background 0.2s;
}
.chub-hgrid-card__icon-btn:hover { color: #6c5ce7; background: #f5f3ff; }
.chub-hgrid-card__icon-btn svg { display: block !important; }

/* ── Specs bar at bottom ──────────────────────────────────────────────────── */
.chub-hgrid-specbar {
  display: flex;
  align-items: center;
  border-top: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 0 0 16px 16px;
}
.chub-hgrid-specbar__item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  flex: 1;
  font-size: 13px;
  color: #374151;
  justify-content: center;
}
.chub-hgrid-specbar__item svg {
  width: 20px !important;
  height: 20px !important;
  stroke: #6c5ce7;
  flex-shrink: 0;
}
.chub-hgrid-specbar__item svg::before,
.chub-hgrid-specbar__item svg::after { content: none !important; display: none !important; }
.chub-hgrid-specbar__item strong { font-weight: 700; }
.chub-hgrid-specbar__div {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
  flex-shrink: 0;
}

/* ── Home card layout fixes ──────────────────────────────────────────────── */

/* Footer — single row, space-between */
.chub-hgrid-card__footer {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  margin-top: auto !important;
  padding-top: 12px !important;
}
.chub-hgrid-card__btns {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

/* Icon buttons — kill theme background/border override */
.chub-hgrid-card__icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #9ca3af !important;
  padding: 0 !important;
  cursor: pointer !important;
  box-shadow: none !important;
  line-height: 1 !important;
  font-size: 0 !important;
}
.chub-hgrid-card__icon-btn:hover {
  color: #6c5ce7 !important;
  background: #f5f3ff !important;
  background-color: #f5f3ff !important;
}
.chub-hgrid-card__icon-btn svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
}
.chub-hgrid-card__icon-btn svg::before,
.chub-hgrid-card__icon-btn svg::after { content: none !important; display: none !important; }
.chub-hgrid-card__actions {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
  align-self: flex-end !important;
}

/* ── Home card final layout ──────────────────────────────────────────────── */
/* Buttons side by side */
.chub-hgrid-card__btns {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
/* Image 500px */
.chub-hgrid-card__img-wrap {
  height: 500px !important;
}
/* Property name purple */
.chub-hgrid-card__name {
  color: #6c5ce7 !important;
  font-size: 18px !important;
  font-weight: 700 !important;
}

/* ── Elementor-overridable defaults for home card ───────────────────────── */
.chub-hgrid-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #6c5ce7;
  margin: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.chub-hgrid-card__price {
  font-size: 20px;
  font-weight: 800;
  color: #6c5ce7;
  letter-spacing: -0.3px;
}
.chub-hgrid-card__price-tag svg {
  stroke: #6c5ce7;
  width: 16px !important;
  height: 16px !important;
}

/* ── Home card base — Elementor-overridable (no inline styles) ───────────── */
.chub-hgrid-card {
  display: flex !important;
  flex-direction: column !important;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  height: 100%;
}

/* ============================================================
   ALL HOMES GRID — FULL RESPONSIVE (overrides all above)
   ============================================================ */

@media (max-width: 1024px) {
  .chub-hgrid-filter-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .chub-hgrid-col {
    flex: 1 1 calc(50% - 8px) !important;
    min-width: 130px !important;
    border-right: none !important;
    padding: 0 !important;
  }
  .chub-hgrid-col--search { flex: 1 1 100% !important; }
  .chub-hgrid-col--btn    { flex: 1 1 100% !important; padding: 0 !important; }
  .chub-hgrid-field       { width: 100% !important; box-sizing: border-box !important; }
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4     { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 640px) {
  /* Top bar */
  .chub-hgrid-top-bar,
  .chub-hgrid-sb-row1 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  /* Filter — single column */
  .chub-hgrid-filter-row  { flex-direction: column !important; gap: 8px !important; }
  .chub-hgrid-col,
  .chub-hgrid-col--search,
  .chub-hgrid-col--btn {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    padding: 0 !important;
  }
  .chub-hgrid-field {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .chub-hgrid-field--btns {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .chub-hgrid-search-btn,
  .chub-hgrid-adv-btn {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Toggle bar */
  .chub-hgrid-toggles      { width: 100% !important; }
  .chub-hgrid-toggle       { flex: 1 !important; justify-content: center !important; }

  /* Grid — 1 col */
  .chub-hgrid--cols-1,
  .chub-hgrid--cols-2,
  .chub-hgrid--cols-3,
  .chub-hgrid--cols-4 { grid-template-columns: 1fr !important; }

  /* Cards */
  .chub-hgrid-card         { width: 100% !important; overflow: hidden !important; }
  .chub-hgrid-card__body   { padding: 14px 14px 0 !important; }
  .chub-hgrid-card__header { flex-wrap: wrap !important; gap: 6px !important; }
  .chub-hgrid-card__name   { font-size: 14px !important; min-width: 0 !important; word-break: break-word !important; }

  /* Card buttons — full width stacked */
  .chub-hgrid-card__body > div[style*="flex-direction:row"],
  .chub-hgrid-card__body > div[style*="flex-direction: row"] {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }
  .chub-hgrid-card__btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
  }
  .chub-hgrid-card__btn--primary,
  .chub-hgrid-card__btn--secondary {
    width: 100% !important;
    justify-content: center !important;
    flex-shrink: unset !important;
  }

  /* Advanced filter panel */
  .chub-hgrid-adv-row      { flex-direction: column !important; gap: 16px !important; }
  .chub-hgrid-adv-col      { flex: 1 1 100% !important; width: 100% !important; }

  /* Amenity / spec */
  .chub-hgrid-amenities    { flex-wrap: wrap !important; }
  .chub-hgrid-specbar      { flex-wrap: wrap !important; gap: 4px !important; }

  /* Pagination */
  .chub-hgrid-pagination   { flex-wrap: wrap !important; justify-content: center !important; gap: 4px !important; }

  /* Sort bar */
  .chub-hgrid-sort-wrap    { width: 100% !important; }
}

@media (max-width: 400px) {
  .chub-hgrid-card__name   { font-size: 13px !important; }
  .chub-hgrid-specbar      { font-size: 11px !important; }
  .chub-hgrid-label        { font-size: 11px !important; }
  .chub-hgrid-card__price  { font-size: 16px !important; }
}

/* ============================================================
   CRITICAL MOBILE FIX — prevent horizontal scroll
   ============================================================ */

/* Prevent the whole page from scrolling horizontally */
.chub-hgrid-wrapper {
  max-width: 100% !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}

/* Every element inside must stay within bounds */
.chub-hgrid-wrapper *,
.chub-hgrid-wrapper *::before,
.chub-hgrid-wrapper *::after {
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* Cards grid never overflows */
.chub-hgrid {
  width: 100% !important;
  overflow: hidden !important;
}

/* Card itself */
.chub-hgrid-card {
  width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  word-break: break-word !important;
}

/* Card header: title left, price right — wrap on small screens */
.chub-hgrid-card__header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}
.chub-hgrid-card__name {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  word-break: break-word !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}
.chub-hgrid-card__price-tag {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* Location rows must not overflow */
.chub-hgrid-card__comm,
.chub-hgrid-card__city {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

/* Buttons row — stack on mobile, never overflow */
@media (max-width: 640px) {
  .chub-hgrid-card__body > div {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  /* The buttons flex container */
  .chub-hgrid-card__body > div > div:first-child {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .chub-hgrid-card__btn--primary,
  .chub-hgrid-card__btn--secondary {
    width: 100% !important;
    flex-shrink: unset !important;
    justify-content: center !important;
    text-align: center !important;
  }
  /* Share/print icons: stay on same row at right */
  .chub-hgrid-card__body > div > div:last-child {
    flex-shrink: 0 !important;
  }
  /* Spec bar: wrap if needed */
  .chub-hgrid-specbar {
    flex-wrap: wrap !important;
    gap: 0 !important;
  }
  .chub-hgrid-specbar > span {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    justify-content: center !important;
  }
}

/* ============================================================
   FIX: Buttons inline unless truly narrow (mobile only)
   ============================================================ */

/* Default: always inline row */
.chub-hgrid-card__body > div[style*="flex-direction:row"],
.chub-hgrid-card__body > div[style*="flex-direction: row"] {
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
}
.chub-hgrid-card__btn--primary,
.chub-hgrid-card__btn--secondary {
  width: auto !important;
  flex-shrink: 0 !important;
}

/* Only truly full-width on very small screens */
@media (max-width: 480px) {
  .chub-hgrid-card__btn--primary,
  .chub-hgrid-card__btn--secondary {
    width: 100% !important;
    flex-shrink: unset !important;
  }
}

/* ============================================================
   FINAL BUTTON FIX — undo the 640px column override
   ============================================================ */
@media (max-width: 640px) {
  .chub-hgrid-card__body > div[style*="flex-direction:row"],
  .chub-hgrid-card__body > div[style*="flex-direction: row"] {
    flex-direction: row !important;
    flex-wrap: wrap !important;
  }
  .chub-hgrid-card__btn--primary,
  .chub-hgrid-card__btn--secondary {
    width: auto !important;
    flex-shrink: 0 !important;
  }
}

/* ── View On Map toggle button ───────────────────────────────────────────── */
.chub-hgrid-map-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 8px 20px;
  background: transparent;
  color: #5f5af2;
  border: 1.5px solid #5f5af2;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.chub-hgrid-map-toggle-btn svg {
  display: block !important;
  flex-shrink: 0;
  width: 15px !important;
  height: 15px !important;
}
.chub-hgrid-map-toggle-btn:hover,
.chub-hgrid-map-toggle-btn--active {
  background: #5f5af2;
  color: #fff;
}
.chub-hgrid-map-toggle-btn--active svg {
  stroke: #fff;
}

/* ── Search field clear (×) button ──────────────────────────────────────── */
.chub-hgrid-field--search {
  position: relative;
}
.chub-hgrid-search-clear {
  position: absolute !important;
  right: 10px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 0 !important;
  cursor: pointer !important;
  color: #9ca3af !important;
  font-size: 18px !important;
  line-height: 20px !important;
  text-align: center !important;
  border-radius: 50% !important;
  z-index: 10 !important;
  font-family: system-ui, sans-serif !important;
  transition: color 0.15s, background 0.15s !important;
  pointer-events: auto !important;
}
.chub-hgrid-search-clear:hover {
  color: #374151 !important;
  background: #f3f4f6 !important;
}
.chub-hgrid-field--search #chub-hgrid-search {
  padding-right: 32px !important;
}
.chub-hgrid-field--search::after {
  display: none !important;
  content: none !important;
}
/* No SVG rules needed — button uses text × character */
.chub-hgrid-map-toggle-wrap {
  display: flex;
  align-items: center;
}
.chub-hgrid-map-toggle {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #374151 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  padding: 0 4px !important;
  width: auto !important;
  height: auto !important;
  cursor: pointer;
  white-space: nowrap;
}
.chub-hgrid-map-toggle.chub-toggle--active {
  color: #5f5af2 !important;
}

/* ── Leaflet map tile protection ─────────────────────────────────────────── */
/* WordPress themes apply max-width:100%;height:auto to all img tags which    */
/* breaks Leaflet tile rendering. These rules restore correct tile dimensions. */
#chub-hgrid-map .leaflet-container {
  font-family: inherit;
}
#chub-hgrid-map .leaflet-tile,
#chub-hgrid-map .leaflet-tile-container img,
#chub-hgrid-map .leaflet-pane img,
#chub-hgrid-map img.leaflet-tile {
  max-width: none !important;
  width: 256px !important;
  height: 256px !important;
  border-radius: 0 !important;
  display: block !important;
  box-shadow: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
#chub-hgrid-map .leaflet-container img.leaflet-tile {
  max-width: none !important;
  width: 256px !important;
  height: 256px !important;
}

/* ── Results footer (below grid) ─────────────────────────────────────────── */
.chub-hgrid-results-footer {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
  padding: 16px 0 8px;
}
.chub-hgrid-results-footer strong {
  color: #374151;
  font-weight: 600;
}

/* ── Clear Search standalone pill button ─────────────────────────────────── */
.chub-hgrid-search-clear-btn {
  flex-shrink: 0;
  height: 44px;
  padding: 0 16px;
  border-radius: 100px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  line-height: 1;
  display: inline-flex !important;
  align-items: center;
}
.chub-hgrid-search-clear-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111;
}
