.rrp-search-container,
.catalog-search-container,
.sticky-search-wrapper {
    isolation: isolate;
}

.rrp-search-focus-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(249, 249, 249, 0.08);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1200;
}

.rrp-search-focus-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.catalog-search-container {
    pointer-events: auto;
}

.sticky-search-wrapper {
    position: relative;
}

.rrp-search-host-active {
    position: relative;
    z-index: 1301;
}

.rrp-search-surface-active {
    position: relative;
    z-index: 1302;
}

.rrp-search-results {
    position: absolute;
    top: calc(100% + 8px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    max-height: min(420px, 62vh);
    overflow-y: auto;
    z-index: 1303;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.rrp-search-container .rrp-search-results,
.sticky-search-wrapper .rrp-search-results {
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-10px);
}

.catalog-search-container .rrp-search-results {
    left: 50%;
    width: min(100%, 550px);
    transform: translate(-50%, -10px);
}

.rrp-search-container .rrp-search-results.active,
.sticky-search-wrapper .rrp-search-results.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.catalog-search-container .rrp-search-results.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.rrp-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    text-decoration: none;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
}

.rrp-result-item:last-of-type {
    border-bottom: none;
}

@media (hover: hover) {
    .rrp-result-item:hover,
    .rrp-search-view-all:hover {
        background: rgba(0, 0, 0, 0.03);
    }
}

.rrp-result-image {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
}

.rrp-result-info {
    min-width: 0;
    flex: 1;
}

.rrp-result-name {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main, #202322);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.rrp-result-name mark {
    background: rgba(228, 200, 196, 0.45);
    color: inherit;
    border-radius: 4px;
    padding: 0 2px;
}

.rrp-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--text-muted, #666);
    font-size: 11px;
}

.rrp-result-category,
.rrp-result-brand,
.rrp-result-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    line-height: 1;
}

.rrp-result-badge {
    background: rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.rrp-result-arrow {
    width: 18px;
    height: 18px;
    color: var(--text-muted, #666);
    flex-shrink: 0;
}

.rrp-result-arrow svg {
    width: 100%;
    height: 100%;
}

.rrp-search-status {
    display: grid;
    gap: 10px;
    justify-items: center;
    padding: 22px 18px;
    color: var(--text-muted, #666);
    text-align: center;
}

.rrp-search-status svg {
    width: 26px;
    height: 26px;
}

.rrp-search-status p {
    margin: 0;
    line-height: 1.45;
}

.rrp-search-view-all {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
    font: inherit;
    font-weight: 600;
    color: var(--text-main, #202322);
    cursor: pointer;
    transition: background 0.2s ease;
}

.rrp-search-view-all svg {
    flex-shrink: 0;
}

.rrp-search-loading {
    padding: 18px 18px 20px;
}

@media (max-width: 768px) {
    .rrp-search-results {
        max-height: min(360px, 52vh);
    }

    .rrp-search-focus-backdrop {
        background: rgba(249, 249, 249, 0.06);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }
}
