You’re close, syntax is just slightly off. I can’t quite work out how/what terms you need to query for, but this should be the structure of your arguments:
$query = new WP_Query(
array(
'post_type' => 'product',
'orderby' => 'name',
'order' => 'ASC',
'tax_query' => array(
array(
'taxonomy' => 'product_cat',
'field' => 'term_id',
'terms' => $ids_of_product_cat_terms,
),
array(
'taxonomy' => 'product_brand',
'field' => 'term_id',
'terms' => $ids_of_product_brand_terms,
),
),
)
);
Read up on tax queries from the codex.