.title-search-result {
    -webkit-box-shadow: 0px 16px 32px rgba(0, 0, 0, 0.08);
    box-shadow:         0px 16px 32px rgba(0, 0, 0, 0.08);
    height:             calc(100% - 220px);
    overflow-y:         auto;
    z-index:            111;
}

.search-title {
    align-items:           flex-start;
    background:            white;
    border-radius:         2px;
    -webkit-box-align:     start;
    -webkit-box-direction: normal;
    -webkit-box-orient:    vertical;
    -webkit-box-pack:      start;
    display:               -webkit-inline-box;
    display:               -ms-inline-flexbox;
    display:               inline-flex;
    -ms-flex-align:        start;
    -ms-flex-direction:    column;
    flex-direction:        column;
    -ms-flex-pack:         start;
    justify-content:       flex-start;
    overflow:              hidden;
    width:                 100%;
}

.search-title-title {
    color:          rgba(0, 0, 0, 0.24);
    font-family:    var(--inter);
    font-size:      14px;
    font-weight:    500;
    letter-spacing: 0.28px;
    line-height:    16px;
    padding:        32px 24px 20px;
    text-transform: uppercase;
    width:          100%;
    word-wrap:      break-word;
}

.hr_horizontal {
    border: 1.50px rgba(0, 0, 0, 0.08) solid;
    height: 0;
    margin: 0 24px;
    width:  calc(100% - 48px);
}

.mse2-ac-wrapper.ui-menu-item,
.mse2-ac-link.ui-menu-item-wrapper,
.mse2-ac-item {
    width: 100%;
}

.mse2-ac-wrapper {
    transition: background-color 0.2s ease;
}

.mse2-ac-wrapper:hover {
    background-color: #F4F4F4;
}

.mse2-ac-item {
    align-items:           stretch;
    -webkit-box-align:     stretch;
    -webkit-box-direction: normal;
    -webkit-box-orient:    horizontal;
    -webkit-box-pack:      justify;
    color:                 inherit;
    cursor:                pointer;
    display:               -webkit-inline-box;
    display:               -ms-inline-flexbox;
    display:               inline-flex;
    -ms-flex-align:        stretch;
    -ms-flex-direction:    row;
    flex-direction:        row;
    -ms-flex-pack:         justify;
    -ms-flex-wrap:         nowrap;
    flex-wrap:             nowrap;
    gap:                   16px;
    justify-content:       space-between;
    padding:               16px 24px;
    text-decoration:       none;
}

.mse2-ac-item:hover {
    background: #F4F4F4;
}

.mse2-ac-item-img {
    align-items:     center;
    background:      #f8f8f8;
    border-radius:   2px;
    display:         flex;
    flex-shrink:     0;
    height:          56px;
    justify-content: center;
    object-fit:      contain;
    width:           56px;
}

.mse2-ac-item-img img {
    max-height: 100%;
    max-width:  100%;
    object-fit: contain;
}

.mse2-ac-item-title {
    align-items:           flex-start;
    -webkit-box-align:     start;
    -webkit-box-direction: normal;
    -webkit-box-orient:    vertical;
    -webkit-box-pack:      center;
    display:               -webkit-inline-box;
    display:               -ms-inline-flexbox;
    display:               inline-flex;
    flex:                  1;
    -ms-flex-align:        start;
    -ms-flex-direction:    column;
    flex-direction:        column;
    -ms-flex-pack:         center;
    gap:                   4px;
    justify-content:       center;
    margin:                0 auto 0 0;
    min-width:             0;
}

.mse2-ac-item-title-name {
    align-self:          stretch;
    -webkit-box-orient:  vertical;
    color:               black;
    display:             -webkit-box;
    -ms-flex-item-align: stretch;
    font-family:         var(--inter);
    font-size:           16px;
    font-weight:         400;
    -ms-grid-row-align:  stretch;
    -webkit-line-clamp:  2;
    line-height:         24px;
    overflow:            hidden;
    text-overflow:       ellipsis;
    word-wrap:           break-word;
}

.mse2-ac-item-title-name strong {
    background:  none !important;
    /*color:       #0066cc !important;*/
    font-weight: 600 !important;
}

.mse2-ac-item-title-count {
    align-self:          stretch;
    color:               rgba(0, 0, 0, 0.24);
    -ms-flex-item-align: stretch;
    font-family:         var(--inter);
    font-size:           14px;
    font-weight:         500;
    -ms-grid-row-align:  stretch;
    letter-spacing:      0.28px;
    line-height:         16px;
    text-transform:      uppercase;
    word-wrap:           break-word;
}

.mse2-ac-item-title-count.price {
    /*color:       #e30613;*/
    font-weight: 600;
}

.mse2-ac-item-go_arrow {
    align-self:  center;
    flex-shrink: 0;
    height:      16px;
    opacity:     0.6;
    transition:  opacity 0.2s;
    width:       16px;
}

.mse2-ac-item:hover .mse2-ac-item-go_arrow {
    opacity: 1;
}

/* Стили для информации о совпадениях */
.mse2-ac-item-match-info {
    align-self:         stretch;
    -webkit-box-orient: vertical;
    color:              #666;
    display:            -webkit-box;
    font-family:        var(--inter);
    font-size:          12px;
    -webkit-line-clamp: 2;
    line-height:        1.3;
    margin-top:         4px;
    max-height:         2.6em;
    overflow:           hidden;
    text-overflow:      ellipsis;
}

.mse2-ac-item-match-info .match-field {
    color:        #555;
    font-weight:  600;
    margin-right: 4px;
}

.mse2-ac-item-match-info .match-text {
    color: #333;
}

.mse2-ac-item-match-info .match-text strong,
.mse2-ac-item-match-info strong {
    background:  none !important;
    /*color:       #0066cc !important;*/
    font-weight: 600 !important;
}

/* Специальные стили для разных полей */
.mse2-ac-item-match-info-traits .match-field {
    /*color: #27ae60;*/
}

.mse2-ac-item-match-info-article .match-field {
    /*color: #e74c3c;*/
}

.mse2-ac-item-match-info-description .match-field {
    /*color: #3498db;*/
}

.search-all {
    padding: 16px 24px 24px;
    width:   100%;
}

.search-all .search-all-link {
    align-items:           center;
    background:            white;
    border:                1.50px rgba(0, 0, 0, 0.12) solid;
    border-radius:         2px;
    -webkit-box-align:     center;
    -webkit-box-direction: normal;
    -webkit-box-orient:    horizontal;
    -webkit-box-pack:      center;
    display:               -webkit-inline-box;
    display:               -ms-inline-flexbox;
    display:               inline-flex;
    -ms-flex-align:        center;
    -ms-flex-direction:    row;
    flex-direction:        row;
    -ms-flex-pack:         center;
    gap:                   12px;
    justify-content:       center;
    padding:               22px 24px;
    transition:            all 0.2s ease;
    width:                 100%;
}

.search-all .search-all-link:hover {
    background:   #f0f8ff;
    border-color: #0066cc;
}

.search-all .search-all-link-name {
    color:       black;
    font-family: Oswald;
    font-size:   20px;
    font-weight: 400;
    line-height: 28px;
    transition:  color 0.2s;
    word-wrap:   break-word;
}

.search-all:hover .search-all-link-name {
    color: #0066cc;
}

.search-all img {
    filter:     brightness(0) saturate(100%);
    height:     24px;
    transition: transform 0.2s;
    width:      24px;
}

.search-all:hover img {
    transform: translateX(4px);
}

/* Информация о времени выполнения и кеше */
.search-execution-time,
.search-cache-notice {
    border-top:     1px dashed rgba(0, 0, 0, 0.08);
    font-family:    var(--inter);
    font-size:      11px;
    font-style:     italic;
    letter-spacing: 0.11px;
    line-height:    13px;
    margin-left:    24px;
    margin-right:   24px;
    margin-top:     5px;
    padding:        5px 24px 12px;
    text-align:     center;
    width:          calc(100% - 48px);
}

.search-execution-time {
    color: #27ae60;
}

.search-cache-notice {
    color: #f39c12;
}

/* Сообщения об ошибках и отсутствии результатов */
.no-results-message {
    color:       rgba(0, 0, 0, 0.5);
    font-family: var(--inter);
    font-size:   16px;
    font-style:  italic;
    line-height: 24px;
    padding:     40px 24px;
    text-align:  center;
}

.error-message {
    color:       #e74c3c;
    font-family: var(--inter);
    font-size:   16px;
    font-weight: 500;
    line-height: 24px;
    padding:     40px 24px;
    text-align:  center;
}

/* Адаптивные стили */
.mobile.search_form-button.h4,
.search_button.mobile {
    display: none;
}

@media (max-width: 992px) {
    .search_form {
        background-color: #F4F4F4;
        display:          none;
        height:           68px;
        left:             0;
        position:         fixed;
        top:              0;
        width:            100%;
        z-index:          9999;
    }

    .search_form:before {
        background-color: #fff;
        content:          "";
        height:           calc(100vh - 68px);
        left:             0;
        position:         absolute;
        top:              68px;
        width:            100%;
    }

    .search_form.active_search {
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
    }

    .search_form-button.h4,
    .search_form-icon {
        display: none;
    }

    .mobile.search_form-button.h4 {
        align-content: center;
        display:       block;
        padding:       16px 22px;
        position:      relative;
    }

    .mobile.search_form-button.h4:before {
        background-color: rgba(0, 0, 0, 0.08);
        content:          "";
        height:           calc(100% - 20px);
        position:         absolute;
        right:            0;
        top:              10px;
        width:            2px;
    }

    .search_form-input,
    .search_form-input:hover,
    .search_form-input:focus,
    .search_form-input:focus-visible {
        background:  transparent;
        border:      unset;
        color:       black;
        display:     block;
        font-family: var(--inter);
        font-size:   16px;
        height:      100%;
        max-width:   calc(100% - 136px);
        outline:     none;
        padding:     24px 16px;
        width:       100%;
    }

    .search_form-input::placeholder {
        color: rgba(0, 0, 0, 0.4);
    }

    .search_button.mobile {
        align-content:      center;
        background:         transparent;
        border:             none;
        cursor:             pointer;
        display:            block;
        -ms-flex-line-pack: center;
        height:             68px;
        padding:            16px 22px;
        width:              68px;
    }

    .search_button.mobile svg,
    .search_button.mobile img {
        height: 24px;
        width:  24px;
    }

    .title-search-result .search-title {
        border-radius: 0;
        max-height:    calc(100vh - 68px);
        overflow-y:    auto;
    }

    .mse2-ac-item {
        padding: 12px 16px;
    }

    .mse2-ac-item-img {
        height: 48px;
        width:  48px;
    }

    .mse2-ac-item-title-name {
        font-size:   15px;
        line-height: 22px;
    }

    .mse2-ac-item-title-count {
        font-size:   13px;
        line-height: 15px;
    }

    .search-all {
        padding: 12px 16px 16px;
    }

    .search-all .search-all-link {
        padding: 18px 20px;
    }

    .search-all .search-all-link-name {
        font-size:   18px;
        line-height: 24px;
    }

    .search-execution-time,
    .search-cache-notice {
        font-size:    10px;
        margin-left:  16px;
        margin-right: 16px;
        padding:      5px 16px 10px;
        width:        calc(100% - 32px);
    }
}

@media (max-width: 360px) {
    .mobile.search_form-button.h4,
    .search_form-input,
    .search_form-input:hover,
    .search_form-input:focus,
    .search_form-input:focus-visible,
    .search_button.mobile {
        padding: 12px 18px;
    }

    .search_form-input {
        max-width: calc(100% - 124px);
        padding:   24px 12px;
    }

    .mse2-ac-item {
        gap:     12px;
        padding: 10px 12px;
    }

    .mse2-ac-item-img {
        height: 40px;
        width:  40px;
    }

    .mse2-ac-item-title-name {
        font-size:   14px;
        line-height: 20px;
    }

    .search-all {
        padding: 10px 12px 14px;
    }

    .search-all .search-all-link {
        padding: 14px 16px;
    }

    .search-all .search-all-link-name {
        font-size:   16px;
        line-height: 22px;
    }
}

/* Стили для живого поиска */
.search_results_container {
    background:    white;
    border:        1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0 0 2px 2px;
    border-top:    none;
    box-shadow:    0px 16px 32px rgba(0, 0, 0, 0.08);
    display:       none;
    left:          0;
    max-height:    70vh;
    overflow-y:    auto;
    position:      absolute;
    right:         0;
    top:           100%;
    z-index:       1001;
}

.search-loader {
    align-items:     center;
    background:      white;
    border:          1px solid rgba(0, 0, 0, 0.12);
    border-radius:   0 0 2px 2px;
    border-top:      none;
    display:         none;
    gap:             15px;
    justify-content: center;
    left:            0;
    padding:         20px;
    position:        absolute;
    right:           0;
    top:             100%;
    z-index:         1002;
}

.loader-spinner {
    animation:        spin 1s linear infinite;
    border:           3px solid rgba(0, 0, 0, 0.1);
    border-radius:    50%;
    border-top-color: #0066cc;
    height:           24px;
    width:            24px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Мобильные стили для поиска */
@media (max-width: 992px) {
    .search_results_container {
        border:        none;
        border-radius: 0;
        border-top:    1px solid rgba(0, 0, 0, 0.12);
        bottom:        0;
        box-shadow:    none;
        height:        calc(100vh - 68px);
        left:          0;
        max-height:    none;
        position:      fixed;
        right:         0;
        top:           68px;
        z-index:       10000;
    }

    .search-loader {
        align-items:   flex-start;
        background:    rgba(255, 255, 255, 0.98);
        border:        none;
        border-radius: 0;
        bottom:        0;
        display:       none;
        left:          0;
        padding-top:   50px;
        position:      fixed;
        right:         0;
        top:           68px;
        z-index:       10001;
    }

    .search_form.active_search ~ .search_results_container,
    .search_form.active_search ~ .search-loader {
        display: block !important;
    }

    .loader-spinner {
        border-top-color: #0066cc;
    }
}

/* Анимация появления результатов */
.search_results_container {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity:   0;
        transform: translateY(-8px);
    }
    to {
        opacity:   1;
        transform: translateY(0);
    }
}

/* Стили для пустого изображения */
.mse2-ac-item-img[src*="empty.png"],
.mse2-ac-item-img:not([src]),
.mse2-ac-item-img[src=""],
.mse2-ac-item-img[src="#"] {
    align-items:     center;
    background:      linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    border:          1px dashed rgba(0, 0, 0, 0.1);
    display:         flex;
    justify-content: center;
    position:        relative;
}

.mse2-ac-item-img[src*="empty.png"]::before,
.mse2-ac-item-img:not([src])::before,
.mse2-ac-item-img[src=""]::before,
.mse2-ac-item-img[src="#"]::before {
    color:       rgba(0, 0, 0, 0.2);
    content:     "?";
    font-family: var(--inter);
    font-size:   14px;
    font-weight: 600;
}

/* Плавные переходы для всех интерактивных элементов */
.mse2-ac-item,
.search-all .search-all-link,
.mse2-ac-item-go_arrow,
.mse2-ac-item-img {
    transition: all 0.2s ease;
}

/* Улучшенная доступность для фокуса */
.mse2-ac-link.ui-menu-item-wrapper:focus,
.mse2-ac-link.ui-menu-item-wrapper:focus-visible {
    outline:        2px solid #0066cc;
    outline-offset: -2px;
}

/* Стили для скроллбара */
.title-search-result::-webkit-scrollbar,
.search_results_container::-webkit-scrollbar {
    width: 6px;
}

.title-search-result::-webkit-scrollbar-track,
.search_results_container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.title-search-result::-webkit-scrollbar-thumb,
.search_results_container::-webkit-scrollbar-thumb {
    background:    #c1c1c1;
    border-radius: 3px;
}

.title-search-result::-webkit-scrollbar-thumb:hover,
.search_results_container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Стили для подсветки активного элемента */
.mse2-ac-wrapper.ui-menu-item.ui-state-focus,
.mse2-ac-wrapper.ui-menu-item.ui-state-active {
    background-color: #f0f8ff;
}

.mse2-ac-wrapper.ui-menu-item.ui-state-focus .mse2-ac-item-title-name,
.mse2-ac-wrapper.ui-menu-item.ui-state-active .mse2-ac-item-title-name {
    color: #0066cc;
}