/* Shared styles for Tradebrary product pages — matches the ninjatrader.html theme */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #10b981;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.7;
}

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

/* Navigation */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
nav .container { display: flex; justify-content: space-between; align-items: center; height: 90px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 80px; width: auto; border-radius: 12px; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { color: var(--gray); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--white); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 12px 24px; border-radius: 8px;
    font-weight: 600; font-size: 1rem; text-decoration: none;
    transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* Product header */
.product-header { padding: 120px 0 48px; background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%); }
.breadcrumb { font-size: 0.9rem; color: var(--gray); margin-bottom: 20px; }
.breadcrumb a { color: var(--gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--white); }
.product-header h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; line-height: 1.15; margin-bottom: 16px; max-width: 860px; }
.product-header h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.product-header .lead { font-size: 1.2rem; color: #cbd5e1; max-width: 720px; margin-bottom: 28px; }
.product-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.purchase-note { font-size: 0.85rem; color: #cbd5e1; margin-top: 16px; max-width: 720px; }
.purchase-note a { color: #cbd5e1; text-decoration: underline; }
.purchase-note a:hover { color: var(--white); }

/* Screenshot */
.product-shot { margin-top: 40px; }
.product-shot img {
    display: block; width: 100%; max-width: 640px; height: auto;
    border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: #0b1220;
}
.product-shot figcaption { color: var(--gray); font-size: 0.9rem; margin-top: 10px; }

/* Article content */
.product-content { padding: 64px 0 24px; }
.product-content section { max-width: 820px; margin-bottom: 52px; }
.product-content h2 { font-size: 1.6rem; line-height: 1.3; margin-bottom: 16px; color: var(--white); }
.product-content h3 { font-size: 1.15rem; margin: 24px 0 8px; color: var(--white); }
.product-content p { color: #cbd5e1; margin-bottom: 14px; }
.product-content ul, .product-content ol { color: #cbd5e1; margin: 0 0 14px 22px; }
.product-content li { margin-bottom: 8px; }
.product-content p a, .product-content li a, .product-content td a { color: var(--primary); text-decoration: none; }
.product-content p a:hover, .product-content li a:hover, .product-content td a:hover { text-decoration: underline; }
.product-content strong { color: var(--white); }

/* Settings table */
.table-wrap { overflow-x: auto; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.settings-table th, .settings-table td {
    text-align: left; vertical-align: top; padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.settings-table th { background: var(--dark-light); color: var(--white); font-weight: 600; }
.settings-table td { color: #cbd5e1; }
.settings-table td:first-child { color: var(--white); font-weight: 500; }

/* Callout */
.callout {
    background: var(--dark-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-left: 4px solid var(--secondary);
    border-radius: 8px;
    padding: 18px 22px;
    margin: 20px 0;
}
.callout p:last-child { margin-bottom: 0; }

/* FAQ */
.faq-item {
    background: var(--dark-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 14px;
}
.product-content .faq-item h3 { margin: 0 0 8px; font-size: 1.05rem; }
.product-content .faq-item p { margin-bottom: 0; }

/* Related products */
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 20px; }
.related-card {
    display: block; padding: 22px; border-radius: 12px; text-decoration: none;
    background: var(--dark-light); border: 1px solid rgba(255,255,255,0.1);
    transition: border-color 0.2s, transform 0.2s;
}
.related-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.related-card strong { display: block; margin-bottom: 6px; color: var(--white); }
.related-card span { color: #94a3b8; font-size: 0.95rem; }

/* Bottom call to action */
.product-cta {
    text-align: center; padding: 48px 24px; margin: 8px 0 64px;
    background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(16,185,129,0.12) 100%), var(--dark-light);
    border: 1px solid var(--primary); border-radius: 16px;
}
.product-cta h2 { font-size: 1.6rem; margin-bottom: 10px; color: var(--white); }
.product-cta p { color: #cbd5e1; margin-bottom: 24px; }
.product-cta .product-actions { justify-content: center; }
.product-cta .purchase-note { margin: 16px auto 0; }

/* Footer */
footer { padding: 60px 0 30px; background: var(--dark); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { color: var(--gray); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.trademark-notice { margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); max-width: 780px; }
.trademark-notice p { color: var(--gray); font-size: 0.8rem; line-height: 1.6; margin-bottom: 10px; }
.trademark-notice .notice-heading { color: #94a3b8; font-weight: 600; margin-top: 16px; margin-bottom: 6px; }
.copyright {
    color: var(--gray); font-size: 0.875rem; text-align: center;
    margin-top: 40px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1);
}

/* Whop redirect modal */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--dark-light); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px;
    max-width: 480px; width: 100%; padding: 36px 32px; text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal h3 { font-size: 1.4rem; margin-bottom: 16px; color: var(--white); }
.modal p { color: #cbd5e1; margin-bottom: 28px; line-height: 1.7; }
.modal .btn { width: 100%; }

.product-shot.wide img { max-width: 100%; }
.product-content .product-shot { margin: 24px 0 8px; }

.product-shot.portrait img { max-width: 420px; }
.product-shot.small img { width: auto; }
.video-embed { aspect-ratio: 16 / 9; max-width: 820px; margin: 8px 0; }
.video-embed iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }
.product-content pre {
    background: var(--dark-light); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    padding: 16px 20px; margin: 0 0 14px; overflow-x: auto;
    color: #e2e8f0; font-size: 0.9rem; line-height: 1.6;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    .nav-links.open {
        display: flex; flex-direction: column; gap: 0;
        position: absolute; top: 90px; left: 0; right: 0;
        padding: 8px 24px 16px;
        background: var(--dark);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-links.open a { display: block; padding: 12px 0; }
    .product-actions .btn { flex: 1 1 auto; }
    .footer-content { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; }
}
