<div class="row row-cols-1 row-cols-md-3 mb-3 text-center">
    @foreach($plans as $plan)
        <div class="col">
            <div class="card mb-4 rounded-3 shadow-sm {{ isset($currentSubscription) && $currentSubscription && $currentSubscription->plan_id == $plan->id ? 'border-primary' : '' }}">
                <div class="card-header py-3 {{ isset($currentSubscription) && $currentSubscription && $currentSubscription->plan_id == $plan->id ? 'bg-primary text-white' : '' }}">
                    <h4 class="my-0 fw-normal">{{ $plan->name }}</h4>
                </div>
                <div class="card-body">
                    <h1 class="card-title pricing-card-title">
                        @if(auth()->check() && auth()->user()->seller && auth()->user()->seller->country == 'India')
                            {{ $plan->formatted_price_inr }}
                        @else
                            {{ $plan->formatted_price_usd }}
                        @endif
                        <small class="text-muted fw-light">/ {{ $plan->duration_days }} days</small>
                    </h1>
                    <ul class="list-unstyled mt-3 mb-4 text-start ps-4">
                        <li><i class="bi bi-check text-success me-2"></i> {{ $plan->product_limit }} Products</li>
                        <li><i class="bi bi-check text-success me-2"></i> {{ $plan->inquiry_limit }} Inquiries/mo</li>
                        @if($plan->banner_limit > 0)
                            <li><i class="bi bi-check text-success me-2"></i> {{ $plan->banner_limit }} Banners</li>
                        @endif
                        @if($plan->has_certificates)
                            <li><i class="bi bi-check text-success me-2"></i> Verified Certificates</li>
                        @endif
                        @if($plan->has_video)
                            <li><i class="bi bi-check text-success me-2"></i> Company Video</li>
                        @endif
                    </ul>
                    @if(isset($currentSubscription) && $currentSubscription && $currentSubscription->plan_id == $plan->id)
                        <button type="button" class="w-100 btn btn-lg btn-outline-primary" disabled>Current Plan</button>
                    @else
                        @auth
                            <a href="{{ route('seller.subscription.checkout', $plan->id) }}" class="w-100 btn btn-lg btn-primary">Get Started</a>
                        @else
                            <a href="{{ route('login') }}" class="w-100 btn btn-lg btn-primary">Login to Subscribe</a>
                        @endauth
                    @endif
                </div>
            </div>
        </div>
    @endforeach
</div>
