{% extends "base.html" %}

{% block content %}
    
<article class="product__item">
    <figure class="product__figure">
        <img class="product__image" src="{{product.productphoto_set.first.image.url}}" alt="{{product.productphoto_set.first.image}}">
    </figure>
    <section>
    	<h1>{{product.name}}</h1>
        <p>{{product.description}}</p>
        <p>$<strong>{{product.price}}</strong></p>
        <p>{{product.weight.oz}} oz</p>
    	<form method="post" action="{% url 'storefront:cart-add' product.pk %}">
            {% csrf_token %}
            {{ form.as_p }}
            <input type="submit" value="Add to cart" class="action-button">
        </form>
    </section>
</article>

{% endblock %}
