<!-- tabla-contenedora -->
<table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" style="width: 100%; max-width: 100%; ">
    <tr>

        <td align="left" valign="top" style="padding-bottom: 16px;" bgcolor="#FAF9F9">

            <!-- contenida-tabla -->

            <?php if ($compra['precios_ant'] != '') {
            ?>

                <!-- sm-title -->
                <table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" style="width: 100%; max-width: 100%; ">
                    <tr>
                        <td class="sm-title" valign="top" align="left" style="font-family:'Montserrat', serif !important; text-transform:uppercase; line-height: 24px; font-style: normal;  font-weight: 500; font-size: 18px; letter-spacing: 0.03em; color: #353535; padding: 0 8px 8px;border-bottom: 1px dashed #dddddd;">

                        Panier précédent

                        </td>
                    </tr>
                </table>
                <!-- sm-title -->

                <!-- space -->
                <table border="0" width="100%" align="center" cellpadding="0" cellspacing="0" style="width:100%;max-width:100%;">
                    <tr>
                        <td valign="middle" align="center" height="16" style="font-size: 16px; line-height: 16px;">&nbsp;</td>
                    </tr>
                </table>
                <!-- space -->


                <table style="width:100%; max-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
                    <tbody>
                        <tr>
                            <td class="title desplazar-derecha" valign="middle" align="left" style="padding: 0 20px;">

                                <table style="width:100%; max-width:100%;" width="100%" cellspacing="0" cellpadding="0" border="0" align="center">

                                    <tr style="font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 500; line-height: 20px; font-style: normal; color: #473d37; text-decoration: none; letter-spacing: 1px;">
                                        <th style="font-weight: 500; text-transform: uppercase; padding-bottom: 4px;" align="left">UNITÉS</th>
                                        <th style="font-weight: 500; text-transform: uppercase; padding-bottom: 4px;" align="left">FRAIS</th>
                                        <th style="font-weight: 500; text-transform: uppercase; padding-bottom: 4px;" align="right">PRIX</th>
                                    </tr>

                                    <?php foreach ($compra['precios_ant'] as $key => $value) : ?>

                                        <tr style="font-family: 'Inter', sans-serif; font-size: 12px; line-height: 20px; color: #1d2331; text-decoration: none; letter-spacing: 1px; padding-top: 10px;">

                                            <td>
                                                <?php echo $compra['unidades_tarifa_ant'][$key]; ?>
                                            </td>

                                            <td>
                                                <?php echo $compra['tarifas_nombre_ant'][$key]; ?>
                                            </td>

                                            <td align="right">
                                                <?php
                                                if (!is_string($value)) {
                                                    $value_format = number_format($value, 2);
                                                    echo $value_format . ' €';
                                                } else {
                                                    echo $value;
                                                }
                                                ?>
                                            </td>

                                        </tr>

                                    <?php endforeach; ?>

                                    <?php foreach ($compra['extras_seleccionados_ant'] as $extra) : ?>
                                        <tr style=" font-family: 'Inter', sans-serif; font-size: 12px; line-height: 20px; color: #1d2331; text-decoration: none; letter-spacing: 1px; padding-top: 10px;">
                                            <td><?php echo $extra['cantidad']; ?></td>
                                            <td><?php echo $extra['nombre']; ?></td>
                                            <td align="right"><?php echo $extra['precio']; ?></td>
                                        </tr>
                                    <?php endforeach; ?>

                                    <?php if ($compra['cupon'] != '') { ?>
                                        <tr style=" font-family: 'Inter', sans-serif; font-size: 12px; line-height: 20px; color: #1d2331; text-decoration: none; letter-spacing: 1px; padding-top: 10px;">
                                            <td>1</td>
                                            <td><?php echo "Cupón: " . $compra['cupon']['codigo']; ?></td>
                                            <?php
                                            if ($compra['cupon']['porcentual'] == 1) {
                                                $simbolo = "%";
                                            } else {
                                                $simbolo = "€";
                                            }
                                            ?>
                                            <td style="text-align:right;"><?php echo "- " . $compra['cantidad_descuento_anterior'] . ' ' . $simbolo; ?></td>
                                        </tr>
                                    <?php } ?>

                                    <?php if ($compra['descuento_coste_realizado_ant'] != '') { ?>
                                        <tr style="">
                                            <td></td>
                                            <td></td>
                                            <td></td>
                                        </tr>
                                        <tr style=" font-family: 'Inter', sans-serif; font-size: 12px; line-height: 20px; color: #1d2331; text-decoration: none; letter-spacing: 1px; padding-top: 10px;">
                                            <td></td>
                                            <td><strong><?php echo $compra['tipo_aplicado_ant']; ?></strong></td>
                                            <td align="right"><?php echo $compra['descuento_coste_realizado_ant'] . ' €'; ?></td>
                                        </tr>
                                    <?php } ?>

                                    <tr height="40px">
                                        <?php if ($compra['descuento_coste_ant'] != '') { ?>
                                            <td>
                                                <strong><?php echo $compra['descuento_coste_ant']; ?></strong>
                                            </td>
                                        <?php } elseif ($compra['pago_parcial_ant'] != '') { ?>
                                            <td><strong>Paiement partiel <?php echo $compra['pago_parcial_ant']; ?></strong>
                                            </td>
                                        <?php } ?>
                                        <td colspan="3" style="font-size: 16px; font-family: 'Montserrat', sans-serif; font-weight: 600; text-align: right; color: #353535;">

                                            <?php
                                            if (!is_string($compra['total_ant'])) {
                                                $compra_total = number_format($compra['total_ant'], 2);
                                                echo $compra_total . ' €';
                                            } else {
                                                echo $compra['total_ant'];
                                            }
                                            ?>

                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            <?php } ?>

            <!-- space -->
            <table border="0" width="100%" align="center" cellpadding="0" cellspacing="0" style="width:100%;max-width:100%;">
                <tr>
                    <td valign="middle" align="center" height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
                </tr>
            </table>
            <!-- space -->

            <!-- space -->
            <table border="0" width="100%" align="center" cellpadding="0" cellspacing="0" style="width:100%;max-width:100%;">
                <tr>
                    <td valign="middle" align="center" height="10" style="font-size:10px;line-height:10px;">&nbsp;</td>
                </tr>
            </table>
            <!-- space -->

            <!-- fin-contenida-tabla -->
        </td>
    </tr>
</table>