/* 级联搜索框通用样式 */
.custom-cat-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 20px auto 40px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    box-sizing: border-box;
}

/* 搜索输入框容器（用于定位清除按钮） */
.search-input-wrapper {
    position: relative;
    flex: 2 1 200px;
    min-width: 180px;
}

/* 输入框本身 */
.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 12.31px 30px 12.32px 10px; /* 右侧留出叉叉的空间 */
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* 清除按钮 */
.search-input-wrapper .clear-search {
    position: absolute;
    right: 8px;
    top: 45%;
    transform: translateY(-50%);
    font-size: 28px;
    color: #999;
    cursor: pointer;
    display: none;          /* 默认隐藏 */
    line-height: 1;
    padding: 2px 4px;
    user-select: none;
}
.search-input-wrapper .clear-search:hover {
    color: #333;
}

/* 下拉选择框 */
.custom-cat-search select {
    /* flex: 1 1 150px; */
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
}

/* 二级分类容器 */
.custom-cat-search .search-cat-group {
    /* flex: 1 1 150px; */
    min-width: 150px;
}

/* 搜索按钮 */
.custom-cat-search button {
    padding: 10px 25px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}

/* ========== 移动端适配 ========== */
@media (max-width: 600px) {
    .custom-cat-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
    }

    .search-input-wrapper,
    .custom-cat-search select,
    .custom-cat-search .search-cat-group,
    .custom-cat-search button {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    .custom-cat-search button {
        padding: 12px;
    }
}