/**
 * ============================================================
 * BAGS&GO - Design Tokens / CSS Variables
 * ============================================================
 * 
 * Central source of truth for all design tokens.
 * Import this file first in your main stylesheets.
 * 
 * @version 1.0.0
 * @since 2024-11-26
 * 
 * Usage:
 * @import url('base/_variables.css');
 * 
 * Or in PHP:
 * wp_enqueue_style('bags-variables', get_stylesheet_directory_uri() . '/assets/css/base/_variables.css');
 * ============================================================
 */

:root {
    /* ========================================
     * COLOR PALETTE - Brand Colors
     * ======================================== */
    
    /* Primary - Orange (Main brand color) */
    --color-primary: #FF914D;
    --color-primary-hover: #E87F3D;
    --color-primary-light: #FFB380;
    --color-primary-dark: #CC7340;
    --color-primary-rgb: 255, 145, 77;
    
    /* Secondary - Dark Navy (Headers, text) */
    --color-secondary: #121E35;
    --color-secondary-light: #1E2D4A;
    --color-secondary-dark: #0A1220;
    --color-secondary-rgb: 18, 30, 53;
    
    /* Accent - Blue (Links, secondary actions) */
    --color-accent: #1746FF;
    --color-accent-hover: #0035E6;
    --color-accent-light: #4D6FFF;
    --color-accent-rgb: 23, 70, 255;
    
    /* ========================================
     * COLOR PALETTE - Semantic Colors
     * ======================================== */
    
    /* Success */
    --color-success: #10B981;
    --color-success-light: #D1FAE5;
    --color-success-dark: #059669;
    
    /* Warning */
    --color-warning: #F59E0B;
    --color-warning-light: #FEF3C7;
    --color-warning-dark: #D97706;
    
    /* Error */
    --color-error: #EF4444;
    --color-error-light: #FEE2E2;
    --color-error-dark: #DC2626;
    
    /* Info */
    --color-info: #3B82F6;
    --color-info-light: #DBEAFE;
    --color-info-dark: #2563EB;
    
    /* ========================================
     * COLOR PALETTE - Neutral Colors
     * ======================================== */
    
    --color-white: #FFFFFF;
    --color-black: #000000;
    
    /* Gray Scale */
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-gray-900: #111827;
    
    /* ========================================
     * COLOR PALETTE - Background Colors
     * ======================================== */
    
    --bg-primary: var(--color-white);
    --bg-secondary: var(--color-gray-50);
    --bg-tertiary: var(--color-gray-100);
    --bg-dark: var(--color-secondary);
    --bg-dark-light: var(--color-secondary-light);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    --gradient-dark: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    --gradient-hero: linear-gradient(180deg, rgba(18, 30, 53, 0.9) 0%, rgba(18, 30, 53, 0.7) 100%);
    
    /* ========================================
     * TYPOGRAPHY - Font Families
     * ======================================== */
    
    --font-primary: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', 'Monaco', monospace;
    
    /* ========================================
     * TYPOGRAPHY - Font Sizes (Fluid Scale)
     * ======================================== */
    
    /* Base size: 16px */
    --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);      /* 12-14px */
    --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);        /* 14-16px */
    --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);        /* 16-18px */
    --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);       /* 18-20px */
    --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);        /* 20-24px */
    --font-size-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);         /* 24-32px */
    --font-size-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);     /* 30-40px */
    --font-size-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3rem);         /* 36-48px */
    --font-size-5xl: clamp(3rem, 2.25rem + 3.75vw, 4rem);           /* 48-64px */
    
    /* ========================================
     * TYPOGRAPHY - Font Weights
     * ======================================== */
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    /* ========================================
     * TYPOGRAPHY - Line Heights
     * ======================================== */
    
    --line-height-tight: 1.2;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* ========================================
     * TYPOGRAPHY - Letter Spacing
     * ======================================== */
    
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
    
    /* ========================================
     * SPACING - Scale (4px base)
     * ======================================== */
    
    --spacing-0: 0;
    --spacing-1: 0.25rem;   /* 4px */
    --spacing-2: 0.5rem;    /* 8px */
    --spacing-3: 0.75rem;   /* 12px */
    --spacing-4: 1rem;      /* 16px */
    --spacing-5: 1.25rem;   /* 20px */
    --spacing-6: 1.5rem;    /* 24px */
    --spacing-8: 2rem;      /* 32px */
    --spacing-10: 2.5rem;   /* 40px */
    --spacing-12: 3rem;     /* 48px */
    --spacing-16: 4rem;     /* 64px */
    --spacing-20: 5rem;     /* 80px */
    --spacing-24: 6rem;     /* 96px */
    --spacing-32: 8rem;     /* 128px */
    
    /* Section Spacing */
    --section-padding-y: clamp(3rem, 5vw, 6rem);
    --section-padding-x: clamp(1rem, 3vw, 2rem);
    
    /* ========================================
     * LAYOUT - Container Widths
     * ======================================== */
    
    --container-xs: 20rem;    /* 320px */
    --container-sm: 24rem;    /* 384px */
    --container-md: 28rem;    /* 448px */
    --container-lg: 32rem;    /* 512px */
    --container-xl: 36rem;    /* 576px */
    --container-2xl: 42rem;   /* 672px */
    --container-3xl: 48rem;   /* 768px */
    --container-4xl: 56rem;   /* 896px */
    --container-5xl: 64rem;   /* 1024px */
    --container-6xl: 72rem;   /* 1152px */
    --container-7xl: 80rem;   /* 1280px */
    --container-full: 100%;
    
    /* Main container (site-wide) */
    --container-max: 1400px;
    --container-content: 1200px;
    --container-narrow: 800px;
    
    /* ========================================
     * LAYOUT - Breakpoints (for reference)
     * Use in media queries, not as CSS variables
     * ======================================== */
    
    /* 
     * --breakpoint-xs: 320px;
     * --breakpoint-sm: 480px;
     * --breakpoint-md: 768px;
     * --breakpoint-lg: 1024px;
     * --breakpoint-xl: 1280px;
     * --breakpoint-2xl: 1440px;
     * --breakpoint-3xl: 1920px;
     */
    
    /* ========================================
     * BORDERS
     * ======================================== */
    
    --border-width-thin: 1px;
    --border-width-base: 2px;
    --border-width-thick: 4px;
    
    --border-radius-none: 0;
    --border-radius-sm: 0.25rem;   /* 4px */
    --border-radius-base: 0.5rem;  /* 8px */
    --border-radius-md: 0.75rem;   /* 12px */
    --border-radius-lg: 1rem;      /* 16px */
    --border-radius-xl: 1.5rem;    /* 24px */
    --border-radius-2xl: 2rem;     /* 32px */
    --border-radius-full: 9999px;
    
    /* ========================================
     * SHADOWS
     * ======================================== */
    
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-base: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Colored shadows */
    --shadow-primary: 0 10px 40px rgba(var(--color-primary-rgb), 0.3);
    --shadow-secondary: 0 10px 40px rgba(var(--color-secondary-rgb), 0.3);
    
    /* ========================================
     * TRANSITIONS
     * ======================================== */
    
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-slower: 500ms ease;
    
    /* Specific transitions */
    --transition-colors: color 250ms ease, background-color 250ms ease, border-color 250ms ease;
    --transition-transform: transform 250ms ease;
    --transition-opacity: opacity 250ms ease;
    --transition-all: all 250ms ease;
    
    /* ========================================
     * Z-INDEX SCALE
     * ======================================== */
    
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-header: 1000;
    --z-mobile-menu: 1100;
    --z-notification: 9999;
    
    /* ========================================
     * HEADER SPECIFIC
     * ======================================== */
    
    --header-height: 80px;
    --header-height-scrolled: 70px;
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-bg-scrolled: rgba(var(--color-primary-rgb), 0.95);
    --header-backdrop-blur: blur(10px);
    
    /* ========================================
     * BUTTONS
     * ======================================== */
    
    --btn-padding-x: var(--spacing-6);
    --btn-padding-y: var(--spacing-3);
    --btn-font-size: var(--font-size-base);
    --btn-font-weight: var(--font-weight-semibold);
    --btn-border-radius: var(--border-radius-base);
    
    /* Button sizes */
    --btn-sm-padding-x: var(--spacing-4);
    --btn-sm-padding-y: var(--spacing-2);
    --btn-sm-font-size: var(--font-size-sm);
    
    --btn-lg-padding-x: var(--spacing-8);
    --btn-lg-padding-y: var(--spacing-4);
    --btn-lg-font-size: var(--font-size-lg);
    
    /* ========================================
     * FORM INPUTS
     * ======================================== */
    
    --input-padding-x: var(--spacing-4);
    --input-padding-y: var(--spacing-3);
    --input-font-size: var(--font-size-base);
    --input-border-color: var(--color-gray-300);
    --input-border-radius: var(--border-radius-base);
    --input-focus-ring: 0 0 0 3px rgba(var(--color-primary-rgb), 0.2);
    
    /* ========================================
     * CARDS
     * ======================================== */
    
    --card-padding: var(--spacing-6);
    --card-border-radius: var(--border-radius-lg);
    --card-shadow: var(--shadow-base);
    --card-shadow-hover: var(--shadow-lg);
    
    /* ========================================
     * FAQ COMPONENT
     * ======================================== */
    
    --faq-item-bg: var(--color-white);
    --faq-item-border: var(--color-gray-200);
    --faq-item-radius: var(--border-radius-lg);
    --faq-question-padding: var(--spacing-5);
    --faq-answer-padding: var(--spacing-5);
    --faq-icon-color: var(--color-primary);
}

/* ========================================
 * DARK MODE OVERRIDES
 * ======================================== */

[data-theme="dark"],
.dark-mode {
    --bg-primary: var(--color-secondary);
    --bg-secondary: var(--color-secondary-light);
    --bg-tertiary: var(--color-secondary-dark);
    
    --color-text-primary: var(--color-gray-100);
    --color-text-secondary: var(--color-gray-300);
    --color-text-muted: var(--color-gray-400);
    
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* ========================================
 * REDUCED MOTION
 * ======================================== */

@media (prefers-reduced-motion: reduce) {
    :root {
        --transition-fast: 0ms;
        --transition-base: 0ms;
        --transition-slow: 0ms;
        --transition-slower: 0ms;
    }
}
