/* ===== CSS Variables ===== */
:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B83FF;
    --secondary: #FF6584;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --dark: #1a1a2e;
    --dark-2: #16213e;
    --dark-3: #0f3460;
    --light: #f8f9fa;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 5px 30px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--light);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ===== Header / Navbar ===== */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.navbar-logo img {
    height: 36px;
    width: auto;
    border-radius: 8px;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-links a {
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-links a:hover,
.navbar-links a.active {
    color: var(--primary);
    background: rgba(108, 99, 255, 0.08);
}

/* More dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown-toggle::after {
    content: '';
    border: solid #555;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    margin-top: -3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px;
    display: none;
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #555;
    font-size: 0.9rem;
    border-radius: 6px;
}

.dropdown-menu a:hover {
    background: rgba(108, 99, 255, 0.08);
    color: var(--primary);
}

/* Mobile hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: #333;
    transition: var(--transition);
    border-radius: 2px;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Products Grid ===== */
.products-section {
    padding: 50px 20px;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--dark);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Product Card ===== */
.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image .credits-icon {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
}

.product-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.product-credits {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.product-description {
    color: var(--gray);
    font-size: 0.88rem;
    margin-bottom: 16px;
    flex: 1;
}

.product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
}

.product-price .currency {
    font-size: 0.9rem;
    font-weight: 600;
}

.product-original-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.9rem;
}

.product-discount {
    background: #e8f5e9;
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.btn-buy {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-buy:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

.btn-buy:disabled {
    background: var(--gray-light);
    color: var(--gray);
    cursor: not-allowed;
    transform: none;
}

/* ===== Checkout Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-light);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.15);
}

/* ===== Payment Method Selector ===== */
.payment-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-method {
    flex: 1;
    padding: 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    background: var(--white);
}

.payment-method:hover {
    border-color: var(--primary-light);
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgba(108, 99, 255, 0.05);
}

.payment-method img {
    height: 30px;
    margin-bottom: 6px;
}

.payment-method span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Order Success / Failed ===== */
.result-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.result-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 520px;
    width: 100%;
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.result-icon.success {
    color: var(--success);
}

.result-icon.failed {
    color: var(--danger);
}

.result-card h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.result-card .subtitle {
    color: var(--gray);
    margin-bottom: 24px;
}

/* Order details table */
.order-details {
    text-align: left;
    width: 100%;
    margin-bottom: 24px;
}

.order-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.95rem;
}

.order-details .detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--gray);
    font-weight: 500;
}

.detail-value {
    font-weight: 600;
    color: var(--dark);
}

/* Coupon code reveal */
.coupon-reveal {
    background: #f0f0ff;
    border: 2px dashed var(--primary);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.coupon-code {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.coupon-code.hidden {
    filter: blur(6px);
    user-select: none;
}

.btn-reveal {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--gray);
    transition: var(--transition);
    padding: 4px;
}

.btn-reveal:hover {
    color: var(--primary);
}

.btn-copy {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-copy:hover {
    background: var(--primary-dark);
}

/* ===== Orders Page ===== */
.orders-section {
    padding: 40px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.orders-warning {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #e65100;
}

.order-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    transition: var(--transition);
}

.order-card:hover {
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.order-id {
    font-weight: 700;
    color: var(--dark);
    font-size: 0.9rem;
}

.order-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.order-status.success {
    background: #e8f5e9;
    color: var(--success);
}

.order-status.failed {
    background: #ffebee;
    color: var(--danger);
}

.order-status.pending {
    background: #fff3e0;
    color: var(--warning);
}

.order-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.order-body .label {
    color: var(--gray);
}

.order-body .value {
    font-weight: 600;
    text-align: right;
}

.order-coupon {
    background: #f5f5ff;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.no-orders {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
}

.no-orders .icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

/* ===== Legal / Static Pages ===== */
.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.page-content h1 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 8px;
}

.page-content .last-updated {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.page-content h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-top: 32px;
    margin-bottom: 12px;
}

.page-content p,
.page-content li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 12px;
}

.page-content ul,
.page-content ol {
    padding-left: 24px;
}

.page-content .warning-box {
    background: #fff3e0;
    border-left: 4px solid var(--warning);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
}

.page-content .info-box {
    background: #e8eaf6;
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 20px 0;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 20px 24px;
    margin-top: auto;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 8px;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1rem;
}

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

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Loading Spinner ===== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    flex-direction: column;
    gap: 16px;
}

.loading-overlay.show {
    display: flex;
}

.loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border-color: rgba(108, 99, 255, 0.2);
    border-top-color: var(--primary);
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark);
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 32px;
}

.contact-info-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
}

.contact-info-card .icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

.contact-info-card h3 {
    margin-bottom: 8px;
    color: var(--dark);
}

.contact-info-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar-links {
        position: fixed;
        top: 64px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 16px;
        box-shadow: var(--shadow-lg);
        display: none;
        gap: 4px;
    }

    .navbar-links.show {
        display: flex;
    }

    .navbar-links a {
        width: 100%;
        padding: 12px 16px;
    }

    .hamburger {
        display: flex;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

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

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

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .order-body {
        grid-template-columns: 1fr;
    }

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

    .payment-methods {
        flex-direction: column;
    }

    .result-card {
        padding: 24px;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding: 0 0 0 16px;
    }
}

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

    .section-title {
        font-size: 1.4rem;
    }

    .coupon-code {
        font-size: 1rem;
    }
}
