/* ===== Search Box Widget ===== */
.sb-search-box {
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 100;
}

.sb-form {
    display: flex;
    align-items: stretch;
    height: 42px;
    border: none;
    border-radius: 4px;
    overflow: visible;
    background: #fff;
}

/* ===== Category Dropdown ===== */
.sb-category-wrap {
    position: relative;
    flex-shrink: 0;
    border-right: none;
    user-select: none;
}

.sb-category-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 14px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 14px;
    color: #333;
    background: #f0f0f0;
    border-radius: 4px 0 0 4px;
    transition: background 0.2s;
}

.sb-category-selected:hover {
    background: #e5e5e5;
}

.sb-chevron {
    transition: transform 0.3s;
    flex-shrink: 0;
}

.sb-category-wrap.open .sb-chevron {
    transform: rotate(180deg);
}

.sb-category-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: -1px;
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--sb-border, #ddd);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    z-index: 200;
}

.sb-category-wrap.open .sb-category-dropdown {
    display: block;
}

.sb-category-item {
    padding: 8px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.sb-category-item:hover,
.sb-category-item.active {
    background: var(--sb-hover, #ea5504);
    color: #fff;
}

/* ===== Search Input ===== */
.sb-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.sb-search-input {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
    padding: 0 16px;
    font-size: 14px;
    color: #333 !important;
    background: transparent;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

.sb-search-input::placeholder {
    color: #999;
}

.sb-search-input:focus,
.sb-search-input:active {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ===== Search Button ===== */
.sb-search-btn {
    flex-shrink: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sb-btn-bg, #ea5504);
    border: none;
    outline: none;
    box-shadow: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
}

.sb-search-btn svg {
    color: #fff;
    stroke: #fff;
}

.sb-search-btn:hover {
    opacity: 0.9;
}

.sb-search-btn:focus {
    outline: none;
    box-shadow: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sb-form {
        height: 38px;
    }

    .sb-category-selected {
        padding: 0 10px;
        font-size: 12px;
    }

    .sb-search-input {
        padding: 0 10px;
        font-size: 13px;
    }

    .sb-search-btn {
        width: 40px;
    }

    .sb-category-dropdown {
        min-width: 180px;
    }

    .sb-category-item {
        padding: 7px 12px;
        font-size: 13px;
    }
}
