Firstly, I would not have a category ID and subcategory ID on the product. It only belongs to a subcategory. You can find out the parent category through the subcategory if you need to.
products (id, subcategory_id, name)
categories (id, name)
subcategories (id, category_id, name)
For the attributes which could be different for all products, you could do this:
attribute_types (id, name)
attributes (id, attribute_type_id, value)
products_attributes (id, product_id, attribute_id)
So in your attribute_types table you might have:
id | name
-----------------------------
1 | T-Shirt Size
2 | Shoe Size (US)
3 | Colour
4 | Batteries Included
In your attributes table:
id | attribute_type_id | value
------------------------------
1 | 1 | Small
2 | 1 | Medium
3 | 1 | Large
4 | 2 | 9
5 | 2 | 9.5
6 | 2 | 10
7 | 2 | 10.5
8 | 2 | 11
9 | 3 | Red
10 | 3 | Blue
11 | 3 | Green
12 | 3 | Yellow
13 | 3 | Black
14 | 4 | Yes
15 | 4 | No
And then in your products_attributes table you just add whichever attributes that product has:
id | product_id | attribute_id
------------------------------
1 | 456 | 6
2 | 456 | 13
So for that product, it is a Size 10 shoe, Black.