/**
 * Property Details Page — Complete Redesign
 * Prefix: pd- to avoid conflicts with base styles
 */

/* ==================== BREADCRUMB ==================== */
.pd-breadcrumb {
    font-size: 0.8rem;
    padding: 1.25rem 0 0.5rem;
    color: var(--text-medium, #6b7280);
}
.pd-breadcrumb a {
    color: var(--text-medium, #6b7280);
    text-decoration: none;
    transition: color 0.15s;
}
.pd-breadcrumb a:hover { color: var(--primary-color); }
.pd-breadcrumb .sep {
    margin: 0 0.35rem;
    color: var(--text-light, #9ca3af);
}
.pd-breadcrumb .current {
    font-weight: 600;
    color: var(--text-darkest, #111827);
}

/* ==================== HERO: TWO-COLUMN ==================== */
.pd-hero {
    padding: 1.5rem 0 1rem;
}
.pd-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Left: Property Info */
.pd-hero-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pd-hero-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-darkest, #0d1b2a);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
}
.pd-hero-desc {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-medium, #6b7280);
    margin: 0;
}

/* Hero address */
.pd-hero-address {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-medium, #6b7280);
    font-weight: 500;
}
.pd-hero-address i {
    color: var(--primary-color);
    font-size: 0.85rem;
}

/* Amenity tags */
.pd-hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.5rem;
}
.pd-hero-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}
.pd-hero-tag-more {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e4e7ec;
    cursor: pointer;
    transition: all 0.15s;
}
.pd-hero-tag-more:hover {
    background: #e5e7eb;
    color: #374151;
}

/* Right: Image Carousel Cards */
.pd-hero-carousel {
    position: relative;
}
.pd-hero-slides {
    display: flex;
    gap: 1rem;
    overflow: hidden;
}
.pd-hero-slide {
    flex: 0 0 55%;
    border-radius: 16px;
    overflow: hidden;
    background: #f3f4f6;
    display: none;
    flex-direction: column;
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.pd-hero-slide.active {
    display: flex;
    opacity: 1;
}
.pd-hero-slide.next {
    display: flex;
    opacity: 0.85;
}
.pd-hero-slide img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}
/* Carousel nav arrows */
.pd-hero-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}
.pd-hero-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #374151;
    transition: all 0.15s;
}
.pd-hero-nav-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== CONTENT ==================== */
.pd-content {
    padding: 0 0 1.5rem;
}
.pd-main { display: flex; flex-direction: column; gap: 1.25rem; }

/* About section */
.pd-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-darkest, #0d1b2a);
    margin: 0 0 0.5rem;
}
.pd-about-text {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-medium, #4b5563);
    max-width: 60%;
}

/* Application details — apply links */
.pd-apply-links {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.pd-apply-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
    color: var(--text-medium, #4b5563);
}
.pd-apply-row:last-child { border-bottom: none; }
.pd-apply-btn {
    display: inline-block;
    padding: 0.45rem 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    color: var(--text-darkest, #111827);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.pd-apply-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pd-apply-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
/* ==================== FINANCING MODAL ==================== */
.pd-financing-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pd-financing-overlay.active {
    display: flex;
}
.pd-financing-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: pdFinancingIn 0.3s ease-out;
    padding: 2rem;
}
@keyframes pdFinancingIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.pd-financing-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #6b7280;
    transition: all 0.15s;
    z-index: 2;
}
.pd-financing-close:hover {
    background: #e5e7eb;
    color: #111827;
}
.pd-financing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}
.pd-financing-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.35rem;
}
.pd-financing-header p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}
.pd-bank-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.pd-bank-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.pd-bank-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.pd-bank-logo {
    width: 180px;
    height: 54px;
    object-fit: contain;
    border-radius: 6px;
}
.pd-bank-logo-placeholder {
    width: 180px;
    height: 54px;
    background: #f3f4f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}
.pd-bank-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
}
.pd-bank-apply {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: auto;
}
.pd-bank-apply:hover {
    background: var(--primary-hover);
    color: #fff;
}
.pd-financing-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #9ca3af;
}
.pd-financing-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}
.pd-financing-empty p {
    font-size: 0.9rem;
    margin: 0;
}
/* Unit info bar in financing modal */
.pd-financing-unit-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: #374151;
}
.pd-fui-item {
    white-space: nowrap;
}
.pd-fui-item strong {
    color: #111827;
}

/* ==================== CONTACT FORM SECTION ==================== */
.pd-contact-section {
    padding: 0 0 2.5rem;
}
.pd-contact-card {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.pd-contact-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-darkest, #0d1b2a);
    margin: 0 0 0.25rem;
}
.pd-contact-card .pd-contact-sub {
    font-size: 0.8rem;
    color: var(--text-medium, #6b7280);
    margin: 0 0 1.25rem;
}
.pd-form-group {
    margin-bottom: 0.85rem;
}
.pd-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.3rem;
}
.pd-form-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.pd-form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(254,163,39,0.1);
}
textarea.pd-form-input { resize: vertical; min-height: 90px; }
.pd-form-disclaimer {
    font-size: 0.7rem;
    color: #6b7280;
    line-height: 1.4;
    margin: 0.5rem 0 0;
}
.pd-form-disclaimer a {
    color: var(--primary-color);
    text-decoration: underline;
}
.pd-form-disclaimer a:hover {
    color: var(--primary-hover);
}
/* Contact form horizontal grid */
.pd-contact-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}
.pd-contact-form-grid .pd-form-group {
    margin-bottom: 0;
}
.pd-contact-form-grid .pd-form-message {
    grid-column: 1 / -1;
}
.pd-form-submit {
    width: auto;
    padding: 0.7rem 2.5rem;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
}
.pd-form-submit:hover { background: var(--primary-hover); }
.pd-form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.pd-form-status {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.8rem;
    display: none;
}
.pd-form-status.success {
    display: block;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.pd-form-status.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==================== NEIGHBORHOOD MAP ==================== */
.pd-map-section { padding: 0 0 2.5rem; }
.pd-map-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e4e7ec;
}
.pd-map-wrap iframe {
    width: 100%;
    height: 350px;
    border: none;
    display: block;
}

/* Top attractions — Anthropic-generated, on-disk-cached. Hidden
   when the helper returned an empty list. Sits below the map inside
   .pd-map-section. */
.pd-attractions {
    margin-top: 1.75rem;
}
.pd-attractions-heading {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.85rem;
}
.pd-attractions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}
.pd-attractions-item {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 14px 16px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.pd-attractions-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}
.pd-attractions-name {
    font-weight: 700;
    color: #1c1c1c;
    font-size: 0.98rem;
    margin-bottom: 4px;
}
.pd-attractions-meta {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
}
.pd-attractions-type {
    background: #fff4e1;
    color: #b8730e;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.pd-attractions-dist {
    color: #6b7280;
}
.pd-attractions-desc {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #374151;
}

/* ==================== QUICK CONTACT ==================== */
.pd-quick-contact {
    padding: 0 0 2rem;
}
.pd-quick-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    align-items: center;
}
.pd-qc-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-darkest, #111827);
    font-weight: 500;
    text-decoration: none;
}
a.pd-qc-item:hover {
    color: var(--primary-color);
}
.pd-qc-item i {
    color: var(--primary-color);
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
}

/* ==================== NOTICES (below the neighborhood map) ==================== */
.pd-notices-section {
    padding: 0 0 2.5rem;
}
.pd-notices-section .pd-notice-label {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pd-notice-text {
    margin-top: 1.25rem;
}
.pd-notice-text h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-darkest, #111827);
    margin: 0 0 0.35rem;
}
.pd-notice-text p {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-dark, #374151);
    margin: 0;
    overflow-wrap: anywhere;
}

/* ==================== AVAILABLE HOMES ==================== */
.pd-available { padding: 0 0 2.5rem; }
.pd-available-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.pd-available-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-darkest, #0d1b2a);
    margin: 0;
}
.pd-filter-tabs {
    display: flex;
    gap: 0.4rem;
}
.pd-filter-tab {
    padding: 0.4rem 1rem;
    border: 1px solid #e4e7ec;
    background: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}
.pd-filter-tab:hover { border-color: var(--primary-color); color: var(--primary-color); }
.pd-filter-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.pd-units-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.pd-unit-wrap { cursor: pointer; }
.pd-units-grid .unit-card-listing { transition: box-shadow 0.2s, transform 0.2s; }
.pd-units-grid .unit-card-listing:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.pd-no-units {
    text-align: center;
    padding: 3rem 1rem;
    color: #9ca3af;
}
.pd-no-units i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.pd-no-units p { font-size: 0.95rem; color: #6b7280; }

/* ==================== FAQ ACCORDION ==================== */
.pd-faq { padding: 0 0 2.5rem; }
.pd-faq h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-darkest, #0d1b2a);
    margin: 0 0 1rem;
    text-align: center;
}
.pd-faq-list {
    max-width: 760px;
    margin: 0 auto;
}
.pd-faq-item {
    border-bottom: 1px solid #e4e7ec;
}
.pd-faq-item:first-child { border-top: 1px solid #e4e7ec; }
.pd-faq-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    gap: 1rem;
}
.pd-faq-question {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
}
.pd-faq-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6b7280;
    transition: transform 0.25s, background 0.15s;
}
.pd-faq-item.open .pd-faq-icon {
    transform: rotate(45deg);
    background: var(--primary-color);
    color: #fff;
}
.pd-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.pd-faq-answer-inner {
    padding: 0 0 1rem;
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-medium, #6b7280);
}

/* ==================== CTA BAR ==================== */
.pd-cta {
    background: var(--primary-color);
    padding: 2.5rem 0;
    text-align: center;
}
.pd-cta h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}
.pd-cta p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    margin: 0 0 1.25rem;
}
.pd-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: #fff;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}
.pd-cta-btn:hover { background: #f9fafb; transform: translateY(-1px); }

/* ==================== UNIT DETAIL MODAL ==================== */
.pd-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    /* Flex gap between the prev/next arrows and the modal so the
       arrows always live outside the white card, not just on wide
       viewports. Replaces the old `position: absolute; left/right`
       arrow placement which overlapped the modal as soon as the
       modal filled the viewport width. */
    gap: 16px;
    padding: 12px;
}
.pd-modal-overlay.active { display: flex; }

.pd-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    /* Flex item: shrink to make room for the two arrow siblings. */
    flex: 1 1 auto;
    min-width: 0;
    max-width: 1500px;
    max-height: 94vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: pdModalIn 0.3s ease-out;
}
@keyframes pdModalIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal close button */
.pd-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #6b7280;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    transition: all 0.15s;
}
.pd-modal-close:hover { background: #f3f4f6; color: #111827; }

/* Modal prev/next navigation — flex siblings of the modal so they
   always sit outside the white card regardless of viewport size.
   Old absolute-positioned version put them at fixed offsets from the
   overlay edge, which meant they overlapped the modal whenever the
   modal expanded to fill the viewport. */
.pd-modal-nav {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #111827;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: background 0.15s, transform 0.1s;
}
.pd-modal-nav:hover { background: #fff; transform: scale(1.08); }
.pd-modal-nav:active { transform: scale(0.95); }
.pd-modal-nav:disabled { opacity: 0.3; cursor: default; }
.pd-modal-nav:disabled:hover { transform: none; }

/* Modal body grid */
.pd-modal-body {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    height: 94vh;
    max-height: 94vh;
}

/* Modal "not found" state (shown when the linked unit isn't a valid
   active listing for this property). Replaces the normal body grid. */
.pd-modal-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 94vh;
    max-height: 94vh;
    padding: 2rem;
    gap: 0.75rem;
    color: #4b5563;
}
.pd-modal-not-found > i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}
.pd-modal-not-found h2 {
    font-size: 1.5rem;
    color: #111827;
    margin: 0;
}
.pd-modal-not-found p {
    margin: 0;
    max-width: 420px;
    line-height: 1.5;
}
.pd-modal-not-found-btn {
    margin-top: 1rem;
    padding: 0.65rem 1.25rem;
    background: #FEA327;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.pd-modal-not-found-btn:hover { background: #e58d18; }

/* Modal left — images */
.pd-modal-images {
    background: #f9fafb;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
}
.pd-modal-main-img {
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-modal-main-img img {
    width: 100%;
    height: 100%;
    max-height: 72vh;
    object-fit: contain;
    display: block;
    background: #e5e7eb;
    cursor: pointer;
}
.pd-modal-img-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #374151;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: background 0.15s;
}
.pd-modal-img-arrow:hover { background: #fff; }
.pd-modal-img-arrow.prev { left: 0.5rem; }
.pd-modal-img-arrow.next { right: 0.5rem; }
.pd-modal-img-arrow.visible { display: flex; }
.pd-modal-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}
.pd-modal-thumbs img {
    width: 88px;
    height: 62px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.15s;
    flex-shrink: 0;
    opacity: 0.6;
}
.pd-modal-thumbs img:hover { opacity: 1; }
.pd-modal-thumbs img.active { border-color: var(--primary-color); opacity: 1; }

/* Modal right — details. The embedded showing widget unfolds a date
   picker -> slot grid -> booking form as the prospect progresses, so
   the column can grow well past the modal's 94vh cap. Make this side
   independently scrollable so the prospect can always reach the
   submit button without the page itself scrolling away under them. */
.pd-modal-details {
    position: relative;
    padding: 1rem 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 94vh;
}
.pd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    padding-right: 2rem;
}
.pd-modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}
.pd-modal-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #d1fae5;
    color: #065f46;
    flex-shrink: 0;
}

/* Modal price */
.pd-modal-price {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.pd-modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.pd-modal-price-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    min-width: 70px;
}
.pd-modal-price-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}
.pd-modal-price-period {
    font-size: 0.85rem;
    color: #9ca3af;
}
.pd-modal-price-original {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
    margin-right: 0.25rem;
}
.pd-modal-price-discount {
    font-size: 0.7rem;
    background: #ef4444;
    color: #fff;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

/* Modal specs */
.pd-modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #f9fafb;
    border-radius: 10px;
}
.pd-modal-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}
.pd-modal-spec i { font-size: 1.1rem; color: var(--primary-color); }
.pd-modal-spec-val { font-size: 1rem; font-weight: 700; color: #111827; }
.pd-modal-spec-label { font-size: 0.75rem; color: #9ca3af; }

/* Modal description */
.pd-modal-desc h4,
.pd-modal-amenities h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.3rem;
}
.pd-modal-desc p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* Modal amenities */
.pd-modal-amenities ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
}
.pd-modal-amenities li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #4b5563;
}
.pd-modal-amenities li i { color: var(--primary-color); font-size: 0.75rem; }

/* Modal actions */
.pd-modal-actions {
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}
.pd-modal-action-btn {
    flex: 1;
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.pd-modal-action-primary {
    background: var(--primary-color);
    color: #fff;
}
.pd-modal-action-primary:hover { background: var(--primary-hover); }
.pd-modal-action-financing {
    background: #fff;
    color: #6b7280;
    border: 1px solid #e4e7ec;
}
.pd-modal-action-financing:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.pd-modal-share {
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
}
.pd-modal-share:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* Contact button */
.pd-modal-action-contact {
    background: #fff;
    color: #6b7280;
    border: 1px solid #e4e7ec;
}
.pd-modal-action-contact:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Contact overlay (slides over modal right panel) */
.pd-contact-overlay {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 10;
    padding: 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
}
.pd-contact-overlay.active {
    transform: translateX(0);
}
.pd-contact-overlay-back {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: inherit;
}
.pd-contact-overlay-back:hover { text-decoration: underline; }
.pd-contact-overlay h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-darkest, #1c1c1c);
    margin-bottom: 0.35rem;
}
.pd-contact-overlay-sub {
    font-size: 0.85rem;
    color: var(--text-medium, #6b7280);
    margin-bottom: 1.25rem;
}
.pd-contact-overlay-fields {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.pd-contact-overlay-fields .pd-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.pd-contact-overlay-fields label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-darkest, #1c1c1c);
}
.pd-contact-overlay-status {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    text-align: center;
}
.pd-contact-overlay-status.success { color: #16a34a; }
.pd-contact-overlay-status.error { color: #dc2626; }

/* Image lightbox */
.pd-lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.pd-lightbox-overlay.active { display: flex; }
.pd-lightbox-overlay img {
    max-width: 95vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,0.5);
    user-select: none;
}
.pd-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    transition: background 0.15s;
}
.pd-lightbox-close:hover { background: rgba(255,255,255,0.3); }
.pd-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    transition: background 0.15s;
}
.pd-lightbox-arrow:hover { background: rgba(255,255,255,0.3); }
.pd-lightbox-arrow.prev { left: 1rem; }
.pd-lightbox-arrow.next { right: 1rem; }
.pd-lightbox-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .pd-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .pd-hero-slide img { height: 240px; }
    .pd-contact-form-grid {
        grid-template-columns: 1fr;
    }
    .pd-units-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pd-modal-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 88vh;
        overflow-y: auto;
    }
    .pd-modal-images { max-height: 300px; overflow: hidden; }
    .pd-modal-details { overflow-y: visible; }
    .pd-modal-main-img img { height: 240px; max-height: 240px; }
    /* Tighten the overlay so the arrows still fit comfortably on tablet-
       sized viewports. The arrows are flex siblings now, so they sit
       outside the modal automatically — no per-arrow left/right needed. */
    .pd-modal-overlay { gap: 8px; padding: 8px; }
    .pd-modal-nav { flex-basis: 40px; width: 40px; height: 40px; font-size: 1rem; }
}

@media (max-width: 767px) {
    .pd-about-text { max-width: 100%; }
    .pd-hero-title { font-size: 1.75rem; }
    .pd-hero-slide { flex: 0 0 65%; }
    .pd-hero-slide img { height: 200px; }
    .pd-apply-row { font-size: 0.85rem; }
    .pd-units-grid { grid-template-columns: 1fr; }
    .pd-available-header { flex-direction: column; align-items: flex-start; }
    .pd-modal { max-height: 95vh; border-radius: 12px; }
    .pd-modal-images, .pd-modal-details { padding: 1rem; }
    .pd-modal-title { font-size: 1.15rem; }
    .pd-modal-specs { grid-template-columns: repeat(3, 1fr); padding: 0.75rem; }
    .pd-modal-amenities ul { grid-template-columns: 1fr; }
    .pd-bank-grid { grid-template-columns: 1fr; }
    .pd-financing-modal { padding: 1.5rem; }
    /* Slimmer arrows on phones so they still fit on either side of
       the modal without crowding it. */
    .pd-modal-overlay { gap: 4px; padding: 4px; }
    .pd-modal-nav { flex-basis: 32px; width: 32px; height: 32px; font-size: 0.8rem; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
}

@media (max-width: 480px) {
    .pd-hero-slide { flex: 0 0 80%; }
    .pd-hero-slide img { height: 180px; }
    .pd-hero-nav-btn { width: 36px; height: 36px; font-size: 0.8rem; }
    .pd-filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.25rem; }
    .pd-filter-tab { white-space: nowrap; }
    .pd-cta h2 { font-size: 1.2rem; }
}
