Base metals gain amid AI demand, supply concerns in July