<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Low Stock Alert</title>
    <style>
        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: #f8fafc;
            margin: 0;
            padding: 0;
            color: #334155;
        }
        .container {
            max-width: 600px;
            margin: 40px auto;
            background: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .header {
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            padding: 30px;
            text-align: center;
        }
        .header h1 {
            margin: 0;
            font-size: 24px;
            font-weight: 800;
            letter-spacing: 0.5px;
        }
        .content {
            padding: 40px 30px;
        }
        .content p {
            font-size: 16px;
            line-height: 1.6;
            margin-top: 0;
            margin-bottom: 20px;
        }
        .product-card {
            background-color: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 12px;
            padding: 24px;
            margin-bottom: 30px;
        }
        .product-title {
            font-size: 18px;
            font-weight: 700;
            color: #b91c1c;
            margin-top: 0;
            margin-bottom: 12px;
        }
        .stat-row {
            display: flex;
            justify-content: space-between;
            padding: 12px 0;
            border-bottom: 1px dashed #fca5a5;
        }
        .stat-row:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }
        .stat-label {
            font-weight: 600;
            color: #7f1d1d;
        }
        .stat-value {
            font-weight: 800;
            color: #991b1b;
        }
        .btn {
            display: inline-block;
            background-color: #1e293b;
            color: #ffffff !important;
            text-decoration: none;
            padding: 14px 28px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 16px;
            text-align: center;
            width: calc(100% - 56px);
            box-sizing: border-box;
            margin-top: 10px;
        }
        .footer {
            background-color: #f1f5f9;
            padding: 20px;
            text-align: center;
            font-size: 13px;
            color: #64748b;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>⚠️ Low Stock Alert</h1>
        </div>
        <div class="content">
            <p>Hello Admin,</p>
            <p>The stock for one of your products in <strong>{{ $shopName }}</strong> has reached the minimum alert threshold and is almost running out.</p>

            <div class="product-card">
                <h2 class="product-title">{{ $product->name }}</h2>
                <div class="stat-row">
                    <span class="stat-label">Current Stock:</span>
                    <span class="stat-value" style="color: #ef4444; font-size: 18px;">{{ $product->stock }} pcs</span>
                </div>
                <div class="stat-row">
                    <span class="stat-label">Alert Threshold:</span>
                    <span class="stat-value">{{ $product->low_stock_threshold ?? 20 }} pcs</span>
                </div>
                <div class="stat-row">
                    <span class="stat-label">Product Price:</span>
                    <span class="stat-value">৳{{ $product->price }}</span>
                </div>
            </div>

            <p style="text-align: center; margin-bottom: 5px;">Please restock this item soon to avoid missing out on potential sales.</p>
            
            <a href="{{ config('app.url') }}/admin" class="btn">Go to Dashboard</a>
        </div>
        <div class="footer">
            &copy; {{ date('Y') }} {{ config('app.name', 'ShophyFast') }}. All rights reserved.<br>
            This is an automated alert from your store system.
        </div>
    </div>
</body>
</html>
