<?php $__env->startSection('title', 'Membership & Rewards'); ?>

<?php $__env->startSection('content'); ?>
    <section class="bg-slate-950 py-14 text-center text-white">
        <p class="text-xs font-bold uppercase tracking-[0.3em] text-gold-400">The Epelcon Circle</p>
        <h1 class="mt-2 font-serif text-4xl font-bold">Membership & rewards</h1>
        <p class="mx-auto mt-3 max-w-xl px-4 text-slate-300">Earn points on every stay, meal and drink. Refer friends, unlock tiers, enjoy perks made for regulars.</p>
    </section>

    <section class="mx-auto max-w-6xl px-4 py-12 sm:px-6">
        <div class="grid gap-6 md:grid-cols-3">
            <?php $__currentLoopData = $plans; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $plan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <div class="relative flex flex-col overflow-hidden rounded-3xl bg-white p-7 shadow-sm ring-1 ring-slate-200 <?php echo e($loop->iteration === 2 ? 'md:-translate-y-3 md:shadow-xl' : ''); ?>">
                    <div class="absolute inset-x-0 top-0 h-1.5" style="background: <?php echo e($plan->color); ?>"></div>
                    <?php if($loop->iteration === 2): ?><span class="absolute right-4 top-4 rounded-full bg-gold-400/20 px-3 py-1 text-[10px] font-bold uppercase text-gold-600">Most popular</span><?php endif; ?>
                    <h2 class="font-serif text-2xl font-bold" style="color: <?php echo e($plan->color); ?>"><?php echo e($plan->name); ?></h2>
                    <p class="mt-2 text-3xl font-extrabold text-slate-900"><?php echo e($CUR ?? '₦') . number_format((float) ($plan->price), 2); ?><span class="text-sm font-medium text-slate-400">/year</span></p>
                    <ul class="mt-5 flex-1 space-y-2.5 text-sm text-slate-600">
                        <?php $__currentLoopData = $plan->perks ?? []; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $perk): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><li class="flex gap-2"><span class="text-emerald-500">✓</span><?php echo e($perk); ?></li><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        <li class="flex gap-2"><span class="text-emerald-500">✓</span><?php echo e($plan->points_multiplier + 0); ?>× reward points on all spend</li>
                    </ul>
                    <?php if(auth()->guard()->check()): ?>
                        <form method="POST" action="<?php echo e(route('account.membership.subscribe', $plan)); ?>"><?php echo csrf_field(); ?>
                            <button class="mt-6 w-full rounded-xl bg-slate-950 py-3.5 text-sm font-extrabold text-white hover:bg-slate-800">Join <?php echo e($plan->name); ?></button>
                        </form>
                    <?php else: ?>
                        <a href="<?php echo e(route('register')); ?>" class="mt-6 rounded-xl bg-slate-950 py-3.5 text-center text-sm font-extrabold text-white hover:bg-slate-800">Create account to join</a>
                    <?php endif; ?>
                </div>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>

        
        <div class="mt-12 rounded-3xl bg-gradient-to-r from-violet-600 to-indigo-700 p-8 text-center text-white sm:p-12">
            <h2 class="font-serif text-2xl font-bold sm:text-3xl">Refer friends, earn rewards 🎁</h2>
            <p class="mx-auto mt-3 max-w-lg text-indigo-200">Every member gets a personal referral code. When a friend signs up with it, you earn <span class="font-extrabold text-white"><?php echo e(\App\Models\Setting::get('referral_points', 50)); ?> points</span> instantly — redeemable against rooms, dining and drinks.</p>
            <?php if(auth()->guard()->check()): ?>
                <p class="mt-5 inline-block rounded-2xl bg-white/10 px-8 py-4 font-mono text-xl font-extrabold tracking-widest ring-1 ring-white/20"><?php echo e(auth()->user()->referral_code ?? '—'); ?></p>
                <p class="mt-2 text-xs text-indigo-200">Your personal referral code — share it anywhere.</p>
            <?php else: ?>
                <a href="<?php echo e(route('register')); ?>" class="mt-6 inline-block rounded-xl bg-white px-7 py-3.5 text-sm font-extrabold text-indigo-700 hover:bg-indigo-50">Sign up & get your code</a>
            <?php endif; ?>
        </div>
    </section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.site', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\wamp64\www\hms\resources\views/site/membership.blade.php ENDPATH**/ ?>