/* ===== PROPERTY PAGE ===== */
.property-page {
    margin-top: 80px;
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem 3rem 4rem;
}

/* ===== GALLERY ===== */
.property-gallery {
    margin-bottom: 2rem;
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
    height: 500px;
    overflow: hidden;
    position: relative;
    z-index: 0;
}

.gallery-main {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-side-img {
    flex: 1;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.gallery-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-more {
    position: absolute;
    inset: 0;
    background: rgba(49, 51, 47, 0.25);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-more-btn {
    background: rgba(255,255,255,0.9);
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

/* Thumbs row */
.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    border-radius: 0.375rem;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, outline 0.2s;
    flex-shrink: 0;
    outline: 2px solid transparent;
}

.gallery-thumb.active {
    opacity: 1;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.gallery-thumb:hover {
    opacity: 1;
}

/* ===== LAYOUT ===== */
.property-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 3rem;
    align-items: start;
}

/* ===== LEFT COLUMN ===== */
.property-main {
    min-width: 0;
}

.property-header {
    margin-bottom: 3rem;
}

.property-badge-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.property-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.property-header h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 0.25rem;
}

.property-address-detail {
    color: var(--on-surface-variant);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.property-price-detail {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.property-meta-detail {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem 0;
    color: var(--on-surface);
    font-weight: 500;
    font-size: 0.95rem;
}

.property-meta-detail span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Sections */
.property-section {
    margin-bottom: 3rem;
}

.property-section h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
}

/* Features */
.features-grid {
    background: var(--surface-container-low);
    padding: 2rem;
    border-radius: 0.75rem;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 500;
}

.features-list li::before {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* Description */
.property-description {
    color: var(--on-surface-variant);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Rooms */
.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.room-item h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.room-dims {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
    font-weight: 600;
}

.room-item p {
    color: var(--on-surface-variant);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 0.25rem;
}

/* Floorplans */
.floorplans {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.floorplan-img {
    max-width: 100%;
    border-radius: 0.75rem;
    background: var(--surface-container-low);
}

/* ===== RIGHT COLUMN: SIDEBAR ===== */
.property-sidebar {
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sidebar-card {
    background: var(--surface-container-lowest);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 12px 32px rgba(49, 51, 47, 0.06);
}

.sidebar-card h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sidebar-card p {
    color: var(--on-surface-variant);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Details table */
.details-table {
    width: 100%;
    border-collapse: collapse;
}

.details-table tr + tr {
    margin-top: 0.5rem;
}

.details-table td {
    padding: 0.6rem 0;
    font-size: 0.9rem;
}

.details-table td:first-child {
    color: var(--on-surface-variant);
    font-weight: 500;
    width: 40%;
}

.details-table td:last-child {
    font-weight: 600;
}

/* Sidebar buttons */
.sidebar-btn-primary {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dim));
    color: var(--on-primary);
    border: none;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 -2px 0 rgba(49,51,47,0.1);
    transition: all 0.2s;
}

.sidebar-btn-primary:hover {
    transform: translateY(-1px);
}

.sidebar-btn-secondary {
    display: block;
    width: 100%;
    padding: 0.9rem;
    background: var(--secondary-container);
    color: var(--on-secondary-container);
    border: none;
    border-radius: 0.5rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-btn-secondary:hover {
    background: var(--surface-container-high);
}

/* Mortgage calc */
.mortgage-calc label {
    display: block;
    font-size: 0.9rem;
    color: var(--on-surface-variant);
    margin-bottom: 0.25rem;
}

.mortgage-calc input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.mortgage-calc input[type="number"] {
    width: 65px;
    padding: 0.3rem 0.5rem;
    background: var(--surface-container-highest);
    border: none;
    border-radius: 0.25rem;
    font-family: 'Public Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.mortgage-calc input[type="number"]:focus {
    box-shadow: 0 0 0 2px rgba(84, 99, 81, 0.4);
}

#mortgage-result {
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--on-surface);
    margin-top: 1rem;
}

/* Agent card */
.agent-card {
    background: var(--surface-container);
    padding: 1.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agent-card img {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    object-fit: cover;
}

.agent-card-name {
    font-family: 'Manrope', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
}

.agent-card-role {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
}

.agent-card a {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.agent-card a:hover { text-decoration: underline; }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 0.5rem;
}

.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-counter {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-family: 'Public Sans', sans-serif;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .property-page { padding: 1.5rem; }
    .property-layout { grid-template-columns: 1fr; }
    .property-sidebar { position: static; }
    .gallery-grid { height: 350px; }
}

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; height: auto; }
    .gallery-side { flex-direction: row; height: 150px; }
    .property-header h1 { font-size: 1.75rem; }
    .property-meta-detail { flex-wrap: wrap; gap: 1rem; }
    .features-list { grid-template-columns: 1fr; }
}
