.header {
    z-index: 1035;
    overflow: visible;
}

.header .top-header,
.header .top-header > .row,
.header .top-header [class*="col-"] {
    overflow: visible;
}

.store-search {
    position: relative;
    width: 100%;
    z-index: 1045;
}

.store-search__form {
    display: flex;
    align-items: center;
    min-height: 50px;
    background: #f7f7f8;
    border: 1px solid #e2e5e9;
    border-radius: 14px;
    box-shadow: none;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.store-search:focus-within .store-search__form {
    border-color: #cbd1d8;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .08);
}

.store-search__input {
    min-width: 0;
    flex: 1 1 auto;
    height: 48px;
    padding: 0 16px;
    color: #111827;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 14px;
}

.store-search__input::-webkit-search-cancel-button { display: none; }

.store-search__category {
    width: 170px;
    height: 30px;
    padding: 0 14px 0 30px;
    color: #4b5563;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7' d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
    border: 0;
    border-right: 1px solid #e5e7eb;
    outline: 0;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.store-search__clear,
.store-search__submit {
    flex: 0 0 auto;
    border: 0;
    display: inline-grid;
    place-items: center;
}

.store-search__clear {
    width: 30px;
    height: 30px;
    margin: 0 2px;
    color: #6b7280;
    background: transparent;
    border-radius: 50%;
}

.store-search__clear:hover { color: #c10b1b; background: #fff1f2; }

.store-search__submit {
    width: 42px;
    height: 42px;
    margin: 4px 4px 4px 5px;
    color: #fff;
    background: #c10b1b;
    border-radius: 11px;
    font-size: 18px;
    transition: transform .2s ease, background-color .2s ease;
}

.store-search__submit:hover { background: #9f0a17; transform: translateY(-1px); }

.store-search__panel {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    max-height: min(390px, 60vh);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .14);
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    z-index: 1040;
}

.store-search__state {
    padding: 20px 16px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
}

.store-search__item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) minmax(96px, auto);
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 8px 12px;
    color: #111827;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color .18s ease;
}

.store-search__item:hover,
.store-search__item.is-active { background: #fff7f7; }

.store-search__image {
    width: 54px;
    height: 54px;
    padding: 4px;
    object-fit: contain;
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 10px;
}

.store-search__item-title {
    display: block;
    max-width: 100%;
    margin-bottom: 3px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.store-search__item-category,
.store-search__stock {
    display: block;
    color: #64748b;
    font-size: 11px;
}

.store-search__stock--out { color: #b91c1c; }
.store-search__price { min-width: 96px; text-align: left; white-space: nowrap; }
.store-search__price strong { display: block; color: #c10b1b; font-size: 12px; font-weight: 900; }
.store-search__price del { display: block; margin-top: 4px; color: #9ca3af; font-size: 11px; }

.store-search__all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: sticky;
    bottom: 0;
    padding: 11px;
    color: #c10b1b;
    background: #fff8f8;
    border-top: 1px solid #f3e4e6;
    font-size: 13px;
    font-weight: 800;
}

.store-search__all:hover { color: #8f0714; }
.store-search__spinner { display: inline-block; animation: store-search-spin .8s linear infinite; }

@keyframes store-search-spin { to { transform: rotate(360deg); } }

.store-search--mobile .store-search__form { flex-wrap: wrap; }
.store-search--mobile .store-search__input { flex-basis: calc(100% - 96px); }
.store-search--mobile .store-search__category {
    order: 4;
    width: 100%;
    height: 42px;
    border-top: 1px solid #eef2f7;
    border-right: 0;
}
.store-search--mobile .store-search__panel { position: relative; top: 8px; }

@media (max-width: 1199.98px) {
    .store-search__category { width: 145px; }
}

@media (max-width: 575.98px) {
    .store-search__item { grid-template-columns: 48px minmax(0, 1fr); min-height: 66px; }
    .store-search__image { width: 48px; height: 48px; }
    .store-search__price { grid-column: 2; text-align: right; }
}
