.uk-responsive-xml-width{
    max-width: 100% !important;
    height: auto;
    max-height: 500px;
    display: block;
    position: relative;
    z-index: 1;
}

.uk-responsive-xml-height{
    max-height: 400px;
    width: auto;
    max-width: 500px;
    display: block;
    position: relative;
    z-index: 1;
}

/* Prevent overlay issues with slider content (property slideshow only, NOT the noUiSlider price slider) */
#slideshow,
#property-slider {
    position: relative;
    z-index: 1;
    margin-bottom: 30px !important;
    clear: both;
    min-height: 100px;
}

.uk-slideshow, .uk-slider {
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    clear: both;
    min-height: 100px;
}

/* Ensure proper spacing between slider and following content */
.uk-slideshow + .uk-alert,
.uk-slider + .uk-alert {
    margin-top: 20px !important;
    clear: both;
    position: relative;
    z-index: 1;
    min-height: 50px;
}

/* Add clearfix to parent containers to prevent layout issues */
.slider-container {
    clear: both;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Force proper document flow for the slider section wrapper */
#slider_overlay_wrapper {
    clear: both;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    /* Ensure this container doesn't create stacking context issues */
    contain: layout style paint;
}

/* Add explicit height and overflow control to prevent stacking issues */
#slideshow {
    min-height: 100px;
    height: auto;
    overflow: visible !important;
    position: relative;
    z-index: 1;
    /* Prevent any positioning that could cause overlap */
    transform: none !important;
    -webkit-transform: none !important;
}

/* Most important fix - ensure no stacking context issues */
#property-alert-wrapper {
    position: relative !important;
    z-index: 3 !important;
    margin-top: 10px !important;
    /* Force a new stacking context for the alert */
    isolation: isolate;
}

/* Additional safety measure - force all elements to have proper positioning */
.uk-slideshow, .uk-slider, #slideshow {
    position: relative !important;
    z-index: 1 !important;
}

/* Force consistent image dimensions for list page thumbnails (not slider thumbnails) */
#list .uk-thumbnail figure img:not(.uk-responsive-xml-width),
#list .uk-overlay figure img:not(.uk-responsive-xml-width),
#modalList .uk-thumbnail figure img:not(.uk-responsive-xml-width),
#modalList .uk-overlay figure img:not(.uk-responsive-xml-width),
.uk-modal-dialog .uk-overlay figure img:not(.uk-responsive-xml-width) {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
}