:root {
    --primary: #003e6b;
    --primary-dark: #4338CA;
    --secondary: #059669;
    --secondary-dark: #047857;
    --light-bg: #F9FAFB;
    --dark-text: #1F2937;
    --light-text: #ffffff;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    --security-color: #1E40AF;
}

body {
    font-family: "Noto Sans Thai", 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
}

/* Navbar Styles */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Language Switcher */
.language-switcher {
    display: flex;
}

.language-switcher button {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    border: none;
    transition: all 0.3s;
}

.language-switcher button:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.language-switcher button:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.language-switcher button.active {
    background-color: var(--primary);
    color: white;
    font-weight: 500;
}

.language-switcher button:not(.active) {
    background-color: #e2e8f0;
    color: #64748b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 5rem 0;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.hero-image {
    max-width: 350px;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

/* Privacy Banner */
.privacy-banner {
    margin-top: -3rem;
    padding-bottom: 2rem;
}

.privacy-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 10;
}

.privacy-icon {
    font-size: 2.5rem;
    color: var(--security-color);
    margin-bottom: 1rem;
}

.privacy-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.privacy-badges .badge {
    background-color: var(--light-bg);
    color: var(--dark-text);
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
}

.privacy-badges .badge i {
    margin-right: 0.5rem;
    color: var(--primary);
}

/* Feature Boxes */
.features {
    padding: 3rem 0;
}

.feature-box {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Section Panels */
.section-panel {
    padding: 4rem 0;
}

.panel-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.panel-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.panel-header i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1rem;
}

.panel-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0;
    font-weight: 600;
}

/* PromptPay ID Type Selector */
.pp-id-type {
    margin-bottom: 2rem;
}

.pp-id-selector {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.pp-id-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background-color: var(--light-bg);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.pp-id-option i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.pp-id-option span {
    font-weight: 500;
}

.pp-id-option.active {
    background-color: var(--primary);
    color: white;
}

.pp-id-option.active i {
    color: white;
}

.pp-id-option:hover:not(.active) {
    background-color: #e5e7eb;
}

/* Form Elements */
.form-control, .form-select {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.id-input-container {
    position: relative;
}

.form-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* Color Picker Style */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-input {
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.color-input input[type="color"] {
    width: 150%;
    height: 150%;
    transform: translate(-25%, -25%);
    padding: 0;
    border: none;
    cursor: pointer;
}

.color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.color-preset {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.color-preset:hover {
    transform: scale(1.1);
}

.color-preset.active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary);
}

/* Logo Options */
.logo-options {
    display: flex;
    gap: 1rem;
}

.logo-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.logo-preview {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 8px;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    border: 2px solid #e2e8f0;
    overflow: hidden;
}

.logo-preview.empty {
    color: #cbd5e1;
}

.logo-preview.custom {
    color: var(--primary);
    background-color: #eef2ff;
    border-color: #c7d2fe;
}

.logo-preview img {
    max-width: 100%;
    max-height: 100%;
}

.logo-option span {
    font-size: 0.875rem;
}

.logo-option.active .logo-preview {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.logo-option.active span {
    color: var(--primary);
    font-weight: 500;
}

/* Privacy Notice */
.privacy-notice {
    display: flex;
    align-items: center;
    background-color: #eef2ff;
    padding: 1rem;
    border-radius: 8px;
    color: var(--primary-dark);
}

.privacy-notice i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
}

/* QR Preview Table - Enhanced Styling */
.qr-preview-container {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
}

#qrcode-preview {
    width: 250px;
    height: 250px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #e2e8f0;
    border-radius: 8px;
}

.qr-info {
    text-align: center;
    margin-top: 1rem;
}

.qr-id {
    font-weight: 600;
    font-size: 1.1rem;
}

.qr-amount {
    color: var(--secondary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.qr-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: white;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #eee;
    margin-bottom: 2rem;
}

.nav-tabs .nav-item .nav-link {
    border: none;
    color: var(--dark-text);
    padding: 0.8rem 1.5rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-tabs .nav-item .nav-link.active {
    color: var(--primary);
    background-color: transparent;
    border-bottom: 3px solid var(--primary);
}

/* Price List */
.price-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.price-item {
    background-color: var(--light-bg);
    padding: 1rem;
    border-radius: 8px;
}

/* Progress Bar */
.progress {
    height: 25px;
    border-radius: 8px;
    background-color: #f1f5f9;
}

.progress-bar {
    background-color: var(--primary);
    font-size: 14px;
    line-height: 25px;
}

/* QR Preview Table */
.qr-preview-container {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.qr-preview-container th,
.qr-preview-container td {
    padding: 15px;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.qr-preview-container th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    padding: 12px 15px;
}

.qr-preview-container td {
    padding: 15px;
}

/* First column styling - ลำดับ */
.qr-preview-container td:first-child {
    font-weight: 600;
    font-size: 1.1rem;
    color: #64748b;
    width: 60px;
}

/* Second column styling - รายละเอียด */
.qr-preview-container td:nth-child(2) {
    min-width: 200px;
    padding: 20px;
}

/* Third column styling - QR Code */
.qr-preview-container td:last-child {
    background-color: #fcfcfc;
    width: 180px;
}

/* QR Image styling */
.qr-image {
    width: 150px;
    height: 150px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    background-color: white;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Badge styling for amount */
.badge.bg-primary {
    background-color: #003e6b !important;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
}

/* Styling for merchant name */
.qr-preview-container strong {
    font-size: 1.1rem;
    color: #111827;
    display: block;
    margin-bottom: 5px;
}

/* Styling for ID display */
.text-secondary {
    color: #64748b !important;
    font-size: 1rem;
}

/* Hover effect on table rows */
.qr-preview-container tbody tr:hover {
    background-color: #f9fafb;
    transition: background-color 0.2s ease;
}

/* Price description styling */
.text-muted {
    color: #94a3b8 !important;
    font-size: 0.9rem;
}

/* Improved table styling */
#bulk-qr-preview-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

#bulk-qr-preview-container th {
    background-color: #f8fafc;
    padding: 12px 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#bulk-qr-preview-container td {
    padding: 15px;
    font-size: 14px;
}

#bulk-qr-preview-container tr:hover {
    background-color: #f9fafb;
}

.price-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* How-to Section */
.step-box {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Bank Support */
.bank-support {
    background-color: white;
    padding: 4rem 0;
    text-align: center;
}

.bank-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.bank-logo {
    flex: 0 0 100px;
    max-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* filter: grayscale(100%); */
    opacity: 0.7;
    transition: all 0.3s;
}

.bank-logo:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* Footer */
.footer {
    background-color: #1a202c;
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer h4, .footer h5 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.privacy-disclaimer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Scroll Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(20px);
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Toast */
.toast {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* AdSense Container */
.ad-container {
    background-color: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin: 2rem 0;
}

/* Font awesome fixes for missing icons */
.fa-database-slash:before {
    content: "\f1c0";
}
.fa-server-slash:before {
    content: "\f233";
}
.fa-wifi-slash:before {
    content: "\f6ac";
}

/* Print Styles */
@media print {
    @page {
        margin: 1cm;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    /* Hide everything except the print container */
    body > *:not(#print-container) {
        display: none !important;
    }
    
    #print-container {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Print title styling */
    #print-container h2 {
        text-align: center;
        margin-bottom: 20px;
    }
    
    /* Improve print table styling */
    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0;
    }
    
    .print-table th,
    .print-table td {
        padding: 10px;
        border: 1px solid #ccc;
        text-align: center;
    }
    
    .print-table th {
        background-color: #f8f9fa !important;
        color: black !important;
    }
    
    /* Force QR images to show */
    .qr-image {
        display: block !important;
        page-break-inside: avoid;
    }
    
    /* Handle page breaks */
    .print-qr-item {
        page-break-inside: avoid;
    }
    
    /* Show QR template full size */
    .qr-template {
        margin: 0 auto;
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
    }
}

/* Print styles for the table */
@media print {
    .print-table {
        width: 100%;
        border-collapse: collapse;
        border: 1px solid #e5e7eb;
    }
    
    .print-table th,
    .print-table td {
        border: 1px solid #e5e7eb;
        padding: 15px;
        text-align: center;
        vertical-align: middle;
    }
    
    .print-table th {
        background-color: #f8fafc !important;
        color: #475569 !important;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 14px;
    }
    
    .print-table .badge.bg-primary {
        background-color: #003e6b !important;
        color: white !important;
        font-weight: 600;
        padding: 5px 15px;
        border-radius: 999px;
        display: inline-block;
    }
    
    .print-table strong {
        font-weight: 700;
        color: #111827 !important;
    }
    
    .print-table .text-secondary {
        color: #64748b !important;
    }
    
    .print-qr-item {
        page-break-inside: avoid;
    }
    
    .qr-image {
        max-width: 150px;
        height: auto;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .privacy-banner {
        margin-top: -1.5rem;
    }
    
    .privacy-content {
        padding: 1.5rem;
    }
    
    .pp-id-selector {
        flex-direction: column;
    }
    
    .color-presets {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .logo-options {
        justify-content: space-between;
    }
    
    .section-panel {
        padding: 2rem 0;
    }
    
    .panel-container {
        padding: 1.5rem;
    }
    
    .step-box {
        flex-direction: column;
    }
    
    .step-number {
        margin-bottom: 0.5rem;
    }
    
    .bank-logo {
        flex: 0 0 80px;
        max-width: 80px;
    }
    
    .qr-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .qr-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .bank-logos {
        gap: 1rem;
    }
    
    .bank-logo {
        flex: 0 0 60px;
        max-width: 60px;
    }
}

/* QR Template Selector */
.qr-template-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    margin-left: 20px;
}

.template-option {
    width: 80px;
    height: 80px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    position: relative;
}

.template-icon {
    font-size: 28px;
    margin-bottom: 5px;
    color: #64748b;
    transition: all 0.3s;
}

.template-name {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.template-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* สีไอคอนที่แตกต่างกันสำหรับแต่ละเทมเพลต */
.template-option[data-template="template-1"] .template-icon {
    color: #4F46E5; /* สีหลักของเว็บ */
}

.template-option[data-template="template-2"] .template-icon {
    color: #0284c7; /* สีฟ้า */
}

.template-option[data-template="template-3"] .template-icon {
    color: #1e293b; /* สีเข้ม */
}

.template-option[data-template="template-4"] .template-icon {
    color: #f59e0b; /* สีส้ม (สีของ Cafe Template) */
}

.template-option[data-template="template-5"] .template-icon {
    color: #818cf8; /* สีม่วงอ่อน */
}

.template-option[data-template="template-6"] .template-icon {
    color: #ec4899; /* สีชมพู (สำหรับเทมเพลตน่ารัก) */
}

.template-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.template-option:hover .template-icon {
    transform: scale(1.1);
}

.template-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.template-option.active .template-icon {
    color: var(--primary);
}

.template-option.active .template-name {
    color: var(--primary);
    font-weight: 600;
}

/* รองรับการแสดงผลบนมือถือ */
@media (max-width: 576px) {
    .qr-template-selector {
        gap: 10px;
    }
    
    .template-option {
        width: 70px;
        height: 70px;
    }
    
    .template-icon {
        font-size: 24px;
    }
}

/* QR Code Templates */
.qr-template {
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.qr-template.active {
    display: block;
}

/* Template 1: Simple Business */
.template-1 {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.template-1 .logo-area {
    margin-bottom: 15px;
}

.template-1 .logo-area img {
    max-height: 142px;
}

.template-1 .qr-display {
    margin: 0 auto 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-1 .merchant-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.template-1 .amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.template-1 .id-display {
    color: #64748b;
    font-size: 16px;
}

.template-1 .promptpay-label {
    background: #0d3f68;
    color: white;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 10px;
}

/* Template 2: Modern Retail */
.template-2 {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.template-2 .top-banner {
    background: var(--primary);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px 8px 0 0;
    margin: -25px -25px 20px -25px;
}

.template-2 .logo-area {
    margin-bottom: 15px;
}

.template-2 .logo-area img {
    max-height: 40px;
}

.template-2 .qr-display {
    background: white;
    padding: 15px;
    border-radius: 15px;
    width: 220px;
    height: 220px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.template-2 .merchant-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.template-2 .id-display {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 10px;
}

.template-2 .amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 5px 15px;
    border-radius: 30px;
    display: inline-block;
    margin-top: 10px;
}

.template-2 .scan-text {
    margin-top: 15px;
    font-size: 14px;
    color: #475569;
}

/* Template 3: Elegant Shop */
.template-3 {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.template-3 .logo-area {
    margin-bottom: 15px;
}

.template-3 .logo-area img {
    max-height: 40px;
}

.template-3 .header {
    background: #1e293b;
    color: white;
    padding: 15px;
    text-align: center;
}

.template-3 .header h3 {
    font-size: 20px;
    margin: 0;
    font-weight: 600;
}

.template-3 .content {
    padding: 20px;
    text-align: center;
}

.template-3 .qr-display {
    background: white;
    width: 220px;
    height: 220px;
    margin: 10px auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

.template-3 .merchant-name {
    font-size: 20px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
}

.template-3 .id-display {
    color: #64748b;
    font-size: 14px;
}

.template-3 .amount {
    font-size: 26px;
    font-weight: 700;
    color: #16a34a;
    margin: 15px 0;
}

.template-3 .footer {
    background: #f1f5f9;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

/* Template 4: Cafe Style */
.template-4 {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 5px solid #f59e0b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.template-4 .header {
    background: #f59e0b;
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.template-4 .header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.template-4 .content {
    padding: 20px;
    text-align: center;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="white"/><circle cx="10" cy="10" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="30" cy="10" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="50" cy="10" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="70" cy="10" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="90" cy="10" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="10" cy="30" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="30" cy="30" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="50" cy="30" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="70" cy="30" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="90" cy="30" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="10" cy="50" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="30" cy="50" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="50" cy="50" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="70" cy="50" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="90" cy="50" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="10" cy="70" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="30" cy="70" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="50" cy="70" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="70" cy="70" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="90" cy="70" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="10" cy="90" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="30" cy="90" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="50" cy="90" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="70" cy="90" r="2" fill="%23f59e0b" opacity="0.15"/><circle cx="90" cy="90" r="2" fill="%23f59e0b" opacity="0.15"/></svg>');
}

.template-4 .qr-display {
    background: white;
    width: 220px;
    height: 220px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.template-4 .merchant-info {
    margin-top: 20px;
}

.template-4 .merchant-name {
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.template-4 .id-display {
    color: #475569;
    font-size: 14px;
    margin: 5px 0;
}

.template-4 .amount {
    font-size: 24px;
    font-weight: 700;
    color: #f59e0b;
    margin: 10px 0;
}

.template-4 .scanner-label {
    margin-top: 15px;
    background: #fef3c7;
    color: #92400e;
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Template 5: Minimal */
.template-5 {
    background: #f8fafc;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    position: relative;
}

.template-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    border-radius: 15px 15px 0 0;
}

.template-5 .qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.template-5 .qr-display {
    background: white;
    width: 220px;
    height: 220px;
    margin: 10px auto 20px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.template-5 .merchant-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.template-5 .id-display {
    color: #64748b;
    font-size: 14px;
    text-align: center;
    margin-bottom: 10px;
}

.template-5 .amount {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin: 10px 0;
}

.template-5 .promptpay-info {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #64748b;
    font-size: 13px;
}

.template-5 .promptpay-info i {
    color: var(--primary);
}

.template-6 {
    background: linear-gradient(135deg, #fecdd3 0%, #fdf2f8 100%);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.cute-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(236, 72, 153, 0.1);
    border: 2px dashed #ec4899;
}

.cute-header {
    color: #ec4899;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.heart-icon {
    color: #ec4899;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(1); }
    45% { transform: scale(1.2); }
    60% { transform: scale(1); }
    100% { transform: scale(1); }
}

.cute-qr-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto 15px;
}

.cute-qr {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 10px;
}

.cute-deco {
    position: absolute;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdf2f8;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: #ec4899;
    font-size: 14px;
}

.cute-deco.top-left {
    top: -10px;
    left: -10px;
    animation: float 3s ease-in-out infinite;
}

.cute-deco.top-right {
    top: -10px;
    right: -10px;
    animation: float 3s ease-in-out infinite 0.5s;
}

.cute-deco.bottom-left {
    bottom: -10px;
    left: -10px;
    animation: float 3s ease-in-out infinite 1s;
}

.cute-deco.bottom-right {
    bottom: -10px;
    right: -10px;
    animation: float 3s ease-in-out infinite 1.5s;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}

.cute-merchant-name {
    font-size: 22px;
    font-weight: 600;
    color: #ec4899;
    margin: 15px 0 5px;
}

.cute-id {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 5px;
}

.cute-amount {
    font-size: 24px;
    font-weight: 700;
    color: #ec4899;
    background: #fdf2f8;
    display: inline-block;
    padding: 5px 15px;
    border-radius: 30px;
    margin: 10px 0;
    border: 2px dashed #fecdd3;
}

.cute-footer {
    font-size: 14px;
    color: #64748b;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cute-footer i {
    color: #ec4899;
    font-size: 12px;
}

/* Print styles for templates - Fixed for issue #2 */
@media print {
    /* Hide all elements except the specific element to be printed */
    html, body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0 !important;
        overflow: visible;
    }
    
    body * {
        visibility: hidden;
    }
    
    #print-container, #print-container * {
        visibility: visible;
    }
    
    #print-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        padding: 1cm !important;
        margin: 0 !important;
        background-color: white;
    }
    
    .qr-template {
        width: 400px !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: 20px !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
}