/* Scoped addition: existing gallery, dialogs, maps and action handlers remain intact. */
:root{--spd-header-offset:var(--space-header-offset);--spd-bar-height:112px;--spd-bottom-height:0px}
.spd-detail .spd-agent .spd-share-wrap{display:block}
.spd-detail .spd-agent .spd-share-wrap>.spd-share{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:row;background:transparent;border:0;min-height:44px}
.space-shell.spd-detail{max-width:1320px;width:calc(100% - 64px);padding-top:24px;color:var(--space-purple-900)}
.spd-detail .sp6-editorial-top{margin-top:20px;gap:28px;align-items:center}
.spd-detail .sp6-editorial-heading h1{font-size:clamp(1.55rem,2.3vw,2.4rem);line-height:1.55;margin:12px 0;overflow-wrap:anywhere}
.spd-detail .sp6-editorial-price{font-size:clamp(1.65rem,2.4vw,2.5rem);line-height:1.5}
.spd-detail .sp6-primary-strip{margin:24px 0 30px}
.spd-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:32px;align-items:start}
.spd-main{min-width:0}.spd-detail .sp6-editorial-section{margin-top:28px}
.spd-detail .sp6-editorial-gallery{margin-top:0;padding-top:0;border-top:0}
.spd-detail .sp6-editorial-gallery .sp6-editorial-section-heading{margin-bottom:12px}
.spd-detail .sp6-gallery{width:100%;max-width:none;margin:0}
.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:clamp(450px,43vw,610px)!important;max-height:none!important;min-height:0;border-radius:20px;background:#eee4dc}
.spd-detail .sp6-gallery-main{height:100%!important;min-width:100%;margin:0;position:relative;background:#eee4dc}
.spd-detail .sp6-gallery-main img{width:100%;height:100%!important;max-height:none!important;object-fit:contain!important;display:block}
.spd-detail .sp6-gallery-thumbs{display:flex;gap:10px;overflow-x:auto;padding:12px 2px;scrollbar-width:thin}
.spd-detail .sp6-gallery-thumbs a{flex:0 0 94px;width:94px;height:76px;padding:3px;border:2px solid transparent;border-radius:12px;overflow:hidden;background:#fff}
.spd-detail .sp6-gallery-thumbs a[aria-current=true]{border-color:var(--space-purple-700)}
.spd-detail .sp6-gallery-thumbs img{width:100%;height:100%;object-fit:cover;border-radius:7px}
.spd-detail .sp6-gallery-nav{width:46px;height:46px;box-shadow:0 3px 16px #30272f25}
.spd-agent{position:sticky;top:calc(var(--spd-header-offset) + var(--spd-bar-height) + 18px);padding:26px 22px;border:1px solid var(--space-color-border,#e5d6df);border-radius:22px;background:#fffdfb;box-shadow:0 12px 32px #53204a08;text-align:center;max-height:calc(100dvh - var(--spd-header-offset) - var(--spd-bar-height) - 36px);overflow:auto;scrollbar-width:thin}
.spd-agent-brand{font-size:.7rem;letter-spacing:.13em;text-transform:uppercase;margin:0 0 20px;color:var(--space-gray-600)}
.spd-agent-avatar{width:112px;height:112px;margin:0 auto 18px;border:1px solid #e8dbe3;border-radius:50%;padding:5px;background:var(--space-cream);display:grid;place-items:center;overflow:hidden;font-size:2.5rem}
.spd-agent-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%}.spd-agent-avatar.is-company img{object-fit:contain;padding:12px}
.spd-agent h2{font-size:1.4rem;line-height:1.5;margin:0 0 6px;overflow-wrap:anywhere}.spd-agent-role{font-size:.88rem;margin:0;color:var(--space-gray-600)}
.spd-agent-phone{display:inline-block;margin:18px 0;font-weight:600;font-size:1.12rem;letter-spacing:.02em}
.spd-contact-actions{display:flex;gap:8px}.spd-contact-actions a{display:flex;align-items:center;justify-content:center;gap:8px;flex:1;min-width:0;min-height:46px;padding:10px 14px;border-radius:10px;text-decoration:none!important;font-size:.9rem;font-weight:600;border:1px solid var(--space-purple-900);white-space:nowrap}
.spd-contact-actions .spd-call{background:var(--space-purple-900);color:#fff}.spd-contact-actions .spd-whatsapp{background:#fffdfb;color:var(--space-purple-900)}
.spd-contact-actions svg{width:19px;height:19px;flex-shrink:0}.spd-contact-actions a:hover{filter:brightness(.94)}
.spd-agent-note{font-size:.78rem;line-height:1.8;margin:18px 0 0;color:var(--space-gray-600)}
.spd-detail .spd-agent .sre-pactions{display:flex;flex-wrap:wrap;justify-content:center;gap:7px;margin-top:18px;padding-top:18px;border-top:1px solid #eadde5}
.spd-detail .spd-agent .sre-pact{min-height:44px;flex:1;justify-content:center;font-size:.8rem;padding:8px}
.spd-share{display:flex;justify-content:center;gap:8px;width:100%;margin-top:10px;background:none;color:var(--space-purple-900);border:0;font:inherit;font-size:.82rem;padding:9px}.spd-share svg{width:18px;height:18px}
.spd-detail .sp6-secondary-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.spd-detail .sp6-secondary-grid>div{grid-column:auto!important}
.spd-detail .sp6-description{font-size:1rem;line-height:2.05;overflow-wrap:anywhere}
.spd-sticky{position:fixed;top:var(--spd-header-offset);inset-inline:0;z-index:990;background:#fffaf5f7;border-block:1px solid #e7d9e1;box-shadow:0 8px 20px #53204a0b;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .16s}
.spd-sticky.is-visible{visibility:visible;opacity:1;pointer-events:auto}.spd-sticky-inner{max-width:1320px;width:calc(100% - 64px);margin:auto}
.spd-sticky-summary{display:flex;align-items:center;gap:16px;padding:10px 0}.spd-sticky-thumb{width:58px;height:52px;object-fit:cover;border-radius:9px;flex-shrink:0}.spd-sticky-copy{flex:1;min-width:0}.spd-sticky-title{font-size:.93rem;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.spd-sticky-facts{display:flex;gap:14px;flex-wrap:wrap;font-size:.75rem;color:var(--space-gray-600);margin-top:4px}.spd-sticky-price{font-size:1rem;font-weight:700;white-space:nowrap}.spd-sticky .spd-contact-actions{min-width:230px}
.spd-section-nav{display:flex;gap:24px;align-items:center}.spd-section-nav a{font-size:.83rem;padding:10px 2px;min-height:40px;text-decoration:none;color:var(--space-purple-900);border-bottom:2px solid transparent}.spd-section-nav a:hover,.spd-section-nav a:focus-visible{border-color:var(--space-purple-700)}
.spd-mobile-actions{display:none}.spd-detail :is(h2,dl[id]){scroll-margin-top:calc(var(--spd-header-offset) + var(--spd-bar-height) + 20px)}
.spd-detail :is(a,button):focus-visible,.spd-sticky a:focus-visible,.spd-mobile-actions a:focus-visible{outline:3px solid var(--space-purple-700);outline-offset:3px}
@media(max-width:1050px){.spd-layout{grid-template-columns:minmax(0,1fr) 280px;gap:22px}.spd-agent{padding:22px 16px}.spd-sticky .spd-contact-actions{min-width:190px}.spd-sticky-facts{gap:8px}}
@media(max-width:900px){.space-shell.spd-detail{width:calc(100% - 32px)}.spd-layout{display:flex;flex-direction:column;gap:24px}.spd-main{display:contents}.spd-main>section{order:3;width:100%;margin-top:0}.spd-main>.sp6-editorial-gallery{order:1}.spd-agent{order:2;position:relative;top:auto;width:100%;max-height:none;padding:24px}.spd-agent-avatar{width:100px;height:100px}.spd-agent .spd-contact-actions,.spd-agent .sre-pactions{max-width:440px;margin-inline:auto}.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:clamp(340px,65vw,530px)!important}.spd-sticky-inner{width:calc(100% - 32px)}.spd-sticky-summary{gap:10px}.spd-sticky .spd-contact-actions{display:none}.spd-sticky-price{font-size:.9rem}.spd-sticky-facts{font-size:.68rem}.spd-sticky-thumb{width:44px;height:44px}.spd-section-nav{justify-content:space-between;gap:12px}.spd-section-nav a{font-size:.78rem}.spd-mobile-actions{position:fixed;bottom:0;inset-inline:0;z-index:995;display:block;background:#fffaf7;border-top:1px solid #e5d6df;padding:10px 16px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 20px #53204a08}.spd-mobile-actions.is-editing{visibility:hidden}.sp6-property-detail-contact:has(.spd-detail){padding-bottom:var(--spd-bottom-height)}.spd-detail .sp6-primary-strip{margin:18px 0 24px}.spd-detail .sp6-secondary-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:480px){.spd-detail .sp6-editorial-heading h1{font-size:1.55rem}.spd-detail .sp6-editorial-price{font-size:1.8rem}.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:350px!important;border-radius:14px}.spd-detail .sp6-gallery-thumbs a{flex-basis:78px;width:78px;height:65px}.spd-sticky-summary{flex-wrap:wrap;row-gap:4px}.spd-sticky-price{margin-inline-start:54px;font-size:.83rem}.spd-sticky-copy{flex-basis:calc(100% - 56px)}.spd-sticky-title{font-size:.8rem}.spd-sticky-facts{gap:8px}.spd-detail .sp6-primary-strip dd{font-size:.82rem}}
@media(prefers-reduced-motion:reduce){.spd-sticky{transition:none}}

/* Administrative controls are rendered only after server capability checks. */
.spd-admin-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}.spd-edit-link,.spd-admin-menu>summary{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #d5bed0;border-radius:9px;padding:9px 14px;min-height:42px;font:inherit;font-size:.84rem;color:var(--space-purple-900);background:#fffaf6;text-decoration:none!important;cursor:pointer}.spd-edit-link{background:var(--space-purple-soft);font-weight:600}.spd-admin-menu{position:relative}.spd-admin-menu>summary{list-style:none}.spd-admin-menu>summary::-webkit-details-marker{display:none}.spd-admin-menu[open]>summary{border-color:var(--space-purple-700)}.spd-admin-options{position:absolute;inset-inline-start:0;top:calc(100% + 6px);min-width:190px;padding:7px;border:1px solid #e3d4df;border-radius:12px;background:#fffdfb;box-shadow:0 12px 28px #53204a20;z-index:1005}.spd-admin-options>a,.spd-admin-options>button{display:block;width:100%;text-align:start;background:none;border:0;border-radius:6px;color:var(--space-purple-900);font:inherit;font-size:.85rem;text-decoration:none;padding:12px;min-height:44px}.spd-admin-options :is(a,button):hover{background:var(--space-purple-soft)}.spd-sticky-navigation{display:flex;align-items:center;justify-content:space-between;gap:20px}.spd-sticky-navigation .spd-admin-actions{margin:0}.spd-admin-dialog{max-width:min(460px,calc(100vw - 32px));width:460px;max-height:85dvh;margin:auto;border:1px solid #e1cede;border-radius:18px;background:#fffaf6;color:#53204a;padding:24px;overflow:auto}.spd-admin-dialog::backdrop{background:#23122188}.spd-admin-dialog h2{font-size:1.3rem}.spd-admin-dialog p{font-size:.9rem;line-height:1.8}.spd-admin-dialog label{display:grid;gap:8px;font-weight:600}.spd-admin-dialog :is(input,select){width:100%;min-height:48px;border:1px solid #d9c3d3;border-radius:8px;padding:10px;font:inherit;background:white}.spd-admin-dialog input{direction:ltr}.spd-admin-dialog form>div{display:flex;gap:10px;justify-content:end}.spd-admin-dialog button{min-height:44px;border:1px solid #53204a;border-radius:8px;padding:9px 16px;background:#fff;color:#53204a;font:inherit}.spd-admin-dialog button[type=submit]{background:#53204a;color:white}.spd-admin-error{color:#a21d35}.spd-admin-dialog button:disabled{opacity:.6}
@media(max-width:760px){.spd-sticky-navigation{display:block}.spd-sticky-navigation .spd-admin-actions{padding-bottom:8px;justify-content:space-between}.spd-sticky-navigation .spd-admin-actions>a,.spd-sticky-navigation summary{font-size:.75rem;padding:7px 10px;min-height:38px}.spd-sticky-navigation .spd-admin-options{inset-inline-start:auto;inset-inline-end:0}.spd-admin-dialog{padding:20px}}

/* 2026-10-14: spacious media; keep the location outside the sidebar columns. */
@media(min-width:1051px){.spd-layout{grid-template-columns:minmax(0,1fr) 286px;gap:28px}}
.spd-detail .sp6-gallery .sp6-gallery-track{overflow-y:hidden;scrollbar-width:none;scroll-padding:0}
.spd-detail .sp6-gallery .sp6-gallery-track::-webkit-scrollbar{display:none}
.spd-detail .sp6-gallery-track .sp6-gallery-main>img{object-fit:contain!important;object-position:center;width:100%;height:100%;max-width:100%;max-height:100%;margin:0}
.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:clamp(400px,45vw,660px)!important;max-height:max(180px,calc(100svh - var(--spd-header-offset) - var(--spd-bar-height) - var(--spd-bottom-height) - 88px))!important}
.spd-detail .sp6-gallery-thumbs{flex-wrap:wrap;overflow:visible;justify-content:flex-start;gap:10px;padding-block:14px 4px}
.spd-detail .sp6-gallery-thumbs a{flex:0 0 88px;width:88px;height:72px}
.spd-detail .sp6-gallery-thumbs img{object-fit:contain;background:#f4eee8}
.spd-detail>section[aria-labelledby="property-location"]{width:100%;max-width:none;min-width:0;overflow:visible;margin-top:36px}
.spd-detail .sp6-property-area-map{display:block;width:100%;max-width:none;min-width:0;overflow:visible;background:#fffdfb;border:1px solid #e4d8df;border-radius:18px}
.spd-detail .sp6-property-area-map iframe{display:block;width:100%;max-width:100%;height:520px;border:0;border-radius:18px 18px 0 0;background:#f5f0e9}
.spd-detail .sp6-map-copy{padding:22px 24px;overflow-wrap:anywhere;min-width:0}
.spd-detail section[aria-labelledby]{scroll-margin-top:calc(var(--spd-header-offset) + var(--spd-bar-height) + 20px)}
@media(min-width:901px) and (max-width:1100px){.spd-layout{display:flex;flex-direction:column}.spd-main{display:contents}.spd-main>section{order:3;width:100%}.spd-main>.sp6-editorial-gallery{order:1}.spd-agent{order:2;position:relative;top:auto;width:100%;max-height:none}.spd-agent .spd-contact-actions{max-width:440px;margin-inline:auto}}
@media(max-width:900px){.spd-detail .sp6-property-area-map iframe{height:460px}.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:clamp(320px,74vw,540px)!important}.spd-detail .sp6-map-copy{padding:18px}}
@media(max-width:480px){.spd-detail .sp6-property-area-map iframe{height:420px}.spd-detail .sp6-gallery .sp6-gallery-stage>.sp6-gallery-track,.spd-detail .sp6-gallery-track{height:360px!important;max-height:max(180px,calc(100svh - var(--spd-header-offset) - var(--spd-bar-height) - var(--spd-bottom-height) - 88px))!important}.spd-detail .sp6-gallery-thumbs{gap:8px}.spd-detail .sp6-gallery-thumbs a{flex-basis:calc((100% - 24px)/4);width:calc((100% - 24px)/4);height:62px}.spd-detail .sp6-map-copy>a{margin-inline-start:0}.spd-detail .sp6-map-copy{gap:12px}}

/* Keep all consultant actions in the page flow without an inner scrollbar. */
.spd-agent{max-height:none;overflow:visible}

/* Shared property section navigation: DOM order follows the RTL reading order. */
.spd-section-nav{direction:rtl;flex-wrap:wrap;gap:8px 20px}
.spd-section-nav a{white-space:nowrap}
.spd-section-nav a.is-active,.spd-section-nav a[aria-current="location"]{border-bottom-color:var(--space-purple-700);color:var(--space-purple-700);background:var(--space-purple-soft)}
.spd-main-navigation{margin-top:24px;padding-block:8px;border-block:1px solid #e7d9e1}
@media(max-width:900px){.spd-section-nav{gap:4px 10px}.spd-section-nav a{font-size:.75rem}}
@media(max-width:480px){.spd-section-nav{gap:2px;justify-content:space-between}.spd-section-nav a{font-size:.75rem;padding-inline:1px;min-height:42px}}
/* Fade fixed property controls without changing page geometry at the footer. */
.spd-sticky{transition:opacity .16s ease,visibility 0s linear .16s}
.spd-sticky.is-visible{transition-delay:0s}
.spd-mobile-actions{transition:opacity .16s ease,visibility 0s linear 0s}
.spd-mobile-actions.is-at-footer{opacity:0;visibility:hidden;pointer-events:none;transition:opacity .16s ease,visibility 0s linear .16s}
@media(prefers-reduced-motion:reduce){.spd-sticky,.spd-mobile-actions,.spd-mobile-actions.is-at-footer{transition:none}}
/* All sizes use the shared measured site-header contract. */
