{% extends 'base.html' %}
{% block content %}
{% load static %}


  <section id="aa-product-details">
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <div class="aa-product-details-area">
            <div class="aa-product-details-content">
              <div class="row">
                <!-- Modal view slider -->
                <div class="col-md-5 col-sm-5 col-xs-12">                              
                  <div class="aa-product-view-slider">                                
                    <div id="demo-1" class="simpleLens-gallery-container">
                      <div class="simpleLens-container">
                        <div class="simpleLens-big-image-container"><img src="{{ object.thumbnail.url }}" class="simpleLens-big-image"></div>
                      </div>
                   
                    </div>
                  </div>
                </div>
                <!-- Modal view content -->
                <div class="col-md-7 col-sm-7 col-xs-12">
                  <div class="aa-product-view-content">
                    <h3>{{ object.title }}</h3>
                    <div class="aa-price-block">

                      {% if object.discount_price %} 
                      <span class="aa-product-view-price">Kshs {{ object.discount_price }}</span>
                      {% else %}
                      <span class="aa-product-view-price">Kshs {{ object.price }}</span>
                      {% endif %}
                      <p class="aa-product-avilability">Category :<span> {{ object.get_category_display }} </span></p>
                    </div>
                    <p>{{ object.description }}</p>
                    {% if request.user.is_authenticated %}
                    <div class="aa-prod-view-bottom">
                      <a class="aa-add-to-cart-btn" href="{{ object.get_add_to_cart_url }}">Add To Cart</a>
                    </div>
                    {% else %}
                    <div class="aa-prod-view-bottom">
                      <a class="aa-add-to-cart-btn" href="{% url 'account_login' %}">Add To Cart</a>
                    </div>
                    {% endif %}
                    
                  </div>
                </div>
              </div>
            </div>
            
            
          </div>
        </div>
      </div>
    </div>
  </section>


 {% endblock content %}