/**
 * Single Property Template CSS
 */

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,700&display=swap");

.pm-property-single {
    --pm-bg: #ffffff;
    --pm-surface: #ffffff;
    --pm-surface-soft: #f7f7f7;
    --pm-text: #1F1F1F;
    --pm-text-muted: #646464;
    --pm-line: #e1e1e1;
    --pm-primary: #CC7E68;
    --pm-primary-strong: #B06C5A;
    --pm-accent: #CC7E68;
    --pm-dark: #1F1F1F;
    --pm-radius: 18px;
    --pm-shadow-soft: 0 14px 32px rgba(25, 29, 38, 0.08);
    --pm-shadow-card: 0 18px 42px rgba(14, 18, 27, 0.14);
    background: var(--pm-bg) !important;
    color: var(--pm-text);
    font-family: "Manrope", "Segoe UI", sans-serif;
    line-height: 1.55;
}

.pm-property-single * {
    box-sizing: border-box;
}

.pm-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.pm-title,
.pm-section-title,
.pm-card h3,
.pm-detail-card h3,
.form-title {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: 0.01em;
}

.pm-hero {
    position: relative;
    min-height: clamp(520px, 68vh, 760px);
    overflow: hidden;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
}

.pm-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pm-hero-placeholder {
    background: var(--pm-surface-soft) !important;
}

.pm-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55) !important;
}

.pm-hero-layout {
    position: relative;
    z-index: 1;
    min-height: inherit;
    display: grid;
    grid-template-columns: 1.2fr minmax(290px, 360px);
    gap: 26px;
    align-items: end;
    padding: clamp(38px, 6vw, 64px) 0;
}

.pm-hero-copy {
    color: #fff !important;
    max-width: 760px;
}

.pm-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.pm-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
    font-size: 0.84rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 13px;
}

.pm-chip-muted {
    background: rgba(22, 24, 34, 0.4);
}

.pm-title {
    margin: 0;
    color: #fff !important;
    font-size: clamp(2rem, 4.8vw, 4rem);
    line-height: 1.02;
}

.pm-address {
    margin: 16px 0 0;
    font-weight: 600;
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    opacity: 0.94;
}

.pm-lead {
    margin: 15px 0 0;
    max-width: 56ch;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1rem;
}

.pm-kpi-list {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pm-kpi-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 12px;
    background: rgba(8, 10, 16, 0.44);
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #fff !important;
    padding: 9px 12px;
    font-size: 0.92rem;
}

.pm-kpi-item strong {
    font-size: 1rem;
}

.pm-hero-card {
    backdrop-filter: blur(7px);
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.68);
    border-radius: var(--pm-radius);
    box-shadow: var(--pm-shadow-card);
    padding: 22px;
    display: grid;
    gap: 12px;
}

.pm-price-wrap {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
}

.pm-price-label {
    color: var(--pm-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 700;
}

.pm-price-value {
    font-size: clamp(1.65rem, 2.8vw, 2.3rem);
    line-height: 1.12;
    color: var(--pm-dark);
}

.pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid transparent;
    padding: 12px 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.pm-btn:hover {
    transform: translateY(-2px);
}

.pm-btn-primary {
    color: #fff !important;
    background: var(--pm-primary) !important;
    box-shadow: 0 6px 16px rgba(204, 126, 104, 0.32);
}

.pm-btn-primary:hover {
    background: var(--pm-primary-strong) !important;
}

.pm-btn-ghost {
    color: var(--pm-dark) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: var(--pm-line) !important;
}

.pm-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 28px;
    padding: 44px 0;
}

.pm-main-content {
    min-width: 0;
    display: grid;
    gap: 24px;
}

.pm-section {
    background: var(--pm-surface);
    border-radius: var(--pm-radius);
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-shadow-soft);
    padding: 24px;
    animation: pm-fade-up 0.55s ease both;
}

.pm-section-title {
    margin: 0 0 16px;
    color: var(--pm-dark) !important;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1.1;
}

.pm-gallery-shell {
    display: grid;
    gap: 12px;
}

/* New carousel styles */
.pm-gallery-carousel {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.pm-gallery-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--pm-line);
}

.pm-gallery-slide img {
    width: 100%;
    height: clamp(280px, 50vw, 520px);
    object-fit: cover;
    display: block;
}

/* Adjust location map when only link present */
.pm-location-map--link {
    border: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.pm-gallery-featured-link {
    display: block;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--pm-line);
}

.pm-gallery-featured-image {
    width: 100%;
    height: clamp(280px, 50vw, 520px);
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.pm-gallery-featured-link:hover .pm-gallery-featured-image {
    transform: scale(1.03);
}

.pm-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
    gap: 10px;
}

.pm-gallery-thumb {
    border: 2px solid transparent !important    ;
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden !important;
    cursor: pointer !important;
    background: #d5d2cc !important;
}

.pm-gallery-thumb img {
    display: block;
    width: 100%;
    height: 74px;
    object-fit: cover;
}

.pm-gallery-thumb.is-active {
    border-color: var(--pm-primary) !important;
    box-shadow: 0 0 0 2px rgba(178, 87, 47, 0.2) !important;
}

.pm-rich-content {
    color: #353c4c !important;
}

.pm-rich-content > :first-child {
    margin-top: 0;
}

.pm-rich-content > :last-child {
    margin-bottom: 0;
}

.pm-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pm-detail-card {
    border-radius: 14px;
    border: 1px solid var(--pm-line);
    background: var(--pm-surface) !important;
    padding: 18px;
}

.pm-detail-card h3 {
    margin: 0 0 12px;
    color: var(--pm-dark) !important;
}

.pm-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.pm-spec-list {
    padding-left: 0;
    list-style: none;
}

.pm-spec-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--pm-line);
}

.pm-spec-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pm-spec-list li strong {
    color: var(--pm-dark) !important;
}

.pm-before-after-stage {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pm-line);
    height: clamp(220px, 48vw, 440px);
    background: #ccc !important;
}

.pm-after-image,
.pm-before-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pm-before-layer {
    position: absolute;
    inset: 0 auto 0 0;
    overflow: hidden;
    border-right: 2px solid rgba(255, 255, 255, 0.85);
}

.pm-before-after-label {
    position: absolute;
    top: 12px;
    z-index: 3;
    background: rgba(17, 21, 31, 0.7) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em;
    padding: 7px 11px;
}

.pm-label-before {
    left: 12px;
}

.pm-label-after {
    right: 12px;
}

.pm-before-after-range {
    position: absolute;
    left: 0;
    bottom: 14px;
    width: 100%;
    z-index: 4;
    appearance: none;
    background: transparent !important;
    margin: 0;
    padding: 0 12px;
}

.pm-before-after-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.pm-before-after-range::-webkit-slider-thumb {
    appearance: none;
    margin-top: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--pm-primary);
    cursor: pointer;
}

.pm-before-after-range::-moz-range-track {
    height: 4px;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.6) !important;
}

.pm-before-after-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border: 2px solid var(--pm-primary);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
}

.pm-video-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--pm-line);
    background: #111;
}

.pm-video-wrap iframe,
.pm-video-wrap video,
.pm-video-wrap embed,
.pm-video-wrap object {
    width: 100% !important;
    min-height: clamp(240px, 46vw, 460px);
    display: block;
}

.pm-faq-list {
    display: grid;
    gap: 10px;
}

.pm-faq-item {
    border-radius: 12px;
    border: 1px solid var(--pm-line);
    background: var(--pm-surface-soft);
    overflow: hidden;
}

.pm-faq-question {
    width: 100%;
    border: 0;
    background: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    color: var(--pm-dark) !important;
    font-weight: 700 !important;
    padding: 14px 16px !important;
}

.pm-faq-icon {
    font-size: 1.3rem;
    line-height: 1;
    color: var(--pm-primary);
    transition: transform 0.22s ease;
}

.pm-faq-item.is-open .pm-faq-icon {
    transform: rotate(45deg);
}

.pm-faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px !important;
    color: #3f4657 !important;
    transition: max-height 0.26s ease, padding-bottom 0.26s ease;
}

.pm-faq-item.is-open .pm-faq-answer {
    max-height: 320px !important;
    padding-bottom: 14px !important;
}

.pm-location-description {
    margin: -4px 0 14px !important;
    color: var(--pm-text-muted) !important;
}

.pm-location-map {
    border-radius: 14px !important;
    overflow: hidden;
    border: 1px solid var(--pm-line);
    min-height: 280px !important;
}

.pm-location-map iframe {
    width: 100%  !important;
    min-height: 320px !important;
    border: 0 !important;
    display: block !important;
}

.pm-sidebar {
    min-width: 0;
    display: grid;
    gap: 14px;
    align-content: start;
    position: sticky;
    top: 22px;
    align-self: start;
}

.pm-card {
    background: var(--pm-surface);
    border-radius: var(--pm-radius);
    border: 1px solid var(--pm-line);
    box-shadow: var(--pm-shadow-soft);
    padding: 20px;
}

.pm-card h3 {
    margin: 0 0 12px !important;
    font-size: 1.35rem !important;
    color: var(--pm-dark) !important;
}

.pm-facts {
    margin: 0 !important;
    display: grid;
    gap: 10px !important;
}

.pm-facts div {
    display: flex !important;
    justify-content: space-between !important;
    gap: 12px !important;
    border-bottom: 1px dashed var(--pm-line) !important;
    padding-bottom: 7px !important;
}

.pm-facts div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pm-facts dt {
    font-weight: 600 !important;
    color: var(--pm-text-muted) !important;
}

.pm-facts dd {
    margin: 0 !important;
    font-weight: 700 !important;
    color: var(--pm-dark) !important;
    text-align: right !important;
}

.pm-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pm-amenity {
    border: 1px solid #e4dacb !important;
    background: #fff9f0 !important;
    color: #74442a !important;
    font-size: 0.83rem !important;
    font-weight: 700 !important;
    border-radius: 999px !important;
    padding: 7px 11px !important;
}

.pm-card-cta p {
    color: var(--pm-text-muted) !important;
    margin: 0 0 14px !important;
}

.pm-contact-block {
    margin-top: 14px !important;
    padding: 62px 0 !important;
    background: var(--pm-bg) !important;
}

.pm-property-single .property-contact-form-wrapper {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #eadfce !important;
    border-radius: 20px !important;
    padding: clamp(20px, 4vw, 34px) !important;
    box-shadow: var(--pm-shadow-soft) !important;
}

.pm-property-single .form-title {
    margin: 0 0 16px !important;
    color: #212737 !important;
    font-size: clamp(1.4rem, 2vw, 1.9rem) !important;
    text-align: left !important;
}

.pm-property-single .form-group {
    margin-bottom: 12px;
}

.pm-property-single .form-group label {
    font-size: 0.9rem !important;
    color: #454d60 !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 6px !important;
}

.pm-property-single .form-control {
    width: 100%;
    border: 1px solid #d8ccb9 !important;
    border-radius: 11px !important;
    padding: 11px 12px !important;
    background: #fff !important;
    color: #22293a !important;
    font: inherit !important;
}

.pm-property-single .form-control:focus {
    outline: none;
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 3px rgba(178, 87, 47, 0.14);
}

.pm-property-single .form-submit {
    margin-top: 16px;
}

.pm-property-single .property-contact-submit {
    width: 100%;
    border: 0;
    border-radius: 11px !important;
    padding: 12px !important;
    color: #fff !important;
    background: var(--pm-primary) !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.pm-property-single .property-contact-submit:hover {
    background: var(--pm-primary-strong) !important;
}

.pm-property-single .form-messages {
    border-radius: 11px !important;
    font-size: 0.9rem !important;
}

.pm-property-single .form-messages.success {
    border: 1px solid #9ad39f !important;
    color: #1a5a25 !important;
    background: #e8f8e7 !important;
}

.pm-property-single .form-messages.error {
    border: 1px solid #f2b0a9 !important;
    color: #81251e !important;
    background: #fdeeed !important;
}

.pm-more-projects {
    padding: 56px 0 66px !important;
    background: var(--pm-bg) !important;
}

.pm-section-title-light {
    color: var(--pm-dark) !important;
    margin-bottom: 24px !important;
}

/* Ensure Astra container/site-content keeps white background */
.site-content {
    background: #ffffff !important;
}

@keyframes pm-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1080px) {
    .pm-hero-layout {
        grid-template-columns: 1fr;
    }

    .pm-hero-card {
        max-width: 420px;
    }

    .pm-content-layout {
        grid-template-columns: 1fr;
    }

    .pm-sidebar {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pm-card-cta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 780px) {
    .pm-container {
        width: calc(100% - 30px);
    }

    .pm-hero {
        min-height: 560px;
        border-bottom-left-radius: 24px;
        border-bottom-right-radius: 24px;
    }

    .pm-hero-layout {
        align-items: end;
    }

    .pm-section,
    .pm-card {
        padding: 18px;
    }

    .pm-detail-grid {
        grid-template-columns: 1fr;
    }

    .pm-sidebar {
        grid-template-columns: 1fr;
    }

    .pm-gallery-thumbs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pm-gallery-thumb img {
        height: 64px;
    }
}

@media (max-width: 560px) {
    .pm-hero {
        min-height: 510px;
    }

    .pm-chip {
        font-size: 0.78rem;
    }

    .pm-kpi-item {
        font-size: 0.84rem;
    }

    .pm-price-value {
        font-size: 1.7rem;
    }

    .pm-gallery-featured-image {
        height: 260px;
    }

    .pm-gallery-thumbs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
