.detail-page {
  background: var(--paper);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(44px, 7vw, 82px) clamp(20px, 4vw, 56px);
}

.detail-hero .image-frame {
  display: grid;
  max-height: 460px;
  place-items: center;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.detail-hero img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  background: transparent;
  cursor: zoom-in;
}

.detail-hero h1 {
  color: var(--ink);
  font-size: clamp(29px, 3.7vw, 43px);
  line-height: 1.16;
}

.detail-catch {
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
}

.detail-hero .vertical-title::before {
  top: 0;
  bottom: 0;
  height: auto;
  transform: none;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  gap: clamp(28px, 5vw, 64px);
  padding: 0 clamp(20px, 4vw, 56px) clamp(54px, 7vw, 86px);
  align-items: start;
}

.detail-page .eyebrow {
  display: none;
}

.detail-hero .eyebrow,
.detail-contact .eyebrow {
  display: block;
}

.detail-main .section-heading h2,
.detail-section h2 {
  margin-bottom: 0;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.22;
}

.detail-main .section-heading.vertical-title::before,
.detail-section .section-heading.vertical-title::before {
  width: 5px;
  height: calc(100% + 10px);
  min-height: 48px;
}

.detail-contact .contact-copy.vertical-title::before {
  top: 45px;
}

.detail-gallery {
  display: grid;
  gap: 12px;
}

.gallery-stage {
  position: relative;
  display: grid;
  place-items: center;
  max-height: 420px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-stage img {
  display: none;
  position: relative;
  z-index: 1;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  margin: 0 auto;
  object-fit: contain;
  opacity: 1;
  background: transparent;
  cursor: zoom-in;
  transition: opacity 180ms ease;
}

.gallery-stage img.is-active {
  display: block;
}

.gallery-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(104px, 18%);
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scroll-snap-type: x mandatory;
}

.gallery-thumbs button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
}

.gallery-thumbs img {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
  border-radius: 6px;
  opacity: 0.72;
  transition: opacity 160ms ease, transform 160ms ease;
}

.gallery-thumbs button:hover img {
  opacity: 1;
  transform: translateY(-2px);
}

.gallery-thumbs button.is-active img {
  opacity: 1;
  outline: 3px solid var(--red);
  outline-offset: -3px;
}

.detail-spec {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(33px, 4.4vw, 57px) 0 22px;
  border-top: 1px solid var(--line);
}

.detail-spec div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--line);
}

.detail-spec div:nth-child(even):not(.wide) {
  padding-left: 20px;
}

.detail-spec .wide {
  grid-column: 1 / -1;
  grid-template-columns: 96px minmax(0, 1fr);
}

.detail-spec dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-spec dd {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
}

.detail-section {
  padding: clamp(38px, 6vw, 70px) clamp(20px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.overview {
  text-align: center;
}

.overview .section-heading {
  justify-content: center;
}

.overview .section-heading.vertical-title {
  display: inline-block;
  text-align: left;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
  text-align: left;
}

.overview-card {
  display: grid;
  gap: 12px;
}

.overview-card-title {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.floorplan-box {
  display: grid;
  width: 100%;
  min-height: 430px;
  height: 430px;
  place-items: center;
  padding: 18px;
  background: #efefef;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
}

.overview-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
  background: transparent;
  cursor: zoom-in;
}

.overview-pdf {
  display: block;
  width: 100%;
  min-width: 100%;
  height: 430px;
  border: 0;
  border-radius: 0;
  background: #efefef;
}

.overview-pdf-wrap {
  display: grid;
  gap: 14px;
  justify-items: center;
  width: 100%;
  max-width: 100%;
}

.overview-pdf-native {
  display: block;
  width: 100%;
  height: 430px;
  border: 0;
  background: transparent;
}

.floorplan-box .pdfemb-viewer,
.floorplan-box .pdfemb-embed-pdf,
.layout-box .pdfemb-viewer,
.layout-box .pdfemb-embed-pdf {
  width: 100% !important;
  max-width: 100% !important;
  height: 430px !important;
  max-height: 430px !important;
}

.floorplan-box .pdfemb-pagescontainer,
.floorplan-box .pdfemb-inner-div,
.floorplan-box .pdfemb-page,
.floorplan-box .pdfemb-the-canvas {
  width: 100% !important;
  max-width: 100% !important;
}

.floorplan-box canvas {
  width: 100% !important;
  height: auto !important;
}

.overview-pdf-wrap .pdfemb-toolbar {
  max-width: 100% !important;
}

.overview-preview {
  display: block;
  width: 100%;
  height: 430px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  text-align: inherit;
}

.has-lightbox {
  overflow: hidden;
}

.detail-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

.detail-lightbox.is-open {
  display: grid;
}

.detail-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.detail-lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(1120px, 94vw);
  max-height: 90vh;
  background: #111;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.detail-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.detail-lightbox__content {
  display: grid;
  place-items: center;
  max-height: 90vh;
}

.detail-lightbox__content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 90vh;
}

.detail-lightbox__content iframe {
  width: min(1120px, 94vw);
  height: 86vh;
  border: 0;
  background: #fff;
}

.layout-box {
  display: grid;
  width: 100%;
  min-height: 430px;
  height: 430px;
  place-items: center;
  padding: 18px;
  background: #efefef;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 900;
  overflow: hidden;
}

.floorplan-box .overview-image,
.layout-box .overview-image {
  max-width: 94%;
  max-height: 390px;
}

.pdf-fallback {
  display: grid;
  gap: 16px;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  background: transparent;
  border-radius: 0;
  text-align: center;
}

.pdf-fallback p {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.layout-summary {
  display: grid;
  gap: 12px;
  position: relative;
  padding-left: 0;
}

.layout-summary p:not(.overview-card-title) {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
}

.overview .button {
  justify-self: center;
  margin-top: 4px;
}

.detail-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 48px);
  align-items: start;
}

.access-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  align-items: stretch;
}

.access-grid .property-map {
  order: 2;
}

.access-grid > div:not(.property-map) {
  order: 1;
}

.property-map iframe {
  display: block;
  width: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.property-map {
  position: relative;
}

.property-map::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 22px;
  height: 22px;
  background: var(--red);
  border: 3px solid var(--white);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translate(-50%, -100%) rotate(-45deg);
}

.property-map::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 7px;
  height: 7px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -120%);
}

.detail-panel {
  padding: 24px;
  background: #f7f7f7;
  border-radius: 8px;
}

.detail-panel h3 {
  color: var(--ink);
}

.detail-panel p {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 700;
}

.other-properties {
  background: #f6f6f6;
}

.property-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 340px);
  gap: 18px;
  overflow-x: scroll;
  overflow-y: hidden;
  padding-bottom: 18px;
  scroll-snap-type: x mandatory;
  scrollbar-color: #9a9a9a #d9d9d9;
  scrollbar-width: thin;
}

.property-scroll::-webkit-scrollbar {
  height: 10px;
}

.property-scroll::-webkit-scrollbar-track {
  background: #d9d9d9;
  border-radius: 999px;
}

.property-scroll::-webkit-scrollbar-thumb {
  background: #9a9a9a;
  border-radius: 999px;
}

.property-scroll .property-card {
  scroll-snap-align: start;
}

.detail-contact {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.82)),
    url("contact-bright-interior.png") center / cover;
}

@media (max-width: 900px) {
  .detail-hero,
  .detail-main,
  .detail-two-column,
  .overview-layout,
  .access-grid {
    grid-template-columns: 1fr;
  }

  .detail-spec {
    margin-top: 0;
  }
}

@media (max-width: 640px) {
  .detail-hero {
    gap: 22px;
    padding: 28px 16px 34px;
  }

  .detail-hero .image-frame,
  .detail-hero img {
    max-height: 270px;
  }

  .detail-hero h1 {
    font-size: 25px;
    line-height: 1.18;
  }

  .detail-catch {
    font-size: 13px;
    line-height: 1.75;
  }

  .detail-main {
    gap: 26px;
    padding: 0 16px 42px;
  }

  .detail-main .section-heading h2,
  .detail-section h2 {
    font-size: 22px;
  }

  .detail-main .section-heading.vertical-title::before,
  .detail-section .section-heading.vertical-title::before {
    min-height: 42px;
  }

  .gallery-stage,
  .gallery-stage img {
    max-height: 280px;
  }

  .gallery-thumbs {
    grid-auto-columns: minmax(76px, 28%);
    gap: 8px;
  }

  .detail-spec {
    grid-template-columns: 1fr;
    margin: 12px 0 18px;
  }

  .detail-spec .wide {
    grid-column: auto;
  }

  .detail-spec div,
  .detail-spec .wide {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    padding: 11px 0;
  }

  .detail-spec div:nth-child(even):not(.wide) {
    padding-left: 0;
  }

  .detail-spec dd {
    font-size: 13px;
  }

  .detail-section {
    padding: 42px 16px;
  }

  .overview-layout {
    gap: 28px;
  }

  .floorplan-box,
  .layout-box {
    min-height: 310px;
    height: 310px;
    padding: 14px;
  }

  .floorplan-box .overview-image,
  .layout-box .overview-image {
    max-width: 95%;
    max-height: 280px;
  }

  .layout-summary p:not(.overview-card-title) {
    font-size: 13px;
    line-height: 1.65;
  }

  .detail-two-column,
  .access-grid {
    gap: 26px;
  }

  .detail-panel {
    padding: 18px;
  }

  .detail-panel p {
    font-size: 13px;
    line-height: 1.85;
  }

  .property-map iframe {
    min-height: 260px;
    box-shadow: none;
  }

  .property-scroll {
    grid-auto-columns: minmax(250px, 78vw);
    gap: 14px;
  }

  .detail-contact {
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
      url("contact-bright-interior.png") center / cover;
  }
}
