<?php $__env->startSection('title', 'پرداخت ناموفق'); ?>

<?php $__env->startSection('content'); ?>

<div class="bread-crumb pt-3">
    <div class="container-fluid">
        <div class="content-box">
            <div class="container-fluid">
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb mb-0">
                        <li class="breadcrumb-item"><a href="<?php echo e(route('home')); ?>" class="font-14 text-muted">خانه</a></li>
                        <li class="breadcrumb-item active main-color-one-color font-14" aria-current="page">پرداخت ناموفق</li>
                    </ol>
                </nav>
            </div>
        </div>
    </div>
</div>

<div class="content py-20">
    <div class="container-fluid">
        <div class="row justify-content-center">
            <div class="col-lg-6 col-md-8">

                <div class="payment-status content-box mb-4">
                    <div class="container-fluid">
                        <div class="payment-status-inner">
                            <div class="payment-icon-failed">
                                <i class="bi bi-x-circle-fill text-danger fs-1"></i>
                            </div>
                            <div class="title">
                                <h4>پرداخت ناموفق</h4>
                                <p class="text-muted font-14">متأسفانه پرداخت شما با موفقیت انجام نشد.</p>
                            </div>
                        </div>
                    </div>
                </div>

                <?php if($order): ?>
                <div class="content-box mb-4">
                    <div class="container-fluid">
                        <h6 class="font-16 fw-bold mb-3 border-bottom pb-2">اطلاعات سفارش</h6>
                        <div class="pay-table">
                            <div class="pay-table-row">
                                <span class="pay-table-label">شماره سفارش:</span>
                                <span class="pay-table-value fw-bold" dir="ltr"><?php echo e($order->order_number); ?></span>
                            </div>
                            <div class="pay-table-row">
                                <span class="pay-table-label">مبلغ:</span>
                                <span class="pay-table-value"><?php echo e(number_format($order->payable_amount)); ?> تومان</span>
                            </div>
                            <?php $tx = $order->transactions->first(); ?>
                            <?php if($tx && $tx->error_message): ?>
                            <div class="pay-table-row">
                                <span class="pay-table-label">علت خطا:</span>
                                <span class="pay-table-value text-danger"><?php echo e($tx->error_message); ?></span>
                            </div>
                            <?php endif; ?>
                            <?php if($tx && $tx->error_code): ?>
                            <div class="pay-table-row">
                                <span class="pay-table-label">کد خطا:</span>
                                <span class="pay-table-value text-muted font-12" dir="ltr"><?php echo e($tx->error_code); ?></span>
                            </div>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <?php endif; ?>

                <div class="payment-actions d-flex gap-3 flex-wrap justify-content-center">
                    <a href="<?php echo e(route('checkout.index')); ?>" class="btn border-0 main-color-one-bg text-white rounded-3 font-14 px-4">
                        <i class="bi bi-arrow-right me-2 text-white"></i>تلاش مجدد
                    </a>
                    <a href="<?php echo e(route('home')); ?>" class="btn btn-outline-secondary rounded-3 font-14 px-4">
                        <i class="bi bi-house me-2"></i>بازگشت به فروشگاه
                    </a>
                </div>

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

<?php $__env->stopSection(); ?>

<?php $__env->startSection('styles'); ?>
<style>
.payment-status-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1rem;
}
.payment-icon-failed {
    font-size: 4rem;
    color: #dc3545;
    margin-bottom: 1rem;
}
.pay-table-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}
.pay-table-row:last-child { border-bottom: none; }
.pay-table-label { color: #6c757d; flex-shrink: 0; margin-left: 1rem; }
.pay-table-value { font-weight: 500; }
</style>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('site.layouts.site-layout', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/louishop/public_html/engine/resources/views/site/payment/failed.blade.php ENDPATH**/ ?>