<div class="container">

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


            <div class="row">
                <div class="col-12 col-lg-6 image--col">
                    <div class="image-col--inner">
                        <div class="product--main-image">
                            <?php echo $this->getGallery('images')->generateMainImage(); ?>
                        </div>
                        <div class="product--thumbnails">
                            <?php echo $this->getGallery('images')->generateGallery(); ?>
                        </div>
                    </div>
                </div>

                <div class="col-12 col-lg-6 content--col">
                    <div class="content-col--inner mt-3">

                        <div class="content--section content--section-1">
                            <div class="ce--headline">
                                <span class="ce--topline mb-0 fs-28px"><?= $this->weinlinie ? $this->generateAttribute('weinlinie') : null ?></span>
                                <h1 itemprop="name"><?php echo $this->generateAttribute('name'); ?> <?= $this->zusatz ? $this->generateAttribute('zusatz') : null; ?> <?= $this->jahrgang ? $this->generateAttribute('jahrgang') : null; ?></h1>
                            </div>


                            <div class="row gy-0 gx-2">
                                <div class="col-12 col-md-6">
                                    <?php if ($this->qualitaet || $this->geschmack || $this->flascheninhalt): ?>
                                        <div class="teaser fw-bold"><?= $this->qualitaet ? $this->generateAttribute('qualitaet') : null; ?> <?= $this->geschmack ? $this->generateAttribute('geschmack') : null; ?> <?= $this->flascheninhalt ? rtrim(rtrim(\System::getFormattedNumber($this->generateAttribute('flascheninhalt'),3),'0'),','). ' l' : null ?></div>
                                    <?php endif; ?>

                                    <?php if ($this->sku) : ?>
                                        <div class="sku">{{isolabel::attr_sku}} <span itemprop="sku"><?= $this->generateAttribute('sku'); ?></span></div>
                                    <?php endif; ?>


                                    <?php if ($this->charakteristik): ?>
                                        <div class="mt-2">
                                            <strong class="d-block">Charakteristik</strong>
                                            <?= $this->generateAttribute('charakteristik'); ?>
                                        </div>
                                    <?php endif; ?>


                                    <?php if ($this->speiseempfehlung): ?>
                                        <div class="mt-2">
                                            <strong class="d-block">Speiseempfehlung</strong>
                                            <?= $this->generateAttribute('speiseempfehlung'); ?>
                                        </div>
                                    <?php endif; ?>

                                </div>

                                <div class="col-12 col-md-6">
                                    <div class="attributes">
                                        <ul class="list-unstyled">
                                            <li><strong>Alkohol</strong> <span><?= $this->alkohol ? \System::getFormattedNumber($this->generateAttribute('alkohol'),1) : null ?> % vol</span></li>
                                            <li><strong>Restzucker</strong> <span><?= $this->restsuesse ? \System::getFormattedNumber($this->generateAttribute('restsuesse'),1) : null ?> g/l</span></li>
                                            <li><strong>Säure</strong> <span><?= $this->saeure ? \System::getFormattedNumber($this->generateAttribute('saeure'),1) : null ?> % g/l</span></li>
                                            <li><strong>Trinktemperatur</strong> <span><?= $this->trinktemperatur ? $this->generateAttribute('trinktemperatur') : null; ?> °C</span></li>
                                            <li><strong>Geschmack</strong> <span><?= $this->geschmack ? $this->generateAttribute('geschmack') : null; ?></span></li>
                                            <li><strong>Rebsorte</strong> <span><?= $this->rebsorte ? $this->generateAttribute('rebsorte') : null; ?></span></li>
                                            <li><strong>Anbauregion</strong> <span><?= $this->anbauregion ? $this->generateAttribute('anbauregion') : null; ?></span></li>
                                            <li><strong>Ursprungsland</strong> <span><?= $this->ursprungsland ? $this->generateAttribute('ursprungsland') : null; ?></span></li>
                                            <li><strong>Erzeuger</strong> <span><?= $this->erzeuger ? $this->generateAttribute('erzeuger') : null; ?></span></li>
                                            <li><strong>Allergene</strong> <span><?= $this->allergene ? $this->generateAttribute('allergene') : null; ?></span></li>
                                        </ul>
                                    </div>

                                    <div class="mt-4">
                                        <a class="btn btn-outline-primary" href="/">
                                            {{icon::ico:download}} ##EXPERTISE.PDF##
                                        </a>
                                    </div>

                                </div>
                            </div>

                            <div class="row gy-0 gx-2">
                                <div class="col-12 col-md-6">
                                    <?php /* @var \Isotope\Interfaces\IsotopePrice $price */
                                    if ($price = $this->product->getPrice()) : ?>
                                        <div class="offer" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
                                            <meta itemprop="priceCurrency"
                                                  content="<?= \Isotope\Isotope::getConfig()->currency ?>">
                                            <div class="h1 price" itemprop="price"
                                                 content="<?= \Isotope\Isotope::roundPrice($price->getAmount(1, $this->product->getOptions())) ?>">
                                                <?php echo $this->generatePrice(); ?>
                                            </div>
                                        </div>
                                    <?php endif; ?>

                                    <p class="fw-bold mb-0"><?php echo $this->generateAttribute('karton'); ?> x <?php echo rtrim(rtrim(\System::getFormattedNumber($this->generateAttribute('flascheninhalt'),3),'0'),','); ?> l</p>

                                    <?php if ($this->generateAttribute('baseprice')) : ?>
                                        <div class="item--short-informations">
                                            <span class="baseprice">(<?php echo $this->generateAttribute('baseprice'); ?>)</span>
                                        </div>
                                    <?php endif; ?>

                                    <div class="tax-note">
                                        <a href="{{link_url::50}}">Preis inkl. MwSt., zzgl. Versandkosten</a>
                                    </div>


                                    <div class="shipping-note<?php if ($this->not_buyable): ?> outOfStock<?php endif; ?>">
                                        <?php if ($this->not_buyable): ?><?php echo ($this->not_buyable_text ?: $GLOBALS['TL_LANG']['MSC']['not_buyable_text']); ?><?php else: ?><?= \InsertTags::replaceInsertTags('{{isolabel::delivery}}') ?><?php endif; ?>
                                    </div>


                                    <?php if ($this->shipping_time): ?>
                                        <div class="delivery-note">
                                            <?php echo $this->shipping_time; ?>
                                        </div>
                                    <?php endif; ?>
                                    <?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->actions) : ?>
                                        <div class="submit_container mt-3">
                                            <div class="d-flex w-100">
                                                <?php if ($this->useQuantity) : ?>
                                                    <div class="quantity_container">
                                                        <input type="text" class="form-control text"
                                                               id="quantity_requested_<?php echo $this->raw['id']; ?>"
                                                               name="quantity_requested"
                                                               placeholder="<?php echo $this->minimum_quantity; ?>"
                                                               value="<?php if (specialchars(Input::post('quantity_requested'))) {
                                                                   echo specialchars(Input::post('quantity_requested'));
                                                               } else {
                                                                   echo "1";
                                                               } ?>" maxlength="10">
                                                        <label for="quantity_requested_<?php echo $this->raw['id']; ?>">Stück</label>
                                                    </div>
                                                <?php endif; ?>
                                                <div class="actions_container">
                                                    <?php foreach ($this->actions as $action) echo $action->generate($this->product); ?>
                                                </div>
                                            </div>
                                        </div>
                                    <?php endif; ?>
                                </div>
                                <div class="col-12 col-md-6 align-self-start">
                                    {{file::contao/snippet_spartipp.html5}}
                                </div>
                            </div>
                        </div>

                        <!--
                    <?php if ($this->description) : ?>
                        <div class="content--section content--section-2">
                            <span class="h3 text-center">Beschreibung</span>
                            <div class="description" itemprop="description"><?php echo $this->generateAttribute('description'); ?></div>
                        </div>
                    <?php endif; ?>
                    -->

                    </div>

                </div>
            </div>

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


<!--

<div>
    <div class="container">
        {{insert_module::22}}
    </div>
</div>


<div>
    <div class="container">
        ##twocolimage## mit ATTRIBUT: headline, text, bild
    </div>
</div>

-->