:root {
    --property-accent: #f4b72f;
    --property-ink: #111111;
    --property-muted: #5d5d5d;
    --property-line: #e4e4e4;
    --property-surface: #ffffff;
    --property-radius: 12px;
}

body.page-property-detail {
    margin: 0;
    background: var(--property-surface);
    color: var(--property-ink);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.45;
}

.property-detail-icon-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.property-detail-icon {
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    fill: currentColor;
}

.property-detail-main {
    width: 100%;
}

/* Galería superior con desplazamiento horizontal nativo y puntos de ajuste. */
.property-detail-gallery {
    max-width: 1740px;
    padding: 28px 40px 0;
}

.property-detail-gallery-stage {
    position: relative;
}

.property-detail-gallery-scroller {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 12px;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--property-accent) #ececec;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.property-detail-gallery-scroller::-webkit-scrollbar {
    height: 8px;
}

.property-detail-gallery-scroller::-webkit-scrollbar-track {
    border-radius: 999px;
    background: #ececec;
}

.property-detail-gallery-scroller::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--property-accent);
}

.property-detail-gallery-track {
    height: clamp(300px, 27vw, 460px);
    max-height: 460px;
    gap: 20px;
}

.property-detail-gallery-item {
    position: relative;
    height: 100%;
    flex: 0 0 clamp(300px, 42vw, 720px);
    overflow: hidden;
    border-radius: var(--property-radius);
    background: #f0f0f0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.property-detail-gallery-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.property-detail-gallery-scroller:focus-visible,
.property-detail-back-link:focus-visible,
.property-detail-contact-button:focus-visible,
.property-detail-share-button:focus-visible,
.property-detail-description-toggle:focus-visible {
    outline: 3px solid rgba(244, 183, 47, .55);
    outline-offset: 3px;
}

.property-detail-back-link {
    position: absolute;
    top: 20px;
    left: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 7px;
    background: #fff;
    color: #171717;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);
    z-index: 2;
}

.property-detail-back-link:hover {
    color: #000;
    transform: translateY(-1px);
}

.property-detail-gallery-empty {
    position: relative;
    display: flex;
    min-height: 320px;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: var(--property-radius);
    background: #f5f3ee;
    color: #777;
}

.property-detail-gallery-empty-icon {
    width: 42px;
    height: 42px;
    color: #c9a044;
}

/* Resumen, inmobiliaria y contenido editorial. */
.property-detail-container {
    max-width: 1200px;
    padding: 0 28px 96px;
    margin: 58px auto 0;
}

.property-detail-overview,
.property-detail-lower-row {
    margin-right: -22px;
    margin-left: -22px;
}

.property-detail-summary,
.property-detail-side,
.property-detail-lower-column {
    padding-right: 22px;
    padding-left: 22px;
}

.property-detail-price-row {
    gap: 20px;
}

.property-detail-price {
    font-size: clamp(36px, 4vw, 44px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.08;
}

.property-detail-operation-badge,
.property-detail-highlight {
    border: 1px solid var(--property-accent);
    background: #fff;
    color: #c67b00;
    font-weight: 500;
}

.property-detail-operation-badge {
    padding: 6px 11px;
    border-radius: 4px;
    font-size: 13px;
}

.property-detail-address {
    display: flex;
    max-width: 590px;
    flex-direction: column;
    gap: 2px;
    padding: 22px 0 18px;
    color: #333;
    font-size: 14px;
    font-style: normal;
}

.property-detail-city {
    color: var(--property-muted);
}

.property-detail-facts {
    max-width: 600px;
    padding: 14px 0;
    border-top: 1px solid var(--property-line);
    border-bottom: 1px solid var(--property-line);
}

.property-detail-fact {
    display: flex;
    min-height: 62px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    text-align: center;
}

.property-detail-fact + .property-detail-fact {
    border-left: 1px solid var(--property-line);
}

.property-detail-fact-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.12;
    white-space: nowrap;
}

.property-detail-fact-label {
    margin-top: 3px;
    font-size: 13px;
}

.property-detail-agency {
    padding-top: 3px;
}

.property-detail-agency-row {
    gap: 22px;
    justify-content: center;
}

.property-detail-agency-brand {
    gap: 12px;
}

.property-detail-agency-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    overflow: hidden;
    border-radius: 50%;
}

.property-detail-agency-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail-agency-name {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.property-detail-agency-name small {
    font-size: 11px;
}

.property-detail-agency-name strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.property-detail-contact-button {
    padding: 10px 16px;
    border-radius: 10px;
    background: #edac32;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: background-color .2s ease, transform .2s ease;
}

.property-detail-contact-button:hover {
    transform: translateY(-1px);
    background: #da951e;
    color: #fff;
}

.property-detail-stats {
    gap: 28px;
    justify-content: center;
    margin-top: 22px;
}

.property-detail-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.property-detail-stat dd,
.property-detail-stat dt {
    margin: 0;
}

.property-detail-stat dd {
    order: 1;
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
}

.property-detail-stat dt {
    order: 2;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 400;
}

.property-detail-lower-row {
    margin-top: 30px;
}

.property-detail-special {
    padding: 0 10px 34px;
}

.property-detail-section-title {
    margin: 0 0 18px;
    font-size: 21px;
    font-weight: 700;
}

.property-detail-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 17px;
}

.property-detail-highlight {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    white-space: normal;
}

.property-detail-description-wrapper {
    position: relative;
}

.property-detail-description {
    display: inline;
    margin: 0;
    color: #202020;
    font-size: 14px;
    line-height: 1.35;
    white-space: pre-line;
}

.property-detail-description:not(.is-expanded) {
    display: block;
    max-height: calc(1.35em * 7);
    overflow: hidden;
}

.property-detail-description-toggle {
    display: inline-block;
    padding: 2px 0;
    color: #087bf0;
    font-size: 14px;
    vertical-align: baseline;
    text-decoration: underline;
}

.property-detail-description-toggle:hover {
    color: #005fbd;
}

.property-detail-map-section {
    position: relative;
    padding-top: 32px;
    border-top: 1px solid var(--property-line);
}

.property-detail-map {
    width: 100%;
    height: 390px;
    overflow: hidden;
    border-radius: 13px;
    background: #eef0e9;
}

.property-detail-map-notice {
    position: absolute;
    top: 44px;
    left: 60px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 10px;
    background: rgba(255, 255, 255, .94);
    color: #383838;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
    pointer-events: none;
    z-index: 500;
}

.property-detail-share-button {
    position: absolute;
    top: 44px;
    right: 12px;
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f3b343;
    color: #fff;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
    z-index: 500;
}

.property-detail-share-button:hover {
    background: #df9d29;
    color: #fff;
}

.property-detail-map .leaflet-control-attribution {
    font-size: 9px;
}

.property-detail-map-marker {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: var(--property-accent);
    color: #3d2a00;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    transform: rotate(-45deg);
}

.property-detail-map-marker .property-detail-icon {
    width: 12px;
    height: 12px;
    transform: rotate(45deg);
}

@media (max-width: 1199.98px) {
    .property-detail-container {
        max-width: 1040px;
    }

    .property-detail-price {
        font-size: 42px;
    }

    .property-detail-agency-row {
        gap: 14px;
    }
}

@media (max-width: 991.98px) {
    .property-detail-gallery {
        padding-right: 22px;
        padding-left: 22px;
    }

    .property-detail-container {
        margin-top: 40px;
    }

    .property-detail-side {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 30px;
    }

    .property-detail-agency {
        padding-top: 0;
    }

    .property-detail-agency-row {
        justify-content: flex-start;
    }

    .property-detail-stats {
        margin-top: 0;
    }

    .property-detail-lower-row {
        margin-top: 36px;
    }
}

@media (max-width: 575.98px) {
    .property-detail-gallery {
        padding: 12px 0 0;
    }

    .property-detail-gallery-scroller {
        padding: 0 14px 10px;
        scroll-padding-inline: 14px;
    }

    .property-detail-gallery-track {
        height: auto;
        max-height: none;
        gap: 12px;
    }

    .property-detail-gallery-item {
        height: auto;
        flex: 0 0 calc(100vw - 28px);
        border-radius: 10px;
        aspect-ratio: 1 / 1;
    }

    .property-detail-gallery-empty {
        min-height: 280px;
        border-radius: 0;
    }

    .property-detail-back-link {
        top: 14px;
        left: 28px;
    }

    .property-detail-container {
        display: flex;
        flex-direction: column;
        padding: 0 0 48px;
        margin-top: 0;
    }

    .property-detail-overview,
    .property-detail-side,
    .property-detail-lower-row,
    .property-detail-lower-column {
        display: contents;
    }

    .property-detail-summary {
        order: 1;
        padding: 18px 24px 0;
        border-top: 1px solid var(--property-line);
    }

    .property-detail-price-row {
        flex-wrap: nowrap !important;
        justify-content: space-between;
        gap: 14px;
    }

    .property-detail-price {
        font-size: clamp(30px, 9vw, 38px);
    }

    .property-detail-address {
        padding: 14px 0 16px;
    }

    .property-detail-facts {
        max-width: none;
        padding: 14px 0;
    }

    .property-detail-fact {
        min-height: 58px;
        flex: 0 0 25%;
        max-width: 25%;
        padding: 0 3px;
    }

    .property-detail-fact:nth-child(3) {
        border-left: 1px solid var(--property-line);
    }

    .property-detail-fact-value {
        font-size: 19px;
    }

    .property-detail-fact-label {
        font-size: 11px;
    }

    .property-detail-agency {
        order: 3;
        width: 100%;
        padding: 12px 28px;
        border-top: 1px solid var(--property-line);
        border-bottom: 1px solid var(--property-line);
    }

    .property-detail-agency-row {
        justify-content: space-between;
        gap: 12px;
    }

    .property-detail-agency-logo {
        width: 60px;
        height: 60px;
        flex-basis: 60px;
    }

    .property-detail-agency-name strong {
        font-size: 15px;
    }

    .property-detail-contact-button {
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 16px;
    }

    .property-detail-stats {
        order: 5;
        width: 100%;
        padding: 20px 40px;
        justify-content: flex-start;
        gap: 46px;
        border-top: 1px solid var(--property-line);
        border-bottom: 1px solid var(--property-line);
    }

    .property-detail-special {
        order: 2;
        width: 100%;
        padding: 30px 28px 28px;
    }

    .property-detail-section-title {
        max-width: 280px;
        font-size: 22px;
    }

    .property-detail-description:not(.is-expanded) {
        max-height: calc(1.35em * 6);
    }

    .property-detail-map-section {
        order: 4;
        width: 100%;
        padding: 16px 28px 24px;
        border-top: 0;
    }

    .property-detail-map {
        height: auto;
        border-radius: 10px;
        aspect-ratio: 1.08 / 1;
    }

    .property-detail-map-notice,
    .property-detail-share-button {
        top: 28px;
    }

    .property-detail-map-notice {
        left: 88px;
    }

    .property-detail-share-button {
        right: 40px;
    }

}

@media (max-width: 359.98px) {
    .property-detail-fact {
        padding-inline: 1px;
    }

    .property-detail-fact-value {
        font-size: 16px;
    }

    .property-detail-fact-label {
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .property-detail-contact-button,
    .property-detail-back-link {
        transition: none;
    }
}
