/* ── Baifumei Catalogue — Searchbar Widget ── */

.bmc-sb-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.bmc-sb-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
    align-items: center;
    z-index: 2;
}

.bmc-sb-input {
    width: 100% !important;
    padding: 10px 14px 10px 38px !important;
    font-size: 14px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    outline: none !important;
    background: #fff !important;
    color: #1a1a1a !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    box-shadow: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.bmc-sb-input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1) !important;
}
.bmc-sb-input::placeholder { color: #9ca3af !important; }

/* ── Autocomplete dropdown ── */
.bmc-sb-ac {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 99999;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    max-height: 420px;
    overflow-y: auto;
    min-width: 320px;
}

.bmc-sb-ac__heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    padding: 10px 16px 4px;
    list-style: none;
}

.bmc-sb-ac__item {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    cursor: pointer;
    gap: 10px;
    transition: background 0.1s;
    list-style: none;
}
.bmc-sb-ac__item:hover { background: #f3f4f6; }

.bmc-sb-ac__img {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    flex-shrink: 0;
}
.bmc-sb-ac__img--placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    flex-shrink: 0;
}
.bmc-sb-ac__brand-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    color: #6b7280;
    flex-shrink: 0;
}
.bmc-sb-ac__title {
    font-size: 14px;
    color: #1a1a1a;
    line-height: 1.3;
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.bmc-sb-ac__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.bmc-sb-ac__price {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}
.bmc-sb-ac__badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.4;
}
.bmc-sb-ac__badge--eu {
    background: #dbeafe;
    color: #1d4ed8;
}
.bmc-sb-ac__badge--cat {
    background: #f3f4f6;
    color: #555;
}
.bmc-sb-ac__show-all {
    display: block;
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    cursor: pointer;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
    list-style: none;
    transition: background 0.1s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.bmc-sb-ac__show-all:hover { background: #f3f4f6; }
