/*
Theme Name: AI Receipt Generator
Theme URI: https://receipt.pivonet.com
Author: Pivonet Technology
Description: Professional receipt generator with multiple templates and PDF export
Version: 1.0.0
*/

:root {
    --primary: #2c3e50;
    --primary-dark: #1a2632;
    --secondary: #27ae60;
    --secondary-dark: #219a52;
    --accent: #e67e22;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --dark-text: #2c3e50;
    --gray-text: #7f8c8d;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    font-size: 1.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.logo span {
    font-size: 0.9rem;
    background: none;
    -webkit-background-clip: unset;
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main-content {
    padding: 60px 0;
}

/* Generator Card */
.generator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Form Section */
.form-section {
    padding: 40px;
    background: var(--white);
}

.form-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.form-section p {
    color: var(--gray-text);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Items Section */
.items-section {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 16px;
    margin: 20px 0;
}

.items-section h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.item-row input {
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.btn-add-item {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 500;
}

.remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: var(--white);
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

/* Receipt Preview Section */
.receipt-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.receipt-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.receipt-preview {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    min-height: 500px;
}

/* Receipt Styles */
.receipt {
    font-family: 'Courier New', monospace;
    background: white;
    color: black;
}

.receipt-header {
    text-align: center;
    border-bottom: 2px dashed #ddd;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.receipt-header h2 {
    color: var(--secondary);
    margin-bottom: 5px;
}

.receipt-header p {
    color: var(--gray-text);
    margin: 5px 0;
}

.receipt-details {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.receipt-table th,
.receipt-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.receipt-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.receipt-total {
    text-align: right;
    padding: 20px;
    border-top: 2px solid #ddd;
    margin-top: 20px;
}

.total-row {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
}

.receipt-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
    font-size: 0.9rem;
    color: var(--gray-text);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn-print, .btn-pdf {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-print {
    background: var(--primary);
    color: white;
}

.btn-pdf {
    background: var(--accent);
    color: white;
}

.btn-print:hover, .btn-pdf:hover {
    transform: translateY(-2px);
}

/* Templates */
.template-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.template-btn {
    flex: 1;
    padding: 8px;
    background: var(--light-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.template-btn.active {
    border-color: #667eea;
    background: rgba(102,126,234,0.1);
    color: #667eea;
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.footer-col a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
}

/* Responsive */
@media (max-width: 968px) {
    .generator-wrapper {
        grid-template-columns: 1fr;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        text-align: center;
        box-shadow: var(--shadow);
    }
    .nav-links.active {
        display: flex;
    }
    .item-row {
        grid-template-columns: 1fr 1fr 1fr 0.5fr;
        gap: 5px;
    }
}

@media (max-width: 768px) {
    .form-section, .receipt-section {
        padding: 20px;
    }
    .receipt-details {
        flex-direction: column;
        gap: 10px;
    }
}