.bsa-panel {
    --bsa-accent: #111827;
    --bsa-sale: #dc2626;
    --bsa-radius: 8px;
    --bsa-width: 820px;
    --bsa-surface: #fff;
    --bsa-text: #1f2937;
    --bsa-muted: #6b7280;
    --bsa-border: #e5e7eb;
    --bsa-divider: #f0f0f1;
    --bsa-hover: #f4f4f5;
    --bsa-side: #fafafa;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bsa-border);
    border-radius: var(--bsa-radius);
    background: var(--bsa-surface);
    box-shadow: 0 16px 40px rgb(0 0 0 / 14%);
    color: var(--bsa-text);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    animation: bsa-fade-in 120ms ease-out;
}

.bsa-panel[hidden] {
    display: none !important;
}

.bsa-panel *,
.bsa-panel *::before,
.bsa-panel *::after {
    box-sizing: border-box;
}

.bsa-panel p {
    margin: 0;
}

.bsa-panel a,
.bsa-panel a:visited,
.bsa-panel a:hover,
.bsa-panel a:focus,
.bsa-panel a:active {
    color: var(--bsa-text);
    text-decoration: none;
}

.bsa-panel__scroll {
    max-height: 72vh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transition: opacity 150ms ease;
}

.bsa-panel__scroll.is-loading {
    opacity: .6;
}

.bsa-group__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px 6px;
    color: var(--bsa-muted);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}

.bsa-product {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
}

.bsa-product__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border-radius: var(--bsa-radius);
    background: var(--bsa-hover);
}

.bsa-product__image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.bsa-product__info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bsa-product__name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.bsa-match,
.bsa-strong {
    font-weight: 700;
}

.bsa-product__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin-top: 3px;
    color: var(--bsa-muted);
    font-size: 12px;
    line-height: 1.3;
}

.bsa-product__stock {
    color: var(--bsa-sale);
}

.bsa-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--bsa-text);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.bsa-price__final {
    font-size: 17px;
    line-height: 1.1;
}

.bsa-price--sale .bsa-price__final {
    color: var(--bsa-sale);
}

.bsa-price__from {
    margin-right: 4px;
    color: var(--bsa-muted);
    font-size: 12px;
    font-weight: 400;
}

.bsa-price__decimals {
    position: relative;
    top: -.4em;
    margin-left: 1px;
    font-size: .62em;
    font-weight: 600;
}

.bsa-price__old {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 4px;
    color: var(--bsa-muted);
    font-size: 12px;
    font-weight: 400;
}

.bsa-badge {
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--bsa-sale);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.bsa-panel .bsa-all,
.bsa-panel .bsa-all:visited,
.bsa-panel .bsa-all:hover {
    display: block;
    margin: 6px 16px 12px;
    padding: 10px 12px;
    border: 1px solid var(--bsa-border);
    border-radius: var(--bsa-radius);
    color: var(--bsa-accent);
    font-weight: 600;
    text-align: center;
}

.bsa-all__count {
    font-weight: 600;
}

.bsa-panel .bsa-all.is-active {
    border-color: var(--bsa-accent);
    background: var(--bsa-hover);
}

.bsa-row {
    display: block;
    padding: 8px 16px;
    line-height: 1.3;
    cursor: pointer;
}

.bsa-row__subtitle {
    display: block;
    margin-top: 1px;
    color: var(--bsa-muted);
    font-size: 12px;
}

.bsa-row--recent .bsa-row__title,
.bsa-row--popular .bsa-row__title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bsa-row__icon {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    color: var(--bsa-muted);
}

.bsa-row--instead {
    color: var(--bsa-muted);
    font-size: 13px;
}

.bsa-product.is-active,
.bsa-row.is-active {
    background: var(--bsa-hover);
}

.bsa-side {
    padding-bottom: 8px;
    border-top: 1px solid var(--bsa-divider);
}

.bsa-columns--single .bsa-side {
    border-top: 0;
}

.bsa-columns:not(.bsa-columns--single) .bsa-group--products {
    padding-bottom: 2px;
}

.bsa-panel .bsa-clear,
.bsa-panel .bsa-clear:hover,
.bsa-panel .bsa-clear:focus {
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--bsa-muted);
    font: inherit;
    font-weight: 500;
    line-height: inherit;
    text-decoration: underline;
    text-transform: none;
    cursor: pointer;
    appearance: none;
}

.bsa-notice,
.bsa-empty {
    padding: 16px 16px 4px;
    font-size: 14px;
}

.bsa-notice__title,
.bsa-empty__title {
    color: var(--bsa-text);
}

.bsa-empty {
    padding-bottom: 12px;
    color: #4b5563;
}

.bsa-empty__title {
    margin-bottom: 4px;
    font-weight: 600;
}

.bsa-skeleton {
    padding: 8px 0;
}

.bsa-skeleton__row {
    display: grid;
    grid-template-columns: 56px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
}

.bsa-skeleton__image,
.bsa-skeleton__line {
    display: block;
    border-radius: var(--bsa-radius);
    background: #f1f1f2;
    animation: bsa-pulse 1.2s ease-in-out infinite;
}

.bsa-skeleton__image {
    width: 56px;
    height: 56px;
}

.bsa-skeleton__lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bsa-skeleton__line {
    width: 70%;
    height: 12px;
    border-radius: 4px;
}

.bsa-skeleton__line--short {
    width: 35%;
}

.bsa-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (min-width: 768px) {
    .bsa-columns {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 230px;
    }

    .bsa-side {
        border-top: 0;
        border-left: 1px solid var(--bsa-divider);
        background: var(--bsa-side);
    }

    .bsa-columns--single {
        display: block;
    }

    .bsa-columns--single .bsa-side {
        border-left: 0;
        background: transparent;
    }

    .bsa-columns--single .bsa-group--products + .bsa-side {
        border-top: 1px solid var(--bsa-divider);
    }
}

@media (max-width: 767px) {
    .bsa-panel {
        font-size: 15px;
    }

    .bsa-product,
    .bsa-row {
        min-height: 44px;
    }
}

.bsa-form {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
}

.bsa-form__field {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
}

.bsa-form__input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.bsa-form__button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.bsa-form__kbd {
    position: absolute;
    top: 50%;
    right: 12px;
    padding: 0 5px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #111827;
    font: 12px/1.6 ui-sans-serif, system-ui, sans-serif;
    pointer-events: none;
    transform: translateY(-50%);
}

.bsa-form__kbd[hidden],
.bsa-form__input:focus ~ .bsa-form__kbd,
.bsa-form__input:not(:placeholder-shown) ~ .bsa-form__kbd {
    display: none;
}

@media (max-width: 1023px) {
    .bsa-form__kbd {
        display: none;
    }
}

@keyframes bsa-fade-in {
    from {
        opacity: 0;
    }
}

@keyframes bsa-pulse {
    50% {
        opacity: .5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bsa-panel,
    .bsa-skeleton__image,
    .bsa-skeleton__line {
        animation: none;
    }

    .bsa-panel__scroll {
        transition: none;
    }
}
