/* ==========================================================================
   Property detail page — scoped redesign
   Everything is namespaced under .property-detail so no other page is touched.
   ========================================================================== */

.property-detail {
    --pd-brand: #ff7430;
    --pd-brand-dark: #e05f1b;
    --pd-ink: #2e2a26;
    --pd-ink-soft: #57504a;
    --pd-muted: #8a837b;
    --pd-border: #e7e1d9;
    --pd-surface: #ffffff;
    --pd-canvas: #f7f5f2;
    --pd-gallery-bg: #262220;
    --pd-radius: 12px;
    --pd-shadow: 0 1px 3px rgba(46, 42, 38, .07);
    font-family: 'Fira Sans', sans-serif;
    color: var(--pd-ink);
    font-size: 15px;
    line-height: 1.6;
    padding: 8px 0 16px;
}

.property-detail *,
.property-detail *::before,
.property-detail *::after {
    box-sizing: border-box;
}

.property-detail a {
    color: var(--pd-brand-dark);
    text-decoration: none;
}

.property-detail a:hover {
    color: var(--pd-brand);
    text-decoration: none;
}

.property-detail :focus-visible {
    outline: 2px solid var(--pd-brand);
    outline-offset: 2px;
}

/* --- Breadcrumb -------------------------------------------------------- */

.property-detail .pd-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--pd-muted);
}

.property-detail .pd-breadcrumb li + li::before {
    content: "›";
    margin-right: 10px;
    color: var(--pd-muted);
}

.property-detail .pd-breadcrumb a {
    color: var(--pd-ink-soft);
}

.property-detail .pd-breadcrumb a:hover {
    color: var(--pd-brand);
}

.property-detail .pd-breadcrumb li[aria-current] span {
    color: var(--pd-muted);
    display: inline-block;
    max-width: min(420px, 60vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* --- Header ------------------------------------------------------------ */

.property-detail .pd-status-alert {
    margin: 14px 0 0;
    border-radius: 8px;
}

.property-detail .pd-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.property-detail .pd-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.property-detail .pd-chip-type {
    background: rgba(255, 116, 48, .12);
    color: var(--pd-brand-dark);
}

.property-detail .pd-chip-status {
    background: #ece8e2;
    color: var(--pd-ink-soft);
}

.property-detail .pd-id {
    font-size: 13px;
    color: var(--pd-muted);
}

.property-detail .pd-head-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin: 10px 0 20px;
}

.property-detail .pd-title {
    margin: 0;
    font-family: 'Fira Sans', sans-serif;
    font-size: clamp(22px, 3.2vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--pd-ink);
}

.property-detail .pd-location {
    margin: 6px 0 0;
    font-style: normal;
    font-size: 15px;
    color: var(--pd-muted);
}

.property-detail .pd-location .fa {
    color: var(--pd-brand);
    margin-right: 4px;
}

.property-detail .pd-price-wrap {
    flex: 0 0 auto;
    text-align: right;
    padding-top: 4px;
}

.property-detail .pd-price {
    display: inline-block;
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 700;
    color: var(--pd-brand);
    white-space: nowrap;
}

/* --- Layout ------------------------------------------------------------ */

.property-detail .pd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
}

.property-detail .pd-main {
    min-width: 0;
}

/* --- Gallery ----------------------------------------------------------- */

.property-detail .pd-gallery {
    position: relative;
    margin-bottom: 22px;
}

.property-detail .pd-gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 640px;
    background: var(--pd-gallery-bg);
    border-radius: var(--pd-radius);
    overflow: hidden;
}

.property-detail .pd-gallery-main .pd-slide,
.property-detail .pd-gallery-main .pd-slide-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.property-detail .pd-gallery-main .pd-slide img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Owl Carousel internals — only inside the property gallery */
.property-detail .pd-carousel .owl-stage-outer,
.property-detail .pd-carousel .owl-stage,
.property-detail .pd-carousel .owl-item {
    height: 100%;
}

.property-detail .pd-carousel .owl-stage {
    display: flex;
}

.property-detail .pd-carousel .owl-item .pd-slide,
.property-detail .pd-carousel .owl-item .pd-slide-link {
    height: 100%;
}

.property-detail .pd-carousel .owl-dots,
.property-detail .owl-nav {
    display: none !important;
}

.property-detail .pd-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-top: -30px;
    border: 0;
    border-radius: 50%;
    background: rgba(38, 34, 32, .55);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .18s ease;
}

.property-detail .pd-arrow:hover,
.property-detail .pd-arrow:focus-visible {
    background: var(--pd-brand);
}

.property-detail .pd-arrow-prev { left: 12px; }
.property-detail .pd-arrow-next { right: 12px; }

.property-detail .pd-counter {
    position: absolute;
    right: 12px;
    top: 12px;
    z-index: 5;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(38, 34, 32, .6);
    color: #fff;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.property-detail .pd-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding: 2px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.property-detail .pd-thumb {
    flex: 0 0 auto;
    width: 78px;
    height: 58px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--pd-gallery-bg);
    cursor: pointer;
    overflow: hidden;
    transition: border-color .18s ease, opacity .18s ease;
    opacity: .75;
}

.property-detail .pd-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail .pd-thumb:hover {
    opacity: 1;
}

.property-detail .pd-thumb.active {
    border-color: var(--pd-brand);
    opacity: 1;
}

.property-detail .pd-thumb:focus-visible {
    border-color: var(--pd-brand);
    opacity: 1;
}

.property-detail .pd-gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    border: 2px dashed var(--pd-border);
    border-radius: var(--pd-radius);
    background: var(--pd-canvas);
    color: var(--pd-muted);
    font-size: 15px;
}

.property-detail .pd-gallery-empty .fa {
    font-size: 34px;
    opacity: .6;
}

/* --- Key facts strip --------------------------------------------------- */

.property-detail .pd-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.property-detail .pd-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--pd-border);
    border-radius: 999px;
    background: var(--pd-surface);
    font-size: 14px;
    font-weight: 500;
    color: var(--pd-ink-soft);
    white-space: nowrap;
}

.property-detail .pd-facts .fa {
    color: var(--pd-brand);
}

/* --- Cards ------------------------------------------------------------- */

.property-detail .pd-card {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    margin-bottom: 22px;
    padding: 22px;
}

.property-detail .pd-card-title {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pd-border);
    font-family: 'Fira Sans', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: var(--pd-ink);
}

.property-detail .pd-card-body {
    min-width: 0;
}

/* Rich description content must fit narrow screens */
.property-detail .pd-description {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.property-detail .pd-description img {
    max-width: 100%;
    height: auto;
}

.property-detail .pd-description table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.property-detail .pd-description pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.property-detail .pd-description iframe {
    max-width: 100%;
}

/* --- Detail meta grid -------------------------------------------------- */

.property-detail .pd-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 12px 24px;
}

.property-detail .pd-meta-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 14.5px;
    color: var(--pd-ink-soft);
    min-width: 0;
}

.property-detail .pd-meta-item .fa,
.property-detail .pd-meta-item .fas,
.property-detail .pd-meta-item .far {
    color: var(--pd-brand);
    flex: 0 0 auto;
}

.property-detail .pd-meta-item img {
    width: 16px;
    flex: 0 0 auto;
    align-self: center;
}

/* --- Amenities --------------------------------------------------------- */

.property-detail .pd-amenities {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.property-detail .pd-amenities li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14.5px;
    color: var(--pd-ink-soft);
    min-width: 0;
}

.property-detail .pd-amenities li img {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

/* --- Tags -------------------------------------------------------------- */

.property-detail .pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.property-detail .pd-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--pd-canvas);
    border: 1px solid var(--pd-border);
    font-size: 13.5px;
    color: var(--pd-ink-soft);
}

.property-detail .pd-tag:hover {
    border-color: var(--pd-brand);
    color: var(--pd-brand-dark);
}

/* --- Sidebar / contact ------------------------------------------------- */

.property-detail .pd-aside {
    min-width: 0;
}

.property-detail .pd-contact .pd-card-body {
    padding-top: 2px;
}

.property-detail .pd-broker {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.property-detail .pd-broker-photo {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--pd-border);
}

.property-detail .pd-broker-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-detail .pd-broker-name {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--pd-ink);
}

.property-detail .pd-broker-name:hover {
    color: var(--pd-brand-dark);
}

.property-detail .pd-broker-count {
    display: inline-block;
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--pd-muted);
}

.property-detail .pd-broker-contacts {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
}

.property-detail .pd-contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--pd-border);
    font-size: 14.5px;
    font-weight: 500;
    color: var(--pd-ink);
    background: var(--pd-canvas);
    overflow-wrap: anywhere;
    text-align: center;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.property-detail .pd-contact-btn:hover {
    border-color: var(--pd-brand);
    color: var(--pd-brand-dark);
}

.property-detail .pd-contact-tel {
    background: var(--pd-brand);
    border-color: var(--pd-brand);
    color: #fff;
}

.property-detail .pd-contact-tel:hover {
    background: var(--pd-brand-dark);
    border-color: var(--pd-brand-dark);
    color: #fff;
}

/* --- Contact form ------------------------------------------------------ */

.property-detail .pd-form .pd-field {
    margin-bottom: 14px;
}

.property-detail .pd-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--pd-ink-soft);
}

.property-detail .pd-form .form-control {
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border: 1px solid var(--pd-border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14.5px;
    color: var(--pd-ink);
    box-shadow: none;
}

.property-detail .pd-form .form-control:focus {
    border-color: var(--pd-brand);
    box-shadow: 0 0 0 3px rgba(255, 116, 48, .15);
    outline: none;
}

.property-detail .pd-form textarea.form-control {
    resize: vertical;
    min-height: 96px;
}

.property-detail .pd-field-captcha .form-control {
    max-width: 120px;
}

.property-detail .pd-field-turnstile {
    overflow: hidden;
}

.property-detail .pd-submit {
    display: block;
    width: 100%;
    min-height: 44px;
    margin-top: 6px;
    border: 0;
    border-radius: 8px;
    background: var(--pd-brand);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    transition: background-color .18s ease;
}

.property-detail .pd-submit:hover,
.property-detail .pd-submit:focus-visible {
    background: var(--pd-brand-dark);
    color: #fff;
}

/* Other widgets rendered into the aside */
.property-detail .pd-aside .widget {
    background: var(--pd-surface);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    padding: 18px;
    margin-bottom: 22px;
}

.property-detail .pd-brochure {
    text-align: center;
    margin: 10px 0 22px;
}

/* --- Mobile sticky action bar ------------------------------------------ */

.property-detail .pd-mobilebar {
    display: none;
}

/* --- Responsive -------------------------------------------------------- */

@media (max-width: 991px) {
    .property-detail .pd-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .property-detail .pd-aside {
        margin-top: 4px;
    }

    .property-detail .pd-gallery-main {
        aspect-ratio: 4 / 3;
    }

    .property-detail .pd-mobilebar {
        position: sticky;
        bottom: 0;
        z-index: 90;
        display: flex;
        gap: 10px;
        margin: 8px -15px 0;
        padding: 10px 15px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .96);
        border-top: 1px solid var(--pd-border);
        box-shadow: 0 -2px 10px rgba(46, 42, 38, .08);
    }

    .property-detail .pd-mobilebar-btn {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 46px;
        padding: 10px 12px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
    }

    .property-detail .pd-mobilebar-btn:first-child {
        background: var(--pd-brand);
        color: #fff;
    }

    .property-detail .pd-mobilebar-btn:first-child:hover {
        background: var(--pd-brand-dark);
        color: #fff;
    }

    .property-detail .pd-mobilebar-msg {
        background: var(--pd-surface);
        border: 1px solid var(--pd-brand);
        color: var(--pd-brand-dark);
    }

    .property-detail .pd-mobilebar-msg:hover {
        background: rgba(255, 116, 48, .08);
        color: var(--pd-brand-dark);
    }

    /* While the cookie notice is up, keep the action bar in normal flow
       (the plugin removes #gdpr-cookie-message from <body> after consent,
       which automatically restores sticky positioning). */
    body:has(> #gdpr-cookie-message) .property-detail .pd-mobilebar {
        position: static;
        box-shadow: none;
    }
}

@media (max-width: 575px) {
    .property-detail {
        font-size: 14px;
    }

    .property-detail .pd-head-main {
        flex-direction: column;
        gap: 8px;
    }

    .property-detail .pd-price-wrap {
        text-align: left;
        padding-top: 0;
    }

    .property-detail .pd-card {
        padding: 16px;
    }

    .property-detail .pd-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 14px;
    }

    .property-detail .pd-meta-item {
        font-size: 13.5px;
    }

    /* >=16px inputs avoid iOS focus zoom */
    .property-detail .pd-form .form-control {
        font-size: 16px;
    }

    .property-detail .pd-thumb {
        width: 66px;
        height: 50px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .property-detail .pd-arrow,
    .property-detail .pd-thumb,
    .property-detail .pd-contact-btn,
    .property-detail .pd-submit {
        transition: none;
    }
}

/* --- Same-broker listings carousel -------------------------------------- */

.property-detail .pd-related-carousel {
    margin: 0 -2px;
}

/* Owl internals — owl theme CSS is not loaded; replicate minimal layout */
.property-detail .pd-owl {
    position: relative;
}

.property-detail .pd-owl .owl-stage-outer {
    position: relative;
    overflow: hidden;
}

.property-detail .pd-owl .owl-stage {
    display: flex;
}

.property-detail .pd-owl .owl-item {
    flex: 0 0 auto;
}

.property-detail .pd-related-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--pd-border);
    border-radius: 10px;
    background: var(--pd-surface);
    overflow: hidden;
    height: 100%;
}

.property-detail .pd-owl .owl-item {
    display: flex;
}

.property-detail .pd-owl .pd-related-card {
    flex: 1 1 auto;
    min-width: 0;
}

.property-detail .pd-related-img {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--pd-gallery-bg);
    overflow: hidden;
}

.property-detail .pd-related-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.property-detail .pd-related-img:hover img {
    transform: scale(1.04);
}

.property-detail .pd-related-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(38, 34, 32, .75);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .02em;
}

.property-detail .pd-related-badge-sold { background: rgba(192, 57, 43, .9); }
.property-detail .pd-related-badge-rent { background: rgba(41, 128, 185, .9); }
.property-detail .pd-related-badge-both { background: rgba(142, 68, 173, .9); }
.property-detail .pd-related-badge-sale { background: var(--pd-brand); }

.property-detail .pd-related-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px 14px;
}

.property-detail .pd-related-title {
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--pd-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.property-detail .pd-related-title:hover {
    color: var(--pd-brand-dark);
}

.property-detail .pd-related-loc {
    font-size: 12.5px;
    color: var(--pd-muted);
}

.property-detail .pd-related-loc .fa {
    color: var(--pd-brand);
    margin-right: 3px;
}

.property-detail .pd-related-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--pd-brand);
}

.property-detail .pd-related-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

.property-detail .pd-related-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--pd-border);
    border-radius: 50%;
    background: var(--pd-surface);
    color: var(--pd-ink-soft);
    font-size: 14px;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background-color .18s ease;
}

.property-detail .pd-related-btn:hover,
.property-detail .pd-related-btn:focus-visible {
    border-color: var(--pd-brand);
    background: var(--pd-brand);
    color: #fff;
}

/* Non-carousel fallback (single card) keeps grid width sane */
.property-detail .pd-related-carousel:not(.owl-carousel) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

@media (max-width: 575px) {
    .property-detail .pd-related-nav {
        justify-content: center;
    }
}
