[data-property-gallery] [hidden], [data-property-share] [hidden] { display: none !important; }
.re-gallery-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0; }
.re-gallery-thumbnails { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem; }
.re-gallery-thumbnails a { flex: 0 0 96px; }
.re-gallery-thumbnails img { width: 96px; height: 80px; object-fit: cover; }
.re-gallery-thumbnails [aria-current="true"] { outline: 2px solid currentColor; outline-offset: 2px; }
[data-gallery-dialog] { width: min(96vw, 1280px); max-height: 96vh; padding: 1rem; }
[data-gallery-dialog]::backdrop { background: rgb(0 0 0 / 85%); }
[data-gallery-large] { width: 100%; height: 70vh; object-fit: contain; touch-action: pan-y; }
@media (min-width: 1024px) { .re-enquiry-card { position: sticky; top: 6rem; align-self: start; max-height: calc(100vh - 7rem); overflow-y: auto; } }

[data-gallery-dialog]:not([open]) { display: none; }

/* Module-owned layout: gallery and both columns share the same content edges. */
.re-property-detail { box-sizing: border-box; width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 1rem; overflow-wrap: anywhere; }
.re-property-detail > *, .re-detail-columns > *, .re-enquiry-card header > div { min-width: 0; }
.re-property-detail .re-detail-columns { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
.re-detail-section { margin-block: 1.5rem; }
.re-detail-section > h2 { margin-bottom: 1rem; }
.re-detail-section > p { line-height: 1.75; }
.re-detail-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.5rem; }
.re-detail-facts > div { padding-block: 1rem; border-bottom: 1px solid var(--re-border); }
.re-detail-facts dd { margin-top: .35rem; font-weight: 600; }
.re-property-detail .re-detail-amenities.re-card__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.re-detail-amenities .re-chip { white-space: normal; padding: .75rem; }
.re-property-detail .re-enquiry-card.re-card { display: flex; flex-direction: column; gap: .75rem; }
.re-enquiry-card > .re-btn { width: 100%; justify-content: center; white-space: normal; }
.re-enquiry-card .re-avatar { flex-shrink: 0; }
.re-agency-listings { display: block; padding-block: .75rem; text-align: center; }
.re-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; overflow: hidden; border-radius: 1rem; }
.re-gallery-grid > [data-gallery-photo]:first-child { grid-column: 1 / -1; }
.re-gallery-grid > [data-gallery-photo] { min-width: 0; }
.re-gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.re-property-detail .re-gallery-all.re-media__count { position: absolute; right: 1rem; bottom: 1rem; z-index: 1; padding: .6rem .9rem; background: var(--re-surface); color: var(--re-text); border-radius: .5rem; font-weight: 600; box-shadow: var(--re-shadow); }
/* Inset the two-colour ring so the clipped gallery cannot hide it. */
.re-gallery-all:focus-visible, .re-gallery-grid a:focus-visible { outline: none; }
.re-gallery-all:focus-visible::after, .re-gallery-grid a:focus-visible::after { content: ""; position: absolute; inset: 4px; z-index: 2; pointer-events: none; border: 3px solid var(--re-focus); box-shadow: 0 0 0 2px #fff, inset 0 0 0 2px #fff; }
@media (min-width: 768px) {
    .re-gallery-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); height: 480px; }
    .re-property-detail .re-gallery-grid > [data-gallery-photo] { aspect-ratio: auto; height: 100%; }
    .re-gallery-grid > [data-gallery-photo]:first-child { grid-column: 1; grid-row: 1 / -1; }
    .re-gallery-grid[data-photo-count="1"] > [data-gallery-photo] { grid-column: 1 / -1; }
    .re-gallery-grid[data-photo-count="2"] > [data-gallery-photo]:nth-child(2) { grid-row: 1 / -1; }
    .re-gallery-grid[data-photo-count="3"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .re-property-detail .re-detail-columns { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
    .re-property-detail .re-detail-content { grid-column: auto; }
}

.property-listing-view .page-title-wrapper { box-sizing: border-box; width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 1rem; }
/* RE-518: compact contact card; module-owned layout, released theme tokens. */
[data-contact-card] [hidden], [data-contact-sticky][hidden] { display: none !important; }
.re-property-detail .re-detail-price { grid-row: 1; margin: 0; }
.re-property-detail .re-detail-content { grid-row: 3; margin: 0; }
.re-property-detail .re-enquiry-card.re-card { grid-row: 2; position: relative; padding: 1rem; margin: 0; overflow: hidden; isolation: isolate; }
.re-contact-banner { position: absolute; inset: 0 0 auto; height: 70px; background: color-mix(in srgb, var(--brand-primary, var(--re-primary)) 12%, var(--re-surface)); z-index: -1; }
.re-contact-identity { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 1rem; padding-top: 20px; }
.re-contact-identity .re-avatar { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--re-surface); }
.re-contact-identity .re-avatar img { width: 100%; height: 100%; object-fit: cover; }
.re-contact-identity .re-contact-agency-avatar img { object-fit: contain; }
.re-contact-identity .re-profile__name { font-size: 18px; font-weight: 600; line-height: 1.3; }
.re-contact-identity .re-profile__meta { font-size: .875rem; margin-block: .25rem; }
.re-contact-identity .re-badge { white-space: normal; }
.re-contact-actions { display: flex; gap: .5rem; min-width: 0; }
.re-ui .re-contact-actions .re-btn { --re-contact-color: var(--brand-primary, var(--re-primary)); display: flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 0; width: 0; height: 44px; min-height: 44px; padding: 0 .25rem; gap: .375rem; font-size: .875rem; font-weight: 700; border: 0; border-radius: var(--re-radius); background: color-mix(in srgb, var(--re-contact-color) 8%, var(--re-surface)); color: var(--re-contact-color); box-shadow: none; white-space: nowrap; }
.re-ui .re-contact-actions .re-btn--whatsapp { --re-contact-color: var(--re-success); }
.re-contact-actions svg { width: 18px; height: 18px; flex-shrink: 0; }
.re-contact-actions .re-btn--secondary { order: -1; }
.re-contact-actions .re-btn--whatsapp { order: 1; }
.re-contact-actions .re-contact-whatsapp-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.re-enquiry-toggle { width: 100%; }
.re-contact-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-top: 1px solid var(--re-border); padding-top: .75rem; }
.re-contact-footer > a:first-child { flex: 0 0 40px; font-size: .75rem; }
.re-contact-footer img { width: 40px; height: 40px; object-fit: contain; }
.re-contact-footer .re-agency-listings { display: flex; align-items: center; gap: .5rem; text-align: end; padding: 0; font-size: .875rem; }
.re-contact-sticky { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; padding: .5rem 1rem calc(.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--re-border); background: var(--re-surface); }
.re-contact-sticky .re-contact-actions { max-width: 768px; margin-inline: auto; }
@container (min-width: 330px) { .re-contact-actions .re-contact-whatsapp-label { position: static; width: auto; height: auto; clip-path: none; } }
@media (min-width: 1024px) {
    .re-property-detail .re-detail-columns { grid-template-columns: minmax(0, 1fr) clamp(340px, 31vw, 390px); align-items: start; }
    .re-property-detail .re-detail-content { grid-row: 2; grid-column: 1; }
    .re-property-detail .re-enquiry-card.re-card { grid-row: 1 / span 2; grid-column: 2; position: sticky; top: 6rem; max-height: calc(100vh - 7rem); overflow-y: auto; }
    .re-contact-sticky { display: none; }
}
/* Long translated labels must fit inside their own action, not into neighbours. */
.re-contact-actions { container-type: inline-size; }
.re-property-detail .re-contact-identity .re-profile__name { font-size: 18px; font-weight: 600; }
@container (max-width: 330px) {
    .re-ui .re-contact-actions .re-btn { flex-direction: column; gap: 0; font-size: .75rem; line-height: 1.2; }
    .re-contact-actions svg { width: 16px; height: 16px; }
}
