.unit-hero { position: relative; height: 34svh; min-height: 200px; margin: 0; }
.unit-hero img { width: 100%; height: 100%; object-fit: cover; }
.unit-hero figcaption {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  max-width: calc(100% - 1.6rem);
  background: rgb(12 10 9 / 0.72);
  color: var(--cream);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.unit-intro { padding: 1.15rem 0 0.4rem; }
.unit-intro .actions { margin-top: 0.9rem; }
@media (max-width: 899px) {
  .unit-intro .btn--ghost { display: none; }
}
@media (max-width: 899px) and (max-height: 700px) {
  .unit-hero { height: 26svh; min-height: 140px; }
  .unit-intro { padding-top: 0.75rem; }
  .unit-intro .actions { display: none; }
}
.crumbs { color: var(--muted); font-size: 0.88rem; margin-bottom: 0.7rem; }
.crumbs a { color: var(--amber-deep); font-weight: 700; text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.8rem 0; padding: 0; list-style: none; }
.chips li {
  background: var(--cream);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}
#fotos { scroll-margin-top: 1.25rem; }
@media (min-width: 900px) {
  #fotos { scroll-margin-top: 6.5rem; }
}
.photo-total {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  margin-left: 0.35rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0;
  vertical-align: middle;
}
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin: 1.1rem 0 0;
}
.gallery button {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--cream);
  cursor: pointer;
  aspect-ratio: 4 / 3;
}
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery button::after {
  content: attr(data-n);
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgb(12 10 9 / 0.72);
  color: white;
  font-size: 0.72rem;
  font-weight: 750;
  display: grid;
  place-items: center;
}

.lightbox {
  width: min(960px, calc(100vw - 1.2rem));
  max-width: calc(100vw - 1.2rem);
  max-height: calc(100svh - 1.5rem);
  border: 0;
  padding: 0;
  background: transparent;
  color: white;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(8 6 5 / 0.88); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; border-radius: 1rem; background: #111; }
.lightbox figcaption { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 0.6rem 0.2rem 0; font-size: 0.9rem; }
.lightbox figcaption span:last-child { white-space: nowrap; flex: none; }
.lightbox__nav { position: absolute; top: 40%; display: flex; justify-content: space-between; width: 100%; pointer-events: none; }
.lightbox button[data-prev], .lightbox button[data-next], .lightbox button[data-close] {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: white;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.lightbox button[data-close] { position: absolute; top: -0.2rem; right: 0; }

.more-units { padding: 2rem 0 2.4rem; }
.more-units .unit-grid { margin-top: 1rem; }

@media (min-width: 800px) {
  .unit-hero { height: 58vh; border-radius: 0 0 2rem 2rem; overflow: hidden; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery button:first-child { grid-column: span 2; aspect-ratio: 16 / 9; }
}
