/* ═══════════════════════════════════════════
   SiteHeader — десктоп
═══════════════════════════════════════════ */

.search-header {
    background: var(--main-light, #5FBD6F);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.search-header__menu {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 24px;
    margin: 0 auto;
    position: relative;
}

/* ── Лого ── */
.search-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* ── Поиск — занимает всё место между лого и иконками ── */
.search-header__search {
    flex: 1;
    min-width: 0;
    max-width: 640px;
}

/* На десктопе активный поиск не перекрывает шапку */
.search-header__search--active {
    position: static;
    padding: 0;
    background: transparent;
    max-width: none;
}

/* ── Иконки — корзина + профиль ── */
.search-header__icons {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

.search-header__icon-btn {
    display: flex;
    align-items: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.search-header__icon-btn img {
    opacity: 0.9;
    transition: opacity 0.15s ease;
    width: 28px;
    height: 28px;
}

.search-header__icon-btn:hover img {
    opacity: 1;
}

.search-header__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-header__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    border: 1.5px solid var(--main-light, #5FBD6F);
}

/* ── Строка поиска ── */
.mh-search {
    position: relative;
    width: 100%;
    z-index: 102;
}

.mh-search:not(.mh-search--active) .mh-search__input {
    pointer-events: none;
    cursor: default;
}

.mh-search__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mh-search--active .mh-search__bar {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: default;
}

.mh-search__icon {
    flex-shrink: 0;
}

.mh-search__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 14px;
    color: #ffffff;
    min-width: 0;
}

.mh-search__input::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

.mh-search__input[readonly] {
    cursor: pointer;
}

.mh-search__close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* ── Результаты поиска ── */
.mh-search__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
    z-index: 102;
    max-height: 480px;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.mh-search__section {
    padding: 8px 0 4px;
}

.mh-search__section-title {
    font-size: 11px;
    font-weight: 500;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 16px 4px;
}

.mh-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    border-top: 0.5px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.1s ease;
}

.mh-search__item:hover {
    background: #f7f7f5;
}

.mh-search__item-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.mh-search__item-sub {
    font-size: 11px;
    color: #aaa;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-search__item-name {
    font-size: 14px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mh-search__item-price {
    font-size: 13px;
    color: #2d6a4f;
    font-weight: 500;
    flex-shrink: 0;
}

.mh-search__loading {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mh-search__skeleton {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 6px;
}

.mh-search__skeleton--short {
    width: 60%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.mh-search__empty {
    padding: 20px 16px;
    font-size: 14px;
    color: #888;
    text-align: center;
}

.mh-search__show-all {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-top: 0.5px solid #f0f0f0;
    background: transparent;
    font-size: 14px;
    color: #2d6a4f;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.1s ease;
}

.mh-search__show-all:hover {
    background: #f7f7f5;
}

.mh-search__overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(0, 0, 0, 0.2);
}

.item__profile {
    display: block;
    height: 56px;
    width: 56px;
    background: rgba(25, 25, 25, 0.2);
    border-radius: 12px;
    padding: 17px 17px 23px 15px;
    box-sizing: border-box;
    position: relative;
}

.item__profile:hover,
.item__profile:hover {
    background: rgba(25, 25, 25, 0.3);
}
