/* Живой поиск: поле под шапкой + список подсказок */
.ssearch {
    position: fixed;
    top: 96px;
    right: 48px;
    z-index: 90;
    width: min(430px, calc(100vw - 40px));
    background: #fdfcf8;
    border: 1px solid rgba(21, 21, 21, .28);
    /* объём без скруглений: глубокая многослойная тень, блик сверху,
       внутренняя волосяная рамка; гигантский spread затемняет страницу */
    box-shadow: inset 0 0 0 1px rgba(253, 252, 248, .9),
      inset 0 2px 0 rgba(255, 255, 255, .95),
      0 70px 130px -20px rgba(0, 0, 0, .62),
      0 20px 44px rgba(0, 0, 0, .3),
      0 0 0 3000px rgba(12, 12, 12, .38);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .3s, transform .3s, visibility .3s;
}

.ssearch.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ssearch__row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 6px 12px 6px 18px;
    border-bottom: 1px solid rgba(21, 21, 21, .1);
}

.ssearch__row svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: rgba(21, 21, 21, .5);
}

.ssearch__in {
    flex: 1;
    border: 0;
    background: none;
    padding: 14px 0;
    min-height: 52px;
    font: 500 .95rem 'Manrope', sans-serif;
    color: #151515;
    outline: none;
}

.ssearch__in::placeholder {
    color: rgba(21, 21, 21, .4);
}

.ssearch__x {
    flex: none;
    width: 52px;
    height: 52px;
    border: 0;
    background: none;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: rgba(21, 21, 21, .5);
    transition: color .25s;
}

.ssearch__x:hover {
    color: #151515;
}

.ssearch__list {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
}

.ssearch__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 18px;
    text-decoration: none;
    color: #151515;
    transition: background .25s;
}

.ssearch__item:hover {
    background: rgba(21, 21, 21, .05);
}

.ssearch__ph {
    width: 46px;
    height: 56px;
    flex: none;
    overflow: hidden;
    background: #eceae4;
}

.ssearch__ph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ssearch__meta {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

/* название переносится максимум в две строки, дальше — многоточие */
.ssearch__name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ssearch__cat {
    margin-top: 4px;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(21, 21, 21, .5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ssearch__price {
    margin-left: auto;
    flex: none;
    font-size: .78rem;
    font-weight: 700;
    color: rgba(21, 21, 21, .65);
    white-space: nowrap;
}

/* пустой список не рисует лишнюю полосу под строкой ввода */
.ssearch__list:empty {
    display: none;
}

/* когда в списке только «пусто» — убираем внутренние поля списка, чтобы не было светлых полос */
.ssearch__list:has(> .ssearch__empty) {
    padding: 0;
}

.ssearch__empty {
    padding: 26px 18px;
    background: #171717;
    text-align: center;
    font-family: 'Manrope', sans-serif;
    font-size: .88rem;
    font-weight: 500;
    color: #f4f1ea;
    animation: sEmptyDrop .45s cubic-bezier(.2, .7, .2, 1) both;
}

.ssearch__empty span {
    display: inline-block;
    animation: sEmptyTxt .3s .22s ease both;
}

/* плашка разворачивается сверху вниз, текст проявляется следом */
@keyframes sEmptyDrop {
    from { clip-path: inset(0 0 100% 0); }
    to { clip-path: inset(0 0 0 0); }
}

@keyframes sEmptyTxt {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
    .ssearch {
        top: 84px;
        right: 20px;
        left: 20px;
        width: auto;
    }
}
