/* =============================================================
   Property Details — Design Refresh (presentation only)
   Loaded ONLY on property_details view, after property-details.css.
   Same design language as add/edit property redesign.
   ============================================================= */

:root {
    --pd-primary:      #1ea69a;
    --pd-primary-dark: #15867d;
    --pd-primary-soft: rgba(30, 166, 154, .10);
    --pd-title:        #2f2a52;
    --pd-ink:          #2d2a45;
    --pd-muted:        #85819c;
    --pd-border:       #e6e6f1;
    --pd-card:         #ffffff;
    --pd-radius:       14px;
    --pd-radius-sm:    10px;
    --pd-shadow:       0 10px 40px -18px rgba(45, 42, 69, .28);
}

/* ---------- Page canvas ---------- */
.rh_page.rh_page--fullWidth {
    max-width: 1180px;
    margin: 0 auto;
}

/* =============================================================
   Header — title / contact / price
   ============================================================= */
.rh_page__head.rh_page__property {
    background: var(--pd-card);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 26px 30px;
    margin-bottom: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.rh_page__property_title { flex: 1 1 420px; }

.rh_page__property .rh_page__title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--pd-title) !important;
    line-height: 1.25;
    margin-bottom: 14px !important;
    text-transform: capitalize;
}

/* Contact / company / address lines */
.rh_page__property_title > p {
    margin: 0 0 8px !important;
    font-size: 14px;
    color: var(--pd-muted);
    line-height: 1.5;
}
.rh_page__property_title > p b {
    color: var(--pd-ink);
    font-weight: 600;
    margin-right: 4px;
}

/* Price / status column */
.rh_page__property_price {
    text-align: right;
    border: none !important;
    padding: 0 !important;
    flex: 0 0 auto;
}
.rh_page__property_price .status {
    display: inline-block;
    background: var(--pd-primary-soft);
    color: var(--pd-primary-dark);
    border: 1px solid rgba(30, 166, 154, .3);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 20px;
    padding: 6px 16px;
    margin-bottom: 10px;
}
.rh_page__property_price .price {
    font-size: 32px;
    font-weight: 700;
    color: var(--pd-primary);
    line-height: 1.2;
}

/* Contact Owner button */
.btn_contact_owner {
    background: linear-gradient(135deg, var(--pd-primary), var(--pd-primary-dark));
    color: #fff !important;
    border: none;
    border-radius: 24px !important;
    padding: 12px 28px !important;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    box-shadow: 0 8px 20px -10px rgba(30, 166, 154, .7);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn_contact_owner:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow: 0 12px 26px -10px rgba(30, 166, 154, .8);
}

/* =============================================================
   Photo mosaic gallery (hero + tiles, "+N Photos" overlay)
   Scales to any image count: extra photos stay hidden but remain
   in the lightbox set; off-screen tiles are lazy-loaded.
   ============================================================= */
.pd_gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 140px;
    gap: 10px;
    margin-bottom: 30px;
}
.pd_gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--pd-radius-sm);
    background: #eceef6;
}
.pd_gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
.pd_gallery__item:hover img { transform: scale(1.05); }

/* First image = hero, spans 2×2 */
.pd_gallery__hero { grid-column: span 2; grid-row: span 2; }

/* Images beyond the first five stay in the DOM for the lightbox only */
.pd_gallery__rest { display: none; }

/* "+N Photos" overlay on the last visible tile */
.pd_gallery__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 18, 34, .55);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .03em;
    transition: background .2s ease;
}
.pd_gallery__item:hover .pd_gallery__more { background: rgba(20, 18, 34, .7); }

/* Count-aware layouts */
.pd_gallery--single { grid-template-columns: 1fr; grid-auto-rows: 440px; }
.pd_gallery--single .pd_gallery__hero { grid-column: span 1; grid-row: span 1; }
.pd_gallery--pair { grid-template-columns: 1fr 1fr; grid-auto-rows: 340px; }
.pd_gallery--pair .pd_gallery__hero { grid-column: span 1; grid-row: span 1; }

@media (max-width: 768px) {
    .pd_gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 110px; }
    .pd_gallery__hero { grid-column: span 2; grid-row: span 2; }
    .pd_gallery--single { grid-auto-rows: 260px; }
    .pd_gallery--pair { grid-template-columns: 1fr; grid-auto-rows: 220px; }
}

/* =============================================================
   Lightbox (namespaced — immune to theme CSS)
   ============================================================= */
.pd_lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(14, 12, 24, .94);
}
.pd_lightbox.pd_lightbox--open { display: flex; }

.pd_lightbox__stage {
    margin: 0;
    max-width: calc(100vw - 140px);
    max-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd_lightbox__img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
    animation: pd-lb-fade .22s ease;
}
@keyframes pd-lb-fade { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }

.pd_lightbox__close,
.pd_lightbox__nav {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s ease;
    z-index: 2;
}
.pd_lightbox__close:hover,
.pd_lightbox__nav:hover { background: var(--pd-primary); }

.pd_lightbox__close { top: 20px; right: 22px; font-size: 30px; }
.pd_lightbox__prev  { left: 22px;  top: 50%; margin-top: -24px; }
.pd_lightbox__next  { right: 22px; top: 50%; margin-top: -24px; }

.pd_lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    background: rgba(255, 255, 255, .12);
    border-radius: 16px;
    padding: 6px 16px;
}

@media (max-width: 640px) {
    .pd_lightbox__stage { max-width: 100vw; }
    .pd_lightbox__img { border-radius: 0; }
    .pd_lightbox__close { top: 12px; right: 12px; }
    .pd_lightbox__prev { left: 8px; }
    .pd_lightbox__next { right: 8px; }
}

/* =============================================================
   Gallery slider
   ============================================================= */
#property-detail-flexslider .flexslider {
    border: none;
    border-radius: var(--pd-radius);
    overflow: hidden;
    box-shadow: var(--pd-shadow);
    margin-bottom: 30px;
    background: #0e0c18;
}
#property-detail-flexslider .slides img {
    max-height: 560px;
    object-fit: cover;
}
/* Prev/next arrows → circular buttons */
#property-detail-flexslider .flex-direction-nav a {
    width: 44px;
    height: 44px;
    margin-top: -22px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .92);
    box-shadow: 0 4px 14px rgba(20, 18, 34, .3);
    opacity: 0;
    transition: opacity .2s ease, background-color .2s ease;
}
#property-detail-flexslider .flexslider:hover .flex-direction-nav a { opacity: 1; }
#property-detail-flexslider .flex-direction-nav a:hover { background-color: #fff; }
#property-detail-flexslider .flex-direction-nav a::before {
    font-size: 22px;
    line-height: 44px;
    width: 44px;
    text-align: center;
    color: var(--pd-ink);
}

/* =============================================================
   Main content column
   ============================================================= */
.rh_property .rh_property__wrap.rh_property--padding { padding: 0; }

.rh_property__main .rh_property__content {
    background: var(--pd-card);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius);
    box-shadow: var(--pd-shadow);
    padding: 26px 30px 30px;
}

/* Print row */
.rh_property__row.rh_property__meta.rh_property--borderBottom {
    border-bottom: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    justify-content: flex-end;
}
.rh_property__print .print svg { opacity: .55; transition: opacity .2s ease; }
.rh_property__print .print:hover svg { opacity: 1; }

/* ---------- Key facts strip (beds / baths / parking / area / year) ---------- */
.rh_property__row.rh_property__meta_wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 10px;
    margin: 4px 0 22px;
    padding-bottom: 0;
    border-bottom: none;
}
.rh_property__meta_wrap .rh_property__meta {
    background: #fafbff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 10px 10px 11px;
    margin: 0 !important;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.rh_property__meta_wrap .rh_property__meta:hover {
    border-color: var(--pd-primary);
    box-shadow: 0 8px 20px -14px rgba(30, 166, 154, .6);
    transform: translateY(-2px);
}
.rh_property__meta_wrap .rh_meta_titles {
    display: block;
    font-size: 10px !important;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--pd-muted) !important;
    margin-bottom: 6px !important;
}
.rh_property__meta_wrap .rh_property__meta > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}
.rh_property__meta_wrap .rh_property__meta svg,
.rh_property__meta_wrap .rh_property__meta .rh_svg {
    fill: var(--pd-primary);
    width: 18px;
    height: 18px;
    margin: 0 !important;
}
.rh_property__meta_wrap .rh_property__meta .figure {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--pd-ink) !important;
    margin: 0 !important;
    line-height: 1.3;
}
.rh_property__meta_wrap .rh_property__meta .label {
    font-size: 10.5px !important;
    color: var(--pd-muted) !important;
}

/* ---------- Section headings ---------- */
.rh_property__heading {
    position: relative;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: var(--pd-title) !important;
    margin: 34px 0 16px !important;
    padding-left: 14px !important;
}
.rh_property__heading::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--pd-primary), var(--pd-primary-dark));
}

/* Description body */
.rh_property__content .rh_content {
    color: #55516e;
    font-size: 14.5px;
    line-height: 1.8;
}

/* Common note panel */
.rh_property__common_note {
    background: #f6f8fe;
    border: 1px solid var(--pd-border);
    border-left: 3px solid var(--pd-primary);
    border-radius: var(--pd-radius-sm);
    padding: 4px 18px 14px;
    margin-top: 26px;
    color: #55516e;
    font-size: 14px;
    line-height: 1.7;
}
.rh_property__common_note .rh_property__heading { margin-top: 14px !important; }

/* ---------- Features: compact tag pills (many features, little space) ---------- */
.rh_property__features_wrap .rh_property__features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}
.rh_property__features .rh_property__feature {
    flex: 0 0 auto !important;
    flex-basis: auto !important;
    width: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pd-primary-soft);
    border: 1px solid rgba(30, 166, 154, .25);
    border-radius: 15px;
    padding: 4px 12px 4px 8px !important;
    margin: 0 !important;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--pd-primary-dark);
    white-space: nowrap;
}
.rh_property__feature .rh_done_icon {
    /* theme positions this absolutely over the text — restore inline flow */
    position: static !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin: 0 !important;
    background: transparent;
}
.rh_property__feature .rh_done_icon svg {
    width: 11px;
    height: 11px;
}
.rh_property__feature .rh_done_icon svg path,
.rh_property__feature .rh_done_icon svg .st0 {
    fill: var(--pd-primary-dark) !important;   /* theme paints this orange */
}

/* ---------- Video / virtual tour ---------- */
.rh_property__virtual_tour video {
    width: 100%;
    border-radius: var(--pd-radius-sm);
    border: 1px solid var(--pd-border);
    background: #0e0c18;
    display: block;
}

/* ---------- Map ---------- */
.rh_property__map_wrap #property_map {
    height: 420px;
    border-radius: var(--pd-radius-sm);
    border: 1px solid var(--pd-border);
}

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 768px) {
    .rh_page__head.rh_page__property { padding: 20px 18px; }
    .rh_page__property_price { text-align: left; }
    .rh_page__property .rh_page__title { font-size: 23px !important; }
    .rh_page__property_price .price { font-size: 26px; }
    .rh_property__main .rh_property__content { padding: 18px 16px 22px; }
    #property-detail-flexslider .slides img { max-height: 320px; }
    .rh_property__map_wrap #property_map { height: 300px; }
}
