/* Buy With Us — page-specific */

.buy-search {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background: var(--white);
}

.buy-search__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.buy-search__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.55rem, 2.6vw, 2.05rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--navy);
  max-width: 18ch;
}

.buy-search .search-form {
  grid-template-columns: 1fr 1fr;
  box-shadow: none;
}

.buy-search .search-field--location,
.buy-search .search-submit {
  grid-column: 1 / -1;
}

.buy-search .search-submit {
  min-height: 3.25rem;
}

.buy-search__media {
  aspect-ratio: 5 / 4;
  overflow: hidden;
}

.buy-search__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Pre-approval */
.preapproval {
  padding: 0 0 clamp(4.5rem, 9vw, 7rem);
}

.preapproval__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

.preapproval__card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2.5rem, 5vw, 3.75rem);
  background: var(--white);
  border: 1px solid var(--line);
}

.preapproval__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(205, 176, 132, 0.45);
  color: var(--sand);
}

.preapproval__icon svg {
  width: 1.55rem;
  height: 1.55rem;
}

.preapproval__card h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--navy);
  max-width: 18ch;
}

.preapproval__card > p {
  margin: 0 0 1.75rem;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--muted);
  max-width: 34rem;
}

.preapproval__note {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.preapproval__media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.preapproval__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 22rem;
}

/* Costs */
.costs {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
  background: var(--white);
}

.costs__title {
  margin: 0 0 2.75rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}

.costs__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
}

.cost-item {
  padding: 0 1.15rem;
  text-align: center;
  border-right: 1px solid var(--line);
}

.cost-item:last-child {
  border-right: none;
}

.cost-item__icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin: 0 auto 1rem;
  color: var(--sand);
}

.cost-item__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.cost-item h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.cost-item p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.costs__note {
  margin: 2.5rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--sand-hover);
}

/* FAQ + featured split */
.buy-explore {
  padding: 0 0 clamp(4.5rem, 9vw, 7rem);
}

.buy-explore__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}

.buy-explore__heading {
  margin: 0 0 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
}

.buy-explore__footer {
  margin-top: 1.5rem;
}

.buy-explore__footer--end {
  text-align: right;
}

.buy-property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.buy-property {
  display: block;
  transition: transform 0.4s var(--ease);
}

.buy-property:hover {
  transform: translateY(-3px);
}

.buy-property__media {
  position: relative;
  aspect-ratio: 4 / 3.1;
  overflow: hidden;
  margin-bottom: 0.85rem;
}

.buy-property__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.buy-property:hover .buy-property__media img {
  transform: scale(1.04);
}

.buy-property__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--sand);
  color: var(--navy);
}

.buy-property__badge--muted {
  background: var(--stone);
  color: var(--charcoal);
}

.buy-property__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.buy-property__suburb {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.buy-property__price {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
}

.buy-property__specs {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.buy-property__text {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--charcoal);
}

.buy-property .link-arrow {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sand-hover);
}

@media (max-width: 1100px) {
  .costs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 0;
  }

  .cost-item:nth-child(3) {
    border-right: none;
  }

  .cost-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
  }

  .buy-property-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .buy-search__layout,
  .preapproval__layout,
  .buy-explore__layout {
    grid-template-columns: 1fr;
  }

  .buy-search__media,
  .preapproval__media {
    min-height: 16rem;
  }

  .preapproval__media img {
    min-height: 16rem;
  }
}

@media (max-width: 720px) {
  .buy-search .search-form {
    grid-template-columns: 1fr;
  }

  .costs__grid {
    grid-template-columns: 1fr 1fr;
  }

  .cost-item {
    border-right: 1px solid var(--line);
    padding: 1.25rem 0.85rem;
  }

  .cost-item:nth-child(2n) {
    border-right: none;
  }

  .cost-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .cost-item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
