/* ─── Unit Page Layout ─────────────────────────────────────────── */
.unit-page { background: var(--white); }

/* ─── Hero Gallery ─────────────────────────────────────────────── */
.unit-hero {
  margin-top: 64px; /* nav height */
  background: #0e0e10;
}

.unit-hero-main {
  position: relative;
  width: 100%;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  max-height: 520px;
}
.unit-hero-main img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity .3s;
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(17,17,21,.6);
  color: var(--white);
  border: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  z-index: 3;
}
.hero-nav.prev { left: 1.2rem; }
.hero-nav.next { right: 1.2rem; }
.hero-nav:hover { background: rgba(17,17,21,.9); }

.hero-counter {
  position: absolute;
  bottom: 1rem; right: 1.2rem;
  background: rgba(17,17,21,.55);
  color: rgba(255,255,255,.85);
  font-size: .75rem;
  letter-spacing: .08em;
  padding: .3rem .8rem;
  border-radius: 20px;
}

/* Thumbnails */
.unit-thumbs {
  display: flex;
  gap: 6px;
  padding: 8px;
  overflow-x: auto;
  background: #0e0e10;
  scrollbar-width: thin;
  scrollbar-color: #333 #0e0e10;
}
.unit-thumbs::-webkit-scrollbar { height: 4px; }
.unit-thumbs::-webkit-scrollbar-track { background: #0e0e10; }
.unit-thumbs::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

.thumb {
  flex-shrink: 0;
  width: 100px;
  height: 68px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  opacity: .55;
  border: 2px solid transparent;
  transition: opacity .2s, border-color .2s;
}
.thumb:hover  { opacity: .8; }
.thumb.active { opacity: 1; border-color: var(--gold); }

/* ─── Lightbox ──────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.93);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}

.lb-close {
  position: absolute;
  top: 1.2rem; right: 1.5rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: 1.6rem;
  cursor: pointer;
  transition: color .2s;
}
.lb-close:hover { color: var(--white); }

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.1);
  color: var(--white);
  border: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lb-nav.prev { left: 1.5rem; }
.lb-nav.next { right: 1.5rem; }
.lb-nav:hover { background: rgba(255,255,255,.2); }

.lb-counter {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.55);
  font-size: .8rem;
  letter-spacing: .1em;
}

/* ─── Details Section ───────────────────────────────────────────── */
.unit-details { padding: 5rem 0 6rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color .2s;
}
.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--gold); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.detail-item {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.detail-item:nth-child(2n) { border-right: none; }
.detail-item:nth-last-child(-n+2) { border-bottom: none; }

.detail-label {
  display: block;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--mid);
  margin-bottom: .3rem;
}
.detail-val {
  font-size: .95rem;
  color: var(--charcoal);
  font-weight: 500;
}
.detail-val.available {
  color: #2e7d32;
  font-weight: 600;
}

.unit-cta-block {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

.map-caption {
  font-size: .8rem;
  color: var(--mid);
  text-align: center;
  margin-top: .6rem;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .unit-hero-main { max-height: 400px; }
  .unit-hero-main img { max-height: 400px; }
}
@media (max-width: 620px) {
  .unit-hero-main { max-height: 280px; }
  .unit-hero-main img { max-height: 280px; }
  .thumb { width: 72px; height: 50px; }
  .unit-cta-block { flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item { border-right: none; }
  .detail-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .detail-item:last-child { border-bottom: none; }
}
