You can make the products as custom posts and create the taxomonias and terms for it.
EX:
Category -> subcategory -> post
Category -> product line -> product
Both running in parallel and no need to modify anything when registering the product, since it will respond to their own categories and terms.
To create the custom of what you need to put this in functions.php:
add_action('init', 'type_post_produto');
function type_post_produto() {
$labels = array(
'name' => _x('Produto', 'post type general name'),
'singular_name' => _x('Produto', 'post type singular name'),
'add_new' => _x('Adicionar Novo Produto', 'Novo Produto'),
'add_new_item' => __('Novo Produto'),
'edit_item' => __('Editar Produto'),
'new_item' => __('Novo Produto'),
'view_item' => __('Ver Produto'),
'search_items' => __('Procurar Produto'),
'not_found' => __('Nenhum registro encontrado'),
'not_found_in_trash' => __('Nenhum registro encontrado na lixeira'),
'parent_item_colon' => '',
'menu_name' => 'Produtos'
);
$args = array(
'labels' => $labels,
'public' => true,
'public_queryable' => true,
'show_ui' => true,
'query_var' => true,
'taxonomies' => array( 'Categoria' ),
'rewrite' => array('slug' => 'produto'),
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('title', 'editor', 'thumbnail', 'revisions'),
);
register_post_type( 'produtos' , $args );
flush_rewrite_rules();
}
With this you will only need to create product category hierarchies and create custom loopings to retrieve the "products".