To improve recommendation systems, it is essential to enhance both their practicality and accuracy, thereby supporting users in making informed shopping decisions. Incorporating two types of product relationships can effectively achieve these goals: first, the product relationships, like complements, and second, the social relationships among users. However, existing studies have paid little attention to user-side information or item-side information. This paper proposes a product recommendation model that utilizes cross-elasticity of demand and hypergraphs, referred to as Hg-CR. First, users and items build a hypergraph. The user–item interactions form the hyperedges. Also, users build a hypergraph between themselves based on their social relationships. Second, hypergraph attention networks (HANs) learn the relationships between nodes. They capture the key features of nodes and hyperedges with a high degree of adaptability. A community detection algorithm organizes users into groups for product recommendations by assessing their similarities. Within different communities, individuals seek complementary products based on the cross-elasticity theory of demand. Additionally, we provide recommendations for complementary products. Tests on real datasets show that the Hg-CR model is about 10% more accurate than the other baseline models.