Order subquery with order by
What is x?  The missing alias on the subquery?

Get rid of the subquery:

SELECT *
    FROM ...
    JOIN ...  ON ...
    JOIN ...  ON ...
    WHERE ...
    ORDER BY ...   -- Belongs after WHERE and before LIMIT
    LIMIT ...;     -- Useless without ORDER BY


Problem:  Since you are specifying a single value for id_CAT, it does not make sense to ORDER BY id_CAT.  Perhaps you want to ORDER BY id_CAT, something_else?  Or simply  ORDER BY something_else?