/* PropertyDisplay.aspx – mobile header + no cutoff */
body.property-display-page {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    max-width: 100vw;
    background: #f3f5f6;
}

body.property-display-page #page_div {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 24px;
    box-sizing: border-box;
}

body.property-display-page .table-responsive {
    overflow-x: visible !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 10px;
    box-sizing: border-box;
}

body.property-display-page #propertyDetails,
body.property-display-page table#propertyDetails {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 0 !important;
    table-layout: fixed !important;
    box-sizing: border-box;
}

body.property-display-page #propertyDetails > tbody > tr > td,
body.property-display-page #propertyDetails td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box;
}

body.property-display-page .detailheader {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 14px !important;
    margin: 0 0 12px !important;
    background: #666666 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: clamp(14px, 3.8vw, 18px) !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow: visible !important;
    text-align: right !important;
    border-radius: 0;
}

body.property-display-page .detailheader > div {
    width: 100% !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

body.property-display-page .col-md-12.row,
body.property-display-page .col-md-12,
body.property-display-page .col-md-5,
body.property-display-page .col-md-7,
body.property-display-page .col-md-6 {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    body.property-display-page .col-md-12.row {
        display: flex;
        flex-wrap: wrap;
        flex-direction: row; /* RTL body: first child (details) on the right */
        direction: rtl;
        gap: 16px 20px;
        align-items: flex-start;
    }

    body.property-display-page .col-md-12.row > .col-md-5 {
        flex: 0 0 calc(40% - 10px);
        width: calc(40% - 10px) !important;
        max-width: calc(40% - 10px) !important;
        order: 1; /* details / text column – right side */
        text-align: right;
    }

    body.property-display-page .col-md-12.row > .col-md-7 {
        flex: 0 0 calc(60% - 10px);
        width: calc(60% - 10px) !important;
        max-width: calc(60% - 10px) !important;
        order: 2; /* gallery – left side */
    }

    body.property-display-page .col-md-12.row .col-md-6 {
        width: 50% !important;
        max-width: 50% !important;
        float: none !important;
        padding: 0 6px !important;
        text-align: right;
    }
}

@media (max-width: 991.98px) {
    body.property-display-page .table-responsive {
        padding: 0 8px 16px;
    }

    body.property-display-page .col-md-12.row {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    /* Gallery first on mobile */
    body.property-display-page .col-md-12.row > .col-md-7 {
        order: -1;
    }

    body.property-display-page .layoutButton,
    body.property-display-page .prop-display-actions {
        margin: 0 !important;
        padding: 8px 0 12px !important;
    }

    body.property-display-page .action-btns {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
    }

    body.property-display-page #little_gallery_inside_popup {
        text-align: right !important;
    }
}

@media print {
    body.property-display-page nav.navbar,
    body.property-display-page #logo_div,
    body.property-display-page .s4u-nav-toggle,
    body.property-display-page #s4u-a11y-root,
    body.property-display-page .prop-display-actions {
        display: none !important;
    }
}

body.property-display-page .prop-display-actions {
    margin: 8px 0 16px !important;
    padding: 4px 0 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: right !important;
    direction: rtl;
    overflow-x: auto;
}

body.property-display-page .prop-display-actions .action-btns {
    display: inline-flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    gap: 10px 14px !important;
    direction: rtl !important;
}

body.property-display-page .prop-display-spacer {
    display: none;
}

body.property-display-page .prop-lang-flags {
    text-align: right !important;
    direction: rtl;
    padding: 8px 0 4px !important;
}

body.property-display-page .prop-lang-flags input[type="image"] {
    margin: 0 0 0 6px;
    vertical-align: middle;
}

/* Full RTL text column */
body.property-display-page,
body.property-display-page #page_div,
body.property-display-page .table-responsive {
    direction: rtl;
    text-align: right;
}

body.property-display-page .asset_details,
body.property-display-page .asset_comments,
body.property-display-page .agent-card,
body.property-display-page .agent-card-details,
body.property-display-page .agent_details {
    direction: rtl !important;
    text-align: right !important;
}

body.property-display-page .agent-card {
    flex-direction: row !important;
    direction: rtl !important;
}

body.property-display-page #little_gallery_inside_popup {
    direction: rtl;
    text-align: right !important;
}
