/* Boxstock Instant Search */
.bs-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.bs-search-overlay.active {
    display: flex;
    justify-content: center;
    padding-top: 10vh;
}

.bs-search-modal {
    width: 100%;
    max-width: 680px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: bsSearchSlideIn 0.2s ease-out;
}

@keyframes bsSearchSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bs-search-input-wrap {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.bs-search-input-wrap svg {
    flex-shrink: 0;
    color: #999;
}

.bs-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-family: inherit;
    background: transparent;
    color: #111;
}

.bs-search-input::placeholder {
    color: #bbb;
}

.bs-search-meta {
    padding: 8px 20px;
    font-size: 12px;
    color: #999;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
}

.bs-search-results {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
}

.bs-search-hit {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    gap: 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.1s;
}

.bs-search-hit:hover,
.bs-search-hit.active {
    background: #f5f5f5;
}

.bs-search-hit__img {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 6px;
    background: #f9f9f9;
}

.bs-search-hit__info {
    flex: 1;
    min-width: 0;
}

.bs-search-hit__name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.bs-search-hit__name mark {
    background: #fef08a;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

.bs-search-hit__meta {
    font-size: 12px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bs-search-hit__price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    flex-shrink: 0;
}

.bs-search-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.bs-search-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.bs-search-footer a {
    font-size: 13px;
    color: #111;
    font-weight: 600;
    text-decoration: none;
}

.bs-search-footer a:hover {
    text-decoration: underline;
}

.bs-search-kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
}

.bs-search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    padding: 4px;
}

.bs-search-close:hover {
    color: #111;
}

/* Mobile */
@media (max-width: 768px) {
    .bs-search-overlay.active {
        padding-top: 0;
    }

    .bs-search-modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    .bs-search-hit__img {
        width: 48px;
        height: 48px;
    }
}
