{**
 * 2007-2019 PrestaShop and Contributors
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://www.prestashop.com for more information.
 *
 * @author    PrestaShop SA <contact@prestashop.com>
 * @copyright 2007-2019 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 * International Registered Trademark & Property of PrestaShop SA
 *}
{block name='product_miniature_item'}
<a href="{$product.url}"  class="group w-full md:w-1/2 lg:w-1/3 xl:w-1/4 flex flex-col p-4">
  {block name='product_thumbnail'}
    {if $product.cover}
      <div class="thumbnail product-thumbnail w-full aspect-[342/513] bg-gray-100">
        <img
          src="{$product.cover.bySize.home_default.url}"
          alt="{if !empty($product.cover.legend)}{$product.cover.legend}{else}{$product.name|truncate:30:'...'}{/if}"
          data-full-size-image-url="{$product.cover.large.url}"
          class="object-cover w-full h-full"
        />
      </div>
    {else}
      <div class="thumbnail product-thumbnail w-full aspect-[342/513]">
        <img class="object-fit w-full h-full" src="{$urls.no_picture_image.bySize.home_default.url}" />
      </div>
    {/if}
  {/block}
  <div class="product-description flex flex-col pt-4 group-hover:text-blue-900 gap-1">
    {block name='product_price_and_shipping'}
      <div class="flex w-full justify-between items-center">
        {if $product.has_discount}
          <span class="regular-price line-through leading-none font-medium">{$product.regular_price}</span>
        {/if}
        {if $product.show_price}
          <div class="font-bold text-lg">
            <span>{$product.price}</span>
          </div>
        {/if}
      </div>
    {/block}
    {block name='product_name'}
        <span class="text-lg font-light" itemprop="name">{$product.name|truncate:30:'...'}</span>
    {/block}
  </div>
</a>
{/block}

