The European Court of Justice has given European Union national courts some leeway to insist a product is regulated as a medicine, when sold as food in another EU member state.