/* Property page (concept look). Loaded only by templates/listing.html, after styles.css, whose tokens and .btn it builds on.
   Markup comes from scripts/listing-lib.js. Today it draws the fictional sample at /buy/listing/demo/ (preview builds only). */
.listing { max-width: 1200px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) 64px; }
.listing__crumbs { margin-bottom: 18px; }
.listing__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.listing__main { min-width: 0; }
.listing__title { margin-bottom: 20px; }
.listing__status { display: inline-block; margin: 0 0 10px; padding: 4px 14px; border-radius: 999px; background: var(--gold-tint); color: #7A4A0E; font-size: 0.82rem; font-weight: 600; }
.listing__title h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
.listing__place { margin: 6px 0 0; color: var(--text-muted); font-size: 1.1rem; }
.listing__price { margin: 16px 0 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.7rem); font-weight: 600; line-height: 1.1; color: var(--accent-deep); }
.listing__summary { margin: 4px 0 0; color: var(--text-muted); font-size: 1.1rem; }

/* Gallery: every photo is shown in a column until gallery.js turns it into one photo at a time. */
.gallery { margin-bottom: 24px; }
.gallery__stage { position: relative; display: grid; gap: 16px; }
.gallery__slide { margin: 0; }
.gallery__frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radius); background: var(--surface-dark); }
.gallery__slide figcaption { margin-top: 6px; color: var(--text-muted); font-size: 0.9rem; }
.gallery.is-enhanced .gallery__stage { display: block; }
.gallery.is-enhanced .gallery__slide:not(.is-current) { display: none; }
.gallery.is-enhanced .gallery__slide figcaption { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gallery__nav { position: absolute; top: calc(50% - 22px); z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--accent); font-size: 2rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(31, 22, 39, 0.28); }
.gallery__nav[hidden] { display: none; }
.gallery__nav:hover { background: #fff; color: var(--accent-dark); }
.gallery__nav--prev { left: 12px; }
.gallery__nav--next { right: 12px; }
.gallery__count { margin: 10px 0 0; color: var(--text-muted); font-size: 0.92rem; }
.gallery__count[hidden] { display: none; }
.gallery__thumbs { display: flex; gap: 10px; margin: 12px 0 0; padding: 4px 0 6px; list-style: none; overflow-x: auto; }
.gallery__thumbs li { flex: none; }
.gallery__thumbs a { display: block; width: 96px; padding: 3px; border: 2px solid transparent; border-radius: 10px; }
.gallery__thumbs a[aria-current="true"] { border-color: var(--accent); }
.gallery__thumbs .media--thumb { position: relative; inset: auto; width: 100%; aspect-ratio: 4 / 3; border-radius: 6px; }
.gallery:not(.is-enhanced) .gallery__thumbs { display: none; }

.listing__facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); margin: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.listing__facts dl > div { padding: 16px 12px; text-align: center; border-left: 1px solid var(--border); }
.listing__facts dl > div:first-child { border-left: 0; }
.listing__facts dt { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.listing__facts dd { margin: 4px 0 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--accent-deep); }
.listing__section h2 { margin: 40px 0 12px; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.listing__section p { max-width: 70ch; font-size: 1.08rem; line-height: 1.7; }
.listing__features { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.listing__features li { position: relative; padding-left: 30px; }
.listing__features li::before { content: ''; position: absolute; left: 4px; top: 0.35em; width: 9px; height: 15px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg) scale(0.8); }
.listing__details { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.listing__details > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.listing__details dt { color: var(--text-muted); }
.listing__details dd { margin: 0; font-weight: 600; text-align: right; }
.listing__attribution { margin: 32px 0 0; padding: 14px 16px; background: var(--surface-light); border: 1px dashed #B9AEC2; border-radius: var(--radius-sm); color: var(--text-muted); font-size: 0.92rem; }
.listing__more { margin: 20px 0 0; font-weight: 600; }
.listing__more a { color: var(--gold-text); text-decoration: underline; text-underline-offset: 4px; }

.listing__card { display: grid; gap: 14px; padding: 26px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.listing__card-title { font-size: 1.5rem; }
.listing__card-lead { margin: 0; color: var(--text-muted); }
.listing__card .btn { width: 100%; }

/* "More information" (assets/js/more-info.js): the card's status line, and the short lead form under the card. The status line stays
   in the page while empty (a live region must exist before it speaks); it only gives back the gap above it. */
.listing__card-status { margin: 0; font-weight: 600; color: var(--accent-deep); }
.listing__card-status:empty { margin-top: -14px; }
.listing__inquiry { margin-top: 20px; } /* scrolled to under the header by the site's own scroll-padding-top (styles.css) */
.listing__inquiry[hidden], .listing__inquiry [hidden] { display: none; } /* the card and the form are grids, which would show them */
.listing__inquiry .sb-form { grid-template-columns: 1fr; } /* one column in the narrow side column */
.listing__inquiry-thanks { margin: 0; font-weight: 600; color: var(--accent-deep); }

@media (max-width: 559px) {
  .listing__facts { display: none; } /* the summary line under the price and the details list carry the same facts */
}
@media (min-width: 1000px) {
  .listing__layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; }
  .listing__side { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
  .listing__side.has-open-form { position: static; } /* the open form can be taller than the screen: it scrolls with the page */
}
