@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans', sans-serif;
}

html,
body {
    width: 100%;
    height: 100%;
}

header {
    height: 93px !important;
}

header .logo {
    width: 150px;
}

.container {
    max-width: 100%;
}

.building-view {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-top: 93px;
}


#building_container {
    flex: 2;
    position: relative;
    min-width: 0;
    display: flex;
    height: 100%;
    overflow: auto;
    width: 100%;
}

#info_div {
    flex: 1.5;
    background-color: #867D5C;
    color: #fff;
    display: flex;
}

.part-details {
    margin-top: 3rem;
}

.floor-details {
    margin-top: 2rem;
}

#info_div .info-content {
    width: 100%;
    margin-left: 3rem;
    margin-top: 8rem;
}

.building-title {
    font-size: 40px !important;
    font-weight: 700;
    margin-bottom: 10px;
}

.section-type {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 10px;
}

.unit-count {
    font-size: 30px;
    margin-bottom: 8px;
}

.area-range {
    font-size: 30px;
    margin-bottom: 15px;
}

#part-info-img {
    margin-top: 1rem;
}

.part-info-image {
    object-fit: contain;
}

.floor-title {
    font-size: 50px;
    font-weight: 700;
    margin-bottom: 30px;
}

.floor-plan-title {
    font-size: 50px;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center !important;
}

.floor-stats {
    margin-top: 15px;
}

.total-offices {
    font-size: 30px;
    font-weight: 600;
    margin-bottom: 5px;
}

.available-offices {
    font-size: 28px;
    margin-bottom: 15px;
}

.building-mask {
    width: 100%;
    height: 100%;
}

#building_image {
    width: 100%;
    /* height: max-content; */
    height: 100vh;
}

.building-mask {
    position: absolute;
    opacity: 0.1;
    transition: opacity 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    margin: 0;
    top: 0;
    left: 0;
}

.building-mask:hover {
    opacity: 0.8;
}

.part-disable-mask {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 1;
    pointer-events: none;
}

.part-title {
    font-size: 40px !important;
}

@media (max-width: 768px) {
    .building-view {
        flex-direction: column;
    }

    #building_container {
        width: 100%;
        height: 50vh;
        overflow: auto;
        flex: none;
    }

    #info_div {
        width: 100%;
        height: auto;
        flex: none;
    }

    #building_container img,
    .building-mask {
        min-width: 500px;
        /* Smaller minimum width for mobile */
    }

    #building_image {
        min-width: 500px;
        max-height: none;
        /* Remove height restriction to allow scrolling */
    }

    #info_div .info-content {
        margin-left: 2rem;
        margin-top: 2rem;
    }

    .building-title {
        font-size: 32px;
    }

    .floor-title {
        font-size: 32px;
    }

    .total-offices {
        font-size: 24px;
    }

    .available-offices {
        font-size: 22px;
    }

    .reset-footer {
        height: 60px;
    }

    .reset-arrow-circle {
        width: 45px;
        height: 45px;
    }

    .reset-arrow-icon {
        width: 18px;
        height: 18px;
    }
}

/* Additional responsive styles for very small screens */
@media (max-width: 480px) {
    #building_container {
        height: 40vh;
    }

    #building_container img,
    .building-mask {
        min-width: 400px;
        /* Even smaller minimum width for very small screens */
    }

    #building_image {
        min-width: 400px;
    }

    #info_div .info-content {
        margin-left: 1rem;
        margin-top: 1rem;
    }

    .building-title {
        font-size: 28px;
    }

    .floor-title {
        font-size: 28px;
    }
}

/* Added styles for interactive floor selection masks */
.floor-mask {
    position: absolute;
    opacity: 0.1;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floor-mask:hover {
    opacity: 0.8;
}

/* Reset footer styles */
.reset-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background-color: rgb(255 255 255 / 64%);
    /* border-top: 1px solid rgba(255, 255, 255, 0.3); */
    /* backdrop-filter: blur(10px); */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.reset-btn-container {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 100%;
    height: 100%;
    padding-left: 40px;
}

.reset-arrow-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.reset-arrow-btn:hover {
    transform: scale(1.1);
}

.reset-arrow-circle {
    width: 50px;
    height: 50px;
    background-color: #867D5C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.reset-arrow-circle:hover {
    background-color: #9a9273;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.reset-arrow-icon {
    width: 20px;
    height: 20px;
    color: white;
    transition: transform 0.3s ease;
}

.reset-arrow-btn:hover .reset-arrow-icon {
    transform: translateX(-2px);
}

/* Update building_container to be positioned relative for footer positioning */
#building_container {
    position: relative;
}

/* Remove position relative from info_div since footer is no longer there */
#info_div {
    flex: 1.5;
    background-color: #867D5C;
    color: #fff;
    display: flex;
}

/* Basic layout for the floor-plan page */
.floor-plan-page {
    width: 100%;
    min-height: 100vh;
    display: flex;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    margin-top: 93px;
}

/* Tower visualization context for floor plan page - now takes left half */
.floor-plan-tower-context {
    flex: 1;
    width: 50%;
    height: 100vh;
    position: relative;
    background: #f8f8f8;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

#floor_plan_tower_container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

#floor_plan_building_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.floor-plan-part-disable-mask,
.floor-plan-floor-mask {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.floor-plan-part-disable-mask {
    z-index: 3;
    opacity: 1;
}

.floor-plan-floor-mask {
    z-index: 4;
    opacity: 0.8;
}

.floor-plan-container {
    flex: 1;
    width: 50%;
    height: 100vh;
    overflow-y: auto;
    padding: 40px 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-left: 2px solid #e0e0e0;
}

.floor-plan-container .header {
    margin-bottom: 40px;
    flex-shrink: 0;
    display: flex;
    justify-content: start;
    align-items: center;
    flex-direction: row;
    /* border-bottom: 1px solid #867D5C; */
    padding-bottom: 20px;
}

.floor-plan-content {
    position: relative;
    width: 100%;
    display: flex;
    align-items: start;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
    flex: 1;
}

.floor-plan-image-container {
    position: relative;
    width: 100%;
    /* max-width: 600px; */
    flex: 1 1 400px;
    margin: 0;
}

#floor-plan-image {
    width: 100%;
    height: auto;
    display: block;
}

#floor-masks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Unit-info-panel in floor plan page - hide in plan view */
.floor-plan-page .unit-info-panel {
    display: none !important;
}

/* Unit info panel adjustments - now slides from left */
.unit-info-panel {
    position: fixed;
    top: 93px;
    left: 0;
    width: 400px;
    height: calc(100vh - 93px);
    background-color: #867D5C;
    color: #fff;
    padding: 40px 24px;
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.35s ease;
    z-index: 2000;
    overflow-y: auto;
    text-align: right;
}

.unit-info-panel.open {
    transform: translateX(0);
}

/* Responsive design for tower context */
@media (max-width: 768px) {
    .floor-plan-page {
        flex-direction: column;
        margin-top: 93px;
    }
    
    .floor-plan-tower-context {
        width: 100%;
        height: 40vh;
        min-height: 300px;
        border: none;
    }
    
    #floor_plan_tower_container {
        padding: 0;
    }
    
    .floor-plan-part-disable-mask,
    .floor-plan-floor-mask {
        width: 100%;
        height: 100%;
    }
    
    .floor-plan-container {
        width: 100%;
        height: 60vh;
        min-height: 400px;
        padding: 20px 15px;
        border-left: none;
        border-top: 2px solid #e0e0e0;
    }
    
    .unit-info-panel {
        width: 100%;
        height: 100vh;
        top: 0;
        transform: translateX(-100%);
    }
}

@media (max-width: 480px) {
    .floor-plan-tower-context {
        height: 35vh;
        min-height: 250px;
    }
    
    #floor_plan_tower_container {
        padding: 0;
    }
    
    .floor-plan-part-disable-mask,
    .floor-plan-floor-mask {
        width: 100%;
        height: 100%;
    }
    
    .floor-plan-container {
        height: 65vh;
        padding: 15px 10px;
    }
}

/* --- Floor-plan view indicators & compass --- */
.floor-view-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    color: #333;
    white-space: nowrap;
}

.floor-view-indicator .arrow {
    font-size: 20px;
    font-weight: 700;
}

/* Compass circle */
.floor-position {
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass {
    width: 72px;
    height: 72px;
    border: 2px solid #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.compass-arrow {
    font-size: 24px;
    font-weight: 700;
}

/* Responsive tweaks */
@media (max-width: 992px) {
    .floor-plan-content {
        gap: 24px;
    }

    .floor-view-indicator {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .floor-plan-content {
        flex-direction: column;
        gap: 20px;
    }

    .floor-view-indicator {
        flex-direction: row;
    }

    .compass {
        width: 60px;
        height: 60px;
    }

    .compass-arrow {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .floor-view-indicator {
        font-size: 16px;
    }

    .compass {
        width: 48px;
        height: 48px;
    }

    .compass-arrow {
        font-size: 18px;
    }
}

/* Floor-plan header styling */
.floor-plan-title {
    font-weight: 500;
    font-size: 50px;
    text-transform: uppercase;
    color: #867D5C !important;
}

.floor-instruction {
    font-size: 18px;
    color: #666;
    margin-top: 4px;
}

/* Adjust on smaller screens */
@media (max-width: 768px) {
    .floor-plan-title {
        font-size: 32px;
        text-align: center;
    }

    .floor-instruction {
        font-size: 16px;
        text-align: center;
    }
}

.unit-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    width: 100%;
    /* justify-content: center; */
    /* height: 100%; */

    justify-content: space-between; 
    /* max-width: 1200px;               */
    /* margin: 0 auto; */
    /* padding: 20px 40px;  */
}

.unit-left {
    flex: 1 1 320px;
    max-width: 400px;
}

/* Unit page tower visualization (left side) */
.unit-tower-context {
    position: relative;
    width: 100%;
    height: 360px;
    background: #f8f8f8;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}

#unit_tower_container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#unit_building_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.unit-part-disable-mask,
.unit-floor-mask {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.unit-part-disable-mask { z-index: 3; opacity: 1; }
.unit-floor-mask { z-index: 4; opacity: 0.85; }

.unit-right {
    flex: 1 1 600px;
    max-width: 900px;
    display: flex;
    justify-content: center; /* centers the image horizontally */
    align-items: center; 
}

.unit-right img {
    width: 75%;
    height: auto;
    display: block;
}

.unit-title {
    font-size: 40px;
    font-weight: 700;
    /* margin-bottom: 24px; */
    text-transform: uppercase;
    /* margin-left: 55px; */
    color: #4B4F5A;
    font-family: Noto Sans;
    font-weight: 500;
}

.unit-floor {
    font-size: 40px !important;
    color: #4B4F5A;
    margin-bottom: 40px;
}

.unit-stats p {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 20px;
    font-weight: lighter;
    color: #4B4F5A;
}

/* New 3x2 stats grid for unit page */
.unit-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 28px 40px;
    margin-top: 48px;
}
.unit-stats-grid .stat-value {
    color: #867D5C;
    font-size: 32px;
    font-weight: 700;
}
.unit-stats-grid .stat-label {
    color: #867D5C;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 6px;
}

/* Slightly smaller value for office unit name */
.unit-stats-grid .office-value {
    font-size: 28px;
}

#unit-area2, #unit-terraces2, #unit-bathrooms2 {
    font-weight: bold;
}

.unit-features p {
    font-size: 20px;
    margin-bottom: 10px;
}

#unit-features2 p {
    margin: 0;
    line-height: 30px;
    font-weight: bold;
    color: #4B4F5A;
}

#unit-features2 {
    margin-top: 40px;
}

.unit-actions {
    margin-top: 28px;
    display: flex;
}

.action-btn {
    border: none;
    font-size: 14px;
    margin-right: 14px;
    cursor: pointer;
    transition: background-color 0.25s ease;
    background-color: #eae6e2;
    color: #867d5c;
    border-radius: 22.5px;
    line-height: 30px;
    width: 176px;
    height: 43px;
}

.action-btn:hover {
    background-color: #4a4533;
    color: #eae6e2;
}

.action-btn svg {
    margin-right: 8px;
}

.unit-page {
    height: 100%;
    margin-top: 100px;
    align-items: center;
    margin: 50px auto;
    width: 100%;
    max-width: 1440px;
    padding: 40px 20px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .unit-page {
        height: 100%;
        align-items: center;
    }

    .unit-tower-context {
        height: 300px;
    }

    .unit-left {
        max-width: none;
    }

    .unit-right {
        flex: 1 1 100%;
        max-width: none;
    }
}

/* Mobile touch-friendly improvements */
.building-mask,
.floor-mask,
.unit-mask {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Mobile touch feedback */
.building-mask:active,
.floor-mask:active,
.unit-mask:active {
    opacity: 0.6 !important;
}

/* Removed duplicate media query - consolidated above */

/* Removed duplicate media query - consolidated above */

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    #building_container {
        height: 60vh;
    }
    
    #building_image {
        height: 60vh;
    }

    #info_div {
        min-height: 40vh;
    }

    .unit-info-panel {
        width: 350px;
    }
}

/* Very small screens in landscape */
@media (max-width: 480px) and (orientation: landscape) {
    #building_container {
        height: 70vh;
    }
    
    #building_image {
        height: 70vh;
    }

    #info_div {
        min-height: 30vh;
    }

    .unit-info-panel {
        width: 300px;
    }
}

/* Mobile-first improvements */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content elements */
p, h1, h2, h3, h4, h5, h6, span, div {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Mobile viewport optimizations */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Mobile touch improvements */
.building-mask,
.floor-mask,
.unit-mask,
.reset-arrow-btn,
.action-btn,
.back-button {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
}

/* Prevent zoom on input focus */
input, select, textarea {
    font-size: 16px;
}

/* Mobile scrolling improvements */
body {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

#building_container {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

/* Mobile-specific button improvements */
.reset-arrow-btn,
.action-btn {
    min-height: 44px;
    min-width: 44px;
}

/* Mobile image handling */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile loading states */
@media (max-width: 768px) {
    .building-mask,
    .floor-mask,
    .unit-mask {
        transition: opacity 0.2s ease;
    }
    
    .building-mask:active,
    .floor-mask:active,
    .unit-mask:active {
        opacity: 0.6 !important;
        transition: opacity 0.1s ease;
    }
}

/* Mobile menu improvements */
@media (max-width: 768px) {
    .unit-info-panel {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
        /* backdrop-filter: blur(10px); */
        /* -webkit-backdrop-filter: blur(10px); */
    }
    
    .unit-info-panel.open {
        transform: translateX(0);
    }
    
    /* Close button for unit panel */
    .unit-info-panel::before {
        content: '×';
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        z-index: 10;
    }
}

/* Mobile keyboard handling */
@media (max-width: 768px) {
    .floor-plan-page,
    .unit-page {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile safe area handling */
@supports (padding: max(0px)) {
    .floor-plan-container,
    .unit-page {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .reset-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile orientation handling */
@media (max-width: 768px) and (orientation: portrait) {
    .unit-container {
        flex-direction: column;
    }
    
    .unit-right {
        order: 1;
    }
    
    .unit-left {
        order: 2;
    }
}

/* Mobile focus states */
@media (max-width: 768px) {
    .reset-arrow-btn:focus,
    .action-btn:focus,
    .back-button:focus {
        outline: 2px solid #867D5C;
        outline-offset: 2px;
    }
}

/* Mobile hover states (disable where appropriate) */
@media (hover: none) and (pointer: coarse) {
    .building-mask:hover,
    .floor-mask:hover,
    .unit-mask:hover {
        opacity: 0.1;
    }
    
    .reset-arrow-btn:hover,
    .action-btn:hover {
        transform: none;
    }
    
    .reset-arrow-circle:hover {
        background-color: #867D5C;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Header and Footer Mobile Responsive Styles */
@media (max-width: 768px) {
    /* Header mobile styles */
    header {
        padding: 8px 15px;
    }
    
    .logo {
        width: 120px;
    }
    
    .logo-link {
        margin-right: 0 !important;
    }
    
    .search-input {
        font-size: 14px;
        padding: 8px 15px;
    }
    
    .fullscreen-menu .nav-section {
        padding-top: 0;
        justify-content: center;
        margin-left: 2%;
    }
    
    .fullscreen-menu .nav-section a {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .fullscreen-menu .nav-section-bottom a {
        font-size: 18px;
    }
    
    .nav-section img {
        width: 200px;
        left: 250px;
    }
    
    /* Footer mobile styles */
    .footer {
        text-align: center;
        padding: 20px 15px;
        flex-direction: column;
        gap: 20px;
    }
    
    .footer .d-flex {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer p, .footer h5, .footer a {
        padding-right: 0;
        text-align: center;
        font-size: 16px;
    }
    
    .footer img {
        width: 150px;
        margin: 0 auto;
    }
    
    .footer .col-md-3 {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .copyright {
        font-size: 11px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(111, 91, 78, 0.3);
    }
    
    /* Building view mobile fixes with proper scrolling */
    .building-view {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    #building_container {
        width: 100%;
        height: 60vh;
        min-height: 300px;
        overflow: auto;
        flex: none;
        position: relative;
        -webkit-overflow-scrolling: touch;
    }

    #info_div {
        width: 100%;
        height: 40vh;
        min-height: 250px;
        max-height: none;
        overflow-y: auto;
        flex: none;
        -webkit-overflow-scrolling: touch;
    }

    /* Fixed mask positioning - scale with images exactly */
    #building_container {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: #f5f5f5;
    }

    #building_image {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        position: relative;
        z-index: 1;
    }

    .building-mask,
    .part-disable-mask {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        z-index: 2;
        pointer-events: auto;
    }

    .part-disable-mask {
        z-index: 3;
        pointer-events: none;
    }

    #info_div .info-content {
        margin-left: 2rem;
        margin-top: 2rem;
        padding-bottom: 4rem;
        height: auto;
        min-height: calc(40vh - 4rem);
    }

    .building-title {
        font-size: 32px;
    }

    .floor-title {
        font-size: 32px;
    }

    .part-title {
        font-size: 28px !important;
    }

    .section-type {
        font-size: 28px;
    }

    .unit-count {
        font-size: 24px;
    }

    .area-range {
        font-size: 24px;
    }

    .total-offices {
        font-size: 24px;
    }

    .available-offices {
        font-size: 22px;
    }

    .reset-footer {
        height: 60px;
        padding: 0 15px;
    }

    .reset-btn-container {
        padding-left: 15px;
    }

    .reset-arrow-circle {
        width: 45px;
        height: 45px;
    }

    .reset-arrow-icon {
        width: 18px;
        height: 18px;
    }

    /* Floor plan page mobile improvements with proper scrolling */
    .floor-plan-page {
        min-height: 100vh;
        height: auto;
        padding-bottom: 2rem;
    }

    .floor-plan-container {
        margin-top: 80px;
        padding: 20px 15px 40px;
        height: auto;
        min-height: calc(100vh - 80px);
    }

    .floor-plan-content {
        flex-direction: column;
    }

    .floor-plan-image-container {
        position: relative;
        width: 100%;
        max-width: none;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #floor-plan-image {
        width: 100%;
        height: auto;
        max-width: 100%;
        object-fit: contain;
        display: block;
        position: relative;
        z-index: 1;
    }

    #floor-masks,
    #plan-masks {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
    }

    .unit-mask,
    .floor-mask,
    .plan-unit-mask {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        z-index: 2;
        pointer-events: auto;
    }

    .floor-plan-title {
        font-size: 28px;
        text-align: center;
        line-height: 1.2;
    }

    .floor-info-title {
        font-size: 32px;
        text-align: center;
    }

    .floor-info-panel {
        text-align: center;
        margin-bottom: 25px;
    }

    .floor-stats-main p {
        font-size: 18px;
        margin: 8px 0;
    }

    .floor-features p {
        font-size: 16px;
        line-height: 24px;
    }

    /* Unit info panel - full width with proper scrolling */
    .unit-info-panel {
        width: 100%;
        height: 100vh;
        padding: 20px 15px;
        text-align: left;
        transform: translateX(-100%);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .unit-info-panel h1 {
        font-size: 22px !important;
        margin-bottom: 10px;
    }

    .unit-info-panel p {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .unit-info-panel #unit-features p {
        font-size: 20px;
    }

    /* Back button for mobile */
    .back-button {
        font-size: 28px;
        margin-bottom: 15px;
        padding: 10px;
        position: fixed;
        top: 80px;
        left: 20px;
        /* z-index: 3000; */
        background-color: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        width: 50px;
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Unit page mobile improvements with proper scrolling */
    .unit-page {
        margin-top: 80px;
        padding: 20px 15px 40px;
        min-height: calc(100vh - 80px);
        height: auto;
    }

    .unit-title {
        font-size: 28px;
        text-align: center;
        margin-bottom: 25px;
    }

    .unit-container {
        flex-direction: column;
        gap: 25px;
        align-items: stretch;
    }

    .unit-left {
        flex: none;
        max-width: none;
        order: 2;
        text-align: center;
    }

    .unit-right {
        flex: none;
        max-width: none;
        order: 1;
        margin-bottom: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .unit-right img {
        width: 100%;
        max-width: 400px;
        height: auto;
        object-fit: contain;
    }

    .unit-floor {
        font-size: 28px !important;
        margin-bottom: 25px;
    }

    .unit-stats p {
        font-size: 18px;
        margin-bottom: 10px;
    }

    #unit-features2 {
        margin-top: 25px;
    }

    #unit-features2 p {
        font-size: 16px;
        line-height: 24px;
    }

    .unit-stats-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 20px 24px;
        margin-top: 24px;
    }
    .unit-stats-grid .stat-value { font-size: 24px; }
    .unit-stats-grid .stat-label { font-size: 12px; }

    .unit-actions {
        margin-top: 25px;
        flex-direction: column;
        gap: 15px;
        align-items: center;
        padding-bottom: 2rem;
    }

    .action-btn {
        width: 100%;
        max-width: 200px;
        height: 48px;
        font-size: 16px;
        line-height: 48px;
        margin-right: 0;
        touch-action: manipulation;
    }

    .action-btn:active {
        transform: scale(0.95);
    }
}

/* Additional responsive styles for very small screens */
@media (max-width: 480px) {
    /* Header very small screens */
    header {
        padding: 5px 10px;
    }
    
    .logo {
        width: 100px;
    }
    
    .search-input {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .fullscreen-menu .nav-section a {
        font-size: 20px;
    }
    
    .nav-section img {
        width: 150px;
        left: 200px;
    }
    
    /* Footer very small screens */
    .footer {
        padding: 15px 10px;
    }
    
    .footer img {
        width: 120px;
    }
    
    .footer p, .footer h5, .footer a {
        font-size: 14px;
    }
    
    /* Building container very small screens with proper scrolling */
    #building_container {
        height: 55vh;
        min-height: 250px;
    }

    #info_div {
        height: 45vh;
        min-height: 200px;
    }

    #info_div .info-content {
        margin-left: 1rem;
        margin-top: 1rem;
        padding-bottom: 3rem;
    }

    .building-title {
        font-size: 24px;
    }

    .floor-title {
        font-size: 24px;
    }

    .part-title {
        font-size: 22px !important;
    }

    .section-type {
        font-size: 22px;
    }

    .unit-count {
        font-size: 20px;
    }

    .area-range {
        font-size: 20px;
    }

    .total-offices {
        font-size: 20px;
    }

    .available-offices {
        font-size: 18px;
    }

    .reset-footer {
        height: 55px;
        padding: 0 10px;
    }

    .reset-btn-container {
        padding-left: 10px;
    }

    .reset-arrow-circle {
        width: 40px;
        height: 40px;
    }

    .reset-arrow-icon {
        width: 16px;
        height: 16px;
    }

    .floor-plan-container {
        padding: 15px 10px 30px;
        margin-top: 70px;
    }

    .floor-plan-title {
        font-size: 24px;
    }

    .floor-info-title {
        font-size: 28px;
    }

    .floor-stats-main p {
        font-size: 16px;
    }

    .floor-features p {
        font-size: 14px;
    }

    .unit-info-panel {
        padding: 15px 10px;
    }

    .unit-info-panel h1 {
        font-size: 22px !important;
    }

    .unit-info-panel p {
        font-size: 20px;
    }

    .unit-info-panel #unit-features p {
        font-size: 20px;
    }

    .back-button {
        font-size: 24px;
        width: 45px;
        height: 45px;
        top: 70px;
        left: 15px;
    }

    .unit-page {
        padding: 15px 10px 30px;
        margin-top: 70px;
    }

    .unit-title {
        font-size: 24px;
    }

    .unit-floor {
        font-size: 24px !important;
    }

    .unit-stats p {
        font-size: 16px;
    }

    #unit-features2 p {
        font-size: 14px;
    }

    .unit-stats-grid { gap: 16px 20px; }
    .unit-stats-grid .stat-value { font-size: 20px; }

    .action-btn {
        height: 44px;
        font-size: 14px;
        line-height: 44px;
    }

    .unit-actions {
        padding-bottom: 1.5rem;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    #building_container {
        height: 65vh;
    }

    #info_div {
        height: 35vh;
        min-height: 200px;
    }

    .unit-info-panel {
        width: 350px;
    }

    .floor-plan-container {
        margin-top: 60px;
    }

    .back-button {
        top: 60px;
    }

    .unit-page {
        margin-top: 60px;
    }
}

/* Very small screens in landscape */
@media (max-width: 480px) and (orientation: landscape) {
    #building_container {
        height: 70vh;
    }

    #info_div {
        height: 30vh;
        min-height: 180px;
    }

    .unit-info-panel {
        width: 300px;
    }
}

/* Desktop-specific styles to ensure proper display on large screens */
@media (min-width: 769px) {
    /* Reset mobile styles and ensure desktop appearance */
    .building-view {
        flex-direction: row;
        height: 100vh;
    }

    #building_container {
        flex: 2;
        height: 100vh;
        width: auto;
        min-height: auto;
    }

    #info_div {
        flex: 1.5;
        height: 100vh;
        width: auto;
        min-height: auto;
        max-height: none;
    }

    #info_div .info-content {
        margin-left: 3rem;
        margin-top: 8rem;
        padding-bottom: 0;
    }

    .building-title {
        font-size: 40px !important;
    }

    .floor-title {
        font-size: 50px !important;
    }

    .floor-plan-title {
        font-size: 50px !important;
        text-align: left;
    }

    .floor-info-title {
        font-size: 50px !important;
        text-align: left;
    }

    .part-title {
        font-size: 25px !important;
    }

    .section-type {
        font-size: 40px !important;
    }

    .unit-count {
        font-size: 30px !important;
    }

    .area-range {
        font-size: 30px !important;
    }

    .total-offices {
        font-size: 30px !important;
    }

    .available-offices {
        font-size: 28px !important;
    }

    .unit-info-panel {
        width: 400px;
        padding: 40px 24px;
        text-align: right;
    }

    .unit-info-panel h1 {
        font-size: 22px !important;
    }

    .unit-info-panel p {
        font-size: 20px !important;
    }

    .unit-info-panel #unit-features p {
        font-size: 20px !important;
    }

    .floor-plan-container {
        padding: 0px 20px;
    }

    .floor-info-panel {
        text-align: left;
        margin-bottom: 30px;
    }

    .floor-stats-main p {
        font-size: 20px;
    }

    .floor-features p {
        font-size: 20px;
    }

    .unit-page {
        margin-top: 100px;
        padding: 40px 20px;
    }

    .unit-title {
        font-size: 40px !important;
        text-align: left;
    }

    .unit-floor {
        font-size: 40px !important;
    }

    .unit-container {
        flex-direction: row;
        gap: 40px;
    }

    .unit-left {
        flex: 1 1 320px;
        max-width: 400px;
        order: 1;
        text-align: left;
    }

    .unit-right {
        flex: 1 1 600px;
        max-width: 900px;
        order: 2;
    }

    .unit-stats p {
        font-size: 22px !important;
    }

    #unit-features2 p {
        font-size: 20px !important;
    }

    .unit-actions {
        flex-direction: row;
        gap: 14px;
        padding-bottom: 0;
    }

    .action-btn {
        width: 176px;
        height: 43px;
        font-size: 14px;
        margin-right: 14px;
    }

    .back-button {
        font-size: 34px;
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 20px;
    }

    /* NEW: Ensure building image scales consistently with masks */
    #building_image {
        /* Fill the container completely while preserving aspect ratio */
        /* object-fit: cover; */
        width: 100%;
        height: 100%;
    }

    /* Ensure masks scale properly on desktop */
    .building-mask,
    .part-disable-mask,
    .unit-mask,
    .floor-mask,
    .plan-unit-mask {
        /* object-fit: contain; */
    }
}

/* Floor-plan header styling */
.floor-plan-title {
    font-weight: 500;
    font-size: 50px;
    text-transform: uppercase;
    color: #4B4F5A;
}

/* Building section styling */
.building-section-container {
    margin-bottom: 20px;
    padding: 10px 0;
}

#building-section {
    color: #867D5C;
    font-weight: 600;
    font-size: 32px;
    text-transform: uppercase;
}

/* Unit page layout - match plan page structure */
.unit-page {
    width: 100% !important;
    min-height: 100vh !important;
    /* display: flex; */
    background: #fff !important;
    color: #333 !important;
    box-sizing: border-box !important;
    margin-top: 93px !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    height: auto !important;
    align-items: stretch !important;
}

/* Tower visualization context for unit page - left half */
.unit-tower-context {
    flex: 1 !important;
    width: 50% !important;
    height: 100vh !important;
    position: relative !important;
    background: #f8f8f8 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
}

#unit_tower_container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#unit_building_image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: relative !important;
    z-index: 1 !important;
}

.unit-part-disable-mask,
.unit-floor-mask {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    pointer-events: none !important;
}

.unit-part-disable-mask {
    z-index: 3 !important;
    opacity: 1 !important;
}

.unit-floor-mask {
    z-index: 4 !important;
    opacity: 0.8 !important;
}

.unit-container {
    flex: 1 !important;
    /* width: 50% !important; */
    height: calc(100vh - 40px) !important;
    overflow-y: none !important;
    padding: 65px 20px 10px 90px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    /* border-left: 2px solid #e0e0e0 !important; */
    gap: 0 !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    /* max-width: none !important; */
    margin-top: 62px !important;
}

    .unit-container .header {
        margin-bottom: 12px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        gap: 8px !important;
        /* border-bottom: 1px solid #867D5C !important; */
        padding-bottom: 8px !important;
    }

.unit-content {
    position: relative !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    justify-content: flex-start !important;
    flex: 1 !important;
    min-height: 0 !important;
}

.unit-info-container {
    position: relative !important;
    width: 100% !important;
    max-width: 600px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    order: 1 !important;
    color: #867D5C !important;
}

.unit-plan-container {
    position: relative !important;
    /* width: 100% !important; */
    /* max-width: 450px !important; */
    flex: 0 0 auto !important;
    margin: 0 !important;
    /* display: flex !important; */
    align-items: center !important;
    justify-content: center !important;
    /* order: 2 !important; */
}

.unit-plan-container img {
    /* width: 400px !important; */
    width: 100% !important;
    height: auto !important;
    /* max-height: 600px !important; */
    display: block !important;
    object-fit: contain !important;
}

/* Unit plan overlay containers to mirror plan structure */
#unit-floor-masks,
#unit-plan-masks {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 400px !important;
    height: 400px !important;
    max-height: 400px !important;
    z-index: 2 !important;
}

/* Unit page header styling */
.unit-title {
    font-weight: 500 !important;
    font-size: 50px !important;
    text-transform: uppercase !important;
    color: #867D5C !important;
}

/* Unit floor styling */
.unit-floor {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #867D5C !important;
    margin: 0 0 12px 0 !important;
    padding: 0 !important;
    padding-bottom: 8px !important;
}

/* Unit right info stack */
.unit-name { font-size: 28px !important; font-weight: 700 !important; color: #867D5C !important; margin: 0 0 6px 0 !important; }

/* Additional unit content styling */
.unit-stats p,
.unit-features p,
.unit-info-container p,
.unit-info-container span,
#unit-area2,
#unit-terraces2,
#unit-bathrooms2,
#unit-features2 {
    color: #867D5C !important;
}

.unit-stats,
.unit-features {
    color: #867D5C !important;
}
.unit-bedrooms { font-size: 22px !important; font-weight: 600 !important; color: #4B4F5A !important; margin: 0 0 12px 0 !important; }
.unit-area { font-size: 22px !important; font-weight: 600 !important; color: #867D5C !important; margin: 0 0 16px 0 !important; }

/* Building section styling for unit page */
#unit-building-section {
    color: #867D5C !important;
    font-weight: 600 !important;
    font-size: 32px !important;
    text-transform: uppercase !important;
}

/* Responsive design for unit page */
@media (max-width: 768px) {
    .unit-page {
        flex-direction: column !important;
        margin-top: 93px !important;
    }
    
    .unit-tower-context {
        width: 100% !important;
        height: 40vh !important;
        min-height: 300px !important;
        border: none !important;
    }
    
    #unit_tower_container {
        padding: 0 !important;
    }
    
    .unit-part-disable-mask,
    .unit-floor-mask {
        width: 100% !important;
        height: 100% !important;
    }
    
    .unit-container {
        width: 100% !important;
        height: auto !important;
        min-height: 65vh !important;
        padding: 20px 15px 30px 15px !important;
        border-left: none !important;
        border-top: 2px solid #867D5C !important;
        margin-top: 0 !important;
        order: 2 !important;
    }
    
    .unit-container .header {
        flex-direction: column !important;
        text-align: center !important;
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
    }
    
    .unit-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 8px !important;
    }
    
    .unit-floor {
        font-size: 20px !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }
    
    .unit-content {
        flex-direction: column !important;
        gap: 25px !important;
        align-items: center !important;
    }
    
    .unit-info-container {
        order: 1 !important;
        width: 100% !important;
        max-width: none !important;
        text-align: center !important;
    }
    
    .unit-stats {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .unit-stats p {
        margin: 0 !important;
        font-size: 16px !important;
        flex: 1 !important;
        min-width: 120px !important;
    }
    
    .unit-features {
        text-align: center !important;
    }
    
    .unit-features p {
        font-size: 14px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
    }
    
    .unit-plan-container {
        order: 2 !important;
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
    }
    
    .unit-plan-container img {
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
        max-height: 350px !important;
    }
    
    #unit-floor-masks,
    #unit-plan-masks {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 350px !important;
        max-height: 350px !important;
    }
}

/* Very small screens - 480px and below */
@media (max-width: 480px) {
    .unit-page {
        margin-top: 80px !important;
    }
    
    .unit-tower-context {
        height: 30vh !important;
        min-height: 200px !important;
    }
    
    .unit-container {
        padding: 15px 10px 25px 10px !important;
        min-height: 70vh !important;
    }
    
    .unit-title {
        font-size: 24px !important;
    }
    
    .unit-floor {
        font-size: 18px !important;
    }
    
    .unit-stats {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .unit-stats p {
        font-size: 14px !important;
        min-width: auto !important;
    }
    
    .unit-plan-container {
        max-width: 280px !important;
    }
    
    .unit-plan-container img {
        max-width: 280px !important;
        max-height: 280px !important;
    }
    
    #unit-floor-masks,
    #unit-plan-masks {
        max-width: 280px !important;
        max-height: 280px !important;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .unit-page {
        margin-top: 70px !important;
    }
    
    .unit-tower-context {
        height: 45vh !important;
        min-height: 200px !important;
    }
    
    .unit-container {
        min-height: 55vh !important;
        padding: 15px !important;
    }
    
    .unit-content {
        flex-direction: row !important;
        gap: 30px !important;
        justify-content: center !important;
        align-items: flex-start !important;
    }
    
    .unit-info-container {
        flex: 1 !important;
        max-width: 50% !important;
    }
    
    .unit-plan-container {
        flex: 1 !important;
        max-width: 300px !important;
    }
    
    .unit-plan-container img {
        max-width: 300px !important;
        max-height: 300px !important;
    }
}