/* Scoped to the estate recommendations in the October articles. */
section.related-properties.gp-estate-carousel {
  --gp-estate-gold: #bb8e43;
  --gp-estate-ink: #403c34;
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  margin: 28px 0;
  padding: 24px;
  overflow: hidden;
  background: #faf5e8;
  border: 0;
  border-left: 3px solid var(--gp-estate-gold);
  color: var(--gp-estate-ink);
}

section.gp-estate-carousel *,
section.gp-estate-carousel *::before,
section.gp-estate-carousel *::after {
  box-sizing: border-box;
}

section.gp-estate-carousel .gp-estate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 12px;
}

section.gp-estate-carousel .gp-estate-header h3 {
  margin: 0;
  padding: 0;
  color: var(--gp-estate-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

section.gp-estate-carousel .gp-estate-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 7px;
}

section.gp-estate-carousel .gp-estate-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #d9c59e;
  border-radius: 50%;
  background: #fff;
  color: #795922;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

section.gp-estate-carousel .gp-estate-controls button:hover:not(:disabled) {
  border-color: var(--gp-estate-gold);
  background: #f2e6cf;
}

section.gp-estate-carousel .gp-estate-controls button:disabled {
  opacity: .38;
  cursor: default;
}

section.gp-estate-carousel .gp-estate-controls [data-gp-count] {
  min-width: 40px;
  color: #655d4e;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

section.gp-estate-carousel > p {
  margin: 0 0 20px;
  color: #585147;
  font-size: 16px;
  line-height: 1.8;
}

section.gp-estate-carousel .gp-estate-track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 16px;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px 0 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: #cfb98c transparent;
  -webkit-overflow-scrolling: touch;
}

section.gp-estate-carousel .gp-estate-track::-webkit-scrollbar {
  height: 5px;
}

section.gp-estate-carousel .gp-estate-track::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: #cfb98c;
}

section.gp-estate-carousel article.gp-estate-card {
  display: grid;
  grid-template-columns: minmax(0, 45%) minmax(0, 55%);
  flex: 0 0 94%;
  width: 94%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #eadfc9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(70, 55, 28, .04);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

section.gp-estate-carousel article.gp-estate-card:last-child {
  scroll-snap-align: end;
}

/* WordPress may insert an empty paragraph after a linked image. */
section.gp-estate-carousel article.gp-estate-card > p:empty,
section.gp-estate-carousel article.gp-estate-card > br {
  display: none;
}

section.gp-estate-carousel .gp-estate-photo-link {
  display: block;
  min-width: 0;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}

section.gp-estate-carousel img.gp-estate-photo {
  display: block;
  position: absolute;
  inset: 0;
  align-self: stretch;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 0;
  margin: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: center;
}

section.gp-estate-carousel .gp-estate-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  margin: 0;
  padding: 23px;
  overflow-wrap: break-word;
}

section.gp-estate-carousel .gp-estate-info h4 {
  margin: 0 0 10px;
  padding: 0;
  color: var(--gp-estate-ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

section.gp-estate-carousel .gp-estate-info h4 a {
  color: inherit;
  text-decoration: none;
}

section.gp-estate-carousel .gp-estate-info h4 a:hover {
  color: #946b2a;
}

section.gp-estate-carousel .gp-estate-info p {
  margin: 0 0 13px;
  color: #585147;
  font-size: 15px;
  line-height: 1.8;
}

section.gp-estate-carousel .gp-estate-info p.property-facts {
  color: #7c715d;
  font-size: 14px;
}

section.gp-estate-carousel .gp-estate-info p.gp-property-price {
  margin-bottom: 10px;
  color: #795922;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

section.gp-estate-carousel .gp-estate-info a.gp-estate-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding: 9px 0;
  color: #946b2a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

section.gp-estate-carousel .gp-estate-info a.gp-estate-link:hover {
  color: #61451c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

section.gp-estate-carousel .gp-estate-info > p:last-child:has(.gp-estate-link) {
  margin-top: auto;
  margin-bottom: 0;
}

section.gp-estate-carousel :is(button, a, .gp-estate-track):focus-visible {
  outline: 2px solid #795922;
  outline-offset: 3px;
}

aside.cta a[href*="wa.me"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 8px;
  background: #128c4a !important;
  color: #fff !important;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none !important;
  transition: background-color .15s;
}

aside.cta a[href*="wa.me"]:hover {
  background: #0c6d38 !important;
}

aside.cta a[href*="wa.me"]:focus-visible {
  outline: 2px solid #0c6d38;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  section.related-properties.gp-estate-carousel {
    margin: 24px 0;
    padding: 18px 16px;
  }

  section.gp-estate-carousel .gp-estate-header h3 {
    font-size: 20px;
  }

  section.gp-estate-carousel > p {
    margin-bottom: 16px;
    font-size: 15px;
  }

  section.gp-estate-carousel .gp-estate-track {
    gap: 12px;
  }

  section.gp-estate-carousel article.gp-estate-card {
    display: flex;
    flex-direction: column;
    flex-basis: 88%;
    width: 88%;
  }

  section.gp-estate-carousel img.gp-estate-photo {
    flex-shrink: 0;
    height: 100% !important;
    min-height: 0;
    aspect-ratio: auto;
  }

  section.gp-estate-carousel .gp-estate-photo-link {
    min-height: 0;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
  }

  section.gp-estate-carousel .gp-estate-info {
    flex: 1;
    padding: 18px;
  }

  section.gp-estate-carousel .gp-estate-info h4 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  section.gp-estate-carousel .gp-estate-track {
    scroll-behavior: auto;
  }

  section.gp-estate-carousel .gp-estate-controls button,
  aside.cta a[href*="wa.me"] {
    transition: none;
  }
}
