<!DOCTYPE html>
<html lang="es">
<!-- Include Head -->
<%- include('partials/head', {title: 'product.name'}) %>
<body>
	<!-- Header -->
	<%- include('partials/headerNavbar') %>
	<!-- /Header -->

	<!-- product detail -->
	<div class="container products-wrapper">
		<div class="row">
			<div class="col-12">
				<h2 class="products-title">Detalle del producto: <%= product.name %> </h2>
			</div>
		</div>
		<div class="product-detail">
			<div class="row">
				<div class="col-12 col-lg-8">
					<img src="/images/products/<%=product.image%>" alt="imagen de producto" image" class="product-detail-img">
					<p class="product-detail-description">
						<%= product.description %>
					</p>
				</div>
				<div class="col-12 col-lg-4">
					<article class="product-detail-info">
						<h2 class="product-detail-title"> <%= product.name %> </h2>
						
							<p class="product-detail-price small">
								<span>$<%= product.price %></span>
								/
								<b>DISCOUNT% OFF <%= product.discount %></b>
							</p>
							<p class="product-detail-price">
								$FINAL PRICE: <%= product.price - (product.price * product.discount /100) %>
							</p>
			
						<ul class="actions-list">
							<li>
								<i class="fas fa-credit-card"></i>
								<p>Pag√° en 12 cuotas sin interes</p>
							</li>
							<li>
								<i class="fas fa-store"></i>
								<p>Retiro gratis en locales del vendedor</p>
							</li>
						</ul>

						<a href="#" class="buy-now-button">COMPRAR AHORA</a>
						<hr>

						<a href="/products/edit/<%= product.id %>" class="action-button edit">EDITAR PRODUCTO</a>
						<form action="/products/delete/<%= product.id %>?_method=DELETE" method="POST" style="display: inline-flex">
							<button type="submit" class="action-button delete">ELIMINAR</button>
						</form>
					</article>
				</div>
			</div>
		</div>
	</div>
	<!-- /product detail -->

	<!-- footer -->
	<%- include('partials/footer') %>
	<!-- /footer -->

</body>	
</html>