

html {
    scroll-behavior: smooth;
}

/* ==========================================
   1. GLOBAL LAYOUT & BREADCRUMBS
   ========================================== */
.property-container {
    max-width: 1240px; 
    margin: 0 auto;
    padding: 0 20px 80px; /* Reduced top padding since we have the spacer */
}

.property-breadcrumb {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #666666;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.property-breadcrumb .back-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.property-breadcrumb .back-link:hover {
    color: #007769;
}

.property-breadcrumb .separator {
    color: #cccccc;
}

/* ==========================================
   2. BULLETPROOF GALLERY GRID
   ========================================== */
.listing-gallery-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

/* --- The Grid Architecture --- */
.listing-gallery-grid {
    display: grid;
    gap: 2px; /* Crisp, architectural hairline gaps */
}

/* Scenario 1: Three or more photos (2.2fr to 1fr split) */
.listing-gallery-grid.grid-3-plus {
    grid-template-columns: 2.2fr 1fr;
    grid-template-rows: 240px 240px;
}
.listing-gallery-grid.grid-3-plus .main-img {
    grid-row: span 2;
}

/* Scenario 2: Two photos (Half and Half) */
.listing-gallery-grid.grid-2 {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 480px;
}

/* Scenario 3: One photo (Full width) */
.listing-gallery-grid.grid-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 480px;
}

/* --- Absolute Image Trapping --- */
.gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    overflow: hidden;
    background: #eaeaea;
}

.gallery-item img {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.03);
}

/* The Overlay Button */
.show-all-photos-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 10px 16px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    z-index: 10;
}

.show-all-photos-btn:hover {
    background: #f9f9f9;
    transform: translateY(-2px);
}

/* ==========================================
   3. CONTENT SPLIT
   ========================================== */
.listing-content-split {
    display: grid;
    grid-template-columns: 1fr 360px; /* Golden ratio sidebar width */
    gap: 60px;
}

/* --- LEFT SIDE: HEADER INFO --- */
.listing-header {
    padding-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
    margin-bottom: 40px;
}

.status-badge-dark {
    display: inline-block;
    background: #1a1a1a;
    color: #ffffff;
    padding: 4px 12px;
    text-transform: uppercase;
    font-family: var(--font-sans);
    font-size: 9px;
    letter-spacing: 0.2em;
    font-weight: 700;
    margin-bottom: 15px;
    border-radius: 2px;
}

.listing-price {
    font-family: var(--font-serif);
    font-size: 32px; 
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.listing-title {
    font-family: var(--font-serif);
    font-size: 22px; 
    color: #444444;
    margin: 0 0 15px 0;
    line-height: 1.3;
    font-weight: 400;
}

.listing-meta-string {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.listing-meta-string strong {
    font-weight: 700;
}

.listing-meta-string .dot {
    margin: 0 8px;
    color: #cccccc;
}

.listing-address {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

/* --- LEFT SIDE: SECTIONS --- */
.listing-section {
    margin-bottom: 50px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 22px;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    font-weight: 600;
}

.listing-narrative {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.8;
    color: #444444;
}

.listing-narrative p {
    margin-bottom: 15px;
}

.listing-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.listing-features-grid li {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.listing-features-grid li svg {
    color: #999999;
}

/* ==========================================
   4. STICKY SIDEBAR FORM
   ========================================== */
.listing-sidebar {
    position: relative;
}

.sticky-inquiry-card {
    position: sticky;
    top: 120px; 
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.agent-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eeeeee;
}

.agent-avatar-box {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.agent-avatar-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-info-box {
    display: flex;
    flex-direction: column;
}

.agent-name {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.agent-role {
    font-family: var(--font-sans);
    font-size: 12px;
    color: #888888;
}

.listing-form input,
.listing-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s ease;
}

.listing-form textarea {
    resize: vertical;
    min-height: 100px;
}

.listing-form input:focus,
.listing-form textarea:focus {
    border-color: #1a1a1a;
}

.listing-submit-btn {
    width: 100%;
    padding: 14px;
    background: #1a1a1a; 
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.listing-submit-btn:hover {
    background: #333333;
}

.form-terms {
    margin-top: 15px;
    font-family: var(--font-sans);
    font-size: 11px;
    color: #888888;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.form-terms input {
    width: auto;
    margin: 2px 0 0 0;
}

#form-message {
    margin-top: 15px;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* ==========================================
   5. NATIVE LIGHTBOX OVERLAY
   ========================================== */
.lux-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.lux-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 40px;
    cursor: pointer;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-counter {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 14px;
    letter-spacing: 2px;
}

/* ==========================================
   6. RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
    .listing-content-split { grid-template-columns: 1fr; }
    .sticky-inquiry-card { position: relative; top: 0; margin-top: 40px; }
    .listing-gallery-grid.grid-3-plus { grid-template-rows: 200px 200px; }
    .listing-gallery-grid.grid-2, .listing-gallery-grid.grid-1 { grid-template-rows: 400px; }
    .listing-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .property-container { padding: 0 15px 40px; }
    .listing-gallery-grid.grid-3-plus, .listing-gallery-grid.grid-2, .listing-gallery-grid.grid-1 { 
        grid-template-columns: 1fr; 
        grid-template-rows: 300px; 
    }
    .listing-gallery-grid .side-img { display: none; } 
    .listing-gallery-grid .main-img { grid-row: span 1; }
    .show-all-photos-btn { bottom: 15px; right: 15px; }
    .listing-features-grid { grid-template-columns: 1fr; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}

/* ==========================================
   7. ENTERPRISE DATA WIDGETS
   ========================================== */

/* Property Overview List */
.overview-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.overview-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}

.o-label {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #666666;
}

.o-val {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Energy Performance Box */
.energy-box {
    background: #fcfcfc;
    border: 1px solid #eeeeee;
    border-radius: 4px;
    padding: 20px 25px;
}

.epc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eeeeee;
}

.epc-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.e-label {
    font-family: var(--font-sans);
    font-size: 14px;
    color: #666666;
}

.e-val {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Dynamic EU EPC Badge Styling */
.epc-badge {
    padding: 4px 10px;
    border-radius: 2px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    background: #999999; /* Fallback for pending/exempt */
}
.epc-a { background: #009640; }
.epc-b { background: #52B153; }
.epc-c { background: #C4D52B; }
.epc-d { background: #FFF200; color: #1a1a1a; }
.epc-e { background: #FDB913; color: #1a1a1a; }
.epc-f { background: #EB6B23; }
.epc-g { background: #E30613; }

/* Explore the Area (Map & Distances) */
.listing-address-full {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #444444;
    margin-bottom: 20px;
}

.map-wrapper {
    margin-bottom: 25px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #eeeeee;
}

/* ==========================================
   MISSING BLOCK ADDED HERE: PRIVATE MAP UI
   ========================================== */
.map-placeholder-private {
    background: #f9f9f9;
    padding: 60px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Optional: Adds a subtle blurred map background effect */
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-placeholder-private svg {
    color: #1a1a1a;
    margin-bottom: 15px;
    background: #ffffff;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.map-placeholder-private h4 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    font-weight: 400;
}

.map-placeholder-private p {
    font-family: var(--font-sans);
    font-size: 15px;
    color: #666666;
    max-width: 450px;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.scroll-to-inquiry {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    background: #007769; /* Luxury Teal */
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.scroll-to-inquiry:hover {
    background: #005a4f;
}

/* ==========================================
   EXPLORE THE AREA (DISTANCES UX UPGRADE)
   ========================================== */
.distances-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.distances-grid li {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 16px 20px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;           /* Forces cards to stretch equally */
    min-width: 200px;  /* Prevents crushing on mobile */
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.d-icon {
    color: #007769; /* Luxury Teal */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f5f4;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
}

.d-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.d-val {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 16px;
}

.d-label {
    color: #666666;
    font-size: 12px;
    font-family: var(--font-sans);
}

/* Ensure mobile layout doesn't break the new grids */
@media (max-width: 768px) {
    .overview-list { grid-template-columns: 1fr; }
    .distances-grid { flex-direction: column; gap: 10px; }
}

/* ==========================================
   8. AGENCY PROFILE BLOCK (CLEAN / NO BANNER)
   ========================================== */
.agency-profile-block {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 30px;
    display: flex;
    gap: 25px;
    margin-top: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.agency-logo-clean {
    width: 90px;
    height: 90px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #eeeeee;
    flex-shrink: 0;
}

.agency-profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.agency-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.agency-title-row h4 {
    font-family: var(--font-serif);
    font-size: 22px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 600;
}

.agency-socials { display: flex; gap: 10px; }
.agency-socials a { color: #888888; transition: color 0.2s ease; }
.agency-socials a:hover { color: #1a1a1a; }

.agency-bio-text { font-family: var(--font-sans); font-size: 14px; line-height: 1.6; color: #666666; margin-bottom: 20px; }

.agency-contact-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-top: 1px solid #eeeeee;
    padding-top: 20px;
}

.ac-item { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: 13px; color: #444444; }
.ac-item svg { color: #999999; flex-shrink: 0;}
.ac-item a { color: #1a1a1a; font-weight: 600; text-decoration: none; }
.ac-item a:hover { text-decoration: underline; color: #007769; }

@media (max-width: 768px) {
    .agency-profile-block { flex-direction: column; align-items: flex-start; gap: 15px; padding: 20px; }
    .agency-logo-clean { width: 70px; height: 70px; }
}