/**
 * Shop Sidebar Enhance - search box + show more
 * Chỉ áp dụng cho widget layered_nav đã enhance (có class memip-sb-* injected).
 */

#shop-sidebar .memip-sb-search,
.shop-sidebar .memip-sb-search,
aside.widget_layered_nav .memip-sb-search {
    margin: 12px 0 8px;
}
.memip-sb-search input {
    width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    border: 1.5px solid #e6e6e6;
    border-radius: 6px;
    background: #fafafa;
    box-sizing: border-box;
    outline: none;
}
.memip-sb-search input:focus {
    border-color: #ed1c24;
    background: #fff;
}

/* Item ẩn mặc định */
.memip-sb-hidden { display: none !important; }
/* Khi widget mở rộng → show tất cả */
.memip-sb-expanded .memip-sb-hidden { display: list-item !important; }

/* Khi đang search → bỏ qua trạng thái hidden, chỉ ẩn nomatch */
.memip-sb-searching .memip-sb-hidden { display: list-item !important; }
.memip-sb-searching .memip-sb-nomatch { display: none !important; }

/* Nút Xem thêm / Thu gọn */
button.memip-sb-toggle {
    display: inline-block;
    margin: 8px 0 0;
    padding: 6px 0 !important;
    background: none !important;
    border: 0 !important;
    color: #ed1c24 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
    min-height: 0 !important;
}
button.memip-sb-toggle:hover {
    color: #b71c1c !important;
    text-decoration: underline;
}

/* Khi đã enhance, bỏ scroll inline-css max-height 260px của file feature-shop-sidebar.php */
.widget_layered_nav .memip-sb-search ~ ul,
#shop-sidebar .widget_layered_nav .memip-sb-search ~ ul {
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0 !important;
}
