/* ===== Listing cards: whole card opens the detail page ===== */
.listing { position: relative; }
.listing__link {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: var(--space-4);
  font-size: var(--text-sm); font-weight: 600; letter-spacing: .02em;
  color: var(--color-primary);
}
.listing__link span { transition: transform var(--transition-interactive); }
.listing:hover .listing__link span { transform: translateX(4px); }
.listing__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.listing__link:focus-visible { outline: none; }
.listing:has(.listing__link:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 3px; }

/* ===== Listing detail ===== */
.ld { padding-top: calc(var(--space-16) + 40px); }
.ld-top { padding-bottom: var(--space-6); }
.ld-crumbs { display: flex; gap: .6rem; align-items: center; font-size: var(--text-xs); letter-spacing: .1em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: var(--space-6); }
.ld-crumbs a { color: var(--color-text-muted); text-decoration: none; }
.ld-crumbs a:hover { color: var(--color-primary); }
.ld-titlebar { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-8); }
.ld-badges { display: flex; gap: .75rem; align-items: center; margin-bottom: var(--space-3); }
.ld-status { padding: .3rem .7rem; background: var(--color-primary); color: var(--color-navy); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; border-radius: var(--radius-sm); }
.ld-ref { font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); }
.ld-title { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); line-height: 1.08; color: var(--color-text); max-width: 30ch; margin: 0; text-wrap: balance; }
.ld-location { margin-top: var(--space-3); font-size: var(--text-xs); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--color-primary); }
.ld-titlebar__cta { flex-shrink: 0; }

/* gallery */
.ld-gallery { position: relative; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; height: clamp(360px, 46vw, 600px); border-radius: var(--radius-lg); overflow: hidden; }
.ld-gallery__item { padding: 0; border: 0; background: var(--color-surface-offset); cursor: zoom-in; overflow: hidden; position: relative; }
.ld-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .3s; }
.ld-gallery__item:hover img { transform: scale(1.04); filter: brightness(1.04); }
.ld-gallery__item--0 { grid-row: 1 / span 2; }
.ld-gallery__item:nth-child(n+6) { display: none; }
.ld-gallery__all { position: absolute; right: var(--space-4); bottom: var(--space-4); z-index: 2; background: rgba(251,250,247,.94); color: var(--color-navy); border: 1px solid rgba(21,35,58,.15); border-radius: var(--radius-full); padding: .6rem 1.1rem; font: 600 var(--text-xs)/1 var(--font-body); letter-spacing: .06em; cursor: pointer; box-shadow: var(--shadow-sm); }
.ld-gallery__all:hover { background: #fff; }
.ld-photo-note { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--color-text-faint); }

/* layout */
.ld-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--space-16); padding-top: var(--space-10); padding-bottom: var(--space-20); align-items: start; }
.ld-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-divider); border-bottom: 1px solid var(--color-divider); }
.ld-stat { padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; gap: 4px; }
.ld-stat + .ld-stat { border-left: 1px solid var(--color-divider); }
.ld-stat strong { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem); white-space: nowrap; color: var(--color-text); line-height: 1.1; }
.ld-stat span { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-muted); }

.ld-section { padding-top: var(--space-12); }
.ld-section h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-2xl); color: var(--color-text); margin: var(--space-2) 0 var(--space-5); }
.ld-section p { color: var(--color-text-muted); line-height: 1.75; max-width: 68ch; }
.ld-section p + p { margin-top: var(--space-4); }
.ld-muted { margin-bottom: var(--space-5); }

.ld-highlights { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6) var(--space-8); }
.ld-highlights li { padding-left: var(--space-5); border-left: 2px solid var(--color-primary); }
.ld-highlights h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--color-text); margin: 0 0 4px; }
.ld-highlights p { font-size: var(--text-sm); line-height: 1.6; }

.ld-specs { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--space-10); margin: 0; }
.ld-specs__row { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); }
.ld-specs dt { color: var(--color-text-muted); }
.ld-specs dd { margin: 0; color: var(--color-text); font-weight: 500; text-align: right; }

.ld-area { display: grid; gap: var(--space-8); }
.ld-area__label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--space-2); }
.ld-area__label strong { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--color-text); }
.ld-area__label span { font-size: var(--text-sm); color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.ld-area__bar { height: 6px; background: var(--color-surface-offset); border-radius: 3px; overflow: hidden; margin-bottom: var(--space-3); }
.ld-area__bar span { display: block; height: 100%; background: var(--color-primary); border-radius: 3px; }
.ld-area p { font-size: var(--text-sm); }

.ld-equip { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-10); }
.ld-equip li { padding: var(--space-3) 0 var(--space-3) var(--space-5); border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); color: var(--color-text); position: relative; }
.ld-equip li::before { content: ""; position: absolute; left: 0; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; background: var(--color-primary); border-radius: 50%; }

.ld-times { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.ld-time { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-md); padding: var(--space-5); display: flex; flex-direction: column; gap: 4px; }
.ld-time strong { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); color: var(--color-text); }
.ld-time span { font-size: var(--text-xs); color: var(--color-text-muted); letter-spacing: .04em; }

.ld-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.ld-list li { position: relative; padding-left: var(--space-6); color: var(--color-text-muted); line-height: 1.65; max-width: 68ch; }
.ld-list li::before { content: ""; position: absolute; left: 0; top: .8em; width: 14px; height: 1px; background: var(--color-primary); }

.ld-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }
.ld-steps__n { font-family: var(--font-display); font-style: italic; color: var(--color-primary); font-size: var(--text-lg); display: block; border-bottom: 1px solid var(--color-divider); padding-bottom: var(--space-2); margin-bottom: var(--space-3); }
.ld-steps h3 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-lg); color: var(--color-text); margin: 0 0 4px; }
.ld-steps p { font-size: var(--text-sm); line-height: 1.6; }

.ld-source { margin-top: var(--space-12); font-size: var(--text-xs) !important; color: var(--color-text-faint) !important; }

/* sidebar */
.ld-side { position: sticky; top: 110px; }
.ld-side__card { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-8); box-shadow: var(--shadow-md); }
.ld-side__label { font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-muted); }
.ld-side__price { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 1.3rem + .8vw, 2.1rem); color: var(--color-text); margin: 4px 0 var(--space-2); line-height: 1.15; }
.ld-side__note { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.55; margin-bottom: var(--space-5); }
.ld-side__facts { margin: 0 0 var(--space-6); border-top: 1px solid var(--color-divider); }
.ld-side__row { display: flex; justify-content: space-between; gap: var(--space-4); padding: .65rem 0; border-bottom: 1px solid var(--color-divider); font-size: var(--text-sm); }
.ld-side__row dt { color: var(--color-text-muted); flex-shrink: 0; }
.ld-side__row dd { margin: 0; text-align: right; color: var(--color-text); font-weight: 500; }
.ld-side__btn { width: 100%; justify-content: center; text-align: center; }
.ld-side__btn + .ld-side__btn { margin-top: var(--space-3); }
.ld-side__fine { margin-top: var(--space-4); font-size: var(--text-xs); color: var(--color-text-faint); text-align: center; }

/* lightbox */
.ld-lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(10, 16, 28, .94); display: flex; align-items: center; justify-content: center; padding: 4vh 6vw; }
.ld-lightbox[hidden] { display: none; }
.ld-lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.ld-lightbox img { max-width: 88vw; max-height: 80vh; object-fit: contain; border-radius: var(--radius-md); }
.ld-lightbox figcaption { color: rgba(255,255,255,.8); font-size: var(--text-sm); text-align: center; }
.ld-lightbox__close, .ld-lightbox__nav { position: absolute; background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; width: 48px; height: 48px; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ld-lightbox__close { top: 20px; right: 20px; }
.ld-lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.ld-lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }
.ld-lightbox button:hover { background: rgba(255,255,255,.18); }

@media (max-width: 1024px) {
  .ld-layout { grid-template-columns: 1fr; gap: var(--space-10); }
  .ld-side { position: static; order: -1; }
  .ld-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .ld { padding-top: calc(var(--space-12) + 40px); }
  .ld-titlebar { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .ld-titlebar__cta { display: none; }
  .ld-gallery { display: flex; height: auto; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--radius-md); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ld-gallery::-webkit-scrollbar { display: none; }
  .ld-gallery__item { flex: 0 0 88%; aspect-ratio: 4/3; scroll-snap-align: start; border-radius: var(--radius-md); }
  .ld-gallery__item:nth-child(n+6) { display: block; }
  .ld-gallery__all { position: sticky; right: auto; bottom: auto; align-self: flex-end; flex: 0 0 auto; margin: 0 4px 8px 0; display: none; }
  .ld-stats { grid-template-columns: 1fr 1fr; }
  .ld-stat:nth-child(3) { border-left: 0; }
  .ld-stat:nth-child(n+3) { border-top: 1px solid var(--color-divider); }
  .ld-highlights, .ld-specs, .ld-equip { grid-template-columns: 1fr; }
  .ld-steps { grid-template-columns: 1fr; }
  .ld-side__card { padding: var(--space-6); }
  .ld-lightbox { padding: 0; }
  .ld-lightbox img { max-width: 100vw; border-radius: 0; }
  .ld-lightbox__prev, .ld-lightbox__next { top: auto; bottom: 24px; transform: none; }
}

/* closing CTA on navy: keep secondary button legible */
.ld ~ .cta .btn--ghost, .cta .btn--ghost { color: #fbfaf7; border-color: rgba(251,250,247,.45); }
.cta .btn--ghost:hover { color: var(--color-primary); border-color: var(--color-primary); }

/* floor plan, valuation, business blocks */
.ld-plan { margin: 0; background: #fff; border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-6); }
.ld-plan img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0 auto; }
.ld-plan figcaption { margin-top: var(--space-3); font-size: var(--text-xs); color: #5b6472; text-align: center; }
.ld-specs--single { grid-template-columns: 1fr; max-width: 560px; }
.ld-equip--wide { grid-template-columns: 1fr; margin-top: var(--space-5); }
.ld-specs dt { flex-shrink: 0; white-space: nowrap; }

/* lede + comparison */
.ld-lede { margin-top: var(--space-4); max-width: 62ch; font-size: var(--text-base); line-height: 1.65; color: var(--color-text-muted); }
.ld-cmp { margin-bottom: var(--space-10); background: var(--color-navy); color: #fbfaf7; border-radius: var(--radius-lg); padding: clamp(1.5rem, 1rem + 2vw, 3rem); }
.ld-cmp__title { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.3rem); line-height: 1.15; margin: 0 0 var(--space-6); color: #fbfaf7; }
.ld-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-8); }
.ld-chip { border: 1px solid rgba(176,136,56,.5); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); background: rgba(176,136,56,.08); }
.ld-chip strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); color: #d4ad5c; line-height: 1.15; }
.ld-chip span { font-size: var(--text-sm); color: rgba(251,250,247,.78); }
.ld-cmp__table { border-top: 1px solid rgba(251,250,247,.18); }
.ld-cmp__row { display: grid; grid-template-columns: 1.1fr 1.3fr 1.3fr; border-bottom: 1px solid rgba(251,250,247,.12); }
.ld-cmp__row > div { padding: .85rem 1rem; font-size: var(--text-sm); line-height: 1.5; }
.ld-cmp__k { color: rgba(251,250,247,.72); }
.ld-cmp__a { color: rgba(251,250,247,.86); }
.ld-cmp__b { color: #fff; font-weight: 600; background: rgba(176,136,56,.14); }
.ld-cmp__head > div { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: rgba(251,250,247,.65); padding-top: .6rem; padding-bottom: .6rem; }
.ld-cmp__head .ld-cmp__b { color: #d4ad5c; background: rgba(176,136,56,.22); }
.ld-cmp__row--total { border-top: 1px solid rgba(212,173,92,.55); border-bottom: 1px solid rgba(212,173,92,.55); align-items: center; }
.ld-cmp__row--total > div { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.3rem, 1.05rem + .8vw, 1.75rem); line-height: 1.2; padding-top: 1.25rem; padding-bottom: 1.25rem; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.ld-cmp__row--total .ld-cmp__k { color: #fbfaf7; }
.ld-cmp__row--total .ld-cmp__a { color: rgba(251,250,247,.86); }
.ld-cmp__row--total .ld-cmp__b { color: #d4ad5c; font-weight: 600; background: rgba(176,136,56,.22); }
.ld-cmp__row--total .ld-cmp__m { font-family: var(--font-body); }
.ld-cmp__m { display: none; }
.ld-cmp__note { margin-top: var(--space-5); font-size: var(--text-xs); color: rgba(251,250,247,.6); line-height: 1.6; max-width: 90ch; }
@media (max-width: 720px) {
  .ld-chips { grid-template-columns: 1fr; gap: var(--space-3); margin-bottom: var(--space-6); }
  .ld-cmp__head { display: none; }
  .ld-cmp__row { grid-template-columns: 1fr 1fr; padding: .75rem 0; }
  .ld-cmp__row > div { padding: .3rem .6rem; }
  .ld-cmp__k { grid-column: 1 / -1; font-weight: 600; color: #fbfaf7; padding-left: 0 !important; }
  .ld-cmp__m { display: block; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; opacity: .7; margin-bottom: 2px; }
  .ld-cmp__b { border-radius: var(--radius-sm); }
  .ld-cmp__row--total > div { justify-content: flex-start; padding-top: .3rem; padding-bottom: .3rem; }
  .ld-cmp__row--total .ld-cmp__b { padding-top: .5rem; padding-bottom: .6rem; }
}
@media (max-width: 720px) {
  .ld-chip { padding: var(--space-3) var(--space-4); display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
  .ld-chip strong { font-size: var(--text-lg); }
}
