/* Поиск: выпадашка Predictive Search и страница выдачи (inc/18-search.php) */

/* ---------- выпадашка ---------- */
.predictive_results {
    margin-top: 6px;
    border: 1px solid #e1e7ea !important;
    border-radius: 14px;
    background: #fff !important;
    box-shadow: 0 14px 36px rgba(16, 32, 44, .16);
}
.predictive_results ul li .ajax_search_content_title { display: none !important; }
.predictive_results ul li { font: 500 14px/1.3 Montserrat, Arial, sans-serif !important; }
.predictive_results ul li + li { border-top: 1px solid #eef2f4; }
.predictive_results ul li .ajax_search_content_title + * { border-top: 0; }

.predictive_results .ajax_search_content.smg-ps {
    float: none; width: 100%; max-height: none; overflow: visible; padding: 0 !important;
    background: #fff !important; color: inherit !important;
}
.predictive_results ul li a.smg-ps__item {
    display: flex; align-items: center; gap: 14px; padding: 8px 16px;
    color: #1d2a31 !important; text-decoration: none !important;
}
.predictive_results .smg-ps__img {
    flex: 0 0 60px; height: 76px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: #fff; overflow: hidden;
}
.predictive_results .smg-ps__img img {
    display: block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 100% !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; object-fit: contain;
}
.predictive_results .smg-ps__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.predictive_results ul li .smg-ps__name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font: 600 14px/1.3 Montserrat, Arial, sans-serif !important; color: #1d2a31 !important;
}
.predictive_results ul li .smg-ps__sku { font-size: 12px !important; color: #6b7a82 !important; }
.predictive_results ul li .smg-ps__price { font: 700 14px/1.2 Montserrat, Arial, sans-serif !important; color: #0095cb !important; }
.predictive_results ul li .smg-ps__price del { font-weight: 500; color: #8a979d !important; }

/* наведение и выбор стрелками: мягкая подсветка вместо синей заливки */
.predictive_results ul li.ac_over .ajax_search_content.smg-ps,
.predictive_results ul li .ajax_search_content.smg-ps:hover { background: #f0f8fc !important; }
.predictive_results ul li.ac_over a.smg-ps__item,
.predictive_results ul li.ac_over .smg-ps__name,
.predictive_results ul li a.smg-ps__item:hover,
.predictive_results ul li a.smg-ps__item:hover .smg-ps__name { color: #1d2a31 !important; }
.predictive_results ul li.ac_over .smg-ps__price { color: #0095cb !important; }

/* «Все результаты» */
.predictive_results ul li .more_result.smg-ps-more { float: none; width: 100%; padding: 0; background: #f6f9fb; text-align: left; }
.predictive_results ul li .more_result.smg-ps-more a {
    display: block; float: none; width: auto; margin: 0; padding: 13px 16px;
    font: 600 14px/1.3 Montserrat, Arial, sans-serif !important; color: #0095cb !important; text-decoration: none !important;
}
.predictive_results ul li.ac_over .more_result.smg-ps-more,
.predictive_results ul li .more_result.smg-ps-more:hover { background: #e8f4fa; }
.predictive_results ul li.ac_over .more_result.smg-ps-more a { color: #0095cb !important; }

/* красный крестик плагина налезает на первую строку; закрывается кликом мимо, на телефоне — кнопкой «Отмена» */
.predictive_results .ps_close { display: none !important; }

.predictive_results .ajax_no_result { padding: 14px 16px !important; font: 500 14px/1.3 Montserrat, Arial, sans-serif !important; color: #6b7a82 !important; }

@media (max-width: 767px) {
    .predictive_results ul li a.smg-ps__item { gap: 12px; padding: 9px 12px; }
    .predictive_results .smg-ps__img { flex-basis: 50px; height: 64px; }
    .predictive_results ul li .smg-ps__name { font-size: 13px !important; }
    .predictive_results ul li .more_result.smg-ps-more a { padding: 12px; }
}

/* ---------- страница выдачи ---------- */
.smg-search { display: flex; flex-direction: column; }
.smg-search h1.smg-search__title { margin: 0 0 16px; overflow-wrap: anywhere; }
.smg-search__form { display: flex; gap: 8px; max-width: 560px; margin: 0 0 14px; }
.smg-search__form input[type="search"] {
    flex: 1 1 auto; min-width: 0; height: 46px; margin: 0; padding: 0 16px !important;
    border: 1px solid #cfd8dd !important; border-radius: 12px !important; background: #fff !important; box-shadow: none !important;
    font: 500 15px/1.2 Montserrat, Arial, sans-serif; color: #1d2a31; -webkit-appearance: none; appearance: none;
}
.smg-search__form input[type="search"]:focus { border-color: #0095cb !important; outline: 0; box-shadow: 0 0 0 3px rgba(0, 149, 203, .16) !important; }
.smg-search__form button {
    flex: 0 0 auto; height: 46px; margin: 0; padding: 0 22px !important; border: 0 !important; border-radius: 12px !important;
    background: #0095cb !important; color: #fff !important; font: 700 15px/1 Montserrat, Arial, sans-serif !important; cursor: pointer;
}
.smg-search__form button:hover { background: #007ea8 !important; }
.smg-search p.smg-search__count { margin: 0 0 12px; font-size: 14px; color: #6b7a82; }
.smg-search .woocommerce-result-count { display: none !important; }
/* кнопка мобильных фильтров каталога — фильтров в выдаче нет */
.smg-search .mobile-filters, .smg-search .toggle-mobile-filters { display: none !important; }

.smg-search__empty { margin-top: 8px; padding: 24px; border: 1px solid #dcecf4; border-radius: 16px; background: #f4f9fc; }
.smg-search__empty p { margin: 0 0 12px; color: #4a5960; }
.smg-search__empty p.smg-search__empty-title { font: 700 17px/1.3 Montserrat, Arial, sans-serif; color: #1d2a31; }
.smg-search__links { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.smg-search__links a {
    display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid #bfe0ef; border-radius: 12px;
    background: #fff; color: #0095cb; font: 600 14px/1 Montserrat, Arial, sans-serif; text-decoration: none;
}
.smg-search__links a:hover { background: #e8f4fa; }

@media (max-width: 767px) {
    .smg-search__form { max-width: none; }
    .smg-search__form button { padding: 0 16px !important; }
    .smg-search__empty { padding: 18px 16px; }
}
