<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
    </head>
    <body style="font-family: Helvetica, Arial, Sans-Serif">
    <div style="background: #eee;padding: 10px;  border-bottom: 3px solid #ef5525">
        <div style="width: 900px; margin: 0 auto;">
            <img src="<?php echo asset('assets/img/logo_lg.png'); ?>" style="height: 50px"/>
            <p style="float: right; font-weight: bold; color: #ef5525">FICHA TÉCNICA DO PRODUTO</p>
        </div>
    </div>
        <div style="width: 900px; margin: 0 auto">
            <div style="width: 220px; float: left;">
                <br/>
                <?php if($product->images->isEmpty()): ?>
                    <img src="<?php echo asset('assets/img/default/product.png'); ?>" class="width-100"/>
                <?php else: ?>
                    <img src="<?php echo asset($product->images->first()->getCroppa(200,200)); ?>" class="width-100"/>
                <?php endif; ?>
                <h3></h3>
            </div>
            <div style="width: 680px; float: left;">
                <h2 style=" margin-bottom: 5px;"><?php echo $product->name; ?></h2>
                <h3 class="pull-left" style="color: #ef5525; margin-top: 0;">
                    <?php echo $product->price_whole; ?>,<?php echo $product->price_decimal; ?> €
                </h3>
                <?php if($product->promo_price): ?>
                    <h5 class="pull-right text-right">
                        <div class="spacer-15"></div>
                        <span class="discount"><strike><?php echo money($product->base_price, '€'); ?></strike></span><br/>
                    <!--<span class="old-price"><?php echo money($product->base_price, '€'); ?></span>-->
                    </h5>
                <?php endif; ?>
                <p style="font-size: 14px"><?php echo $product->description; ?></p>
                <?php if(!$product->tables->isEmpty()): ?>
                    <table class="table" style="font-size: 14px">
                        <?php foreach($product->tables as $key => $row): ?>
                            <tr>
                                <?php foreach($row as $key => $column): ?>
                                    <?php if(@$column->th): ?>
                                        <th><?php echo @$column->content; ?></th>
                                    <?php else: ?>
                                        <td><?php echo @$column->content; ?></td>
                                    <?php endif; ?>
                                <?php endforeach; ?>
                            </tr>
                        <?php endforeach; ?>
                    </table>
                <?php endif; ?>
                <br/><br/>
                <a href="<?php echo $input['url']; ?>" style="padding: 10px; color: #fff; background: #ef5525; margin-top: 20px; text-decoration: none;">
                    Visitar a página do produto em beirateca.pt
                </a>
                <br/>
                <br/>
            </div>
    </div>
</body>
</html>