.istore-search-panel {
    width: 100%;
    max-height: min(720px, calc(100vh - 150px));
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 0 0 22px 22px;
    box-shadow: 0 18px 48px rgba(33, 37, 41, .14);
    color: #292d32;
    text-align: left;
}

.istore-search-panel__section { padding: 20px 28px 0; }
.istore-search-panel__section + .istore-search-panel__section {
    margin-top: 18px;
    border-top: 1px solid #eceeef;
}
.istore-search-panel__heading {
    margin-bottom: 10px;
    color: #70757c;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}
.istore-search-panel__suggestion,
.istore-search-panel__category,
.istore-search-panel__product,
.istore-search-panel__footer {
    color: #292d32;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease;
}
.istore-search-panel__suggestion:hover,
.istore-search-panel__category:hover,
.istore-search-panel__product:hover,
.istore-search-panel__footer:hover {
    background: #f5f6f7;
    color: #292d32;
}
.istore-search-panel__suggestion {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 12px;
    margin: 0 -12px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 15px;
}
.istore-search-panel__search-icon {
    flex: 0 0 16px;
    margin: 0;
    opacity: .46;
}
.istore-search-panel__category {
    display: grid;
    min-height: 68px;
    grid-template-columns: 72px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 14px;
    margin: 0 -28px;
    padding: 0 28px;
    border-top: 1px solid #eceeef;
}
.istore-search-panel__category:first-child,
.istore-search-panel__product:first-child { border-top: 0; }
.istore-search-panel__category-picture,
.istore-search-panel__product-picture {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}
.istore-search-panel__category-picture {
    width: 64px;
    height: 52px;
    border-radius: 9px;
}
.istore-search-panel__category-picture img,
.istore-search-panel__product-picture img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.istore-search-panel__category-name {
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
}
.istore-search-panel__arrow {
    width: 18px;
    margin: 0;
    opacity: .42;
    transform: rotate(180deg);
}
.istore-search-panel__products { padding-bottom: 4px; }
.istore-search-panel__product {
    display: grid;
    min-height: 86px;
    grid-template-columns: 76px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 -28px;
    padding: 0 28px;
    border-top: 1px solid #eceeef;
}
.istore-search-panel__product-picture {
    width: 68px;
    height: 68px;
    border-radius: 10px;
}
.istore-search-panel__product-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
}
.istore-search-panel__product-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.istore-search-panel__availability {
    color: #55a925;
    font-size: 12px;
    line-height: 1;
}
.istore-search-panel__availability--out { color: #92979d; }
.istore-search-panel__price {
    padding-left: 14px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.istore-search-panel__footer {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    border-top: 1px solid #e4e7e9;
    border-radius: 0 0 22px 22px;
    color: #666c73;
    font-size: 13px;
}
.istore-search-panel__key {
    padding: 3px 7px;
    border: 1px solid #cfd3d6;
    border-radius: 5px;
    background: #fff;
    color: #7a8086;
    font-size: 11px;
    line-height: 1;
}
.istore-search-panel__footer-arrow {
    width: 14px;
    margin: 0;
    opacity: .4;
    transform: rotate(180deg);
}

.istore-search-panel__capacities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 4px;
}
.istore-search-panel__capacity-chip {
    padding: 9px 16px;
    border: 1px solid #d8dbde;
    border-radius: 20px;
    background: #fff;
    color: #292d32;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease;
}
.istore-search-panel__capacity-chip:hover { background: #f5f6f7; border-color: #c3c7cb; }

@media (max-width: 767px) {
    .istore-search-panel { max-height: calc(100vh - 110px); border-radius: 0 0 16px 16px; }
    .istore-search-panel__section { padding: 16px 16px 0; }
    .istore-search-panel__section + .istore-search-panel__section { margin-top: 14px; }
    .istore-search-panel__category { grid-template-columns: 58px minmax(0, 1fr) 18px; gap: 10px; margin: 0 -16px; padding: 0 16px; }
    .istore-search-panel__category-picture { width: 52px; height: 46px; }
    .istore-search-panel__product { min-height: 78px; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 10px; margin: 0 -16px; padding: 0 16px; }
    .istore-search-panel__product-picture { width: 56px; height: 56px; }
    .istore-search-panel__price { padding-left: 4px; font-size: 13px; }
    .istore-search-panel__footer { min-height: 52px; margin-top: 14px; border-radius: 0 0 16px 16px; }
    .istore-search-panel__capacity-chip { padding: 10px 15px; font-size: 13px; }
}

/* История поиска (localStorage) — переиспользует стили .istore-search-panel__suggestion */
.istore-search-history__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.istore-search-history__clear {
    padding: 4px 0;
    border: 0;
    background: none;
    color: #8e9aa8;
    font-size: 13px;
    cursor: pointer;
}
.istore-search-history__clear:hover { color: #55606b; text-decoration: underline; }

.istore-search-history__item,
.istore-search-history__link {
    display: flex;
    align-items: center;
}
.istore-search-history__item {
    min-height: 42px;
    gap: 4px;
    margin: 0 -12px;
    padding: 0 4px 0 12px;
    border-radius: 10px;
    transition: background-color .18s ease;
}
.istore-search-history__item:hover { background: #f5f6f7; }
.istore-search-history__link {
    flex: 1 1 auto;
    min-width: 0;
    gap: 12px;
    padding: 0 8px 0 0;
    color: #292d32;
    font-size: 15px;
    text-decoration: none;
}
.istore-search-history__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.istore-search-history__remove {
    display: flex;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #9aa2ab;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.istore-search-history__remove:hover { background: #e7e9eb; color: #55606b; }

@media (max-width: 767px) {
    .istore-search-history__remove { flex-basis: 32px; width: 32px; height: 32px; }
}