/* ==========================================================================
   PayGate Store Theme Stylesheet
   ========================================================================== */

/* Design Tokens (Dark Theme Default) */
:root {
    --bg-main: #0b0f19;
    --bg-card: rgba(17, 24, 39, 0.65);
    --bg-header: rgba(11, 15, 25, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 50%, rgba(6, 182, 212, 0.3) 100%);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-bright: #ffffff;

    /* Accent Palette */
    --primary: #6366f1;       /* Indigo */
    --primary-hover: #4f46e5;
    --secondary: #8b5cf6;     /* Violet */
    --accent: #06b6d4;        /* Cyan */
    --accent-light: rgba(6, 182, 212, 0.1);
    
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    
    /* Gradients */
    --neon-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #22d3ee 100%);
    --bg-gradient: radial-gradient(circle at top, rgba(99, 102, 241, 0.15) 0%, rgba(9, 13, 22, 0) 60%);
    
    /* Shadows */
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow-shadow: 0 0 25px rgba(99, 102, 241, 0.25);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light Theme Fallback (when OS / user requests it) */
@media (prefers-color-scheme: light) {
    :root {
        --bg-main: #f8fafc;
        --bg-card: rgba(255, 255, 255, 0.8);
        --bg-header: rgba(248, 250, 252, 0.85);
        --border-color: rgba(0, 0, 0, 0.08);
        --border-glow: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 50%, rgba(6, 182, 212, 0.1) 100%);
        
        --text-main: #1e293b;
        --text-muted: #64748b;
        --text-bright: #0f172a;

        --primary: #4f46e5;
        --primary-hover: #4338ca;
        --secondary: #7c3aed;
        --accent: #0891b2;
        
        --neon-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #0891b2 100%);
        --bg-gradient: radial-gradient(circle at top, rgba(79, 70, 229, 0.08) 0%, rgba(248, 250, 252, 0) 65%);
        --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
        --glow-shadow: 0 0 20px rgba(79, 70, 229, 0.1);
    }
}

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

body {
    background-color: var(--bg-main);
    background-image: var(--bg-gradient);
    background-repeat: no-repeat;
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--accent);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

code {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Layout Wrapper */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header-container,
.site-footer-container,
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.main-container {
    flex-grow: 1;
    padding-top: 40px;
    padding-bottom: 80px;
}

/* ==========================================================================
   Header & Navigation (Codeur-Inspired Minimalist)
   ========================================================================== */
.site-header {
    background-color: var(--bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 16px 0;
}

.site-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
}

.logo-icon {
    font-size: 24px;
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.4));
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-navigation a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.main-navigation a:hover,
.main-navigation li.current-menu-item a {
    color: var(--text-bright);
}

/* Menu Toggle Button (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle .bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    transition: all 0.2s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    text-align: center;
    padding: 60px 0 80px 0;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 46px;
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-title span {
    background: var(--neon-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

/* ==========================================================================
   Catalog Product Cards (Glassmorphism & Neon Gradients)
   ========================================================================== */
.software-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--neon-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--card-shadow), var(--glow-shadow);
}

.product-card:hover::before {
    opacity: 1;
}

.product-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.product-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-meta-title h3 {
    font-size: 18px;
    margin-bottom: 2px;
}

.product-badge-platform {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    color: var(--accent);
}

.product-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    min-height: 45px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: auto;
}

.product-price-box {
    display: flex;
    flex-direction: column;
}

.product-price-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-bright);
    font-family: var(--font-heading);
}

.product-price-type {
    font-size: 11px;
    color: var(--text-muted);
}

/* Premium Button CTA */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--neon-gradient);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5), 0 0 12px rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-bright);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-bright);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.15);
}

/* ==========================================================================
   Single Product Layout (Codeur-style catalog detail page)
   ========================================================================== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-main-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.product-main-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 24px;
}

.product-detail-icon {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.product-detail-title h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

/* Description Editor style */
.product-description-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-main);
}

.product-description-body p {
    margin-bottom: 20px;
}

.product-description-body h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Sidebar Checkout Card */
.product-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 100px;
}

.sidebar-price-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.sidebar-price-val {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-bright);
    margin: 5px 0 15px 0;
    font-family: var(--font-heading);
}

.sidebar-price-val span {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.sidebar-features-list {
    list-style: none;
    margin: 25px 0;
}

.sidebar-features-list li {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-features-list li::before {
    content: '✓';
    color: var(--success);
    font-weight: bold;
}

/* Tab Layout (Changelog / Details) */
.product-tabs-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-bright);
}

.tab-btn.active {
    color: var(--primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--neon-gradient);
}

.tab-content-panel {
    display: none;
}

.tab-content-panel.active {
    display: block;
}

/* ==========================================================================
   Upsell Section Styling
   ========================================================================== */
.upsell-section {
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding-top: 40px;
}

.upsell-title {
    font-size: 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upsell-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: var(--card-shadow);
}

.upsell-info-wrap {
    display: flex;
    align-items: center;
    gap: 20px;
}

.upsell-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.upsell-meta h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.upsell-meta p {
    font-size: 13px;
    color: var(--text-muted);
}

.upsell-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.upsell-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
    font-family: var(--font-heading);
    white-space: nowrap;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    border-top: 1px solid var(--border-color);
    background-color: rgba(9, 13, 22, 0.95);
    padding: 60px 0 40px 0;
    margin-top: auto;
}

.site-footer-container {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-branding {
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu a {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-menu a:hover {
    color: var(--text-bright);
}

.footer-copyright {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-powered-by {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 960px) {
    .hero-title { font-size: 36px; }
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
    .product-sidebar-card {
        position: relative;
        top: 0;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .site-header-container {
        position: relative;
    }
    .menu-toggle {
        display: flex;
    }
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-main);
        position: absolute;
        top: 60px;
        left: 0;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 24px;
    }
    .main-navigation ul.active {
        display: flex;
    }
    .upsell-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .upsell-cta {
        width: 100%;
        justify-content: space-between;
        margin-top: 15px;
    }
}
