/* Отключаем синюю рамку Bootstrap */
.header-search-input:focus, .search-input-wrapper input:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: #DEE2E3 !important;
}

/* ВАЖНО: position relative для привязки выпадающих списков */
.header-search-form { position: relative; }
.search-input-wrapper { position: relative; }
.search-settings { position: relative; } 

/* Выпадающий список области поиска */
.search-scope-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; /* Теперь выравнивается ровно по левой границе текста */
    width: 182px;
    padding: 4px;
    background: #FFFFFF;
    box-shadow: 0px 12px 20px -4px rgba(102, 102, 102, 0.10);
    border: 1px solid #F3F4F5;
    border-radius: 8px;
    z-index: 1000;
    flex-direction: column;
    gap: 2px;
}
.search-scope-dropdown .scope-item {
    padding: 8px 12px;
    border-radius: 4px;
    color: #292A2A;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    background: #fff;
}
.search-scope-dropdown .scope-item:hover { background: #F3F4F5; }
.search-scope-dropdown .scope-item.active { background: #F3F4F5; color: #00B1BA; }

/* Плавный поворот стрелки */
#search_scope_arrow { transition: transform 0.2s ease; }

/* Контейнер результатов поиска */
.header-search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 4px); /* Чуть ниже инпута */
    left: 0; /* Выравнивание по левому краю формы */
    width: 100%;
    max-width: 596px;
    padding: 4px;
    background: #FFFFFF;
    box-shadow: 0px 12px 20px -4px rgba(102, 102, 102, 0.10);
    border: 1px solid #F3F4F5;
    border-radius: 8px;
    z-index: 999;
    max-height: 500px;
    overflow-y: auto;
}


.header-search-suggestions {
    scrollbar-width: thin; 
    scrollbar-color: #767C80 #F3F4F5; 
}

.header-search-suggestions::-webkit-scrollbar {
    width: 4px !important;
    height: 4px !important;
    -webkit-appearance: none !important;
}
.header-search-suggestions::-webkit-scrollbar-track {
    background: #F3F4F5 !important;
    border-radius: 36px !important;
    margin: 4px 0 !important;
}
.header-search-suggestions::-webkit-scrollbar-thumb {
    background-color: #767C80 !important;
    border-radius: 36px !important;
    opacity: 0.7 !important;
}
.header-search-suggestions::-webkit-scrollbar-thumb:hover {
    background-color: #5d6166 !important; /* Чуть темнее при наведении */
}

.ss-divider { height: 1px; background: #F3F4F5; margin: 4px 0; }

/* Категории */
.search-suggest-section-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #292A2A;
    transition: background 0.2s;
}
.search-suggest-section-item:hover, .search-suggest-section-item.selected { background: #F3F4F5; }

.ss-sec-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ss-sec-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ss-sec-info { display: flex; flex-direction: column; gap: 2px; }
.ss-sec-title { font-size: 16px; font-weight: 500; color: #292A2A; }
.ss-sec-subtitle { font-size: 14px; font-weight: 400; color: #878D91; line-height: 18.9px; }

/* Товары */
.search-suggest-product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    text-decoration: none;
    color: #292A2A;
    transition: background 0.2s;
}
.search-suggest-product-item:hover, .search-suggest-product-item.selected { background: #F3F4F5; }

.ss-prod-img { width: 64px; height: 64px; background: #fff; border-radius: 4px; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.ss-prod-img img { max-width: 52px; max-height: 52px; object-fit: contain; }

.ss-prod-info { display: flex; flex-direction: column; gap: 4px; }
.ss-prod-title { font-size: 14px; font-weight: 500; line-height: 1.2; color: #292A2A; }
.ss-prod-prices { display: flex; align-items: baseline; gap: 8px; }
.ss-prod-price-current { color: #292A2A; font-size: 16px; font-weight: 600; line-height: 20.8px; }
.ss-prod-price-old { color: #878D91; font-size: 14px; font-weight: 400; text-decoration: line-through; }

.search-suggest-empty { padding: 20px; text-align: center; color: #878D91; font-size: 14px; }


/* Информация (Статьи/Новости) */
.search-suggest-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #292A2A;
    transition: background 0.2s;
}
.search-suggest-info-item:hover, .search-suggest-info-item.selected { background: #F3F4F5; }

.ss-info-icon { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ss-info-title { font-size: 14px; font-weight: 500; color: #292A2A; line-height: 1.2; }