/* ==========================================================================
   Listing detail — layers on top of styles.css
   ========================================================================== */

/* --- Breadcrumb ----------------------------------------------------------- */
.breadcrumb {
  padding-top: clamp(20px, 3vw, 32px);
}
.breadcrumb .link-arrow {
  font-size: 0.95rem;
  color: var(--slate);
}
.breadcrumb .link-arrow:hover { color: var(--aubergine); }
.breadcrumb .link-arrow span { transition: transform 0.25s var(--ease); }
.breadcrumb .link-arrow:hover span { transform: translateX(-4px); }

/* --- Hero ----------------------------------------------------------------- */
.listing-hero {
  padding-block: clamp(28px, 4vw, 48px) clamp(40px, 6vw, 72px);
}
.listing-hero__grid {
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
.listing-hero__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.listing-hero__copy h1 { margin: 0.4rem 0 1.6rem; }

@media (min-width: 768px) {
  .listing-hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}

/* --- Stat row ------------------------------------------------------------- */
.stat-row {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 3vw, 34px);
  margin-bottom: 2rem;
}
.stat-row li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-right: clamp(18px, 3vw, 34px);
  border-right: 1px solid var(--stone);
}
.stat-row li:last-child { border-right: 0; padding-right: 0; }
.stat-row__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1;
  color: var(--aubergine);
}
.stat-row__label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--slate);
}

/* --- Price block ---------------------------------------------------------- */
.price-block {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--stone);
}
.price-block__amount {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 2.8rem);
  color: var(--aubergine);
}
.price-block__note {
  font-style: italic;
  color: var(--slate);
}

/* --- Intro ---------------------------------------------------------------- */
.listing-intro { padding-block: clamp(40px, 6vw, 80px); }

/* --- Gallery -------------------------------------------------------------- */
.listing-gallery-section .eyebrow { margin-bottom: 1.6rem; }

.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.gallery__item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 8px 24px -22px rgba(52, 33, 61, 0.45);
}
.gallery__item img { transition: transform 0.6s var(--ease); }
.gallery__item:hover img { transform: scale(1.05); }

@media (min-width: 768px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(120px, 13.5vw, 200px);
    grid-auto-flow: dense;
    gap: 18px;
  }
  /* Items fill the auto rows rather than holding their own aspect ratio. */
  .gallery__item { aspect-ratio: auto; height: 100%; }
  .gallery__item--feature { grid-column: span 2; grid-row: span 2; }
  .gallery__item--wide    { grid-column: span 2; grid-row: span 1; }
}

/* --- Features ------------------------------------------------------------- */
.features-grid {
  margin-top: clamp(28px, 4vw, 48px);
  display: grid;
  gap: clamp(28px, 4vw, 56px);
}
.features-col h3 { margin-bottom: 1.1rem; }
.features-col__second { margin-top: 2rem; }

.dash-list li {
  position: relative;
  padding-left: 1.6em;
  padding-block: 0.4em;
  color: var(--aubergine);
  border-bottom: 1px solid rgba(52, 33, 61, 0.07);
}
.dash-list li:last-child { border-bottom: 0; }
.dash-list li::before {
  content: "\2014";        /* em dash */
  position: absolute;
  left: 0;
  color: var(--slate);
}

@media (min-width: 768px) {
  .features-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* --- Contact (shared shape with home) ------------------------------------- */
.contact__grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: clamp(32px, 5vw, 56px);
  align-items: center;
}
.contact__copy .lead { margin-bottom: 2rem; }
.contact__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.contact__card {
  background: var(--white);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 40px);
  box-shadow: var(--shadow-card);
}
.contact__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--aubergine);
}
.contact__role { font-style: italic; color: var(--slate); margin-top: 0.15rem; }
.contact__card hr { border: 0; border-top: 1px solid var(--stone); margin: 1.25rem 0; }
.contact__details li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--stone);
}
.contact__details li:last-child { border-bottom: 0; }
.contact__details li > span:first-child {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--slate);
}
.contact__details a:hover { text-decoration: underline; }
.contact__brokerage { color: var(--aubergine); text-align: right; }

@media (min-width: 768px) {
  .contact__grid { grid-template-columns: 1.2fr 0.8fr; }
}

/* Location map button spacing */
.section .btn { margin-top: 1.6rem; }

/* Extra photos that appear only in the lightbox, never as grid tiles. */
.gallery__item--lightbox-only { display: none; }

/* --- Lightbox / photo modal ---------------------------------------------- */
/* Soft frosted plum-grey scrim (not a harsh black) so the photo stays the
   focus while the page reads through, blurred, behind it. */
body.is-locked { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.7);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  backdrop-filter: blur(12px) saturate(110%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__stage {
  position: relative;
  margin: 0;
  max-width: min(1040px, 92vw);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__img {
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: 0 40px 90px -30px rgba(52, 33, 61, 0.6);
  transform: scale(0.98);
  transition: transform 0.3s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }

/* Circular controls */
.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stone);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--aubergine);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  box-shadow: 0 8px 24px -10px rgba(52, 33, 61, 0.5);
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: #fff; }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.lightbox__close {
  top: clamp(14px, 2.5vw, 28px);
  right: clamp(14px, 2.5vw, 28px);
  width: 34px;
  height: 34px;
  font-family: var(--font-body);
  font-size: 1.25rem;
}
.lightbox__close:hover { transform: scale(1.06); }

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  font-family: var(--font-head);
  font-size: 1.45rem;
  padding-bottom: 3px;
}
.lightbox__nav:hover { transform: translateY(-50%) scale(1.06); }
.lightbox__nav--prev { left: clamp(10px, 3vw, 34px); }
.lightbox__nav--next { right: clamp(10px, 3vw, 34px); }

.lightbox__counter {
  position: absolute;
  bottom: clamp(16px, 3vw, 30px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(52, 33, 61, 0.55);
  padding: 0.4em 1em;
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  .lightbox,
  .lightbox__img { transition: none; }
  .lightbox__img { transform: none; }
}
