/* ============================================================
   PROPERTY DETAIL — 2-Column Layout (left expanded, right fixed)
   Colors: #60724F (green), #F0EBE6 (beige), #fff, #333
   ============================================================ */

/* ── Section wrapper ─────────────────────────────────────── */
.pd {
    width: 100%;
    background: #F0EBE6;
    padding: 24px clamp(16px, 4vw, 60px) 60px;
}

/* ── Top header (above grid) ────────────────────────────── */
.pd-top-header {
    max-width: 1320px;
    margin: 0 auto 16px;
}

.pd-headline {
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 800;
    color: #222;
    line-height: 1.25;
    margin: 0;
}

.pd-address {
    font-size: 15px;
    color: #666;
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pd-address i {
    color: #60724F;
    font-size: 14px;
}

/* 2 columns: left expands, right fixed width */
.pd-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr minmax(320px, 380px);
    gap: 28px;
    align-items: start;
}

/* ── LEFT COLUMN ─────────────────────────────────────────── */
.pd-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Gallery ─────────────────────────────────────────────── */
.pd-gallery {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-main-photo-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #e0dbd5;
    aspect-ratio: 16 / 10;
}

.pd-main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.pd-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #333;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.pd-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.pd-nav-prev { left: 12px; }
.pd-nav-next { right: 12px; }

.pd-counter {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    z-index: 2;
}

/* Thumbnails */
.pd-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #60724F transparent;
}

.pd-thumbs::-webkit-scrollbar {
    height: 4px;
}
.pd-thumbs::-webkit-scrollbar-thumb {
    background: #60724F;
    border-radius: 4px;
}

.pd-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

.pd-thumb:hover {
    opacity: 0.85;
}

.pd-thumb.active {
    opacity: 1;
    border-color: #60724F;
}

/* ── Description block ───────────────────────────────────── */
.pd-description-block {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
}

.pd-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 14px;
}

.pd-description {
    font-size: 15px;
    line-height: 1.65;
    color: #444;
    white-space: pre-wrap;
    word-break: break-word;
}

.pd-expand-btn {
    margin-top: 10px;
    background: none;
    border: none;
    color: #60724F;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: color 0.2s;
}

.pd-expand-btn:hover {
    color: #4a5a3d;
}

.pd-expand-btn i {
    transition: transform 0.3s;
}

.pd-expand-btn.expanded i {
    transform: rotate(180deg);
}

/* ── Map block ───────────────────────────────────────────── */
.pd-map-block {
    border-radius: 16px;
    overflow: hidden;
}

.pd-map {
    width: 100%;
    height: 280px;
    background: #ddd;
    border-radius: 16px;
}

/* ── Back link (mobile hidden by default) ────────────────── */
.pd-back-mobile {
    display: none;
}

.pd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #60724F;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    margin-top: 8px;
    transition: color 0.2s;
}

.pd-back-link:hover {
    color: #4a5a3d;
}

/* ── STICKY WRAPPER (right column) ────────────────────────── */
.pd-sticky-wrap {
    position: relative;
}

.pd-sticky-inner {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(96,114,79,0.3) transparent;
    padding-right: 4px;
}

.pd-sticky-inner::-webkit-scrollbar {
    width: 4px;
}
.pd-sticky-inner::-webkit-scrollbar-thumb {
    background: rgba(96,114,79,0.3);
    border-radius: 4px;
}

/* ── Main characteristics card (inside right column) ─────── */
.pd-mid {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
}

.pd-chars {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pd-char-row {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(96, 114, 79, 0.1);
}

.pd-char-row:last-child {
    border-bottom: none;
}

.pd-char-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-char-icon img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.pd-char-label {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.pd-char-value {
    font-size: 15px;
    color: #222;
    font-weight: 600;
    text-align: right;
}

/* ── RIGHT COLUMN ────────────────────────────────────────── */
.pd-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Price card */
.pd-price-card {
    background: #60724F;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-price-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pd-price {
    color: #fff;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.15;
}

/* Callback button (opens popup) */
.pd-callback-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: #fff;
    color: #60724F;
    border: 2px solid #60724F;
    border-radius: 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
}

.pd-callback-btn:hover {
    background: #60724F;
    color: #fff;
    transform: translateY(-1px);
}

.pd-callback-btn i {
    font-size: 18px;
}

/* ── Modal overlay ──────────────────────────────────────── */
.pd-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.pd-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ── Modal card ─────────────────────────────────────────── */
.pd-modal {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.pd-modal-overlay.active .pd-modal {
    transform: translateY(0);
}

.pd-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f0ebe6;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.pd-modal-close:hover {
    background: #e0dbd5;
    color: #333;
}

.pd-modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
    padding-right: 40px;
}

/* ── Form inside modal ──────────────────────────────────── */
.pd-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e0dbd5;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Manrope', sans-serif;
    color: #333;
    background: #faf9f7;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    box-sizing: border-box;
}

.pd-form input:focus {
    border-color: #60724F;
    background: #fff;
}

.pd-form input::placeholder {
    color: #aaa;
}

.pd-submit-btn {
    width: 100%;
    margin-top: 4px;
}

.pd-form-msg {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    min-height: 20px;
}

.pd-form-msg.success { color: #60724F; }
.pd-form-msg.error   { color: #c0392b; }

/* Renovation card */
.pd-renovation-card {
    background: #fff7ef;
    border: 1.5px solid #ffd7ba;
    border-radius: 16px;
    padding: 20px;
}

.pd-renovation-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ff9f43;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.pd-renovation-text {
    font-size: 14px;
    color: #7a5a3a;
    line-height: 1.55;
    margin: 0;
}

/* Extras card */
.pd-extras-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
}

.pd-extras-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.pd-extra-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #444;
}

.pd-extra-item i {
    width: 22px;
    text-align: center;
    color: #60724F;
    font-size: 16px;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE — Tablet (≤ 1080px): 2-column layout
   ============================================================ */
@media (max-width: 1080px) {
    .pd-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .pd-sticky-wrap {
        order: 2;
    }

    .pd-left {
        order: 1;
    }

    .pd-sticky-inner {
        position: static;
        max-height: none;
        overflow-y: visible;
        gap: 16px;
    }
}

/* ============================================================
   RESPONSIVE — Mobile (≤ 720px): single column
   ============================================================ */
@media (max-width: 720px) {
    .pd {
        padding: 16px 12px 40px;
    }

    .pd-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pd-headline {
        font-size: 22px;
    }

    /* Gallery tweaks */
    .pd-main-photo-wrap {
        aspect-ratio: 16 / 10;
        border-radius: 12px;
    }

    .pd-nav {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .pd-thumb {
        width: 56px;
        height: 42px;
        border-radius: 6px;
    }

    /* Sticky becomes stacked */
    .pd-sticky-inner {
        position: static;
        gap: 14px;
        max-height: none;
        overflow-y: visible;
    }

    /* Re-order on mobile */
    .pd-left  { order: 1; }
    .pd-sticky-wrap { order: 2; }

    /* Description */
    .pd-description-block {
        padding: 16px 18px;
        border-radius: 12px;
    }

    /* Cards */
    .pd-price-card,
    .pd-form-card,
    .pd-renovation-card,
    .pd-extras-card,
    .pd-mid {
        border-radius: 12px;
        padding: 18px;
    }

    .pd-map {
        height: 220px;
        border-radius: 12px;
    }

    /* Show mobile back */
    .pd-back-mobile {
        display: block;
        text-align: center;
        margin-top: 8px;
    }

    .pd-back-link {
        display: none;
    }

    /* Extras 2 columns on mobile */
    .pd-extras-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   RESPONSIVE — Small mobile (≤ 420px)
   ============================================================ */
@media (max-width: 420px) {
    .pd-headline {
        font-size: 19px;
    }

    .pd-price {
        font-size: 24px;
    }

    .pd-extras-grid {
        grid-template-columns: 1fr;
    }

    .pd-thumb {
        width: 48px;
        height: 36px;
    }
}
