You went from
(product_id, product_name, product_cat, product_subcat, cost, stock)
to
products_details(product_id, product_name, stock)
products_categories(product_cat, product_subcat)
products_costs(cost_id, cost)
That's good but not enough according to me. And not complete either. Here's a first solution…
product_details(product_id*, psub_id@, product_name, cost, stock)
product_categories(pcat_id*, pcat_name)
product_subcategories(psub_id*, pcat_id@, psub_name)
…where *
indicates the primary key, and @
the foreign key.
Another possible second solution is
product_details(product_id*, pcat_id@, product_name, cost, stock)
product_categorisation(pcat_id*, pcat_parent@, pcat_name)
This later is good only when not all categories have subcateries (not sure my writing is clear here, sorry.)
Also note that I didn't put costs in a table by their own because I don't think they are such independant. However, I don't know the context you are modeling.