/**
 * base.css - Foundation styles for IndianShopping.com (Platform Core)
 * Provides CSS custom properties (design tokens), resets, and base styles
 * used by platform-core pages that reference /static/css/shared/base.css
 */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Design Tokens (Light Theme) ===== */
:root {
    /* Brand colours */
    --primary-50: #fef7ed;
    --primary-500: #f97316;
    --primary-600: #ea580c;
    --primary-700: #c2410c;
    --primary-900: #7c2d12;
    --accent-500: #10b981;
    --accent-600: #059669;

    /* Surfaces */
    --surface-primary: #ffffff;
    --surface-secondary: #f9fafb;
    --surface-tertiary: #f3f4f6;
    --surface-hover: #f3f4f6;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;

    /* Borders */
    --border-primary: #e5e7eb;
    --border-secondary: #d1d5db;

    /* Accent */
    --accent-primary: #f97316;
    --accent-hover: #ea580c;
    --accent-primary-alpha: rgba(249, 115, 22, 0.15);

    /* Semantic */
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-info: #3b82f6;
}

/* ===== Dark Theme Tokens ===== */
[data-theme="dark"], .dark {
    --surface-primary: #0f172a;
    --surface-secondary: #1e293b;
    --surface-tertiary: #334155;
    --surface-hover: #334155;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;

    --border-primary: #334155;
    --border-secondary: #475569;

    --accent-primary: #f97316;
    --accent-hover: #fb923c;
    --accent-primary-alpha: rgba(249, 115, 22, 0.2);

    --color-success: #34d399;
    --color-error: #f87171;
    --color-warning: #fbbf24;
    --color-info: #60a5fa;
}

[data-theme="dark"] body, .dark body {
    color: var(--text-primary);
    background-color: var(--surface-primary);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

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

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

/* ===== Common Utilities ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

/* ===== Form Elements ===== */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===== Scrollbar (dark theme) ===== */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--surface-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}
