As a visitor, I want to view a product's details, add it to my cart, or save it to my favorites, so that I can purchase it or come back to it later.
Given I am on the product detail page Then the product image, name, description, price, category badge, and brand badge are shown.
Given the product is in stock Then a quantity input field is displayed with plus (+) and minus (-) buttons And the default quantity is 1.
Given the quantity input is displayed When I click the plus button Then the quantity increases by 1.
Given the quantity is greater than 1 When I click the minus button Then the quantity decreases by 1.
Given the quantity is 1 When I click the minus button Then the quantity remains at 1.
Given the quantity input is displayed When I type a number directly into the input field Then the quantity is updated to the entered value And the value is clamped between 1 and 999,999,999.
Given a valid quantity is selected When I click the "Add to Cart" button Then the product is added to the cart with the selected quantity And a success message "Product added to shopping cart." is displayed.
Given the product is not in stock and is not a rental item Then the "Add to Cart" button is disabled And "Out of stock" is shown in red.