/* property-search.css — Clean & Minimal Estate Agent */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ────────────────────────────────────────────────────────────── */
:root {
  --ps-bg:          #fafaf8;
  --ps-white:       #ffffff;
  --ps-ink:         #1a1a18;
  --ps-muted:       #6b6b65;
  --ps-line:        #e8e8e3;
  --ps-accent:      #2a4a3e;
  --ps-accent-lt:   #e8f0ed;
  --ps-sale:        #2a4a3e;
  --ps-rent:        #4a3a2a;
  --ps-radius:      4px;
  --ps-card-radius: 6px;
  --ps-shadow:      0 2px 16px rgba(0,0,0,.07);
  --ps-shadow-hover:0 8px 32px rgba(0,0,0,.12);
  --ps-font-display:'Cormorant Garamond', Georgia, serif;
  --ps-font-body:   'DM Sans', system-ui, sans-serif;
  --ps-transition:  220ms ease;
}

/* ── Search form wrap ─────────────────────────────────────────────────────── */
.ps-search-wrap {
  background: var(--ps-white);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: var(--ps-shadow);
}

.ps-form {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1.3fr 1.4fr 1.4fr auto;
  gap: 16px;
  align-items: end;
}

@media (max-width: 900px) {
  .ps-form {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .ps-field--keyword { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .ps-form {
    grid-template-columns: 1fr;
  }
  .ps-field--keyword { grid-column: auto; }
  .ps-search-wrap { padding: 20px 16px; }
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.ps-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ps-field label {
  font-family: var(--ps-font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ps-muted);
}

.ps-input-wrap {
  position: relative;
}

.ps-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--ps-muted);
  pointer-events: none;
}

.ps-input-wrap input[type="text"] {
  padding-left: 42px;
}

input[type="text"],
input[type="number"],
select {
  font-family: var(--ps-font-body);
  font-size: 14px;
  color: var(--ps-ink);
  background: var(--ps-bg);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  padding: 10px 14px;
  width: 100%;
  outline: none;
  transition: border-color var(--ps-transition), box-shadow var(--ps-transition);
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  border-color: var(--ps-accent);
  box-shadow: 0 0 0 3px var(--ps-accent-lt);
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b65' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* ── Submit button ────────────────────────────────────────────────────────── */
.ps-btn {
  font-family: var(--ps-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ps-white);
  background: var(--ps-accent);
  border: none;
  border-radius: var(--ps-radius);
  padding: 11px 28px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.ps-btn:hover {
  background: #1e3830;
  transform: translateY(-1px);
}

.ps-btn:active {
  transform: translateY(0);
}

/* ── Results meta ─────────────────────────────────────────────────────────── */
.ps-results-meta {
  font-family: var(--ps-font-body);
  font-size: 13px;
  color: var(--ps-muted);
  margin-bottom: 24px;
}

.ps-results-meta strong {
  color: var(--ps-ink);
  font-weight: 500;
}

/* ── Property grid ────────────────────────────────────────────────────────── */
.ps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  min-height: 120px;
}

@media (max-width: 900px) {
  .ps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .ps-grid { grid-template-columns: 1fr; }
}

.ps-grid--loading {
  opacity: .5;
  pointer-events: none;
  transition: opacity .2s ease;
}

/* ── Property card ────────────────────────────────────────────────────────── */
.ps-card {
  background: var(--ps-white);
  border-radius: var(--ps-card-radius);
  border: 1px solid var(--ps-line);
  overflow: hidden;
  transition: box-shadow var(--ps-transition), transform var(--ps-transition);
  animation: ps-fade-up .4s both ease;
}

@keyframes ps-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ps-card:hover {
  box-shadow: var(--ps-shadow-hover);
  transform: translateY(-3px);
}

.ps-card__img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ps-line);
  text-decoration: none;
}

.ps-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.ps-card:hover .ps-card__img-wrap img {
  transform: scale(1.04);
}

.ps-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ps-bg);
}

.ps-card__img-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--ps-line);
}

/* Badge */
.ps-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: var(--ps-font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  color: var(--ps-white);
}

.ps-badge--sale { background: var(--ps-sale); }
.ps-badge--rent { background: var(--ps-rent); }
.ps-badge--sold { background: #888; }

/* Body */
.ps-card__body {
  padding: 18px 20px 20px;
}

.ps-card__price {
  font-family: var(--ps-font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ps-ink);
  letter-spacing: -.01em;
  line-height: 1;
  margin-bottom: 6px;
}

.ps-card__price small {
  font-size: 13px;
  font-weight: 400;
  color: var(--ps-muted);
  margin-left: 2px;
}

.ps-card__title {
  font-family: var(--ps-font-body);
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 8px;
  line-height: 1.35;
}

.ps-card__title a {
  color: var(--ps-ink);
  text-decoration: none;
  transition: color var(--ps-transition);
}

.ps-card__title a:hover {
  color: var(--ps-accent);
}

.ps-card__address {
  font-family: var(--ps-font-body);
  font-size: 12px;
  color: var(--ps-muted);
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  line-height: 1.4;
}

.ps-card__address svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ps-card__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--ps-line);
  padding-top: 14px;
  margin-top: 2px;
}

.ps-card__meta span {
  font-family: var(--ps-font-body);
  font-size: 12px;
  color: var(--ps-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}

.ps-card__meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* ── No results ───────────────────────────────────────────────────────────── */
[hidden] { display: none !important; }

.ps-no-results {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
  color: var(--ps-muted);
}

.ps-no-results svg {
  width: 48px;
  height: 48px;
  color: var(--ps-line);
  margin-bottom: 16px;
}

.ps-no-results p {
  font-family: var(--ps-font-display);
  font-size: 20px;
  color: var(--ps-ink);
  margin: 0 0 6px;
}

.ps-no-results small {
  font-family: var(--ps-font-body);
  font-size: 13px;
}

/* ── Error ────────────────────────────────────────────────────────────────── */
.ps-error {
  font-family: var(--ps-font-body);
  font-size: 14px;
  color: #a33;
  padding: 20px;
  text-align: center;
}

/* ── Pagination ───────────────────────────────────────────────────────────── */
.ps-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.ps-page-btn {
  font-family: var(--ps-font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--ps-ink);
  background: var(--ps-white);
  border: 1px solid var(--ps-line);
  border-radius: var(--ps-radius);
  width: 38px;
  height: 38px;
  cursor: pointer;
  transition: all var(--ps-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ps-page-btn:hover:not(.is-active):not(.is-disabled) {
  border-color: var(--ps-accent);
  color: var(--ps-accent);
}

.ps-page-btn.is-active {
  background: var(--ps-accent);
  border-color: var(--ps-accent);
  color: var(--ps-white);
  font-weight: 500;
}

.ps-page-btn.is-disabled,
.ps-page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.ps-page-btn--prev,
.ps-page-btn--next {
  font-size: 16px;
  width: 38px;
}

.ps-page-ellipsis {
  font-family: var(--ps-font-body);
  font-size: 13px;
  color: var(--ps-muted);
  padding: 0 4px;
  line-height: 38px;
}

/* ── Featured Properties Slider ───────────────────────────────────────────── */
.fp-slider {
  position: relative;
  overflow: hidden;
  padding-bottom: 48px; /* space for dots */
}

.fp-track {
  display: flex;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

.fp-slide {
  flex: 0 0 calc(33.333% - 16px);
  margin-right: 24px;
}

@media (max-width: 900px) {
  .fp-slide { flex: 0 0 calc(50% - 12px); }
}

@media (max-width: 560px) {
  .fp-slide { flex: 0 0 calc(100% - 0px); margin-right: 24px; }
}

/* Prev / next buttons */
.fp-btn {
  position: absolute;
  top: calc(50% - 24px);
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ps-white);
  border: 1px solid var(--ps-line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-ink);
  box-shadow: var(--ps-shadow);
  transition: all var(--ps-transition);
}

.fp-btn:hover {
  background: var(--ps-accent);
  border-color: var(--ps-accent);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.fp-btn svg { width: 18px; height: 18px; }
.fp-btn--prev { left: 8px; }
.fp-btn--next { right: 8px; }

/* Dots */
.fp-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 0;
}

.fp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ps-line);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.fp-dot.is-active {
  background: var(--ps-accent);
  transform: scale(1.3);
}

/* ── Single Featured Property Hero ───────────────────────────────────────── */
.fph-hero {
  display: block;
  position: relative;
  width: 100%;
  min-height: 480px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--ps-ink);
  text-decoration: none;
  border-top: 4px solid var(--ps-accent);
  transition: transform var(--ps-transition), box-shadow var(--ps-transition);
}

.fph-hero:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,.25);
}

.fph-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.65) 0%,
    rgba(0,0,0,.15) 40%,
    rgba(0,0,0,.55) 100%
  );
}

.fph-content {
  position: absolute;
  inset: 0;
  padding: 32px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fph-content-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.fph-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: var(--ps-accent);
  color: #fff;
  padding: 5px 12px;
  border-radius: 2px;
}

.fph-title {
  font-family: var(--ps-font-display);
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.2;
  letter-spacing: -.01em;
  text-shadow: 0 1px 8px rgba(0,0,0,.3);
}

.fph-content-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.fph-address {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  margin: 0;
}

.fph-address svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.fph-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.fph-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: rgba(255,255,255,.85);
}

.fph-meta svg {
  width: 14px;
  height: 14px;
  opacity: .8;
}

.fph-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ps-font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  background: var(--ps-accent);
  color: #fff;
  padding: 11px 24px;
  border-radius: var(--ps-radius);
  white-space: nowrap;
  transition: background var(--ps-transition);
}

.fph-hero:hover .fph-btn {
  background: #1e3830;
}

@media (max-width: 560px) {
  .fph-hero { min-height: 360px; }
  .fph-content { padding: 24px 20px; }
  .fph-title { font-size: 20px; }
  .fph-btn { width: 100%; justify-content: center; }
}

/* ── Featured Property Hero — background slideshow ───────────────────────── */
.fph-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
  z-index: 0;
}

.fph-bg.is-active {
  opacity: 1;
}

.fph-overlay,
.fph-content {
  z-index: 1;
}

/* ── Featured Properties Hero Group Slider ───────────────────────────────── */
.fph-group {
  position: relative;
  width: 100%;
  min-height: 480px;
  border-radius: 8px;
  overflow: hidden;
  border-top: 4px solid var(--ps-accent);
}

.fph-group-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

.fph-group-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  min-height: 480px;
}

/* Dots */
.fph-group-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}

.fph-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--ps-transition), transform var(--ps-transition);
}

.fph-group-dot.is-active {
  background: #fff;
  transform: scale(1.3);
}

@media (max-width: 560px) {
  .fph-group,
  .fph-group-slide.is-active { min-height: 360px; }
}
