What should be the schema of the database if the parent table is being referenced in more than one child table?
My approach in a model:
-- Categories and subcategories table
CREATE TABLE category (id INT PRIMARY KEY, 
                       name VARCHAR(255), 
                       parent_id INT,
                       FOREIGN KEY (parent_id) REFERENCES category (id));

-- Products table
CREATE TABLE product (id INT PRIMARY KEY,
                      name VARCHAR(255),
                      category_id INT,
                      FOREIGN KEY (category_id) REFERENCES category (id));

How it works: DEMO (MySQL used).
The queries are converted to procedures - only for simplifying their execution call.
If some section is empty we don't display it.
If we want to get the categories list with the info does they have subcategories we simply execute
SELECT *, EXISTS ( SELECT 1
                   FROM category t2
                   WHERE t1.id = t2.parent_id ) has_subcategory
FROM category t1;