/**
 * index-home.css — Explore / daftar rumah & layout listing
 */

:root {
  --page-explore-bg: var(--bg-alt);
  --index-card-radius: 18px;
  --index-toolbar-bg: #fff;
  --index-surface-line: rgba(28, 25, 23, 0.08);
}

.index-page-container {
  max-width: 1140px;
}

/* ─── Hero ─── */
@keyframes index-hero-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.index-hero {
  position: relative;
  isolation: isolate;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #1c1917;
}

.index-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.index-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 1.1s ease, transform 5.5s ease-out;
  z-index: 0;
}

.index-hero__img.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.index-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(28, 25, 23, 0.78) 0%, rgba(28, 25, 23, 0.45) 48%, rgba(28, 25, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(28, 25, 23, 0.25) 0%, rgba(28, 25, 23, 0.55) 55%, rgba(28, 25, 23, 0.82) 100%);
}

.index-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.index-hero__brand {
  margin: 0 0 0.85rem;
  font-size: clamp(1.85rem, 4.2vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  animation: index-hero-rise 0.7s ease-out both;
}

.index-hero__brand i {
  color: var(--primary, #E08600);
  font-size: 0.92em;
}

.index-hero__title {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #fff;
  animation: index-hero-rise 0.75s 0.08s ease-out both;
}

.index-hero__lead {
  margin: 0.85rem 0 0;
  max-width: 34rem;
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86);
  animation: index-hero-rise 0.75s 0.16s ease-out both;
}

.index-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.45rem;
  animation: index-hero-rise 0.75s 0.24s ease-out both;
}

.index-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.index-hero__cta:hover {
  transform: translateY(-1px);
}

.index-hero__cta--primary {
  background: var(--primary, #E08600);
  color: #fff;
  border: none;
  box-shadow: 0 10px 28px rgba(224, 134, 0, 0.28);
}

.index-hero__cta--primary:hover {
  background: var(--primary-dark, #AA4C0A);
  color: #fff;
}

.index-hero__cta--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.index-hero__cta--ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 576px) {
  .index-hero {
    min-height: min(62vh, 440px);
  }

  .index-hero__inner {
    padding-top: clamp(1.5rem, 4vw, 2.25rem);
    padding-bottom: clamp(1.75rem, 4vw, 2.5rem);
  }

  .index-hero__title {
    max-width: none;
    font-size: clamp(1.45rem, 7vw, 1.85rem);
  }

  .index-hero__lead {
    font-size: 0.92rem;
    max-width: none;
  }

  .index-hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .index-hero__cta {
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .index-hero__img {
    transition: none;
    transform: none;
  }

  .index-hero__img.is-active {
    transform: none;
  }

  .index-hero__brand,
  .index-hero__title,
  .index-hero__lead,
  .index-hero__actions {
    animation: none;
  }

  .index-hero__cta:hover {
    transform: none;
  }
}

/* ─── Explore / Daftar rumah ─── */
.index-explore {
  padding: 1.35rem 0 3rem;
}

.index-explore .container,
.index-foryou .container {
  max-width: 1140px;
}

.index-explore__header {
  display: block;
  margin-bottom: 1.15rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--index-surface-line);
}

.index-explore__header-text {
  flex: 1 1 16rem;
  min-width: 0;
}

.index-page-title {
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  line-height: 1.15;
}

.index-explore__lede {
  margin: 0.4rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-secondary, #78716c);
  max-width: 36rem;
}

.index-explore__location-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #a8a29e);
  margin-bottom: 0.25rem;
}

.index-explore__location-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border-soft, #e7e5e4);
  background: var(--index-toolbar-bg);
  padding: 0.55rem 0.85rem 0.55rem 0.75rem;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.index-explore__location-btn:hover,
.index-explore__location-btn[aria-expanded="true"] {
  border-color: rgba(224, 134, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(224, 134, 0, 0.1);
}

.index-explore__location-btn .bi-geo-alt-fill {
  color: var(--primary);
  font-size: 1rem;
}

.index-explore__location-btn .bi-chevron-down {
  font-size: 0.72rem;
  color: #a8a29e;
  margin-left: 0.1rem;
  transition: transform 0.2s ease;
}

.index-explore__location-btn[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.index-explore__toolbar {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.index-explore__search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--index-toolbar-bg);
  border: 1px solid var(--border-soft, #e7e5e4);
  border-radius: 14px;
  padding: 0.72rem 1rem;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.index-explore__search:focus-within {
  border-color: rgba(224, 134, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(224, 134, 0, 0.12);
}

.index-explore__search i {
  color: #a8a29e;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.index-explore__search input {
  border: none;
  background: transparent;
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  color: var(--ink);
}

.index-explore__search input::placeholder {
  color: #a8a29e;
}

.index-explore__filter-btn {
  position: relative;
  flex-shrink: 0;
  min-width: 48px;
  height: auto;
  border: 1px solid var(--border-soft, #e7e5e4);
  border-radius: 14px;
  background: var(--index-toolbar-bg);
  color: var(--ink);
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1rem;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.index-explore__filter-label {
  display: none;
  font-size: 0.88rem;
}

.index-explore__filter-btn:hover {
  background: #fafaf9;
  border-color: #d6d3d1;
}

.index-explore__filter-btn.has-active-filters {
  border-color: rgba(224, 134, 0, 0.4);
  background: var(--primary-light, #fff7ed);
  color: var(--primary-dark, #763a12);
}

.index-explore__filter-btn.has-active-filters::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
}

.index-chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 0.85rem;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
}

.index-chips[hidden] {
  display: none !important;
}

.index-chips::-webkit-scrollbar {
  display: none;
}

.index-chip {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: #e7e5e4;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.index-chip:hover {
  background: #d6d3d1;
}

.index-chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.index-chip--active {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid var(--border-soft, #e7e5e4);
  color: var(--ink);
  padding: 0.42rem 0.55rem 0.42rem 0.85rem;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.index-chip--active:hover {
  background: #fafaf9;
  border-color: #d6d3d1;
}

.index-chip--active i {
  font-size: 0.95rem;
  color: #a8a29e;
  line-height: 1;
}

.index-chip--active:hover i {
  color: var(--ink);
}

.index-explore__results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.95rem;
}

.index-explore__meta {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary, #78716c);
  line-height: 1.4;
}

.index-filters-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ─── Property grid ─── */
.x-property-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.x-property-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 639px) {
  .index-loc-menu {
    left: 0;
    right: auto;
  }

  .index-explore__header {
    align-items: flex-start;
  }
}

@media (min-width: 640px) {
  .index-explore__filter-label {
    display: inline;
  }

  .index-explore__filter-btn {
    padding: 0 1.15rem;
  }

  .index-explore__filter-btn.has-active-filters::after {
    top: 10px;
    right: 10px;
  }
}

/* Navbar & page shell — lihat public-layout.css */
body.page-explore,
body.index-on-explore {
  background: var(--page-explore-bg);
}

.index-on-explore .m-explore-head,
.index-on-explore .m-explore-toolbar,
.index-on-explore .section-heading,
.index-on-explore .house-card,
.index-on-explore .m-property-list {
  display: none !important;
}

/* Property cards — index */
.page-explore .m-property-card,
.index-on-explore .m-property-card {
  background: #fff;
  border: 1px solid var(--border-soft, #e7e5e4);
  border-radius: var(--index-card-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.page-explore .m-property-card--clickable,
.index-on-explore .m-property-card--clickable {
  cursor: pointer;
}

.page-explore .m-property-card--clickable:hover,
.index-on-explore .m-property-card--clickable:hover {
  transform: translateY(-2px);
  border-color: #d6d3d1;
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.08);
}

.page-explore .m-property-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7e5e4;
}

.page-explore .m-property-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.page-explore .m-property-card--clickable:hover .m-property-card__media img {
  transform: scale(1.03);
}

.page-explore .m-property-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: max-content;
  max-width: calc(100% - 5.5rem);
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  text-transform: capitalize;
  z-index: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-explore .m-property-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.page-explore .m-property-card__body {
  padding: 0.95rem 1.05rem 1.1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.page-explore .m-property-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.28rem;
}

.page-explore .m-property-card__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0;
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-explore .m-property-card__price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary-dark, #763a12);
  white-space: nowrap;
  flex-shrink: 0;
}

.page-explore .m-property-card__loc {
  font-size: 0.8rem;
  color: #78716c;
  margin: 0 0 0.35rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-explore .m-property-card__dev {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #57534e;
  line-height: 1.35;
  min-width: 0;
}

.page-explore .m-property-card__dev i {
  color: var(--primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.page-explore .m-property-card__dev span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-explore .m-property-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
}

.page-explore .m-property-card__specs span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #57534e;
  background: #f5f5f4;
  padding: 0.38rem 0.6rem;
  border-radius: 8px;
}

.page-explore .m-property-card__specs i {
  font-size: 0.82rem;
  color: #78716c;
}

.page-explore .m-property-card__specs span.is-pref-match {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid rgba(22, 163, 74, 0.2);
}

.page-explore .m-property-card__specs span.is-pref-match i {
  color: #16a34a;
}

@media (min-width: 700px) {
  .index-explore {
    padding-top: 1.75rem;
  }

  .x-property-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }

  .x-property-list {
    display: contents;
  }
}

@media (min-width: 1100px) {
  .x-property-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

/* Filter drawer panel */
body.index-filter-open {
  overflow: hidden;
}

.index-filter-panel {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: none;
}

.index-filter-panel.open {
  pointer-events: auto;
}

.index-filter-panel__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.index-filter-panel.open .index-filter-panel__backdrop {
  opacity: 1;
}

.index-filter-panel__sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.14);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.index-filter-panel.open .index-filter-panel__sheet {
  transform: translateY(0);
}

.index-filter-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: #d6d3d1;
  margin: 0.65rem auto 0;
  flex-shrink: 0;
}

.index-filter-sheet__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.15rem 0.35rem;
  flex-shrink: 0;
}

.index-filter-sheet__head-text h5 {
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.2rem;
}

.index-filter-sheet__hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted);
}

.index-filter-sheet__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.index-filter-sheet__close:hover {
  background: #e7e5e4;
  color: var(--ink);
}

.index-filter-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 1.15rem 1rem;
  -webkit-overflow-scrolling: touch;
}

.index-filter-field + .index-filter-field {
  margin-top: 1.15rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border-soft);
}

.index-filter-field__label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.index-filter-field__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.index-filter-field__hint {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.index-filter-field__control {
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0.72rem 0.95rem;
  font-size: 0.95rem;
  background: var(--bg-alt);
  box-shadow: none;
}

.index-filter-field__control:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

.index-filter-price-widget.price-input-wrap {
  padding: 0;
  background: transparent;
}

.index-filter-price-widget.price-input-wrap.pi-minmax-stacked .pi-input-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.index-filter-price-widget.price-input-wrap input.pi-number {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 0.72rem 0.95rem;
  font-size: 0.95rem;
  background: var(--bg-alt);
  font-family: inherit;
  color: var(--ink);
}

.index-filter-price-widget.price-input-wrap input.pi-number::placeholder {
  color: var(--muted);
  opacity: 1;
}

.index-filter-price-widget.price-input-wrap input.pi-number:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

.index-filter-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.index-filter-preset {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.index-filter-preset:hover {
  border-color: #d6d3d1;
  color: var(--ink);
}

.index-filter-preset.active {
  background: var(--primary-light);
  border-color: transparent;
  color: var(--primary-dark);
  box-shadow: var(--focus-ring);
}

.index-filter-sheet__foot {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem calc(0.95rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-soft);
  background: var(--surface);
  flex-shrink: 0;
}

.index-filter-reset {
  min-height: 48px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-secondary);
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.index-filter-reset:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.index-filter-apply {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
  box-shadow: 0 8px 20px rgba(224, 134, 0, 0.22);
}

.index-filter-apply:hover {
  background: var(--primary-dark);
}

.index-filter-apply:active {
  transform: scale(0.98);
}

@media (min-width: 768px) {
  .index-filter-sheet__handle {
    display: none;
  }

  .index-filter-panel__sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(440px, calc(100% - 2rem));
    max-height: min(86vh, 620px);
    border-radius: 20px;
    transform: translate(-50%, calc(-50% + 24px));
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .index-filter-panel.open .index-filter-panel__sheet {
    transform: translate(-50%, -50%);
    opacity: 1;
  }

  .index-filter-sheet__head {
    padding: 1.15rem 1.25rem 0.5rem;
  }

  .index-filter-sheet__body {
    padding: 0.5rem 1.25rem 1rem;
  }

  .index-filter-sheet__foot {
    padding: 1rem 1.25rem 1.15rem;
  }
}

/* Location dropdown */
.index-loc-dropdown {
  position: relative;
  flex: 0 0 auto;
}

.index-loc-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  left: auto;
  min-width: 220px;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border-soft, #e7e5e4);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(28, 25, 23, 0.12);
  padding: 0.4rem;
  z-index: 50;
  display: none;
}

.index-loc-menu.open {
  display: block;
}

.index-loc-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 0.58rem 0.8rem;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.index-loc-menu button:hover,
.index-loc-menu button.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}

/* ─── Zona Untuk Anda (rekomendasi di daftar rumah) ─── */
.index-foryou {
  padding: 1.35rem 0 1.15rem;
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(224, 134, 0, 0.07), transparent 55%),
    linear-gradient(180deg, #fafaf9 0%, var(--bg-alt, #f5f5f4) 100%);
  border-bottom: 1px solid var(--index-surface-line);
}

.index-foryou__head {
  margin-bottom: 0.75rem;
}

.index-foryou__intro h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink, #1c1917);
  line-height: 1.15;
}

.index-foryou__sub {
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary, #78716c);
  line-height: 1.4;
}

.index-foryou__sub strong {
  color: var(--ink);
  font-weight: 700;
}

.index-foryou__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.index-foryou__lokasi {
  min-width: 12rem;
  max-width: 17rem;
  border: 1px solid var(--border-soft, #e7e5e4);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.04);
}

.index-foryou__lokasi:focus {
  outline: none;
  border-color: rgba(224, 134, 0, 0.45);
  box-shadow: 0 0 0 3px rgba(224, 134, 0, 0.12);
}

.index-foryou__reset {
  border: none;
  background: transparent;
  color: var(--primary-dark, #763A12);
  font-size: 0.78rem;
  font-weight: 700;
  font-family: inherit;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.index-foryou__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
}

.index-foryou__count {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink);
}

.index-foryou__label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.foryou-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(224, 134, 0, 0.08);
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
}

.foryou-note i {
  color: var(--primary);
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.index-foryou .empty-state--compact {
  padding: 1.75rem 1rem;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* ─── Carousel Untuk Anda (≈3 kartu terlihat, geser horizontal) ─── */
.foryou-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.25rem;
}

.foryou-carousel__viewport {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 0.15rem 0.65rem;
  container-type: inline-size;
  container-name: foryou;
}

.foryou-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.foryou-carousel__track {
  display: flex;
  gap: 0.9rem;
  width: max-content;
}

.foryou-carousel__item {
  flex: 0 0 82cqw;
  width: 82cqw;
  max-width: 320px;
  scroll-snap-align: start;
}

.foryou-carousel__item .m-property-card {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(28, 25, 23, 0.06);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 28px rgba(28, 25, 23, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.foryou-carousel__item .m-property-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.1);
}

.foryou-carousel__item .m-property-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e7e5e4;
}

.foryou-carousel__item .m-property-card__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.foryou-carousel__item .m-property-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0.85rem 0.95rem 1rem;
  gap: 0.2rem;
}

.foryou-carousel__item .m-property-card__title {
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.foryou-carousel__item .m-property-card__price {
  font-size: 0.95rem;
  white-space: nowrap;
}

.foryou-carousel__item .m-property-card__loc {
  font-size: 0.78rem;
  margin: 0 0 0.3rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.foryou-carousel__item .m-property-card__dev {
  margin-bottom: 0.55rem;
  font-size: 0.74rem;
}

.foryou-carousel__item .m-property-card__specs {
  margin-top: 0.35rem;
}

.foryou-carousel__item .rec-match-chips {
  margin: 0.45rem 0 0.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.foryou-carousel__item .rec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(224, 134, 0, 0.12);
  color: var(--primary-dark, #763A12);
  border: none;
}

.foryou-carousel__item .rec-chip i {
  font-size: 0.72rem;
  color: var(--primary);
}

.foryou-carousel__item .m-property-card__feedback {
  margin-top: 0.45rem;
  margin-bottom: 0.55rem;
  opacity: 0.92;
}

.foryou-carousel__item .m-btn-card {
  margin-top: auto;
  width: 100%;
  justify-content: center;
  gap: 0.25rem;
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  background: var(--ink, #1c1917);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.foryou-carousel__item .m-btn-card:hover {
  background: #292524;
  color: #fff;
}

.foryou-carousel__item .m-btn-card:active {
  transform: scale(0.98);
}

.foryou-carousel__item .m-btn-card i {
  font-size: 1.15rem;
  line-height: 1;
}

.foryou-carousel__nav {
  flex: 0 0 auto;
  align-self: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 1px solid rgba(28, 25, 23, 0.08);
  background: #fff;
  color: var(--ink);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.08);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.foryou-carousel__nav:hover {
  background: #fff7ed;
  border-color: rgba(224, 134, 0, 0.35);
}

.foryou-carousel__nav:active {
  transform: scale(0.96);
}

.foryou-carousel__hint {
  margin: 0.15rem 0 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-align: center;
}

@container foryou (min-width: 560px) {
  .foryou-carousel__item {
    flex-basis: calc((100cqw - 0.9rem) / 2);
    width: calc((100cqw - 0.9rem) / 2);
    max-width: none;
  }
}

@container foryou (min-width: 900px) {
  .foryou-carousel__item {
    flex-basis: calc((100cqw - 1.8rem) / 3);
    width: calc((100cqw - 1.8rem) / 3);
    max-width: none;
  }
}

@media (min-width: 992px) {
  .foryou-carousel__nav {
    display: inline-flex;
  }
}

@supports not (width: 1cqw) {
  .foryou-carousel__item {
    flex: 0 0 280px;
    width: 280px;
  }

  @media (min-width: 992px) {
    .foryou-carousel__item {
      flex: 0 0 calc(33.333% - 0.65rem);
      width: calc(33.333% - 0.65rem);
    }
  }
}

@media (max-width: 576px) {
  .index-foryou__head {
    align-items: stretch;
  }

  .index-foryou__controls {
    width: 100%;
  }

  .index-foryou__lokasi {
    flex: 1;
    max-width: none;
  }
}

/* Detail modal score panel (rekomendasi) */
.score-panel {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 1rem;
  margin-top: 0.5rem;
}
.score-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0;
}
.score-label {
  font-size: 0.7rem;
  color: var(--muted);
  width: 60px;
  flex-shrink: 0;
}
.score-bar {
  flex: 1;
  height: 4px;
  background: #e7e5e4;
  border-radius: 2px;
  overflow: hidden;
}
.score-fill {
  height: 100%;
  border-radius: 2px;
}
.score-val {
  font-size: 0.7rem;
  font-weight: 700;
  width: 32px;
  text-align: right;
}


/* ─── Mobile audit polish ─── */
html {
  scroll-padding-top: 4.75rem;
}

#index-listing,
#untuk-anda {
  scroll-margin-top: 4.75rem;
}

@media (max-width: 991px) {
  .index-explore {
    padding-top: 1rem;
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .index-page-container {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }

  .index-explore__header {
    margin-bottom: 0.95rem;
    padding-bottom: 0.95rem;
  }

  .index-page-title {
    font-size: 1.35rem;
  }

  .index-explore__lede {
    font-size: 0.88rem;
  }

  .index-explore__toolbar {
    gap: 0.5rem;
  }

  .index-explore__search {
    padding: 0.65rem 0.85rem;
    min-height: 48px;
  }

  .index-explore__filter-btn {
    min-width: 48px;
    min-height: 48px;
  }

  .page-explore .m-property-card__head,
  .index-on-explore .m-property-card__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }

  .page-explore .m-property-card__price,
  .index-on-explore .m-property-card__price {
    font-size: 1.05rem;
  }

  .page-explore .m-property-card__specs span,
  .index-on-explore .m-property-card__specs span {
    font-size: 0.74rem;
    padding: 0.4rem 0.55rem;
  }

  .index-filter-panel__sheet {
    max-height: min(92dvh, 720px);
  }

  .foryou-carousel__item {
    flex: 0 0 min(78vw, 300px);
    width: min(78vw, 300px);
  }
}
