<!-- Bloque espaciador - reserva espacio para el cupón -->
<!-- Si no cabe, salta a página nueva -->
<div style="page-break-inside: avoid; height: 95mm; width: 100%;"></div>

<!-- Cupón de envío - Posicionado al fondo de la página -->
<div style="position: fixed; bottom: 0; left: 0; right: 0; width: 100%;">
    <div style="border-top: 1px dashed #ccc; padding-top: 5mm;">
        <table style="width: 100%; border-collapse: collapse; font-size: 7pt;" cellpadding="5" cellspacing="0">
        <tr>
            <!-- Cupón izquierdo -->
            <td style="width: 50%; height: 85mm; vertical-align: top; padding-right: 5mm; border-right: 1px dashed #ccc;">
                <table style="width: 100%; height: 20mm; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="vertical-align: middle; width: 15mm;">
                            <?= ($data['logoBase64'] ? '<img src="' . $data['logoBase64'] . '" style="max-height: 14mm; max-width: 35mm;">' : 'LOGO') ?>
                        </td>
                        <td style="vertical-align: top; color: #333; line-height: 1.2; text-align: center; padding-top: 2mm;">
                            <div style="font-weight: bold; font-size: 14pt; margin-bottom: 1mm;">SERVICIO AL CLIENTE</div>
                            <div style="font-weight: bold; font-size: 11pt;">TEL.: <?= $data['telefono'] ?></div>
                        </td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">DESTINATARIO</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['destinatario_parte1'] ?></td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['destinatario_parte2'] ?></td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">DIRECCION</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['direccion_parte1'] ?></td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['direccion_parte2'] ?></td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">CIUDAD</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt; color: #f00;">GUATEMALA</td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse; margin-top: 2mm;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">
                            <barcode code="<?= $data['codigo_cliente'] ?>" type="QR" size="0.8" height="10" disableborder="1" />
                        </td>
                        <td style="padding-top: 2mm; vertical-align: bottom; text-align: center;">
                            <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                                <tr>
                                    <td style="text-align: center; border-top: 1px solid #000; font-size: 10pt;">TRANSPORTE</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>

            <!-- Cupón derecho -->
            <td style="width: 50%; height: 85mm; vertical-align: top; padding-left: 5mm;">
                <table style="width: 100%; height: 20mm; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="vertical-align: middle; width: 15mm;">
                            <?= ($data['logoBase64'] ? '<img src="' . $data['logoBase64'] . '" style="max-height: 14mm; max-width: 35mm;">' : 'LOGO') ?>
                        </td>
                        <td style="vertical-align: top; color: #333; line-height: 1.2; text-align: center; padding-top: 2mm;">
                            <div style="font-weight: bold; font-size: 14pt; margin-bottom: 1mm;">SERVICIO AL CLIENTE</div>
                            <div style="font-weight: bold; font-size: 11pt;">TEL.: <?= $data['telefono'] ?></div>
                        </td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">DESTINATARIO</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['destinatario_parte1'] ?></td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['destinatario_parte2'] ?></td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">DIRECCION</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['direccion_parte1'] ?></td>
                    </tr>
                    <tr>
                        <td colspan="2" style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt;"><?= $data['direccion_parte2'] ?></td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">CIUDAD</td>
                        <td style="padding-top: 2mm; vertical-align: middle; font-weight: bold; border-bottom: 1px solid #000; font-size: 11pt; color: #f00;">GUATEMALA</td>
                    </tr>
                </table>
                <table style="width: 100%; border-collapse: collapse; margin-top: 2mm;" cellpadding="5" cellspacing="0">
                    <tr>
                        <td style="padding-top: 2mm; vertical-align: middle; width: 15mm; font-size: 11pt;">
                            <barcode code="<?= $data['codigo_cliente'] ?>" type="QR" size="0.8" height="10" disableborder="1" />
                        </td>
                        <td style="padding-top: 2mm; vertical-align: bottom; text-align: center;">
                            <table style="width: 100%; border-collapse: collapse;" cellpadding="5" cellspacing="0">
                                <tr>
                                    <td style="text-align: center; border-top: 1px solid #000; font-size: 10pt;">TRANSPORTE</td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        </table>
    </div>
</div>



