Just make any of my product like this and check this product on product page thatis it out of stock or not

#2. Variable product: With your idea, you need to create unit price, ex: 100$/1kg, then create variation product with options ( ex: 0.5kg, 1kg, 0.25kg). Price on variation will be calculated and auto-update for variation. When update, you only update unit price.