/* ===== Основной контейнер ===== */
.bx-searchtitle {
    margin: 10px 0 0;
    position: relative;
    width: 100%;
}
.bx-searchtitle .bx-input-group {
    position: relative;
    display: table;
    border-collapse: separate;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
}
.bx-searchtitle .bx-input-group .bx-form-control {
    display: table-cell;
    position: relative;
    z-index: 2;
    float: left;
    width: 100%;
    height: 45px;
    padding: 6px 15px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #f8fafc;
    border: 1px solid #d5dadc;
    border-right: none;
    border-radius: 2px 0 0 2px;
    outline: none;
    box-shadow: none !important;
    -webkit-transition: border-color ease-in-out .15s;
    transition: border-color ease-in-out .15s;
}
.bx-searchtitle .bx-input-group-btn {
    position: relative;
    font-size: 0;
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
    display: table-cell;
}
.bx-searchtitle .bx-input-group-btn button {
    position: relative;
    border: none;
    background: #95a1a8;
    display: inline-block;
    margin-bottom: 0;
    cursor: pointer;
    padding: 11px 16px;
    border-radius: 0 2px 2px 0;
    color: #fff;
    font-size: 18px;
    line-height: 1.42857143;
    -webkit-transition: all .3s ease;
    -moz-transition: all .3s ease;
    -ms-transition: all .3s ease;
    -o-transition: all .3s ease;
    transition: all .3s ease;
    height: 45px;
}
.bx-searchtitle .bx-input-group-btn button:hover {
    background: #1484CE;
}

/* ===== Попап поиска ===== */
div.search-popup {
	border: none !important;
}
.title-search-result {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    padding: 0;
    margin-top: -1px;
    display: none;
}

/* ===== Табы ===== */
.search-tabs {
	padding: 6px 12px;
    border-bottom: 0;
    background: #fff;
    border-radius: 4px 4px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}
.search-tabs-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex-wrap: wrap;
}
.search-tab {
	cursor: pointer;
	padding: 0px 12px;
    margin-right: 6px;
    margin-bottom: 0;
    transition: all 0.2s ease;
    border: 1px solid #c8a859;
    border-radius: 4px;
}
.search-tab a {
    color: #6c757d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.search-tab:hover a {
    color: #495057;
}
.search-tab.active {
    background: #c8a859;
}
.search-tab.active a {
    color: #fff;
}

/* ===== Результаты ===== */
.search-results {
    padding: 4px 12px 12px 12px;
}
.search-category-group {
	padding-top: 8px;
    border-bottom: 1px solid #dedede;
}
.search-category-group:last-child {
    margin-bottom: 0;
}
.search-category-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
	text-transform: uppercase;
	padding-bottom: 12px;
}
.search-items-list {
	list-style: none;
	padding-bottom: 8px;
    margin: 0;
}
.search-item {
	padding-bottom: 4px;
    border-bottom: 0;
}
.search-item:last-child {
    border-bottom: none;
}
.search-item-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 10px;
    padding: 0;
}
.search-item-link:hover {
	color: #c8a859;
}
.search-item-link:hover .search-item-name {
	color: #c8a859;
}
.search-item-image {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}
.search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}
.search-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.search-item-name {
    font-size: 14px;
    color: #333;
    font-weight: 400;
}
.search-item-specialty {
    font-size: 12px;
    color: #6c757d;
    padding-left: 0;
    display: block;
}
.search-item-price {
    font-size: 13px;
    font-weight: 600;
    color: #28a745;
    margin-top: 1px;
}

/* ===== Показать все результаты ===== */
.search-show-all {
    text-align: center;
	margin-top: 0;
    padding: 6px 12px;
    border-top: 0;
}
.search-show-all a {
	font-size: 14px;
    font-weight: 600;
    color: #c8a859;
    text-decoration: none;
}
.search-show-all a:hover {
    text-decoration: underline;
}

/* ===== Скрытие групп при переключении ===== */
.search-category-group[data-category] {
    display: block;
}

/* ===== Скролл ===== */
.title-search-result::-webkit-scrollbar {
    width: 4px;
}
.title-search-result::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
.title-search-result::-webkit-scrollbar-thumb {
    background: #c1c7cd;
    border-radius: 4px;
}
.title-search-result::-webkit-scrollbar-thumb:hover {
    background: #a8aeb4;
}

/* ===== Адаптив ===== */
@media (max-width: 576px) {
    .title-search-result {
        max-height: 400px;
    }
    .search-tab {
        padding: 4px 8px;
    }
    .search-tab a {
        font-size: 12px;
    }
    .search-item-name {
        font-size: 13px;
    }
    .search-category-title {
        font-size: 13px;
    }
}

/* ===== Дополнительные стили для поля поиска ===== */

/* Скрываем стандартную кнопку поиска */
.bx-searchtitle .bx-input-group-btn {
    display: none !important;
}

/* Перестраиваем контейнер поля */
.bx-searchtitle .bx-input-group {
    display: flex;
    align-items: center;
    background: #fff;
	border: 1px solid #c8a859;
    border-radius: 4px;
    padding: 0 16px;
    transition: border-color 0.3s ease;
}

.bx-searchtitle .bx-input-group:focus-within {
    border-color: #c8a859;
}

/* Иконка поиска слева */
.bx-searchtitle .bx-input-group .search-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: #999;
}

.bx-searchtitle .bx-input-group .search-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #999;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Поле ввода */
.bx-searchtitle .bx-input-group .bx-form-control {
    flex: 1;
    height: 50px;
    padding: 0;
    font-size: 15px;
    color: #333;
    background: transparent;
    border: none !important;
    border-radius: 0 !important;
    outline: none;
    box-shadow: none !important;
}

.bx-searchtitle .bx-input-group .bx-form-control::placeholder {
    color: #aaa;
}

/* Кнопка очистки (крестик) */
.bx-searchtitle .bx-input-group .search-clear {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
}

.bx-searchtitle .bx-input-group .search-clear:hover {
    color: #333;
}

.bx-searchtitle .bx-input-group .search-clear.visible {
    display: flex;
}