/* ============================================================
   Community Detail Page Styles v2.0
   ============================================================ */

.chub-cd-wrapper {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #333;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Hero / Carousel ─────────────────────────────────────── */
.chub-cd-hero {
  position: relative;
  height: 480px;
  border-radius: 16px;
  overflow: hidden;
}

.chub-carousel-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.chub-carousel-slide.chub-slide-active {
  opacity: 1;
}

.chub-cd-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.1) 55%,
    transparent 100%
  );
  z-index: 1;
}

.chub-cd-hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 36px 40px;
  color: #fff;
}

.chub-cd-hero__title {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.15;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.chub-cd-hero__addr {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.88);
  margin: 0;
}

.chub-cd-hero__addr svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Carousel arrows */
.chub-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.chub-carousel-arrow:hover {
  background: rgba(255, 255, 255, 0.32);
}
.chub-carousel-prev {
  left: 16px;
}
.chub-carousel-next {
  right: 16px;
}
.chub-carousel-arrow svg {
  width: 20px;
  height: 20px;
}

/* Carousel dots */
.chub-carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}

.chub-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.2s;
}
.chub-carousel-dot.chub-dot-active {
  background: #fff;
  transform: scale(1.3);
}

/* ── Info Panel ──────────────────────────────────────────── */
.chub-cd-info {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chub-cd-info__main {
  flex: 1 1 360px;
}

.chub-cd-title {
  font-size: 26px;
  font-weight: 800;
  color: #6c5ce7;
  margin: 0 0 16px;
  line-height: 1.2;
}

.chub-cd-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.chub-cd-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #444;
  line-height: 1.4;
}

.chub-cd-meta-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #6c5ce7;
}

/* Extra buttons row */
.chub-cd-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.chub-cd-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.1s;
  line-height: 1;
  border: 2px solid transparent;
}
.chub-cd-btn:active {
  transform: scale(0.97);
}

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

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

/* Stat boxes */
.chub-cd-info__stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.chub-cd-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5f3ff;
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 80px;
}

.chub-cd-stat__num {
  font-size: 26px;
  font-weight: 800;
  color: #6c5ce7;
  line-height: 1;
}

.chub-cd-stat__label {
  font-size: 11px;
  color: #888;
  font-weight: 600;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Two-column body layout ──────────────────────────────── */
.chub-cd-body-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  align-items: start;
}

.chub-cd-body-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Shared panel style */
.chub-cd-desc-wrap,
.chub-cd-amenities-wrap,
.chub-cd-hours-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 26px 30px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.chub-cd-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin: 0 0 14px;
  line-height: 1.3;
}

.chub-cd-desc {
  font-size: 15px;
  color: #555;
  line-height: 1.75;
  margin: 0;
}

.chub-cd-desc p {
  margin: 0 0 12px;
}
.chub-cd-desc p:last-child {
  margin-bottom: 0;
}

/* Amenities grid */
.chub-cd-amenities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chub-amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f5f3ff;
  color: #6c5ce7;
  border: 1px solid #ddd6fe;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.chub-amenity-tag svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Office hours */
.chub-cd-hours {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}
.chub-cd-hours p {
  margin: 0 0 6px;
}
.chub-cd-hours strong {
  color: #333;
  font-weight: 600;
}

/* ── Contact Card ────────────────────────────────────────── */
.chub-cd-contact-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 80px;
}

.chub-cd-contact-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: #111;
  margin: 0 0 4px;
  line-height: 1.3;
}

.chub-cd-contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}

.chub-cd-contact-row svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #6c5ce7;
}

.chub-cd-contact-card a {
  color: #6c5ce7;
  text-decoration: none;
  font-weight: 500;
  word-break: break-word;
}
.chub-cd-contact-card a:hover {
  text-decoration: underline;
}

.chub-cd-contact-call,
.chub-cd-contact-directions {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none !important;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.1s;
  margin-top: 4px;
  color: #fff !important;
}

.chub-cd-contact-call {
  background: #6c5ce7;
}
.chub-cd-contact-call:hover {
  background: #5a4bd1;
}
.chub-cd-contact-call svg {
  width: 16px;
  height: 16px;
}

.chub-cd-contact-directions {
  background: #0891b2;
}
.chub-cd-contact-directions:hover {
  background: #0e7490;
}
.chub-cd-contact-directions svg {
  width: 16px;
  height: 16px;
}

/* ── Homes Section ───────────────────────────────────────── */
.chub-cd-homes-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chub-cd-homes-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.chub-cd-homes-title {
  font-size: 22px;
  font-weight: 700;
  color: #111;
  margin: 0;
}
.chub-cd-homes-count {
  font-size: 13px;
  color: #888;
}
.chub-cd-homes-count strong {
  color: #333;
}

/* ── Home Filter Bar ─────────────────────────────────────── */
.chub-home-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 18px;
}

.chub-hf-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 130px;
  min-width: 0;
}
.chub-hf-label {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chub-hf-field {
  position: relative;
  display: flex;
  align-items: center;
}

.chub-hf-select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  padding: 7px 28px 7px 10px;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}
.chub-hf-select:focus {
  border-color: #6c5ce7;
}

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

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

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

/* ── Home Card ───────────────────────────────────────────── */
.chub-home-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: chubHcFadeUp 0.4s ease both;
}
.chub-home-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

@keyframes chubHcFadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chub-home-card:nth-child(1) {
  animation-delay: 0.04s;
}
.chub-home-card:nth-child(2) {
  animation-delay: 0.08s;
}
.chub-home-card:nth-child(3) {
  animation-delay: 0.12s;
}
.chub-home-card:nth-child(4) {
  animation-delay: 0.16s;
}
.chub-home-card:nth-child(5) {
  animation-delay: 0.2s;
}
.chub-home-card:nth-child(6) {
  animation-delay: 0.24s;
}

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

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

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

.chub-home-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f3f4f6;
  border-bottom: 1px solid #f3f4f6;
}
.chub-home-spec {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}
.chub-home-spec svg {
  width: 15px;
  height: 15px;
  color: #6c5ce7;
  flex-shrink: 0;
}

.chub-home-card__details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chub-home-card__details li {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
}
.chub-home-detail-key {
  font-weight: 600;
  color: #374151;
}

.chub-home-card__footer {
  margin-top: auto;
  padding-top: 12px;
}
.chub-home-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-home-card__btn svg {
  width: 14px;
  height: 14px;
}
.chub-home-card__btn:hover {
  background: #5a4bd1;
  color: #fff;
  text-decoration: none;
}
.chub-home-card__btn:active {
  transform: scale(0.97);
}

.chub-hc-no-results {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px;
  color: #9ca3af;
  font-size: 15px;
}

.chub-home-grid.chub-loading {
  position: relative;
  min-height: 120px;
  opacity: 0.45;
  pointer-events: none;
}
.chub-home-grid.chub-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-cd-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.chub-cd-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-cd-page-btn svg {
  width: 16px;
  height: 16px;
}
.chub-cd-page-btn:hover:not([disabled]) {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.chub-cd-page-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}
.chub-cd-page-numbers {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}
.chub-cd-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-cd-page-num:hover {
  border-color: #6c5ce7;
  color: #6c5ce7;
}
.chub-cd-page-num.chub-cd-active {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #fff;
}
.chub-cd-page-dots {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #d1d5db;
  font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .chub-cd-body-cols {
    grid-template-columns: 1fr;
  }
  .chub-cd-body-side {
    order: -1;
  }
  .chub-cd-contact-card {
    position: static;
  }
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .chub-cd-hero {
    height: 320px;
  }
  .chub-cd-hero__title {
    font-size: 26px;
  }
  .chub-cd-hero__content {
    padding: 24px 20px;
  }
  .chub-cd-info {
    flex-direction: column;
    padding: 20px;
  }
  .chub-cd-info__stats {
    justify-content: flex-start;
  }
  .chub-cd-desc-wrap,
  .chub-cd-amenities-wrap,
  .chub-cd-hours-wrap {
    padding: 18px 20px;
  }
  .chub-home-grid--cols-2,
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 {
    grid-template-columns: 1fr;
  }
  .chub-home-filters {
    flex-direction: column;
  }
  .chub-hf-group {
    flex: 1 1 100%;
  }
  .chub-cd-btn-row {
    flex-direction: column;
  }
  .chub-cd-btn {
    justify-content: center;
  }
}

/* ── Homes grid — Find a Home visual style ───────────────────────────────── */

/* Filter bar */
.chub-home-filters {
  background: #ffffff !important;
  box-shadow: 0 12px 19.5px 0 rgba(0, 0, 0, 0.25) !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 24px 32px !important;
}
.chub-hf-select {
  border-radius: 100px !important;
  background-color: #f5f5f7 !important;
  border: none !important;
  padding: 10px 36px 10px 16px !important;
}
.chub-hf-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(95, 90, 242, 0.15) !important;
}
.chub-home-filter-btn {
  background: #5f5af2 !important;
  border-radius: 100px !important;
  height: 44px;
  padding: 0 28px;
  box-shadow: 0 4px 12px rgba(95, 90, 242, 0.3);
  border: none !important;
  color: #fff !important;
}
.chub-home-filter-btn:hover {
  background: #4a45d4 !important;
}

/* Grid — 2-col 80px gap desktop */
.chub-home-grid,
.chub-home-grid--cols-1,
.chub-home-grid--cols-2,
.chub-home-grid--cols-3,
.chub-home-grid--cols-4 {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 80px !important;
}

/* Card — remove outer box, style image and body separately */
.chub-home-card {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.chub-home-card:hover {
  box-shadow: none !important;
  transform: none !important;
}
.chub-home-card__img-wrap {
  border-radius: 33px 33px 0 0 !important;
  overflow: hidden !important;
}
.chub-home-card__img {
  border-radius: 33px 33px 0 0 !important;
}
.chub-home-card__img-placeholder {
  border-radius: 33px 33px 0 0 !important;
}
.chub-home-card__body {
  border-radius: 0 0 30px 30px !important;
  border: 2px solid #e1e5e5 !important;
  padding: 20px 24px 24px !important;
}

/* Button */
.chub-home-card__btn {
  background: #5f5af2 !important;
  border-radius: 100px !important;
  color: #fff !important;
}
.chub-home-card__btn:hover {
  background: #4a45d4 !important;
  color: #fff !important;
}

/* Badges */
.chub-home-badge--sale {
  background: #f2683e !important;
}
.chub-home-badge--rent {
  background: #0891b2 !important;
}
.chub-home-badge--both {
  background: #57a430 !important;
}

/* Pagination */
.chub-cd-page-btn {
  background: rgba(38, 36, 96, 0.1) !important;
  border: none !important;
}
.chub-cd-page-btn:hover:not([disabled]) {
  background: rgba(38, 36, 96, 0.2) !important;
  border: none !important;
  color: inherit !important;
}
.chub-cd-page-num {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
}
.chub-cd-page-num.chub-cd-active {
  background: #5f5af2 !important;
  border-color: #5f5af2 !important;
  color: #fff !important;
}

/* Responsive grid overrides */
@media (max-width: 1024px) {
  .chub-home-grid,
  .chub-home-grid--cols-1,
  .chub-home-grid--cols-2,
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 40px !important;
  }
  .chub-home-filters {
    padding: 20px 24px !important;
  }
}
@media (max-width: 600px) {
  .chub-home-grid,
  .chub-home-grid--cols-1,
  .chub-home-grid--cols-2,
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .chub-home-filters {
    padding: 18px 20px !important;
    flex-direction: column;
  }
}

/* ── Homes grid — additional homes.css parity ────────────────────────────── */

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

.chub-hf-field svg {
  display: none !important;
}

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

.chub-hf-group {
  border: none !important;
}

.chub-home-filters input[type="text"],
.chub-home-filters input[type="number"],
.chub-home-filters input[type="search"],
.chub-home-filters select,
.chub-hf-field,
.chub-hf-select {
  box-shadow: none !important;
  filter: none !important;
}

.chub-hf-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-cd-homes-count {
  justify-self: center !important;
}

.chub-home-filter-btn {
  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;
  width: 140px !important;
  height: 44px !important;
  padding: 8px 20px !important;
}

.chub-home-grid {
  padding: 4vw 6vw;
}

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

/* ── Community homes filter — pill style fields ──────────────────────────── */
.chub-hgrid-filter-table { border: none !important; }
.chub-hgrid-filter-table * { border: none !important; }
.chub-hgrid-ftd { border: none !important; }

.chub-hgrid-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0 14px;
  height: 42px;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}
.chub-hgrid-pill:focus-within {
  border-color: #6c5ce7;
  background: #fff;
}
.chub-hgrid-pill-input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: inherit !important;
  font-size: 13px !important;
  color: #555 !important;
  padding: 0 !important;
  line-height: 1;
  box-shadow: none !important;
  min-width: 0;
  width: 100%;
}
.chub-hgrid-pill-input::placeholder { color: #9ca3af !important; }
.chub-hgrid-pill--select { cursor: pointer; }
.chub-hgrid-pill-select {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-family: inherit !important;
  font-size: 13px !important;
  color: #555 !important;
  padding: 0 !important;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  line-height: 1;
  box-shadow: none !important;
  min-width: 0;
  width: 100%;
}
.chub-hgrid-pill-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  width: 16px !important;
  height: 16px !important;
  font-size: 0 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
}
.chub-hgrid-pill-icon svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  min-width: 15px !important;
  max-width: 15px !important;
}

/* Responsive — stack on mobile */
@media (max-width: 900px) {
  .chub-hgrid-filter-table,
  .chub-hgrid-filter-table tbody,
  .chub-hgrid-filter-table tr { display: block !important; width: 100% !important; }
  .chub-hgrid-ftd { display: block !important; width: 100% !important; padding: 0 0 10px !important; }
  .chub-hgrid-pill { width: 100%; }
}

/* ── Overrides for pill layout alignment fixes ───────────────────────────── */
.chub-hgrid-filter-table tr { vertical-align: bottom !important; }
.chub-hgrid-ftd { vertical-align: bottom !important; padding-bottom: 0 !important; }

/* Button cell — no label, aligned to bottom of row */
.chub-hgrid-ftd--btn { vertical-align: bottom !important; }

/* Native select chevron visible */
.chub-hgrid-pill--select .chub-hgrid-pill-select {
  -webkit-appearance: auto !important;
  appearance: auto !important;
  padding-right: 4px !important;
}

/* Search pill — no icon, just input */
.chub-hgrid-pill .chub-hgrid-pill-input {
  height: 100%;
}

/* Search button — same height as pills, vertically aligned */
#chub-hf-apply.chub-hgrid-search-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  vertical-align: bottom;
  margin: 0;
}

/* Kill any ::before / ::after font icon injection */
.chub-hgrid-pill::before,
.chub-hgrid-pill::after,
.chub-hgrid-pill-input::before,
.chub-hgrid-pill-input::after,
.chub-hgrid-pill-select::before,
.chub-hgrid-pill-select::after {
  content: none !important;
  display: none !important;
}

/* ── All Homes Grid cards inside Community Detail ──────────────────────── */
.chub-home-grid {
  display: grid;
  gap: 24px;
}
.chub-home-grid--cols-1 { grid-template-columns: 1fr; }
.chub-home-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.chub-home-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.chub-home-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .chub-home-grid--cols-2,
  .chub-home-grid--cols-3,
  .chub-home-grid--cols-4 { grid-template-columns: 1fr; }
}

/* ── Community Detail: suppress ::after sort icon on text/number inputs ── */
/* Search for a Home, Min Price, Max Price don't need the dropdown arrow icon */
.chub-cd-homes-section .chub-hgrid-field:has(#chub-hf-search)::after,
.chub-cd-homes-section .chub-hgrid-field:has(#chub-hf-price-min)::after,
.chub-cd-homes-section .chub-hgrid-field:has(#chub-hf-price-max)::after {
  display: none !important;
}

/* ── Community Detail: advanced filter panel clear button ─────────────── */
/* Ensure the button sits above any overlapping pseudo-elements             */
.chub-cd-homes-section .chub-hgrid-adv-clear-btn {
  position: relative;
  z-index: 1;
  cursor: pointer;
  pointer-events: all !important;
}
