<?php
$page_title = "Plug Manual | ECUPRATIX";
$active = "plug";
$user_name = $_SESSION["user_name"] ?? "User";
include __DIR__ . "/partials/head.php";

// Demo Plug Verileri
$plug_data = [
    ["brand" => "Mercedes", "logo" => "M", "ecu" => "BOSCH EDC17CP46", "option" => "DPF Removal", "disconnects" => ["DPF Pressure Sensor (Pin 12-13)", "Exhaust Temperature Sensor (Pin 45)", "NOx Sensor (Pin 78-79)"]],
    ["brand" => "BMW", "logo" => "B", "ecu" => "BOSCH EDC17C50", "option" => "EGR OFF", "disconnects" => ["EGR Valve Connector (Pin 23-24)", "EGR Position Sensor (Pin 56)", "Intake Temperature Sensor (Pin 89)"]],
];
?>
<div class="ux-app">
    <style>
        .plug-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; padding: 120px 40px 40px; }
        .plug-card { background: linear-gradient(145deg, #121212, #080808); border: 1px solid rgba(255,255,255,0.05); border-radius: 25px; padding: 30px; }
        .plug-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid rgba(255,0,0,0.2); }
        .brand-logo { width: 60px; height: 60px; background: #000; border: 2px solid #ff0000; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 900; color: #ff0000; box-shadow: 0 0 10px rgba(255,0,0,0.3); }
        .plug-brand { font-size: 20px; font-weight: 900; color: #fff; }
        .plug-ecu { font-size: 12px; color: rgba(255,255,255,0.4); }
        .plug-option { background: #ff0000; color: #fff; font-size: 11px; font-weight: 900; padding: 6px 12px; border-radius: 8px; display: inline-block; margin-bottom: 20px; }
        .disconnect-item { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 12px 15px; font-size: 13px; color: #fff; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
    </style>

    <?php include __DIR__ . "/partials/user_sidebar.php"; ?>
    <div class="ux-content">
        <main class="main full">
            <?php include __DIR__ . "/partials/topbar.php"; ?>
            <div class="plug-grid">
                <?php foreach($plug_data as $plug): ?>
                <div class="plug-card">
                    <div class="plug-header">
                        <div class="brand-logo"><?= $plug["logo"] ?></div>
                        <div><div class="plug-brand"><?= $plug["brand"] ?></div><div class="plug-ecu"><?= $plug["ecu"] ?></div></div>
                    </div>
                    <div class="plug-option"><?= $plug["option"] ?></div>
                    <div style="font-size: 12px; font-weight: 900; color: #ff0000; margin-bottom: 15px; text-transform: uppercase;">⚠️ Manuel İşlemler</div>
                    <?php foreach($plug["disconnects"] as $d): ?>
                    <div class="disconnect-item">🔌 <?= $d ?></div>
                    <?php endforeach; ?>
                </div>
                <?php endforeach; ?>
            </div>
        </main>
    </div>
</div>
<?php include __DIR__ . "/partials/footer.php"; ?>
