/* Detail-page layout only; project browsing keeps its existing component styles. */
.hzpr-page--detail {
    --hzpr-accent: #0745d9;
    --hzpr-accent-dark: #0745d9;
    --hzpr-line: #e4e7ec;
    --hzpr-ink: #14171c;
    --hzpr-muted: #6b7280;
    padding-bottom: 64px;
    font-size: 16px;
}

.hzpr-page--detail .hzpr-crumbs { padding-block: 18px; font-size: 13px; }
.hzpr-page--detail .hzpr-hero {
    width: calc(100% - 48px);
    max-width: 1152px;
    margin: 0 auto;
    border-radius: 16px;
    aspect-ratio: 2.35 / 1;
}
.hzpr-page--detail .hzpr-hero__img { height: 100%; object-position: center; }
.hzpr-page--detail .hzpr-hero__flags {
    inset-block-start: 20px;
    inset-block-end: auto;
    inset-inline-start: 20px;
    inset-inline-end: 20px;
    width: auto;
    max-width: none;
    padding: 0;
    transform: none;
}
.hzpr-page--detail .hzpr-flag { padding: 6px 12px; font-size: 12px; }

.hzpr-page--detail .hzpr-dgrid {
    grid-template-columns: minmax(0, 1fr) 330px;
    grid-template-areas: "identity contact" "content contact";
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    row-gap: 32px;
    margin-top: 32px;
}
.hzpr-page--detail .hzpr-ident { grid-area: identity; margin: 0; display: block; }
.hzpr-page--detail .hzpr-ident__name { font-size: clamp(28px, 2.8vw, 36px); line-height: 1.2; letter-spacing: -.025em; }
.hzpr-page--detail .hzpr-ident__loc { margin-top: 12px; gap: 8px; font-size: 15px; }
.hzpr-page--detail .hzpr-ident__loc svg { width: 18px; height: 18px; }
.hzpr-developer { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 18px 20px; border-radius: 12px; background: #f5f7fc; }
.hzpr-developer__icon { display: grid; place-items: center; flex: 0 0 52px; height: 52px; border: 1px solid var(--hzpr-line); border-radius: 10px; background: white; color: var(--hzpr-accent); }
.hzpr-developer__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hzpr-developer__label { display: block; color: var(--hzpr-muted); font-size: 13px; }
.hzpr-developer__name { margin: 2px 0 0; color: var(--hzpr-ink); font-size: 18px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }

.hzpr-page--detail .hzpr-dmain { grid-area: content; grid-template-columns: minmax(0, 1fr); gap: 0; }
.hzpr-page--detail .hzpr-dmain > .hzpr-sec { min-width: 0; padding-block: 30px; border-top: 1px solid var(--hzpr-line); }
.hzpr-page--detail .hzpr-sec__head { margin-bottom: 22px; }
.hzpr-page--detail .hzpr-sec__title,
.hzpr-page--detail .hzpr-rail__title { font-size: 24px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
.hzpr-page--detail .hzpr-panel { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.hzpr-page--detail .hzpr-prose { font-size: 16px; line-height: 1.8; }
.hzpr-page--detail .hzpr-prose p { margin: 0 0 16px; }
.hzpr-page--detail .hzpr-prose p:last-child { margin-bottom: 0; }
.hzpr-page--detail .hzpr-note { margin-top: 18px; font-size: 13px; line-height: 1.65; }

/* Match the listing Property details: paired label/value rows with dividers. */
.hzpr-page--detail .hzpr-keys { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
.hzpr-page--detail .hzpr-keys > li { align-items: baseline; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--hzpr-line); }
.hzpr-page--detail .hzpr-keys > li > svg { align-self: center; width: 16px; height: 16px; margin: 0; stroke: var(--hzpr-muted); stroke-width: 1.7; }
.hzpr-page--detail .hzpr-keys > li > span { display: flex; flex: 1; align-items: baseline; justify-content: space-between; gap: 14px; }
.hzpr-page--detail .hzpr-keys__k { color: #434956; text-transform: none; letter-spacing: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.hzpr-page--detail .hzpr-keys__v { margin: 0; max-width: 55%; font-size: 15px; font-weight: 600; line-height: 1.45; text-align: end; }
.hzpr-page--detail .hzpr-keys__v.is-unknown { font-style: normal; }
.hzpr-page--detail .hzpr-keys > li:last-child { border-bottom: 0; }
@media (min-width: 768px) {
    .hzpr-page--detail .hzpr-keys > li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
}
@media (max-width: 767.98px) {
    .hzpr-page--detail .hzpr-keys { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

.hzpr-page--detail .hzpr-dside { grid-area: contact; }
.hzpr-page--detail .hzpr-enq { top: 24px; padding: 24px; border-radius: 14px; border-top: 3px solid var(--hzpr-accent); box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.hzpr-page--detail .hzpr-price { border: 0; border-bottom: 1px solid var(--hzpr-line); border-radius: 0; padding: 0 0 22px; margin-bottom: 22px; background: transparent; }
.hzpr-page--detail .hzpr-price__label { text-transform: none; letter-spacing: 0; font-size: 14px; }
.hzpr-page--detail .hzpr-price__value { margin-top: 8px; color: var(--hzpr-ink); font-size: 32px; }
.hzpr-page--detail .hzpr-price__value span { font-size: 16px; color: var(--hzpr-muted); }
.hzpr-page--detail .hzpr-enq__title { font-size: 20px; line-height: 1.4; }
.hzpr-page--detail .hzpr-agent { padding: 16px 0; margin-top: 4px; border: 0; background: transparent; }
.hzpr-page--detail .hzpr-agent__name { font-size: 15px; }
.hzpr-page--detail .hzpr-agent__role { font-size: 13px; }
.hzpr-page--detail .hzpr-btns { gap: 12px; margin-top: 8px; }
.hzpr-page--detail .hzpr-btn { min-height: 48px; height: auto; padding: 12px; border-radius: 8px; font-size: 16px; font-weight: 600; }
.hzpr-page--detail .hzpr-btn--call { order: -1; }
.hzpr-page--detail .hzpr-btns svg { width: 20px; height: 20px; }
.hzpr-page--detail .hzpr-enq__note { margin-top: 16px; font-size: 13px; line-height: 1.65; }

.hzpr-page--detail .hzpr-rail__head { gap: 16px; margin-bottom: 22px; }
.hzpr-page--detail .hzpr-rail__tools { gap: 12px; }
.hzpr-page--detail .hzpr-rail__all { font-size: 14px; color: var(--hzpr-accent); }
.hzpr-page--detail .hzpr-rail__track { gap: 16px; padding: 2px 0 12px; scroll-snap-type: x mandatory; }
.hzpr-page--detail .hzpr-mini { width: calc((100% - 32px) / 3); min-width: 220px; scroll-snap-align: start; border-radius: 12px; }
.hzpr-page--detail .hzpr-mini__img { height: 148px; }
.hzpr-page--detail .hzpr-map { min-height: 250px; border-radius: 12px; }
.hzpr-page--detail .hzpr-living { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; }
.hzpr-page--detail .hzpr-living__img { height: 180px; }
.hzpr-page--detail .hzpr-living__cardtitle { font-size: 17px; }
.hzpr-page--detail .hzpr-points { gap: 20px; }
.hzpr-page--detail .hzpr-points__t { font-size: 15px; }
.hzpr-page--detail .hzpr-points__d { font-size: 14px; }
.hzpr-page--detail .hzpr-amen { gap: 20px 24px; }
.hzpr-page--detail .hzpr-amen > li { font-size: 16px; gap: 12px; }
.hzpr-page--detail .hzpr-amen svg { width: 20px; height: 20px; }
.hzpr-page--detail .hzpr-empty { padding: 32px 24px; border: 1px solid var(--hzpr-line); background: #f8fafc; border-radius: 12px; }
.hzpr-page--detail .hzpr-empty__t { font-size: 18px; }
.hzpr-page--detail .hzpr-empty__d { font-size: 14px; }
.hzpr-page--detail .hzpr-faq { gap: 0; border-top: 1px solid var(--hzpr-line); }
.hzpr-page--detail .hzpr-faq__item { border: 0; border-bottom: 1px solid var(--hzpr-line); border-radius: 0; }
.hzpr-page--detail .hzpr-faq__q { padding: 18px 0; font-size: 16px; font-weight: 500; }
.hzpr-page--detail .hzpr-faq__q svg { width: 20px; height: 20px; stroke: var(--hzpr-accent); }
.hzpr-page--detail .hzpr-faq__a { padding: 0 28px 20px 0; font-size: 15px; }
[dir="rtl"] .hzpr-page--detail .hzpr-faq__a { padding: 0 0 20px 28px; }

@media (max-width: 1023.98px) {
    .hzpr-page--detail .hzpr-dgrid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "identity" "content"; gap: 28px; }
    .hzpr-page--detail .hzpr-dside { display: none; }
    .hzpr-page--detail .hzpr-enq { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; }
    .hzpr-page--detail .hzpr-price { grid-row: 1 / span 3; margin: 0; padding: 0; border: 0; align-self: center; }
    .hzpr-page--detail .hzpr-agent { display: none; }
    .hzpr-page--detail .hzpr-enq__note { grid-column: 2; }
    .hzpr-page--detail .hzpr-living { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); }
}
@media (max-width: 639.98px) {
    .hzpr-page--detail { padding-bottom: 32px; }
    .hzpr-page--detail .hzpr-hero { width: calc(100% - 32px); aspect-ratio: 1.25 / 1; border-radius: 12px; }
    .hzpr-page--detail .hzpr-hero__flags { inset-block-start: 12px; inset-inline: 12px; gap: 6px; flex-wrap: wrap; }
    .hzpr-page--detail .hzpr-flag { font-size: 11px; padding: 5px 9px; }
    .hzpr-page--detail .hzpr-dgrid { margin-top: 24px; gap: 24px; }
    .hzpr-page--detail .hzpr-ident__name { font-size: 28px; }
    .hzpr-developer { margin-top: 20px; padding: 16px; gap: 12px; }
    .hzpr-developer__name { font-size: 17px; }
    .hzpr-page--detail .hzpr-enq { display: block; padding: 20px; }
    .hzpr-page--detail .hzpr-price { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--hzpr-line); }
    .hzpr-page--detail .hzpr-btns { margin-top: 16px; }
    .hzpr-page--detail .hzpr-enq__note { margin-bottom: 0; }
    .hzpr-page--detail .hzpr-dmain > .hzpr-sec { padding-block: 24px; }
    .hzpr-page--detail .hzpr-sec__title,
    .hzpr-page--detail .hzpr-rail__title { font-size: 22px; }
    .hzpr-page--detail .hzpr-keys { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hzpr-page--detail .hzpr-rail__tools { justify-content: space-between; width: 100%; }
    .hzpr-page--detail .hzpr-mini { width: 76%; min-width: 0; }
    .hzpr-page--detail .hzpr-living { grid-template-columns: minmax(0, 1fr); }
    .hzpr-page--detail .hzpr-living__card { max-width: none; }
    .hzpr-page--detail .hzpr-living__img { height: 210px; }
    .hzpr-page--detail .hzpr-amen { gap: 16px 12px; }
    .hzpr-page--detail .hzpr-amen > li { font-size: 14px; gap: 8px; }
    .hzpr-page--detail .hzpr-faq__q { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .hzpr-page--detail .hzpr-rail__track { scroll-behavior: auto; }
    .hzpr-page--detail .hzpr-faq__q svg { transition: none; }
}


/* Project photographs: one main image with a horizontal thumbnail strip. */
.hzpr-page--detail .hzpr-gallery { width: calc(100% - 48px); max-width: 1152px; margin: 0 auto; }
.hzpr-page--detail .hzpr-gallery .hzpr-hero { width: 100%; margin: 0; }
.hzpr-gallery button { font: inherit; cursor: pointer; }
.hzpr-gallery button:focus-visible { outline: 3px solid #0745d9; outline-offset: 3px; }
.hzpr-gallery svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.hzpr-gallery__image-button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.hzpr-gallery .hzpr-hero__flags { pointer-events: none; }
.hzpr-gallery__arrow { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(228,231,236,.6); border-radius: 50%; background: rgba(255,255,255,.94); color: #14171c; box-shadow: 0 2px 8px #0002; }
.hzpr-gallery__arrow:hover { background: #fff; color: #0745d9; }
.hzpr-gallery__arrow--prev { inset-inline-start: 16px; }
.hzpr-gallery__arrow--next { inset-inline-end: 16px; }
[dir="rtl"] .hzpr-gallery__arrow svg { transform: rotate(180deg); }
.hzpr-gallery__view { position: absolute; bottom: 20px; inset-inline-end: 20px; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 16px; border: 1px solid #e4e7ec; border-radius: 8px; background: white; color: #14171c; font-size: 14px; font-weight: 600; box-shadow: 0 2px 8px #0002; }
.hzpr-gallery__view:hover { background: #f5f7fc; }
.hzpr-gallery__count { position: absolute; bottom: 22px; inset-inline-start: 20px; padding: 6px 12px; border-radius: 20px; background: #14171ccc; color: white; font-size: 13px; pointer-events: none; }
.hzpr-gallery__thumbs { display: flex; gap: 12px; margin-top: 14px; padding: 3px 3px 7px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.hzpr-gallery__thumbs[hidden] { display: none; }
.hzpr-gallery__thumb { flex: 0 0 120px; height: 82px; padding: 3px; border: 2px solid transparent; border-radius: 10px; background: transparent; }
.hzpr-gallery__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.hzpr-gallery__thumb:hover { border-color: #a9bce9; }
.hzpr-gallery__thumb[aria-pressed="true"] { border-color: #0745d9; }
.hzpr-gallery-locked, .hzpr-gallery-locked body { overflow: hidden; }
@media (max-width: 639.98px) {
    .hzpr-page--detail .hzpr-gallery { width: calc(100% - 32px); }
    .hzpr-gallery__thumbs { gap: 8px; margin-top: 10px; }
    .hzpr-gallery__thumb { flex-basis: 92px; height: 64px; }
    .hzpr-gallery__arrow { width: 36px; height: 36px; }
    .hzpr-gallery__arrow--prev { inset-inline-start: 10px; }
    .hzpr-gallery__arrow--next { inset-inline-end: 10px; }
    .hzpr-gallery__view { bottom: 12px; inset-inline-end: 12px; min-height: 40px; padding: 8px 12px; font-size: 13px; }
    .hzpr-gallery__count { bottom: 16px; inset-inline-start: 12px; }
}

/* Match the listing detail's WhatsApp artwork and shared amenity outlines. */
.hzpr-page--detail .hzpr-whatsapp-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
.hzpr-page--detail .hzpr-amen .hzp-feature-icon { stroke: currentColor; stroke-width: 1.8; }


/* Units belong to this project and use the same content width as its other sections. */
.hzpr-units { display:grid; gap:16px; }
.hzpr-unit { display:flex; align-items:center; gap:18px; padding:18px; border:1px solid var(--hzpr-line); border-radius:14px; background:#fff; }
.hzpr-unit__image { flex:0 0 120px; width:120px; height:150px; border-radius:8px; overflow:hidden; background:#f8fafc; }
.hzpr-unit__image img { display:block; width:100%; height:100%; object-fit:contain; }
.hzpr-unit__body { flex:1; min-width:0; }
.hzpr-unit__body h3 { margin:0; color:var(--hzpr-ink); font-size:16px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
.hzpr-unit__price { margin:6px 0 16px; color:var(--hzpr-ink); font-size:20px; font-weight:600; }
.hzpr-unit__price span { font-size:14px; color:var(--hzpr-muted); font-weight:400; }
.hzpr-unit__facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 12px; margin:0; }
.hzpr-unit__fact { display:flex; align-items:center; gap:8px; min-width:0; }
.hzpr-unit__icon { display:grid; place-items:center; flex:0 0 32px; height:32px; border:1px solid var(--hzpr-line); border-radius:50%; color:#64748b; }
.hzpr-unit__icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.hzpr-unit__fact dt { color:var(--hzpr-muted); font-size:12px; line-height:1.35; }
.hzpr-unit__fact dd { margin:3px 0 0; color:var(--hzpr-ink); font-size:13px; line-height:1.45; overflow-wrap:anywhere; }
@media(min-width:800px) and (max-width:1023.98px) { .hzpr-unit__facts { grid-template-columns:repeat(5,minmax(0,1fr)); } }
@media(max-width:639.98px) {
    .hzpr-unit { padding:16px; align-items:flex-start; flex-direction:column; gap:14px; }
    .hzpr-unit__image { width:100%; height:180px; flex:auto; }
    .hzpr-unit__body { width:100%; }
    .hzpr-unit__facts { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 12px; }
}

/* Fullscreen project popup matches the listing photo gallery. */
.hzpr-gallery__dialog {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    gap: 12px;
    padding: 12px 0 max(12px, env(safe-area-inset-bottom));
    overflow: hidden;
    background: rgba(8, 9, 11, 0.94);
    color: #fff;
}

.hzpr-gallery__dialog:not([open]) {
    display: none;
}

.hzpr-gallery__heading {
    display: flex;
    justify-content: center;
    min-width: 0;
    padding: 0 60px;
}

.hzpr-gallery__collection {
    margin: 0;
    padding: 10px 16px 12px;
    border-bottom: 2px solid #79b9f2;
    color: #79b9f2;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
}

.hzpr-gallery__full-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    min-width: 0;
    padding: 0 60px;
    touch-action: pan-y;
}

.hzpr-gallery__full-image > img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    object-fit: contain;
}

.hzpr-gallery__dialog .hzpr-gallery__arrow,
.hzpr-gallery__close {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
}

.hzpr-gallery__dialog .hzpr-gallery__arrow:hover,
.hzpr-gallery__close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hzpr-gallery__dialog .hzpr-gallery__arrow:focus-visible,
.hzpr-gallery__close:focus-visible,
.hzpr-gallery__filmthumb:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

.hzpr-gallery__dialog .hzpr-gallery__arrow svg,
.hzpr-gallery__close svg {
    width: 24px;
    height: 24px;
}

.hzpr-gallery__dialog .hzpr-gallery__arrow {
    position: absolute;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
}

.hzpr-gallery__dialog .hzpr-gallery__arrow--prev { inset-inline: auto; right: auto; left: 8px; }
.hzpr-gallery__dialog .hzpr-gallery__arrow--next { inset-inline: auto; left: auto; right: 8px; }

.hzpr-gallery__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

.hzpr-gallery__full-count {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hzpr-gallery__filmstrip {
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #62666d transparent;
    direction: ltr;
}

.hzpr-gallery__filmtrack {
    display: flex;
    gap: 10px;
    width: max-content;
    margin: 0 auto;
    padding: 2px 20px 6px;
}

.hzpr-gallery__filmthumb {
    display: block;
    flex: 0 0 auto;
    width: clamp(72px, 11vh, 112px);
    height: clamp(64px, 10vh, 100px);
    padding: 0;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 3px;
    background: #181a1d;
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 120ms ease, border-color 120ms ease;
}

.hzpr-gallery__filmthumb:hover {
    opacity: 0.85;
}

.hzpr-gallery__filmthumb[aria-pressed="true"] {
    border-color: #79b9f2;
    opacity: 1;
}

.hzpr-gallery__filmthumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hzpr-gallery__dialog::backdrop { background: transparent; }
.hzpr-gallery__dialog .hzpr-gallery__arrow svg { transform: none; }

@media (max-width: 767.98px) {
    .hzpr-gallery__dialog {
        gap: 10px;
        padding-top: max(8px, env(safe-area-inset-top));
    }
    .hzpr-gallery__full-image { padding: 0 36px; }
    .hzpr-gallery__dialog .hzpr-gallery__arrow--prev { left: 0; }
    .hzpr-gallery__dialog .hzpr-gallery__arrow--next { right: 0; }
    .hzpr-gallery__close { top: 8px; right: 6px; }
    .hzpr-gallery__filmtrack { gap: 8px; padding-inline: 12px; }
}

/* Keep project contact actions available once the sidebar becomes a single column. */
.hzpr-mobile-contact { display: none; }

@media (max-width: 1023.98px) {
    .hzpr-page--detail .hzpr-mobile-contact {
        display: block;
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 58;
        padding: 10px 16px;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        background: #fff;
        border-top: 1px solid var(--hzpr-line);
        box-shadow: 0 -6px 18px -14px rgba(18, 20, 26, .45);
    }

    .hzpr-page--detail .hzpr-mobile-contact .hzpr-btns {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin: 0;
    }

    .hzpr-page--detail .hzpr-mobile-contact .hzpr-btn {
        min-width: 0;
        min-height: 48px;
        white-space: nowrap;
    }

    body:has(.hzpr-page--detail .hzpr-mobile-contact) {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}


/* Phones use the same full-width gallery and photo-overlay navigation as listings. */
.hzpr-mobile-gallery-header,
.hzpr-mobile-toast,
.hzpr-gallery__swipe,
.hzpr-gallery__dots { display: none; }

@media (max-width: 767.98px) {
    body:has(.hzpr-mobile-gallery-header) .hz-header,
    .hzpr-page--detail .hzpr-crumbs { display: none; }
    .hzpr-page--detail .hzpr-gallery-wrap { position: relative; }
    .hzpr-page--detail .hzpr-gallery { width: 100%; max-width: none; }
    .hzpr-page--detail .hzpr-gallery .hzpr-hero { width: 100%; aspect-ratio: 4 / 3; border-radius: 0; }
    .hzpr-gallery__thumbs,
    .hzpr-gallery .hzpr-hero > .hzpr-gallery__image-button,
    .hzpr-gallery .hzpr-hero > .hzpr-gallery__arrow,
    .hzpr-gallery .hzpr-hero > .hzpr-gallery__view,
    .hzpr-gallery[data-hzpr-total="1"] .hzpr-gallery__count { display: none; }

    .hzpr-gallery__swipe {
        position: absolute;
        inset: 0;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        direction: ltr;
        -webkit-overflow-scrolling: touch;
    }
    .hzpr-gallery__swipe::-webkit-scrollbar { display: none; }
    .hzpr-gallery__swipe-photo {
        flex: 0 0 100%;
        min-width: 0;
        height: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    .hzpr-gallery__swipe-photo:focus-visible { outline-offset: -3px; }
    .hzpr-gallery__swipe-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

    .hzpr-gallery__dots {
        position: absolute;
        z-index: 4;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: max-content;
        max-width: calc(100% - 128px);
        direction: ltr;
    }
    .hzpr-gallery__dot {
        display: grid;
        place-items: center;
        flex: 0 0 24px;
        width: 24px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
    }
    .hzpr-gallery__dot span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.8); box-shadow: 0 1px 4px #0006; }
    .hzpr-gallery__dot[aria-pressed="true"] span { background: var(--hzpr-accent); transform: scale(1.25); }
    .hzpr-gallery__count { z-index: 3; bottom: 12px; inset-inline-start: 16px; padding: 4px 9px; font-size: 12px; }

    .hzpr-page--detail .hzpr-gallery .hzpr-hero__flags {
        z-index: 3;
        inset-block-start: calc(max(16px, env(safe-area-inset-top)) + 48px);
        inset-inline: 16px;
        gap: 6px;
        flex-wrap: wrap;
    }
    .hzpr-page--detail .hzpr-mobile-gallery-header {
        position: absolute;
        inset-inline: 16px;
        top: max(16px, env(safe-area-inset-top));
        z-index: 8;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        pointer-events: none;
    }
    .hzpr-mobile-gallery-header__actions { display: flex; align-items: center; gap: 8px; }
    .hzpr-page--detail .hzpr-mobile-gallery-header .hzpr-mobile-gallery-header__button {
        display: grid;
        place-items: center;
        flex: 0 0 36px;
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid #e0e4eb;
        border-radius: 50%;
        background: #fff;
        color: #6b7280;
        box-shadow: 0 2px 8px #0000000a;
        cursor: pointer;
        pointer-events: auto;
        text-decoration: none;
    }
    .hzpr-mobile-gallery-header__button > svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .hzpr-mobile-gallery-header__back > svg { width: 18px; height: 18px; stroke-width: 1.9; }
    [dir="rtl"] .hzpr-mobile-gallery-header__back > svg { transform: rotate(180deg); }
    .hzpr-page--detail .hzpr-mobile-gallery-header .hzp-fav--on { color: var(--hzfav-saved, #e11d48); }
    .hzpr-gallery-wrap:not(:has(.hzpr-gallery)) .hzpr-mobile-gallery-header { position: relative; inset: auto; padding: 16px; }
    .hzpr-mobile-toast[data-visible] {
        display: block;
        position: fixed;
        z-index: 80;
        inset-inline: 24px;
        bottom: calc(90px + env(safe-area-inset-bottom));
        margin: 0;
        padding: 10px 16px;
        border-radius: 10px;
        background: #14171c;
        color: #fff;
        text-align: center;
        font-size: 14px;
    }
}

/* Desktop collage: every tile opens the full gallery at its own photograph. */
.hzpr-gallery__collage { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 8px; aspect-ratio: 2.35 / 1; }
.hzpr-gallery__collage--single { grid-template-columns: minmax(0, 1fr); }
.hzpr-page--detail .hzpr-gallery__collage .hzpr-hero { height: 100%; aspect-ratio: auto; min-height: 0; min-width: 0; border-radius: 12px; }
.hzpr-gallery__side { display: grid; grid-template-rows: repeat(var(--hzpr-side-count), minmax(0, 1fr)); gap: 8px; min-height: 0; }
.hzpr-gallery__tile { position: relative; min-height: 0; overflow: hidden; border: 0; border-radius: 10px; padding: 0; background: #f5f7fc; }
.hzpr-gallery__tile > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hzpr-gallery__tile .hzpr-gallery__view { bottom: 12px; inset-inline-end: 12px; padding: 8px 12px; min-height: 38px; font-size: 13px; font-weight: 600; max-width: calc(100% - 24px); }
.hzpr-gallery__collage:not(.hzpr-gallery__collage--single) .hzpr-gallery__view--hero,
.hzpr-gallery__thumbs { display: none; }
.hzpr-gallery__count { display: none; }
.hzpr-page--detail .hzpr-keys__v { display: block; overflow-wrap: anywhere; }
.hzpr-page--detail .hzpr-price__value { font-size: 28px; line-height: 1.35; overflow-wrap: anywhere; }
.hzpr-buyer-info { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 0 16px; }
.hzpr-buyer-info > span { display: inline-flex; align-items: center; gap: 5px; border-radius: 20px; background: #edf9f1; color: #176443; padding: 5px 9px; font-size: 12px; line-height: 1.4; }
.hzpr-buyer-info svg { width: 16px; height: 16px; flex-shrink: 0; }
.hzpr-buyer-info--mobile { display: none; }
.hzpr-mini__facts { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; color: var(--hzpr-muted); font-size: 12px; line-height: 1.6; }
.hzpr-mini__facts > span:first-child { color: var(--hzpr-accent); }
.hzpr-mini .hzpr-buyer-info { margin: 12px 0 0; }
.hzpr-page--detail .hzpr-mini .hzpr-mini__price { font-size: 18px; line-height: 1.4; }
.hzpr-page--detail .hzpr-mini .hzpr-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 16px; gap: 6px; }
.hzpr-page--detail .hzpr-mini .hzpr-btn { padding: 8px 5px; font-size: 12px; min-height: 40px; gap: 5px; }
.hzpr-page--detail .hzpr-mini .hzpr-btn svg,
.hzpr-page--detail .hzpr-mini .hzpr-whatsapp-icon { width: 16px; height: 16px; }
.hzpr-location > p:first-child { margin-bottom: 16px; }
.hzpr-location__map { display: block; width: 100%; height: 300px; border: 1px solid var(--hzpr-line); border-radius: 12px; }
.hzpr-location__link { display: inline-flex; align-items: center; gap: 8px; color: var(--hzpr-accent); margin-top: 12px; font-weight: 600; }
.hzpr-location__link svg { width: 18px; height: 18px; }
[dir="rtl"] .hzpr-location__link svg { transform: rotate(180deg); }
.hzpr-neighbourhood { white-space: pre-line; }
@media (max-width: 1023.98px) {
    .hzpr-buyer-info--mobile { display: flex; }
}
@media (max-width: 767.98px) {
    .hzpr-gallery__collage { display: block; aspect-ratio: auto; }
    .hzpr-page--detail .hzpr-gallery__collage .hzpr-hero { height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
    .hzpr-gallery__side { display: none; }
    .hzpr-gallery[data-hzpr-total]:not([data-hzpr-total="1"]) .hzpr-gallery__count { display: block; }
    .hzpr-location__map { height: 250px; }
}
