/*
Theme Name: SiteFlow Digital
Theme URI: https://siteflow.io
Author: EaseIn Team
Author URI: https://siteflow.io
Description: A premium, light-mode SaaS theme for selling digital products and plugins. Built for speed and conversions.
Version: 1.0.2
Text Domain: siteflow-digital
Tags: e-commerce, software, light-mode, minimal
*/

/* -------------------------------------------------------------------------- */
/*	1. Variables & Reset
/* -------------------------------------------------------------------------- */

:root {
    /* Colors - Light Mode Base */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);

    /* Text Colors */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    /* Brand Colors - User Palette */
    --brand-primary: #186f9f;
    /* Deep Blue */
    --brand-secondary: #e7000b;
    /* Vibrant Red */
    --brand-accent: #f97316;
    /* Orange */
    --brand-glow: rgba(24, 111, 159, 0.15);

    /* Accents */
    --accent-success: #10b981;
    --accent-warning: #f97316;
    --accent-error: #e7000b;

    /* Borders */
    --border-light: #e2e8f0;
    --border-hover: #cbd5e1;

    /* Spacing */
    --container-width: 1280px;
    --header-height: 80px;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Responsive Table Wrapper */
@media (max-width: 768px) {

    .woocommerce-orders-table,
    .woocommerce-MyAccount-downloads {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* -------------------------------------------------------------------------- */
/*	2. Utility Classes
/* -------------------------------------------------------------------------- */

/* Container - Hybrid approach (Compatible with Tailwind .container class) */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    width: 100%;
    /* clear: both; - Removing as it can cause layout jumps */
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), #207db0);
    color: white;
    box-shadow: 0 4px 15px var(--brand-glow);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--brand-glow);
    color: white;
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: #f1f5f9;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* -------------------------------------------------------------------------- */
/*	3. Layout Components
/* -------------------------------------------------------------------------- */

/* Header */
.site-header {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

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

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    letter-spacing: -0.03em;
    color: var(--brand-primary);
}

.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.main-nav a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--brand-primary);
}

/* Footer */
.site-footer {
    padding: 80px 0 40px;
    background: #f1f5f9;
    /* Slightly darker than body for contrast */
    border-top: 1px solid var(--border-light);
    color: var(--text-muted);
}

.site-footer h3,
.site-footer h4 {
    color: var(--text-main);
}

/* -------------------------------------------------------------------------- */
/*	4. Product Layout & Responsive Grid
/* -------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------- */
/*	4. Product Layout (Legacy - Handled by Tailwind now)
/* -------------------------------------------------------------------------- */

/* Keeping minimal overrides if needed */

/* -------------------------------------------------------------------------- */
/*	5. WooCommerce Account Styles (Dashboard UI)
/* -------------------------------------------------------------------------- */

.woocommerce::before {
    content: none !important;
}

.single-product h1,
.single-product h2,
.single-product h3,
.single-product h4,
.single-product h5,
.single-product h6 {
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 1rem;
    margin-top: 20px;
    font-size: 1.2rem;
}

del span.woocommerce-Price-amount.amount bdi {
    color: var(--brand-secondary);
}

span.woocommerce-Price-amount.amount bdi {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none !important;
}

/* Account Page Grid - Responsive */
.woocommerce-account .woocommerce {
    display: flex;
    flex-direction: column;
    /* Mobile First: Stacked */
    gap: 40px;
}

@media (min-width: 1024px) {
    .woocommerce-account .woocommerce {
        flex-direction: row;
        /* Desktop: Sidebar + Content */
        gap: 60px;
        align-items: start;
    }
}

/* Force Woo Elements to behave in Grid */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.woocommerce-account .woocommerce nav.woocommerce-MyAccount-navigation {
    width: 30% !important;
}

/* Account Headings */
.woocommerce-account h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--text-main);
}

/* Sidebar Navigation */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 10px;
    /* Sticky logic handled by file context or Tailwind classes if wrapped properly */
}

/* Mobile Sidebar Scroll */
@media (max-width: 1024px) {
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-direction: column;
        overflow-x: auto;
        white-space: nowrap;
        margin-bottom: 2rem;
    }

    .woocommerce-MyAccount-navigation li {
        margin-right: 0.5rem;
    }
}

.woocommerce-MyAccount-navigation li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-muted);
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.woocommerce-MyAccount-navigation li a:hover {
    background: #f1f5f9;
    color: var(--brand-primary);
}

.woocommerce-MyAccount-navigation li.is-active a {
    background: rgba(24, 111, 159, 0.1);
    color: var(--brand-primary);
    font-weight: 600;
}

/* Content Area */
.woocommerce-MyAccount-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 40px;

}

.dashboard-welcome-banner {
    margin-top: 2rem;
}

/* Orders Table */
.woocommerce-orders-table {
    width: 100%;
    margin-top: 20px;
}

.woocommerce-orders-table th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid var(--border-light);
    font-weight: 700;
}

.woocommerce-orders-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-light);
}

/* Address & Forms */
.woocommerce-Address {
    background: var(--bg-body);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
}

.woocommerce-address-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.woocommerce-form-row {
    margin-bottom: 24px;
}

.woocommerce-Input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.woocommerce-Button.button {
    background: var(--brand-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
}