<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
  <title>Products - TATA</title>

  <!-- External Resources -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"/>
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap" rel="stylesheet">

  <style>
    :root {
      --primary-gradient: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #ff8c00);
      --yellow-gradient: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
      --orange-btn: linear-gradient(90deg, #FF8C00, #FF4500);
      --glass: rgba(255, 255, 255, 0.12);
      --glass-border: rgba(255, 255, 255, 0.2);
    }

    * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

    body {
      font-family: 'Poppins', sans-serif;
      background: var(--primary-gradient);
      background-size: 400% 400%;
      animation: gradientBG 15s ease infinite;
      color: #fff;
      min-height: 100vh;
      display: flex;
      justify-content: center;
      padding-bottom: 90px;
    }

    @keyframes gradientBG {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    .app-wrapper { width: 92%; max-width: 400px; }

    .top-bar { padding: 25px 0; text-align: center; }
    .top-bar h2 { font-size: 20px; font-weight: 600; letter-spacing: 1px; color: #FFD700; }

    /* --- Fixed Tab System CSS --- */
    .tab-container {
      display: flex;
      background: rgba(0, 0, 0, 0.3);
      border-radius: 15px;
      padding: 5px;
      margin-bottom: 25px;
      border: 1px solid var(--glass-border);
    }

    .tab-btn {
      flex: 1;
      text-align: center;
      padding: 10px 5px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      border-radius: 12px;
      transition: 0.3s;
      color: #ccc;
    }

    .tab-btn.active {
      background: var(--yellow-gradient);
      color: #000;
      font-weight: 600;
      box-shadow: 0 4px 10px rgba(255, 215, 0, 0.2);
    }

    /* Tab Content Visibility */
    .tab-content {
      display: none; /* সব কন্টেন্ট আগে হাইড থাকবে */
      animation: fadeIn 0.4s ease;
    }

    .tab-content.active {
      display: block; /* শুধু একটিভটা দেখাবে */
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Product Cards */
    .vip-card {
      background: var(--glass);
      backdrop-filter: blur(15px);
      border: 1px solid var(--glass-border);
      border-radius: 25px;
      padding: 18px;
      margin-bottom: 20px;
      position: relative;
    }

    .vip-tag {
      position: absolute;
      top: 0;
      right: 20px;
      background: var(--yellow-gradient);
      color: #333;
      font-size: 10px;
      font-weight: 700;
      padding: 5px 15px;
      border-bottom-left-radius: 12px;
      border-bottom-right-radius: 12px;
    }

    .product-row { display: flex; gap: 15px; align-items: center; margin-top: 5px; }
    
    .product-img { 
      width: 90px; 
      height: 90px; 
      border-radius: 18px; 
      object-fit: cover; 
      border: 2px solid rgba(255,255,255,0.2);
      background: #fff;
    }

    .product-info h3 { font-size: 16px; margin-bottom: 8px; color: #fff; }
    .product-info p { font-size: 12px; color: #ddd; margin-bottom: 4px; }
    .product-info span { color: #FFD700; font-weight: 700; }

    .invest-btn {
      width: 100%;
      background: var(--orange-btn);
      color: #fff;
      text-align: center;
      padding: 14px;
      border-radius: 15px;
      text-decoration: none;
      font-weight: 700;
      display: block;
      margin-top: 15px;
      text-transform: uppercase;
      font-size: 13px;
      box-shadow: 0 5px 15px rgba(255, 69, 0, 0.3);
      border: none;
    }

    /* Bottom Nav */
    .bottom-nav {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      background: rgba(15, 32, 39, 0.98);
      backdrop-filter: blur(15px);
      display: flex;
      justify-content: space-around;
      padding: 12px 0;
      border-top: 1px solid var(--glass-border);
      z-index: 1000;
    }

    .nav-item { text-decoration: none; color: #888; text-align: center; flex: 1; transition: 0.3s; }
    .nav-item i { font-size: 20px; display: block; margin-bottom: 4px; }
    .nav-item span { font-size: 10px; }
    .nav-item.active { color: #FFD700; }

  </style>
</head>

<body>

<div class="app-wrapper">
  
  <div class="top-bar">
    <h2>Investment Store</h2>
  </div>

  <!-- --- TAB SYSTEM --- -->
  <div class="tab-container">
      <div class="tab-btn active" onclick="openTab(event, 'vip')">VIP</div>
      <div class="tab-btn" onclick="openTab(event, 'daily_vip')">Daily VIP</div>
      <div class="tab-btn" onclick="openTab(event, 'fixed_vip')">Fixed VIP</div>
  </div>

  <div class="product-list">
    <?php
      use App\Models\Package;
      $allPackages = Package::where('status','active')->get();
    ?>

    <!-- VIP TAB CONTENT -->
    <div id="vip" class="tab-content active">
        <?php $__currentLoopData = $allPackages->where('category', 'vip'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="vip-card">
            <div class="vip-tag">VIP LEVEL</div>
            <div class="product-row">
                <img src="<?php echo e(asset($package->photo)); ?>" class="product-img">
                <div class="product-info">
                    <h3><?php echo e($package->name); ?></h3>
                    <p>Investment: <span><?php echo e(price($package->price)); ?></span></p>
                    <p>Daily Profit: <span><?php echo e(price($package->commission_with_avg_amount / $package->validity)); ?></span></p>
                    <p>Total Return: <span><?php echo e(price($package->commission_with_avg_amount)); ?></span></p>
                </div>
            </div>
            <a href="<?php echo e(route('vip.details',$package->id)); ?>" class="invest-btn">Invest Now</a>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>

    <!-- DAILY VIP TAB CONTENT -->
    <div id="daily_vip" class="tab-content">
        <?php $__currentLoopData = $allPackages->where('category', 'daily_vip'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="vip-card">
            <div class="vip-tag">DAILY VIP</div>
            <div class="product-row">
                <img src="<?php echo e(asset($package->photo)); ?>" class="product-img">
                <div class="product-info">
                    <h3><?php echo e($package->name); ?></h3>
                    <p>Investment: <span><?php echo e(price($package->price)); ?></span></p>
                    <p>Daily Profit: <span><?php echo e(price($package->commission_with_avg_amount / $package->validity)); ?></span></p>
                    <p>Total Return: <span><?php echo e(price($package->commission_with_avg_amount)); ?></span></p>
                </div>
            </div>
            <a href="<?php echo e(route('vip.details',$package->id)); ?>" class="invest-btn">Invest Now</a>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>

    <!-- FIXED VIP TAB CONTENT -->
    <div id="fixed_vip" class="tab-content">
        <?php $__currentLoopData = $allPackages->where('category', 'fixed_vip'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $package): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <div class="vip-card">
            <div class="vip-tag">FIXED VIP</div>
            <div class="product-row">
                <img src="<?php echo e(asset($package->photo)); ?>" class="product-img">
                <div class="product-info">
                    <h3><?php echo e($package->name); ?></h3>
                    <p>Investment: <span><?php echo e(price($package->price)); ?></span></p>
                    <p>Daily Profit: <span><?php echo e(price($package->commission_with_avg_amount / $package->validity)); ?></span></p>
                    <p>Total Return: <span><?php echo e(price($package->commission_with_avg_amount)); ?></span></p>
                </div>
            </div>
            <a href="<?php echo e(route('vip.details',$package->id)); ?>" class="invest-btn">Invest Now</a>
        </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>
  </div>

</div>

<!-- বটম ন্যাভ -->
<nav class="bottom-nav">
  <a href="/dashboard" class="nav-item">
    <i class="fa-solid fa-house"></i>
    <span>Home</span>
  </a>
  <a href="/product" class="nav-item active">
    <i class="fa-solid fa-layer-group"></i>
    <span>Invest</span>
  </a>
  <a href="/my-team" class="nav-item">
    <i class="fa-solid fa-users"></i>
    <span>Team</span>
  </a>
  <a href="/my-profile" class="nav-item">
    <i class="fa-solid fa-circle-user"></i>
    <span>Profile</span>
  </a>
</nav>

<script>
    // Tab Switching Function - Corrected
    function openTab(evt, tabName) {
        var i, tabcontent, tablinks;
        
        // সব কন্টেন্ট হাইড করা
        tabcontent = document.getElementsByClassName("tab-content");
        for (i = 0; i < tabcontent.length; i++) {
            tabcontent[i].style.display = "none";
            tabcontent[i].classList.remove("active");
        }
        
        // সব বাটন থেকে active ক্লাস রিমুভ করা
        tablinks = document.getElementsByClassName("tab-btn");
        for (i = 0; i < tablinks.length; i++) {
            tablinks[i].classList.remove("active");
        }
        
        // নির্দিষ্ট ট্যাব দেখানো এবং বাটনে active ক্লাস দেওয়া
        const targetTab = document.getElementById(tabName);
        targetTab.style.display = "block";
        targetTab.classList.add("active");
        evt.currentTarget.classList.add("active");
    }
    
    // পেজ লোড হওয়ার সময় প্রথম ট্যাবটি নিশ্চিত করা
    window.onload = function() {
        document.getElementById('vip').style.display = 'block';
    };
</script>

<?php echo $__env->make('alert-message', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

</body>
</html><?php /**PATH /home/goldenyi/public_html/resources/views/app/main/vip.blade.php ENDPATH**/ ?>