<?php

use Isotope\Interfaces\IsotopePrice;
use Isotope\Isotope;

?>
<div class="iso--product-box variant-v1 " data-aos="animate__fadeInUp">

    <form action="<?= $this->action; ?>" id="<?= $this->formId; ?>" name="iso<?= rand(); ?>" method="post"
          enctype="<?= $this->enctype; ?>">
        <div class="formbody row gy-0 text-center" itemscope itemtype="http://schema.org/Product">
            <input type="hidden" name="FORM_SUBMIT" value="<?= $this->formSubmit; ?>">
            <input type="hidden" name="REQUEST_TOKEN" value="{{request_token}}">
            <input type="hidden" name="AJAX_PRODUCT" value="<?= $this->product_id; ?>">
            <input type="hidden" name="AJAX_MODULE" value="<?= $this->module_id; ?>">


            <div class="col-12">
                <?= $this->getGallery('images')->generateMainImage(); ?>
            </div>


            <div class="col-12">
                <div class="content_container ">

                    <div class="product--title">
                        <h3 itemprop="name">
                            <a href="<?= $this->href; ?>" title="<?= $this->label_detail; ?>">
                                <?= $this->highlightKeywords($this->generateAttribute('name')); ?>
                            </a>
                        </h3>


                        <?php if ($this->sku): ?>
                            <!-- <div class="sku" itemprop="sku"><?= $this->generateAttribute('sku'); ?></div> -->
                        <?php endif; ?>

                        <?php if ($this->teaser) : ?>
                            <div class="teaser"><?= $this->highlightKeywords($this->generateAttribute('teaser')); ?></div>
                        <?php endif; ?>

                    </div>

                    <?php /* @var IsotopePrice $price */
                    if ($price = $this->product->getPrice()) : ?>
                        <div class="offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                            <meta itemprop="priceCurrency" content="<?= Isotope::getConfig()->currency ?>">
                            <div class="price" itemprop="price"
                                 content="<?= Isotope::roundPrice($price->getAmount(1, $this->product->getOptions())) ?>"><?= $this->generatePrice(); ?></div>


                            <span class="tax-note">
                            inkl. MwSt., zzgl. Versandkosten
                        </span>
                        </div>
                    <?php endif; ?>

                    <div class="details"><a class="btn btn-outline-primary" href="<?= $this->href; ?>"
                                            title="<?= $this->label_detail; ?>">mehr Info</a></div>

                    <?php if ($this->actions) : ?>
                        <div class="button_container">
                            <?php if ($this->hasOptions) : ?>
                                <div class="options">
                                    <div class="form-body">
                                            <?php foreach ($this->options as $arrOption) : echo $arrOption['html'];
                                    endforeach; ?>
                                    </div>

                                </div>
                            <?php endif; ?>
                            <?php if ($this->useQuantity) : ?>
                                <div class="quantity_container">
                                    <label for="quantity_requested_<?= $this->raw['id']; ?>"><?= $GLOBALS['TL_LANG']['MSC']['quantity']; ?>
                                        :</label> <input type="text" class="text"
                                                         id="quantity_requested_<?= $this->raw['id']; ?>"
                                                         name="quantity_requested"
                                                         placeholder="<?= $this->minimum_quantity; ?>" maxlength="10">
                                </div>
                            <?php endif; ?>
                            <?php foreach ($this->actions as $action) echo $action->generate($this->product); ?>
                        </div>
                    <?php endif; ?>

                </div>
            </div>

        </div>
    </form>
</div>