/* ============================================
   Individual Property Listing Page
   css/pages/listing.css
   ============================================ */


/* ================================================================
   BREADCRUMB
   ================================================================ */
.property-breadcrumb {
  background: var(--color-dark);
  padding-top: calc(76px + var(--space-lg));
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.property-breadcrumb__inner {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-xs);
  color: var(--color-mid-gray);
  letter-spacing: 0.03em;
  flex-wrap: wrap;
}

.property-breadcrumb a {
  color: var(--color-mid-gray);
  transition: color var(--duration-fast);
}

.property-breadcrumb a:hover {
  color: var(--accent);
}

.property-breadcrumb__sep {
  color: rgba(154, 148, 144, 0.35);
  font-size: 10px;
}

.property-breadcrumb__current {
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}


/* ================================================================
   PHOTO GALLERY
   ================================================================ */
.property-gallery {
  background: var(--color-dark);
  padding-bottom: 0;
}

/* Main large image */
.gallery-main {
  position: relative;
  overflow: hidden;
  background: var(--color-charcoal);
  cursor: zoom-in;
  line-height: 0;
}

.gallery-main__img {
  width: 100%;
  max-height: 580px;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-out);
}

.gallery-main:hover .gallery-main__img {
  transform: scale(1.02);
}

/* Expand/view all button */
.gallery-main__expand {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  background: rgba(30, 28, 26, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-white);
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: background var(--duration-fast), border-color var(--duration-fast);
  z-index: 2;
  border-radius: 0;
}

.gallery-main__expand:hover {
  background: rgba(30, 28, 26, 0.97);
  border-color: rgba(184, 147, 78, 0.4);
}

/* Thumbnail strip */
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: 3px;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--color-charcoal);
  line-height: 0;
}

.gallery-thumb__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-normal) var(--ease-out),
              filter var(--duration-normal) var(--ease-out),
              opacity var(--duration-normal) var(--ease-out);
  opacity: 0.75;
}

.gallery-thumb:hover .gallery-thumb__img,
.gallery-thumb.is-active .gallery-thumb__img {
  opacity: 1;
  transform: scale(1.05);
}

.gallery-thumb.is-active::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent);
  pointer-events: none;
  z-index: 1;
}

/* "+N more" overlay on last thumb */
.gallery-thumb--more .gallery-thumb__more-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30, 28, 26, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1;
  gap: 4px;
  transition: background var(--duration-fast);
}

.gallery-thumb--more:hover .gallery-thumb__more-overlay {
  background: rgba(30, 28, 26, 0.5);
}

.gallery-thumb--more .gallery-thumb__more-count {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: 1;
}

.gallery-thumb--more .gallery-thumb__more-label {
  font-size: var(--fs-xs);
  color: var(--color-gold-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}


/* ================================================================
   PROPERTY INFO BAR (dark strip below gallery)
   ================================================================ */
.property-info-bar {
  background: var(--color-dark);
  color: var(--text-on-dark);
  padding-block: var(--space-2xl);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.property-info-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.property-info-bar__left {
  flex: 1;
  min-width: 260px;
}

/* Price + badge inline */
.property-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-xs);
}

.property-price {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: var(--ls-tight);
}

.property-address-block {
  margin-top: var(--space-xs);
}

.property-address {
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-medium);
  color: rgba(255, 255, 255, 0.85);
  display: block;
  margin-bottom: 3px;
}

.property-city {
  font-size: var(--fs-small);
  color: var(--color-mid-gray);
  display: block;
}

/* Quick stats on right */
.property-info-bar__right {
  display: flex;
  gap: var(--space-3xl);
  flex-shrink: 0;
}

.property-quick-stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: var(--fw-regular);
  color: var(--accent);
  line-height: 1;
  display: block;
}

.property-quick-stat__label {
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-mid-gray);
  display: block;
  margin-top: 4px;
}


/* ================================================================
   PROPERTY LAYOUT (main content + sticky sidebar)
   ================================================================ */
.section--property {
  padding-block: var(--section-pad-y);
  background: var(--color-cream);
}

.property-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-3xl);
  align-items: start;
}

.property-main {
  min-width: 0;
}

.property-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}


/* ================================================================
   SIDEBAR CARDS
   ================================================================ */

/* Price + CTA card (dark) */
.sidebar-price-card {
  background: var(--color-dark);
  padding: var(--space-xl);
  color: var(--text-on-dark);
}

.sidebar-price-card__price {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3vw, 2.375rem);
  font-weight: var(--fw-regular);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--space-xs);
}

.sidebar-price-card__address {
  font-size: var(--fs-small);
  color: var(--color-mid-gray);
  margin-bottom: var(--space-xl);
  line-height: 1.5;
}

.sidebar-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md) var(--space-xl);
  padding-bottom: var(--space-xl);
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-stat__value {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}

.sidebar-stat__label {
  font-size: var(--fs-xs);
  color: var(--color-mid-gray);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
}

.sidebar-price-card .btn {
  width: 100%;
  justify-content: center;
}

.sidebar-price-card .btn + .btn {
  margin-top: var(--space-sm);
}

.sidebar-price-card__link {
  display: block;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--color-mid-gray);
  padding-block: var(--space-sm);
  letter-spacing: 0.05em;
  transition: color var(--duration-fast);
  margin-top: var(--space-xs);
}

.sidebar-price-card__link:hover {
  color: var(--color-white);
}

/* Generic light sidebar card */
.sidebar-card {
  background: var(--color-white);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.sidebar-card__heading {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

/* Agent card */
.agent-card__agent {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.agent-card__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-warm-gray);
}

.agent-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agent-card__name {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.2;
}

.agent-card__title {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.agent-card__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.agent-card__contact-link {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  transition: color var(--duration-fast);
  text-decoration: none;
}

.agent-card__contact-link:hover {
  color: var(--accent);
}

.agent-card__contact-link svg {
  flex-shrink: 0;
  opacity: 0.5;
}

/* Schedule showing form */
.schedule-form .form-group {
  margin-bottom: var(--space-md);
}

.schedule-form .form-input,
.schedule-form .form-select,
.schedule-form .form-textarea {
  font-size: var(--fs-small);
  padding: var(--space-sm) var(--space-md);
}

.schedule-form .form-textarea {
  min-height: 80px;
  resize: none;
}

.schedule-form .btn {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-xs);
}

.schedule-form__legal {
  font-size: var(--fs-xs);
  color: var(--text-secondary);
  margin-top: var(--space-sm);
  line-height: 1.5;
  text-align: center;
}


/* ================================================================
   PROPERTY MAIN CONTENT
   ================================================================ */

/* Section heading within property main */
.property-section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  color: var(--text-primary);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-section + .property-section {
  margin-top: var(--space-3xl);
}

/* Description */
.property-description p {
  line-height: var(--lh-body);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.property-description p:last-child {
  margin-bottom: 0;
}

.property-description p.lead {
  font-size: var(--fs-body-lg);
  color: var(--text-primary);
  font-style: italic;
  font-family: var(--font-display);
}

/* Features */
.property-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xs) var(--space-2xl);
}

.property-feature {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-xs);
  border-bottom: 1px solid rgba(232, 226, 218, 0.6);
}

.property-feature::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: 0.7;
}

/* Details table */
.property-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--space-2xl);
}

.property-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-color);
  gap: var(--space-md);
}

.property-detail-item:last-child,
.property-detail-item:nth-last-child(2):nth-child(odd) {
  border-bottom: none;
}

.property-detail-label {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.property-detail-value {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  text-align: right;
}


/* ================================================================
   MAP SECTION
   ================================================================ */
.section--map {
  padding-block: 0;
}

.property-map {
  height: 420px;
  background: var(--color-warm-gray);
  position: relative;
  overflow: hidden;
}

.property-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.property-map__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background: var(--color-warm-white);
}

.property-map__placeholder-icon {
  color: var(--accent);
  opacity: 0.5;
}

.property-map__placeholder-text {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}


/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.97);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal) var(--ease-out);
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 48px;
  height: 48px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.lightbox-nav--prev {
  left: var(--space-xl);
}

.lightbox-nav--next {
  right: var(--space-xl);
}

.lightbox-counter {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--fs-xs);
  color: var(--color-mid-gray);
  letter-spacing: 0.12em;
}


/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .property-layout {
    grid-template-columns: 1fr;
  }

  .property-sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 768px) {
  .gallery-main__img {
    max-height: 300px;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  .property-info-bar__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .property-info-bar__right {
    gap: var(--space-xl);
  }

  .property-details-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .property-features {
    grid-template-columns: 1fr;
  }

  .property-map {
    height: 280px;
  }

  .sidebar-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lightbox-nav--prev {
    left: var(--space-md);
  }

  .lightbox-nav--next {
    right: var(--space-md);
  }
}

@media (max-width: 480px) {
  .property-breadcrumb {
    padding-top: calc(64px + var(--space-md));
  }

  .gallery-main__img {
    max-height: 260px;
  }

  .gallery-thumbs {
    display: none;
  }

  .property-info-bar__right {
    gap: var(--space-lg);
  }

  .property-map {
    height: 240px;
  }
}
