/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
    --secondary: #3b82f6;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.5);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom, var(--bg-darker), var(--bg-dark), var(--bg-darker));
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-small {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-brand .icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* Banner */
.banner {
    background: linear-gradient(to right, #ec4899, #ef4444, #f59e0b);
    padding: 0.75rem 0;
    text-align: center;
}

.banner p {
    margin: 0;
    font-weight: 600;
    color: white;
}

.banner .code {
    background: white;
    color: #ef4444;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 700;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.15), transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: rgba(6, 182, 212, 0.2);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, white, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(51, 65, 85, 0.5);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Products Section */
.products,
.products-page {
    padding: 4rem 0;
}

.section-header,
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2,
.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.section-header p,
.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    min-height: 3rem;
    flex: 1;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.product-price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.section-footer {
    text-align: center;
}

/* Checkout Page */
.checkout-page {
    padding: 4rem 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    margin-top: 2rem;
}

.order-summary,
.checkout-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.order-summary h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-secondary);
}

.summary-value {
    font-weight: 600;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.voucher-input {
    display: flex;
    gap: 0.5rem;
}

.voucher-input input {
    flex: 1;
}

.voucher-message {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.voucher-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.voucher-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.price-breakdown {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.price-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    border-top: 2px solid var(--border);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.price-row.discount {
    color: var(--success);
}

/* Order Page */
.order-page {
    padding: 4rem 0;
}

.success-message {
    text-align: center;
    margin-bottom: 3rem;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
    stroke-width: 3;
}

.invoice,
.payment-instructions,
.next-steps {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.invoice h2,
.payment-instructions h2,
.next-steps h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 2rem;
}

.invoice-number {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.status-badge {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid var(--warning);
}

.invoice-details {
    margin-bottom: 2rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
}

.detail-value.discount {
    color: var(--success);
}

.invoice-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.75rem;
    font-weight: 700;
    padding-top: 1rem;
    border-top: 2px solid var(--border);
}

.invoice-total .amount {
    color: var(--primary);
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--secondary);
    color: #93c5fd;
}

.instructions-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.chain-selection h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.chain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.chain-button {
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.chain-button:hover {
    border-color: var(--text-muted);
}

.chain-button.active {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

.chain-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.chain-button.active .chain-name {
    color: var(--primary);
}

.chain-tokens {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.chain-details {
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(6, 182, 212, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.chain-details h3 {
    margin-bottom: 0.5rem;
}

.chain-details-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.qr-container {
    text-align: center;
    margin-bottom: 2rem;
}

.qr-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.qr-code {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    display: inline-block;
}

.qr-code img {
    display: block;
    max-width: 600px;
    width: 100%;
    height: auto;
}

.wallet-address {
    margin-top: 1rem;
}

.wallet-address-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.address-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.address-text {
    flex: 1;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.875rem;
    word-break: break-all;
}

.copy-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.3s;
}

.copy-button:hover {
    background: rgba(51, 65, 85, 0.5);
    color: var(--primary);
}

.copy-button svg {
    width: 20px;
    height: 20px;
}

.no-selection {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1rem;
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.step-content h3 {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.step-content p {
    color: var(--text-secondary);
}

.step-content a {
    color: var(--primary);
    text-decoration: none;
}

.step-content a:hover {
    text-decoration: underline;
}

.order-actions {
    text-align: center;
    margin-top: 2rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    background: var(--bg-darker);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.footer-brand span {
    color: var(--text-secondary);
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-contact span {
    color: var(--text-secondary);
}

.footer-contact a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--primary-dark);
}

/* Product Details Page */
.product-details-page {
    padding: 4rem 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-detail-image {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-detail-description {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.product-detail-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
}

.product-detail-price span {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.product-features-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

.product-features-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(6, 182, 212, 0.1);
}

.feature-check {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
    stroke-width: 3;
    margin-top: 0.125rem;
}

.feature-item span {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .chain-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .qr-code img {
        max-width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-info h1 {
        font-size: 2rem;
    }

    .product-detail-price {
        font-size: 2.5rem;
    }

    .features-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .voucher-input {
        flex-direction: column;
    }

    .chain-grid {
        grid-template-columns: 1fr;
    }
}
