<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>Invoice</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            color: #333;
            line-height: 1.6;
            background: #fff;
        }
        
        .container {
            max-width: 900px;
            margin: 0 auto;
            padding: 20px;
            background: #fff;
            border: 1px solid #ddd;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        
        .header {
            text-align: center;
            margin-bottom: 30px;
            padding-bottom: 15px;
            border-bottom: 2px solid #000;
        }
        
        .header h1 {
            margin: 0;
            font-size: 28px;
            font-weight: bold;
            color: #000;
            text-transform: uppercase;
        }
        
        .header p {
            margin: 5px 0;
            font-size: 14px;
        }
        
        .bill-info {
            margin: 20px 0;
            font-size: 14px;
            display: flex;
            justify-content: space-between;
            padding: 10px;
            background: #f9f9f9;
        }
        
        .main-table {
            width: 100%;
            border-collapse: collapse;
            margin: 25px 0;
        }
        
        .main-table th,
        .main-table td {
            border: 1px solid #000;
            padding: 8px;
            font-size: 14px;
        }
        
        .details-row td {
            padding: 15px;
            border: 1px solid #000;
        }
        
        .details-row td:first-child {
            border-right: none;
        }
        
        .details-row td:last-child {
            border-left: none;
        }
        
        .details-row strong {
            display: block;
            margin-bottom: 10px;
            text-decoration: underline;
        }
        
        .product-header {
            background-color: #f0f0f0;
            text-transform: uppercase;
            text-align: center;
        }
        
        .product-row td {
            text-align: center;
        }
        
        .totals-row td {
            border: none;
            text-align: right;
            padding: 5px;
            font-size: 14px;
        }
        
        .totals-row:last-child td {
            font-weight: bold;
            border-top: 2px solid #000;
            padding-top: 10px;
        }
        
        .footer {
            margin-top: 40px;
            text-align: center;
            font-size: 14px;
            border-top: 1px solid #000;
            padding-top: 20px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="header">
            <h1>ROYAAL CRACKERS</h1>
            <p>Viswanatham, Sivakasi - 626 189</p>
        </div>

        <div class="bill-info">
            <div>
                <strong>Bill No:</strong> {{invoiceNumber}}<br>
                <strong>Date:</strong> {{invoiceDate}}
            </div>
        </div>

        <table class="main-table">
            <tr class="details-row">
                <td colspan="3">
                    <strong>Customer Details</strong> Name: {{customer.company}}<br> Mobile: {{customer.number}}<br> District: {{customer.address1}}<br> State: {{customer.address2}}
                </td>
                <td colspan="3">
                    <strong>Bank Details</strong> Bank Name: STATE BANK OF INDIA<br> A/C Name: ROYAAL CRACKERS<br> A/C Number: XXXXXXXX1234<br> A/C Type: Current Account<br> IFSC Code: SBIN0123456
                </td>
            </tr>
            <tr class="product-header">
                <th>S.No</th>
                <th>Code</th>
                <th>Product Name</th>
                <th>Qty</th>
                <th>Rate/Qty</th>
                <th>Amount</th>
            </tr>
            {{#products}}
            <tr class="product-row">
                <td>{{index}}</td>
                <td>{{code}}</td>
                <td>{{name}}</td>
                <td>{{quantity}}</td>
                <td>₹{{price}}</td>
                <td>₹{{priceTotal}}</td>
            </tr>
            {{/products}}
            <tr class="totals-row">
                <td colspan="4"></td>
                <td>Sub Total:</td>
                <td>₹{{totalNetAmount}}</td>
            </tr>
            <tr class="totals-row">
                <td colspan="4"></td>
                <td>Packing Charges:</td>
                <td>₹100.00</td>
            </tr>
            <tr class="totals-row">
                <td colspan="4"></td>
                <td><strong>Grand Total:</strong></td>
                <td><strong>₹{{totalAmount}}</strong></td>
            </tr>
        </table>

        <div class="footer">
            <p><strong>Note:</strong> As per the Supreme Court order, online sale of firecrackers is not permitted.<br> This is only an enquiry confirmation. You will be contacted to confirm your order.</p>
            <p><strong>Thank You for Your Business!</strong></p>
        </div>
    </div>
</body>

</html>