/* 3G Autó – managed inventory dependency UI. Loaded only on the two inventory pages. */
.select2-container--open .select2-results__option[aria-disabled="true"],
.select2-container--open .select2-results__option--disabled {
	display: none !important;
}

/* Instant optimistic narrowing of cards already rendered by Motors. */
#listings-result .gauto-instant-filter-hidden {
    display: none !important;
}

/* =========================================================
   MOBILE INVENTORY – STABIL STICKY KERESŐ / FILTER SOR
========================================================= */

/*
 * Motors Pro 1.2.31 a sticky állapothoz natívan kiveszi ezt a sort a
 * fő inventory oszlopból és a footer elé mozgatja. A child JS ezt a
 * DOM-átrakást letiltja; ez a CSS csak akkor rögzíti a helyben maradó sort,
 * amikor a JS a config.php-ban megadott stickyMax töréspont alatt ráteszi a
 * .mvl-filter-sticky osztályt. Így a breakpoint nincs duplán hardcode-olva CSS-ben.
 *
 * A placeholder megtartja az eredeti sormagasságot, ezért sticky-váltáskor
 * nem ugrik össze az oldal és lefelé görgetésnél nincs layout-villogás.
 */
    .stm-inventory-pro.gauto-mobile-sticky-enabled .gauto-mobile-filter-sticky-sentinel {
        display: block;
        width: 100%;
        height: 1px;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }

    .stm-inventory-pro.gauto-mobile-sticky-enabled .gauto-mobile-filter-sticky-placeholder {
        display: block;
        width: 100%;
        height: 0;
        margin: 0;
        padding: 0;
        pointer-events: none;
    }

    .stm-inventory-pro.gauto-mobile-sticky-enabled .stm-inventory-pro-filter-mobile-apparent.mvl-filter-sticky {
        position: fixed !important;
        top: var(--gauto-mobile-filter-top, 0px) !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        width: auto !important;
        margin: 0 !important;
        box-sizing: border-box;
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

/*
 * Elementor writes a 216px mobile cap for list-card images. The managed phone
 * layout must show the complete photo instead of cropping it to that cap.
 */
@media (max-width: 767px) {
    .stm-template-listing_one_elementor #listings-result .listing-list-loop .image,
    .stm-template-listing_one_elementor #listings-result .listing-list-loop .image .image-inner {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    .stm-template-listing_one_elementor #listings-result .listing-list-loop .image .image-inner img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
        object-fit: contain !important;
    }

    /* Hover-gallery images are absolutely positioned, so their wrapper needs a
       stable photo ratio after the fixed Elementor height is removed. */
    .stm-hoverable-interactive-galleries.stm-template-listing_one_elementor #listings-result .listing-list-loop .image .image-inner.interactive-hoverable {
        aspect-ratio: 1920 / 1270;
    }

    .stm-hoverable-interactive-galleries.stm-template-listing_one_elementor #listings-result .listing-list-loop .image .image-inner.interactive-hoverable img {
        height: 100% !important;
        object-fit: contain !important;
    }
}


/* =========================================================
   NUMERIC/RANGE FILTER – CURRENT STOCK DISTRIBUTION (Inventory 1.2.40)
   Generic visual histogram for every managed numeric field whose Motors
   configuration has slider=true and distribution enabled. Built from the
   already-localized facetRows; it never owns slider state or AJAX.
========================================================= */
.stm-inventory-pro .stm-filter-item.numeric .stm-price-range-unit.gauto-range-distribution-enabled,
.stm-inventory-pro .stm-filter-item.numeric .stm-number-range-unit.gauto-range-distribution-enabled {
    background: transparent;
}

.stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    width: 100%;
    height: 30px;
    margin: 0 0 7px;
    padding: 0 1px;
    box-sizing: border-box;
    overflow: hidden;
    pointer-events: none;
}

.stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution-bar {
    display: block;
    pointer-events: auto;
    cursor: help;
    flex: 1 1 0;
    width: 100%;
    height: 0;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--motors-filter-field-link-color, #1f6fae);
    opacity: .72;
    transform: scaleY(1);
    transform-origin: 50% 100%;
    transition: height .26s ease, opacity .18s ease, transform .18s ease;
}

.stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution-bar.is-empty {
    opacity: .08;
}

.stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution-bar.is-outside {
    opacity: .16;
    transform: scaleY(.82);
}

.stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution-bar.is-inside:not(.is-empty) {
    opacity: .72;
    transform: scaleY(1);
}

@media (max-width: 767px) {
    .stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution {
        height: 24px;
        gap: 1px;
        margin-bottom: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stm-inventory-pro .stm-filter-item.numeric .gauto-range-distribution-bar {
        transition: none;
    }
}
