/* Harper Listings — WordPress Plugin Styles */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Questrial&display=swap');

:root {
  --harper-ivory:   #F3EEE7;
  --harper-charcoal:#383838;
  --harper-gold:    #B89D7F;
  --harper-muted:   #9b9589;
  --harper-border:  #E2DDD6;
}

.harper-listings-root {
  font-family: 'Questrial', sans-serif;
  color: var(--harper-charcoal);
  background: transparent;
  box-sizing: border-box;
}

.harper-listings-root *,
.harper-listings-root *::before,
.harper-listings-root *::after {
  box-sizing: inherit;
}

/* ── Loading ─────────────────────────────────────────── */
.harper-listings-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  color: var(--harper-muted);
  letter-spacing: 0.15em;
  font-style: italic;
}

/* ── Section Header (preview mode) ──────────────────── */
.harper-section-header {
  text-align: center;
  margin-bottom: 48px;
}
.harper-section-eyebrow {
  font-family: 'Questrial', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--harper-muted);
  margin-bottom: 14px;
}
.harper-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--harper-charcoal);
  margin: 0 0 16px;
  line-height: 1.15;
}
.harper-gold-rule {
  width: 40px;
  height: 1px;
  background: var(--harper-gold);
  margin: 0 auto;
}

/* ── Grid ────────────────────────────────────────────── */
.harper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2px;
}

/* ── Card ────────────────────────────────────────────── */
.harper-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.25s ease;
}
.harper-card:hover {
  box-shadow: 0 8px 40px rgba(56, 56, 56, 0.12);
  text-decoration: none;
  color: inherit;
}
.harper-card-photo {
  position: relative;
  width: 100%;
  padding-top: 66%;
  overflow: hidden;
  background: var(--harper-ivory);
}
.harper-card-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.harper-card:hover .harper-card-photo img {
  transform: scale(1.04);
}
.harper-card-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--harper-muted);
}
.harper-card-status {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--harper-gold);
  color: #fff;
  font-size: 0.55rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding: 4px 10px;
}
.harper-card-status--active      { background: var(--harper-gold); }
.harper-card-status--sold        { background: #383838; }
.harper-card-status--coming_soon { background: #7a9e8e; }
.harper-card-status--under_agreement { background: #8c7b6b; }
.harper-card-body {
  padding: 22px 24px 28px;
  border-top: 1px solid var(--harper-border);
}
.harper-card-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--harper-gold);
  margin-bottom: 6px;
}
.harper-card-address {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--harper-charcoal);
  margin-bottom: 10px;
  line-height: 1.3;
}
.harper-card-specs {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--harper-muted);
}

/* ── View All Button ─────────────────────────────────── */
.harper-view-all-wrap {
  text-align: center;
  margin-top: 48px;
}
.harper-btn {
  display: inline-block;
  font-family: 'Questrial', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--harper-charcoal);
  background: transparent;
  border: 1px solid var(--harper-charcoal);
  padding: 16px 40px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.harper-btn:hover {
  background: var(--harper-charcoal);
  color: #fff;
  text-decoration: none;
}
.harper-btn-gold {
  border-color: var(--harper-gold);
  color: var(--harper-gold);
}
.harper-btn-gold:hover {
  background: var(--harper-gold);
  color: #fff;
}

/* ── Detail Page ─────────────────────────────────────── */
.harper-detail {}

.harper-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--harper-muted);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.harper-detail-back:hover { color: var(--harper-charcoal); text-decoration: none; }

/* Gallery */
.harper-gallery {
  position: relative;
  width: 100%;
  height: clamp(280px, 58vw, 620px);
  background: var(--harper-ivory);
  overflow: hidden;
  margin-bottom: 2px;
}
.harper-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.harper-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,0.85);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--harper-charcoal);
  transition: background 0.2s;
  z-index: 2;
}
.harper-gallery-btn:hover { background: #fff; }
.harper-gallery-btn-prev { left: 14px; }
.harper-gallery-btn-next { right: 14px; }
.harper-gallery-counter {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  padding: 4px 10px;
  z-index: 2;
}

/* Thumbnails */
.harper-thumbs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  margin-bottom: 40px;
  scrollbar-width: none;
}
.harper-thumbs::-webkit-scrollbar { display: none; }
.harper-thumb {
  flex: 0 0 80px;
  height: 52px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  border: none;
  padding: 0;
  background: none;
}
.harper-thumb.active { opacity: 1; outline: 1px solid var(--harper-gold); }
.harper-thumb:hover { opacity: 0.75; }
.harper-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Identity */
.harper-detail-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--harper-gold);
  margin-bottom: 10px;
}
.harper-detail-address {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 300;
  color: var(--harper-charcoal);
  margin-bottom: 12px;
  line-height: 1.15;
}
.harper-detail-specs {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--harper-muted);
  margin-bottom: 40px;
}
.harper-detail-rule {
  width: 40px;
  height: 1px;
  background: var(--harper-gold);
  margin-bottom: 40px;
}

/* Content rows */
.harper-detail-row {
  display: flex;
  gap: 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--harper-border);
}
@media (max-width: 640px) {
  .harper-detail-row { flex-direction: column; gap: 16px; }
}
.harper-detail-row-label {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
  white-space: nowrap;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--harper-muted);
  padding-top: 4px;
}
.harper-detail-row-content { flex: 1; min-width: 0; }
.harper-detail-description {
  font-size: 0.95rem;
  line-height: 2;
  color: rgba(56,56,56,0.8);
}
.harper-detail-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--harper-charcoal);
  line-height: 1.6;
}
.harper-detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
}
.harper-detail-fact-label {
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--harper-muted);
  margin-bottom: 6px;
}
.harper-detail-fact-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--harper-charcoal);
}

/* Map */
.harper-detail-map {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
  filter: grayscale(20%);
}

/* Contact form */
.harper-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.harper-contact-form input,
.harper-contact-form textarea {
  width: 100%;
  font-family: 'Questrial', sans-serif;
  font-size: 0.875rem;
  color: var(--harper-charcoal);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--harper-border);
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.harper-contact-form input:focus,
.harper-contact-form textarea:focus {
  border-bottom-color: var(--harper-gold);
}
.harper-contact-form input::placeholder,
.harper-contact-form textarea::placeholder {
  color: var(--harper-muted);
  letter-spacing: 0.05em;
}
.harper-contact-form textarea {
  resize: vertical;
  min-height: 100px;
}
.harper-contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 640px) {
  .harper-contact-form-row { grid-template-columns: 1fr; }
}
.harper-contact-btn {
  align-self: flex-start;
  font-family: 'Questrial', sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: white;
  background: var(--harper-charcoal);
  border: none;
  padding: 14px 36px;
  cursor: pointer;
  transition: background 0.2s;
}
.harper-contact-btn:hover { background: var(--harper-gold); }
.harper-contact-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.harper-contact-success {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--harper-gold);
  padding: 12px 0;
}
.harper-contact-error {
  font-size: 0.8rem;
  color: #c0392b;
  padding: 8px 0;
}
