/* Kaufen-Seite – angelehnt an andresen-immobilien.de/kaufen/ */

.page-kaufen {
  scrollbar-gutter: stable;
}

/* Hero */
#kaufen-startpic .picBox img {
  width: 100%;
  height: clamp(220px, 35vw, 680px);
  object-fit: cover;
}

/* Titel + Intro */
#kaufen-starttext .outer_wrapper > .title {
  max-width: 1780px;
  padding-top: clamp(2rem, 1.17rem + 2.78vw, 4.5rem);
  padding-bottom: clamp(3.75rem, -1.875rem + 18.75vw, 20.625rem);
  margin: 0 auto;
  text-align: center;
}

#kaufen-starttext .outer_wrapper > .title h1 {
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(3.5rem, 1.15rem + 7.5vw, 10.5rem);
  line-height: 0.9;
  font-weight: 300;
  font-synthesis: none;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #2a2a2a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#kaufen-starttext .outer_wrapper:last-of-type {
  padding-bottom: clamp(8rem, 6.08rem + 6.39vw, 13.75rem);
}

#kaufen-starttext .outer_wrapper > .txt_copy {
  width: 68%;
  max-width: 1220px;
  margin: 0 auto;
  text-align: center;
}

#kaufen-starttext .outer_wrapper > .txt_copy p {
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(1.5rem, 1.1rem + 1.33vw, 2.5rem);
  line-height: 1.1;
  font-weight: 500;
  font-synthesis: none;
  letter-spacing: -0.01em;
  color: #2a2a2a;
}

/* Filter */
#kaufen-immosuche {
  padding-bottom: clamp(4rem, 2rem + 5vw, 8rem);
  scroll-margin-top: clamp(4rem, 3rem + 2vw, 6rem);
}

#kaufen-immosuche-inner {
  overflow-anchor: auto;
}

#kaufen-immosuche-inner.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#kaufen-results {
  overflow-anchor: auto;
}

.kaufen-search-form {
  margin-bottom: clamp(2rem, 1rem + 3vw, 4rem);
}

.kaufen-search-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 720px) {
  .kaufen-search-grid {
    grid-template-columns: 1fr 1fr 1fr auto;
    align-items: end;
    gap: 14px 18px;
  }
}

.kaufen-field label {
  display: block;
  margin-bottom: 8px;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b3a39;
}

/* Custom Select */
.kaufen-select {
  position: relative;
}

/* Fallback, wenn JavaScript aus ist */
.kaufen-field > select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(59, 58, 57, 0.22);
  border-radius: 3px;
  background: #fff url('../images/icons/ico_arr_pure_down_gray.svg') right 16px center / 12px auto no-repeat;
  padding: 14px 40px 14px 18px;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.8125rem, 0.76rem + 0.18vw, 0.9375rem);
  color: #3b3a39;
  cursor: pointer;
}

.kaufen-field > select:focus {
  outline: 2px solid #3b3a39;
  outline-offset: 2px;
}

.kaufen-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.kaufen-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 1px solid rgba(59, 58, 57, 0.22);
  border-radius: 3px;
  background: #fff;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.8125rem, 0.76rem + 0.18vw, 0.9375rem);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #3b3a39;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.kaufen-select-trigger:hover {
  border-color: rgba(59, 58, 57, 0.45);
  background: #fdfdfd;
}

.kaufen-select-trigger:focus-visible {
  outline: 2px solid #3b3a39;
  outline-offset: 2px;
}

.kaufen-select.is-open .kaufen-select-trigger {
  border-color: #3b3a39;
  box-shadow: 0 6px 24px rgba(59, 58, 57, 0.1);
}

.kaufen-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kaufen-select-icon {
  flex-shrink: 0;
  width: 13px;
  height: 8px;
  background: url('../images/icons/ico_arr_pure_down_gray.svg') center / contain no-repeat;
  transition: transform 0.25s ease;
  opacity: 0.85;
}

.kaufen-select.is-open .kaufen-select-icon {
  transform: rotate(180deg);
}

.kaufen-select-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: min(340px, 52vh);
  margin: 0;
  padding: 8px 0;
  list-style: none;
  border: 1px solid rgba(59, 58, 57, 0.12);
  border-radius: 3px;
  background: #fff;
  box-shadow:
    0 16px 48px rgba(59, 58, 57, 0.14),
    0 2px 8px rgba(59, 58, 57, 0.06);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 58, 57, 0.35) transparent;
  animation: kaufenSelectReveal 0.22s ease;
}

.kaufen-select-list::-webkit-scrollbar {
  width: 6px;
}

.kaufen-select-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(59, 58, 57, 0.28);
}

@keyframes kaufenSelectReveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kaufen-select-option {
  padding: 11px 18px;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.8125rem, 0.76rem + 0.18vw, 0.9375rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: #3b3a39;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.kaufen-select-option.is-category {
  margin-top: 6px;
  padding-top: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #6a6866;
}

.kaufen-select-option.is-category:first-child {
  margin-top: 0;
}

.kaufen-select-option.is-sub {
  padding-left: 28px;
  color: #4a4948;
}

.kaufen-select-option.is-sub::before {
  content: "–";
  margin-right: 8px;
  color: #9a9896;
}

.kaufen-select-option:hover,
.kaufen-select-option.is-focused {
  background: #f0efee;
}

.kaufen-select-option.is-selected {
  background: #ebeae9;
  font-weight: 700;
}

.kaufen-select-option.is-selected.is-sub {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .kaufen-select-list {
    animation: none;
  }

  .kaufen-select-icon {
    transition: none;
  }
}

.kaufen-submit {
  display: block;
  width: 100%;
  min-width: 250px;
  min-height: 52px;
  padding: clamp(0.5rem, -0.19rem + 1.08vw, 0.94rem) clamp(1.25rem, 0.21rem + 2.78vw, 3.13rem);
  border: none;
  border-radius: 30px;
  background: #b4b0ac;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #3b3a39;
  cursor: pointer;
  transition: opacity 0.2s;
}

.kaufen-submit:hover {
  opacity: 0.85;
}

/* Aktive Filter + Reset */
.kaufen-filter-reset-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
  margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  padding: clamp(1rem, 0.85rem + 0.6vw, 1.35rem) clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem);
  border: 1px solid rgba(59, 58, 57, 0.12);
  border-radius: 3px;
  background: linear-gradient(145deg, #faf9f8 0%, #f2f1f0 100%);
  box-shadow: 0 10px 32px rgba(59, 58, 57, 0.05);
}

.kaufen-filter-reset-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: min(100%, 280px);
}

.kaufen-filter-reset-kicker {
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a8886;
}

.kaufen-filter-reset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kaufen-filter-reset-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(59, 58, 57, 0.14);
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kaufen-filter-reset-tag:has(.kaufen-filter-reset-tag__remove:hover),
.kaufen-filter-reset-tag:has(.kaufen-filter-reset-tag__remove:focus-visible) {
  border-color: rgba(59, 58, 57, 0.28);
  box-shadow: 0 4px 14px rgba(59, 58, 57, 0.08);
}

.kaufen-filter-reset-tag__type {
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8a8886;
}

.kaufen-filter-reset-tag__text {
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #3b3a39;
}

.kaufen-filter-reset-tag__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-left: 2px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(59, 58, 57, 0.08);
  cursor: pointer;
  transition:
    background-color 0.18s ease,
    transform 0.18s ease;
}

.kaufen-filter-reset-tag__remove-icon {
  width: 10px;
  height: 10px;
  background:
    linear-gradient(#6a6866, #6a6866) center/10px 1px no-repeat,
    linear-gradient(#6a6866, #6a6866) center/1px 10px no-repeat;
  transform: rotate(45deg);
  transition: background 0.18s ease;
}

.kaufen-filter-reset-tag__remove:hover,
.kaufen-filter-reset-tag__remove:focus-visible {
  background: #3b3a39;
  transform: scale(1.06);
}

.kaufen-filter-reset-tag__remove:hover .kaufen-filter-reset-tag__remove-icon,
.kaufen-filter-reset-tag__remove:focus-visible .kaufen-filter-reset-tag__remove-icon {
  background:
    linear-gradient(#f7f6f5, #f7f6f5) center/10px 1px no-repeat,
    linear-gradient(#f7f6f5, #f7f6f5) center/1px 10px no-repeat;
}

.kaufen-filter-reset-tag__remove:focus-visible {
  outline: 2px solid #3b3a39;
  outline-offset: 2px;
}

.kaufen-filter-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid #3b3a39;
  border-radius: 999px;
  background: #fff;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.72rem, 0.66rem + 0.2vw, 0.8125rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #3b3a39;
  cursor: pointer;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.kaufen-filter-reset-btn__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background:
    linear-gradient(#3b3a39, #3b3a39) center/14px 1px no-repeat,
    linear-gradient(#3b3a39, #3b3a39) center/1px 14px no-repeat;
  transform: rotate(45deg);
  transition: background 0.22s ease;
}

.kaufen-filter-reset-btn:hover,
.kaufen-filter-reset-btn:focus-visible {
  background: #3b3a39;
  color: #f7f6f5;
  box-shadow: 0 8px 24px rgba(59, 58, 57, 0.16);
  transform: translateY(-1px);
}

.kaufen-filter-reset-btn:hover .kaufen-filter-reset-btn__icon,
.kaufen-filter-reset-btn:focus-visible .kaufen-filter-reset-btn__icon {
  background:
    linear-gradient(#f7f6f5, #f7f6f5) center/14px 1px no-repeat,
    linear-gradient(#f7f6f5, #f7f6f5) center/1px 14px no-repeat;
}

.kaufen-filter-reset-btn:focus-visible {
  outline: 2px solid #3b3a39;
  outline-offset: 3px;
}

.kaufen-empty-wrap {
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0 clamp(2rem, 1.5rem + 2vw, 3rem);
  text-align: center;
}

.kaufen-empty-hint {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.875rem, 0.82rem + 0.22vw, 1rem);
  line-height: 1.45;
  color: #6a6866;
}

.kaufen-empty-wrap .kaufen-empty {
  padding: 0;
}

.kaufen-empty {
  padding: 2rem 0;
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(1.1rem, 0.95rem + 0.5vw, 1.5rem);
  color: #3b3a39;
}

/* Objektliste */
.kaufen-property-list > .property-item-wrap {
  width: 100%;
}

.one-property {
  width: 100%;
}

.one-property .wrapper {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  width: 100%;
  padding: clamp(2.5rem, 2rem + 1.67vw, 3.75rem) 0;
  border-top: 1px solid #3b3a39;
}

.one-property .wrapper > .desc {
  width: 100%;
}

.one-property .location {
  margin-bottom: 12px;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(calc(0.5rem + 2px), calc(0.425rem + 0.28vw + 2px), calc(0.75rem + 2px));
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
  color: #3b3a39;
}

.one-property .title {
  display: block;
  margin-bottom: 40px;
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(1.5rem, 1.1rem + 1.33vw, 2.5rem);
  line-height: 1.1;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #3b3a39;
  word-wrap: break-word;
  transition: opacity 0.2s;
}

.one-property .title:hover {
  opacity: 0.7;
}

.one-property .center {
  width: 60%;
  min-width: 280px;
  max-width: 480px;
  margin-bottom: 40px;
}

.kaufen-facts {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.kaufen-facts tbody {
  display: block;
}

.kaufen-facts tr {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 6px;
}

.kaufen-facts th,
.kaufen-facts td {
  display: block;
  width: 50%;
  padding: 0 10px 0 0;
  text-align: left;
  vertical-align: top;
  color: #3b3a39;
}

.kaufen-facts th {
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(calc(0.625rem + 2px), calc(0.525rem + 0.28vw + 2px), calc(0.875rem + 2px));
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.kaufen-facts td {
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(calc(0.625rem + 2px), calc(0.525rem + 0.28vw + 2px), calc(0.875rem + 2px));
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: -0.015em;
  white-space: normal;
}

.kaufen-facts-price th,
.kaufen-facts-price td {
  padding-top: 10px;
}

.one-property .linkBox > .link {
  display: block;
  width: max-content;
  padding-right: clamp(1.5rem, 1.25rem + 0.83vw, 2.25rem);
  background: url('../images/icons/ico_arrow_right_dark.svg') right center / clamp(1rem, 0.92rem + 0.28vw, 1.25rem) auto no-repeat;
  transition: opacity 0.2s;
}

.one-property .linkBox > .link:hover {
  opacity: 0.7;
}

.one-property .linkBox > .link > span {
  display: inline-block;
  padding-bottom: 8px;
  border-bottom: 1px solid #3b3a39;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.75rem, 0.65rem + 0.33vw, 1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #3b3a39;
}

.one-property .pic {
  display: block;
  width: 100%;
  margin-bottom: 40px;
}

.one-property .pic img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1020px) {
  .one-property .wrapper {
    flex-direction: row;
    justify-content: space-between;
  }

  .one-property .wrapper > .desc {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 48%;
  }

  .one-property .center {
    width: 100%;
    min-width: unset;
    max-width: unset;
  }

  .one-property .pic {
    width: 50%;
    margin-bottom: 0;
  }
}

/* Footer-CTA */
#kaufen-nichtdabei .picBox {
  position: relative;
}

#kaufen-nichtdabei .picBox img {
  display: block;
  width: 100%;
  height: clamp(420px, 55vh, 800px);
  object-fit: cover;
}

#kaufen-nichtdabei .picBox .cont_wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1.25rem, -0.55rem + 3.79vw, 4rem) clamp(1rem, 0.375rem + 2.08vw, 2.25rem);
  z-index: 2;
}

#kaufen-nichtdabei .contBox,
#kaufen-nichtdabei .linkBox {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

#kaufen-nichtdabei .contBox > .title {
  padding-bottom: clamp(1.25rem, -0.06rem + 2.05vw, 2.25rem);
  margin: 0 auto;
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(2.25rem, 1.15rem + 3.67vw, 5rem);
  line-height: 0.9;
  font-weight: 300;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #eaefef;
}

#kaufen-nichtdabei .contBox > .cont p {
  max-width: 600px;
  margin: 0 auto;
  font-family: "Portrait", "freight-display-pro", Georgia, serif;
  font-size: clamp(1rem, 0.63rem + 0.77vw, 1.5rem);
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.015em;
  color: #eaefef;
}

#kaufen-nichtdabei .linkBox > .link {
  display: inline-block;
  width: max-content;
  padding: clamp(0.5rem, -0.19rem + 1.08vw, 0.94rem) clamp(1.25rem, 0.21rem + 2.78vw, 3.13rem);
  border-radius: 30px;
  background: #eaefef;
  transition: opacity 0.2s;
}

#kaufen-nichtdabei .linkBox > .link:hover {
  opacity: 0.85;
}

#kaufen-nichtdabei .linkBox > .link > span {
  display: inline-block;
  padding-top: 1px;
  font-family: "Untitled", "freight-sans-pro", Arial, sans-serif;
  font-size: clamp(0.75rem, 0.65rem + 0.33vw, 1rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  color: #3b3a39;
}

@media (min-width: 900px) {
  #kaufen-nichtdabei .contBox,
  #kaufen-nichtdabei .linkBox {
    width: 58%;
  }

  #kaufen-nichtdabei .linkBox {
    padding-top: 0;
  }
}
