<?php
defined( 'ABSPATH' ) || exit;
?>
<?php if ( $image_url ) : ?>
<tr>
	<td align="center">
		<img src="<?php echo esc_url( $image_url ); ?>" alt="" width="600" style="display:block;width:100%;max-width:600px;border:0;outline:none;text-decoration:none;">
	</td>
</tr>
<?php endif; ?>
<tr>
	<td align="center" style="padding:36px 32px;text-align:center;">
		<?php if ( $heading ) : ?>
			<h1 style="margin:0 0 18px;font-family:Inter,Arial,Helvetica,sans-serif;font-size:26px;line-height:1.3;color:#0F172A;font-weight:700;letter-spacing:-0.01em;text-align:center;">
				<?php echo esc_html( $heading ); ?>
			</h1>
		<?php endif; ?>
		<div style="font-family:Inter,Arial,Helvetica,sans-serif;font-size:15px;line-height:1.65;color:#475569;text-align:center;">
			<?php echo wp_kses_post( wpautop( $body ) ); ?>
		</div>
		<?php if ( $discount ) : ?>
			<div style="margin:24px auto;padding:18px;background:#F1F5F9;border-radius:10px;text-align:center;font-size:15px;color:#0F172A;max-width:480px;">
				<?php echo wp_kses_post( $discount ); ?>
			</div>
		<?php endif; ?>
		<?php if ( $cta_label && $cta_url ) : ?>
		<table role="presentation" cellpadding="0" cellspacing="0" align="center" style="margin:28px auto 8px;">
			<tr>
				<td align="center" style="border-radius:<?php echo (int) $cta_radius; ?>px;background:<?php echo esc_attr( $accent ); ?>;">
					<a href="<?php echo esc_url( $cta_url ); ?>" style="display:inline-block;padding:14px 32px;font-family:Inter,Arial,Helvetica,sans-serif;font-size:15px;font-weight:600;color:#ffffff;text-decoration:none;border-radius:<?php echo (int) $cta_radius; ?>px;">
						<?php echo esc_html( $cta_label ); ?>
					</a>
				</td>
			</tr>
		</table>
		<?php endif; ?>
		<?php if ( ! empty( $intro_line ) ) : ?>
			<div style="margin:20px auto 0;max-width:480px;font-family:Inter,Arial,Helvetica,sans-serif;font-size:11px;line-height:1.5;color:<?php echo esc_attr( $footer_color ); ?>;text-align:center;">
				<?php echo esc_html( $intro_line ); ?>
			</div>
		<?php endif; ?>
	</td>
</tr>
