/* mmLiveSearch — Mebelnaia Tochka / UpStore UI adaptation / UI18 */
.box-search,
.search-top,
.header-search {
    overflow: visible !important;
}
.header-search {
    position: relative;
}
.box-search.mmls-is-active,
.search-top.mmls-is-active,
.header-search.mmls-is-active,
.box-search:has(.mmlivesearch__input:focus),
.search-top:has(.mmlivesearch__input:focus),
.header-search:has(.mmlivesearch__input:focus) {
    position: relative !important;
    z-index: 2147482999 !important;
}
body.mmls-search-open .megamenu-html-open,
body.mmls-search-open .megamenu-full-width,
body.mmls-search-open .megamenu-dropdown,
body.mmls-search-open .dropdown-menu {
    z-index: 1040;
}

.mmlivesearch__result {
    position: absolute;
    left: 0;
    top: 40px;
    width: 100%;
    min-width: 280px;
    max-width: calc(100vw - 20px);
    z-index: 2147483000 !important;
    display: none;
    overflow: hidden;
    flex-direction: column;
    background: #fff;
    color: #1f1f1f;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(30, 32, 37, .18);
    text-align: left;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.28) transparent;
    will-change: transform, opacity;
}
.mmlivesearch__result.mmls-open {
    display: flex;
    animation: mmlsDrop .14s ease-out both;
}
@keyframes mmlsDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.mmlivesearch__result::-webkit-scrollbar {
    width: 8px;
}
.mmlivesearch__result::-webkit-scrollbar-track {
    background: transparent;
}
.mmlivesearch__result::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.24);
    border-radius: 10px;
}

.mmlivesearch__result .mmls__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,.28) transparent;
}
.mmlivesearch__result .mmls__list::-webkit-scrollbar {
    width: 8px;
}
.mmlivesearch__result .mmls__list::-webkit-scrollbar-track {
    background: transparent;
}
.mmlivesearch__result .mmls__list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.24);
    border-radius: 10px;
}

.mmlivesearch__result span.search_sel,
.mmlivesearch__result span.no_find {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 74px;
    padding: 10px 16px;
    position: relative;
    cursor: pointer;
    background: #fff;
    color: inherit;
    border-top: 1px solid rgba(0,0,0,.07);
    text-align: left;
    transition: background-color .12s ease, color .12s ease;
}
.mmlivesearch__result span.search_sel:first-child,
.mmlivesearch__result .title + span.search_sel {
    border-top: 0;
}
.mmlivesearch__result span.search_sel:hover,
.mmlivesearch__result span.search_sel.selected {
    background: #f4f6f8;
}
.mmlivesearch__result span.search_sel:focus {
    outline: none;
}

.mmlivesearch__result span.search_sel .im {
    flex: 0 0 58px;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    overflow: hidden;
}
.mmlivesearch__result span.search_sel .im img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.mmlivesearch__result span.search_sel.tocategory,
.mmlivesearch__result span.search_sel.tosearch,
.mmlivesearch__result span.search_sel.history {
    min-height: 50px;
}
.mmlivesearch__result span.search_sel.tocategory .im,
.mmlivesearch__result span.search_sel.tosearch .im,
.mmlivesearch__result span.search_sel.history .im {
    flex-basis: 28px;
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    border-radius: 0;
}
.mmlivesearch__result span.search_sel.tocategory .im img,
.mmlivesearch__result span.search_sel.tosearch .im img,
.mmlivesearch__result span.search_sel.history .im img {
    width: 22px !important;
    height: 22px !important;
}

.mmlivesearch__result span.search_sel .mmls__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mmlivesearch__result span.search_sel .w {
    min-width: 0;
    line-height: 1.32;
    font-size: 15px;
    text-align: left;
}
.mmlivesearch__result .mmls__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    margin-top: 1px;
    color: #8f96a3;
    font-size: 12px;
    line-height: 1.25;
}
.mmlivesearch__result .mmls__meta-brand {
    display: inline-flex;
    align-items: center;
    max-width: 145px;
    min-width: 0;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(34, 42, 54, .08);
    background: #f5f6f8;
    color: #343a44;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mmlivesearch__result .mmls__meta-article {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    min-width: 0;
    white-space: nowrap;
}
.mmlivesearch__result .mmls__meta-label {
    color: #a8aeba;
}
.mmlivesearch__result .mmls__meta-value {
    color: #6281bd;
    font-weight: 600;
}
.mmlivesearch__result .mmls__meta-sep {
    color: #c0c5ce;
}
.mmlivesearch__result span.search_sel .w strong {
    font-weight: 700;
}
.mmlivesearch__result .mmls__price {
    position: static;
    flex: 0 0 auto;
    min-width: 86px;
    margin-left: 10px;
    padding-left: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
    color: inherit;
    background: transparent !important;
}
.mmlivesearch__result span.search_sel.all_products {
    flex: 0 0 auto;
    min-height: 50px;
    justify-content: center;
    padding: 14px 16px;
    font-weight: 700;
    text-align: center !important;
    background: #f7f8fa;
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -8px 18px rgba(20, 24, 32, .06);
}
.mmlivesearch__result span.search_sel.all_products:hover,
.mmlivesearch__result span.search_sel.all_products.selected {
    background: #eceff3;
}
.mmlivesearch__result span.no_find {
    cursor: default;
    justify-content: center;
    min-height: 48px;
    text-align: center;
}
.mmlivesearch__result .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 16px;
    background: #fff;
    color: inherit;
    border-bottom: 1px solid rgba(0,0,0,.07);
    text-align: left;
}
.mmlivesearch__result .clearMMLiveSearch {
    float: none;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
}
.mmlivesearch__result .clearMMLiveSearch:hover {
    color: #111827;
}


.mmls-hint-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 16px;
    color: #8f96a3;
    background: #fff;
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    border-top: 1px solid rgba(0,0,0,.06);
}
.dark-theme .mmls-hint-row,
html.dark .mmls-hint-row,
.dark .mmls-hint-row {
    background: #24262a;
    color: #aeb4bf;
    border-color: rgba(255,255,255,.1);
}

.mmlsloader {
    display: none !important;
}
.mmls-loading-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 58px;
    padding: 14px 16px;
    color: #6b7280;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
}
.mmls-loading-text {
    font-size: 14px;
    line-height: 1.3;
}
.mmls-loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.mmls-loading-dots i {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    opacity: .35;
    animation: mmlsDots 1s ease-in-out infinite;
}
.mmls-loading-dots i:nth-child(2) { animation-delay: .14s; }
.mmls-loading-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes mmlsDots {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40% { transform: translateY(-3px); opacity: .9; }
}



/* Страница стандартного поиска: подсказки не меняют высоту формы и не сдвигают найденные товары. */
.chm-search-block {
    overflow: visible !important;
}
.chm-search-block .group-checkbox {
    display: none !important;
}
.chm-search-block #button-search {
    margin-top: 18px;
}
.mmlivesearch__result.mmls-search-page {
    max-width: 760px;
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(30, 32, 37, .14);
}
.mmlivesearch__result.mmls-search-page span.search_sel {
    min-height: 62px;
    padding: 8px 12px;
}
.mmlivesearch__result.mmls-search-page span.search_sel .im {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
}
.mmlivesearch__result.mmls-search-page span.search_sel .w {
    font-size: 14px;
}
.mmlivesearch__result.mmls-search-page .mmls__meta {
    font-size: 12px;
}
.mmlivesearch__result.mmls-search-page .mmls__price {
    min-width: 82px;
    font-size: 14px;
}
.mmlivesearch__result.mmls-search-page span.search_sel.all_products {
    min-height: 44px;
    padding: 11px 14px;
}
@media (max-width: 767px) {
    .mmlivesearch__result.mmls-search-page {
        max-width: calc(100vw - 20px);
        max-height: 300px !important;
    }
    .chm-search-block #button-search {
        width: 100%;
    }
}

.light-theme .mmlivesearch__result,
body.light-theme .mmlivesearch__result {
    background: #fff;
    color: #1f1f1f;
}
.dark-theme .mmlivesearch__result,
html.dark .mmlivesearch__result,
.dark .mmlivesearch__result {
    background: #24262a;
    color: #f2f2f2;
    border-color: rgba(255,255,255,.1);
    box-shadow: 0 18px 44px rgba(0,0,0,.46);
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.dark-theme .mmlivesearch__result span.search_sel,
.dark-theme .mmlivesearch__result span.no_find,
.dark-theme .mmlivesearch__result .title,
html.dark .mmlivesearch__result span.search_sel,
html.dark .mmlivesearch__result span.no_find,
html.dark .mmlivesearch__result .title,
.dark .mmlivesearch__result span.search_sel,
.dark .mmlivesearch__result span.no_find,
.dark .mmlivesearch__result .title {
    background: #24262a;
    color: #f2f2f2;
    border-color: rgba(255,255,255,.1);
}
.dark-theme .mmlivesearch__result span.search_sel .im,
html.dark .mmlivesearch__result span.search_sel .im,
.dark .mmlivesearch__result span.search_sel .im {
    background: #2f3238;
    border-color: rgba(255,255,255,.1);
}
.dark-theme .mmlivesearch__result span.search_sel:hover,
.dark-theme .mmlivesearch__result span.search_sel.selected,
html.dark .mmlivesearch__result span.search_sel:hover,
html.dark .mmlivesearch__result span.search_sel.selected,
.dark .mmlivesearch__result span.search_sel:hover,
.dark .mmlivesearch__result span.search_sel.selected {
    background: #30333a;
}
.dark-theme .mmlivesearch__result span.search_sel.all_products,
html.dark .mmlivesearch__result span.search_sel.all_products,
.dark .mmlivesearch__result span.search_sel.all_products {
    background: #2b2e34;
}
.dark-theme .mmlivesearch__result .mmls__meta,
html.dark .mmlivesearch__result .mmls__meta,
.dark .mmlivesearch__result .mmls__meta {
    color: #aeb4bf;
}
.dark-theme .mmlivesearch__result .mmls__meta-brand,
html.dark .mmlivesearch__result .mmls__meta-brand,
.dark .mmlivesearch__result .mmls__meta-brand {
    background: #31343a;
    border-color: rgba(255,255,255,.1);
    color: #e3e6eb;
}
.dark-theme .mmlivesearch__result .mmls__meta-label,
html.dark .mmlivesearch__result .mmls__meta-label,
.dark .mmlivesearch__result .mmls__meta-label {
    color: #858c98;
}
.dark-theme .mmlivesearch__result .mmls__meta-value,
html.dark .mmlivesearch__result .mmls__meta-value,
.dark .mmlivesearch__result .mmls__meta-value {
    color: #9fb7ee;
}
.dark-theme .mmlivesearch__result .mmls__meta-sep,
html.dark .mmlivesearch__result .mmls__meta-sep,
.dark .mmlivesearch__result .mmls__meta-sep {
    color: #6f7682;
}
.dark-theme .mmlivesearch__result .clearMMLiveSearch,
html.dark .mmlivesearch__result .clearMMLiveSearch,
.dark .mmlivesearch__result .clearMMLiveSearch {
    color: #c7cbd1;
}
.dark-theme .mmls-loading-row,
html.dark .mmls-loading-row,
.dark .mmls-loading-row {
    background: #24262a;
    color: #c7cbd1;
    border-color: rgba(255,255,255,.1);
}

.dark-theme .mmlivesearch__result .mmls__list,
html.dark .mmlivesearch__result .mmls__list,
.dark .mmlivesearch__result .mmls__list {
    scrollbar-color: rgba(255,255,255,.25) transparent;
}
.dark-theme .mmlivesearch__result .mmls__list::-webkit-scrollbar-thumb,
html.dark .mmlivesearch__result .mmls__list::-webkit-scrollbar-thumb,
.dark .mmlivesearch__result .mmls__list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.24);
}

@media (max-width: 767px) {
    .mmlivesearch__result {
        border-radius: 14px;
    }
    .mmlivesearch__result span.search_sel {
        min-height: 66px;
        padding: 9px 12px;
        gap: 10px;
    }
    .mmlivesearch__result span.search_sel .im {
        flex-basis: 50px;
        width: 50px;
        height: 50px;
    }
    .mmlivesearch__result span.search_sel .w {
        font-size: 14px;
    }
    .mmlivesearch__result .mmls__meta {
        font-size: 11.5px;
        gap: 5px;
    }
    .mmlivesearch__result .mmls__meta-brand {
        max-width: 110px;
        padding: 2px 6px;
        font-size: 11px;
    }
    .mmlivesearch__result .mmls__price {
        min-width: 70px;
        font-size: 13px;
        padding-left: 4px;
        margin-left: 4px;
    }
}

/* MT ui10: упрощённая страница поиска — без ручного выбора категории. */
body.product-search .chm-search-block .mmls-search-category-col {
    display: none !important;
}
body.product-search .chm-search-block .mmls-search-query-col {
    width: 100% !important;
    max-width: 680px;
    float: none;
}
body.product-search .chm-search-block select[name="category_id"] {
    display: none !important;
}

/* MT ui14: цена акции в живом поиске — новая + старая, как в карточке товара. */
.mmlivesearch__result .mmls__price {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
}
.mmlivesearch__result .mmls__price-old {
    display: block;
    color: #a7adb8;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.05;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    white-space: nowrap;
}
.mmlivesearch__result .mmls__price-new {
    display: block;
    color: #d72626;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}
.dark-theme .mmlivesearch__result .mmls__price-old,
html.dark .mmlivesearch__result .mmls__price-old,
.dark .mmlivesearch__result .mmls__price-old {
    color: #858c98;
}
.dark-theme .mmlivesearch__result .mmls__price-new,
html.dark .mmlivesearch__result .mmls__price-new,
.dark .mmlivesearch__result .mmls__price-new {
    color: #ff6b6b;
}
@media (max-width: 767px) {
    .mmlivesearch__result .mmls__price-old {
        font-size: 11.5px;
    }
    .mmlivesearch__result .mmls__price-new {
        font-size: 14px;
    }
}


/* MT ui17: более заметный hover для тёмной темы без резких цветов. */
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products):hover,
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products).selected,
html.dark .mmlivesearch__result span.search_sel:not(.all_products):hover,
html.dark .mmlivesearch__result span.search_sel:not(.all_products).selected,
.dark .mmlivesearch__result span.search_sel:not(.all_products):hover,
.dark .mmlivesearch__result span.search_sel:not(.all_products).selected {
    background: #343941;
    color: #ffffff;
    box-shadow: inset 3px 0 0 rgba(118, 158, 255, .42);
}
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand,
html.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
html.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand,
.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand {
    background: #3d434d;
    border-color: rgba(255, 255, 255, .14);
    color: #f4f6f9;
}
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-label,
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-label,
html.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-label,
html.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-label,
.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-label,
.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-label {
    color: #aab2bf;
}
.dark-theme .mmlivesearch__result span.search_sel.all_products:hover,
.dark-theme .mmlivesearch__result span.search_sel.all_products.selected,
html.dark .mmlivesearch__result span.search_sel.all_products:hover,
html.dark .mmlivesearch__result span.search_sel.all_products.selected,
.dark .mmlivesearch__result span.search_sel.all_products:hover,
.dark .mmlivesearch__result span.search_sel.all_products.selected {
    background: #39404a;
    color: #ffffff;
    box-shadow: 0 -8px 18px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255,255,255,.06);
}


/* MT ui18: лёгкий hover-акцент для светлой темы и более читаемый производитель. */
.mmlivesearch__result span.search_sel:not(.all_products):hover,
.mmlivesearch__result span.search_sel:not(.all_products).selected {
    background: #f3f6fb;
    box-shadow: inset 3px 0 0 rgba(96, 130, 190, .24);
}
.mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
.mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand {
    background: #eef3fb;
    border-color: rgba(98, 129, 189, .22);
    color: #2f3744;
}
.mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-label,
.mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-label {
    color: #9098a6;
}
.mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-value,
.mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-value {
    color: #4f73b6;
}

/* В тёмной теме оставляем ui17-акцент сильнее: эти правила должны быть ниже светлых. */
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products):hover,
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products).selected,
html.dark .mmlivesearch__result span.search_sel:not(.all_products):hover,
html.dark .mmlivesearch__result span.search_sel:not(.all_products).selected,
.dark .mmlivesearch__result span.search_sel:not(.all_products):hover,
.dark .mmlivesearch__result span.search_sel:not(.all_products).selected {
    background: #343941;
    color: #ffffff;
    box-shadow: inset 3px 0 0 rgba(118, 158, 255, .42);
}
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
.dark-theme .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand,
html.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
html.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand,
.dark .mmlivesearch__result span.search_sel:not(.all_products):hover .mmls__meta-brand,
.dark .mmlivesearch__result span.search_sel:not(.all_products).selected .mmls__meta-brand {
    background: #3d434d;
    border-color: rgba(255, 255, 255, .14);
    color: #f4f6f9;
}
