/**
 * OMEGA Sarajevo — Design Tokens
 * Modern Industrial Ecommerce / Lab Equipment Supply
 */

:root {
  /* ── Typography ─────────────────────────────────────────── */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-secondary: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;

  /* Type scale (fluid where appropriate) */
  --text-xs: 0.6875rem;    /* 11px */
  --text-sm: 0.8125rem;    /* 13px */
  --text-base: 0.9375rem;  /* 15px — dense ecommerce base */
  --text-md: 1rem;         /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: clamp(2rem, 4vw, 3rem);

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-wider: 0.08em;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ── Color — Surfaces ───────────────────────────────────── */
  --color-white: #ffffff;
  --color-surface-0: #ffffff;
  --color-surface-1: #f8f9fa;
  --color-surface-2: #f1f3f5;
  --color-surface-3: #e9ecef;
  --color-surface-4: #dee2e6;
  --color-surface-inset: #f4f5f7;
  --color-surface-elevated: #ffffff;
  --color-surface-muted: #f6f7f9;

  /* ── Color — Text ───────────────────────────────────────── */
  --color-text-primary: #1a1d21;
  --color-text-secondary: #4a5058;
  --color-text-tertiary: #6b7280;
  --color-text-muted: #8b939e;
  --color-text-inverse: #ffffff;
  --color-text-link: #c44d00;
  --color-text-link-hover: #a33f00;

  /* ── Color — Accent (Industrial Orange) ─────────────────── */
  --color-accent: #e85d04;
  --color-accent-hover: #c44d00;
  --color-accent-active: #a33f00;
  --color-accent-subtle: #fef3eb;
  --color-accent-muted: #fde8d4;
  --color-accent-border: #f5c49a;

  /* ── Color — Semantic ───────────────────────────────────── */
  --color-success: #15803d;
  --color-success-bg: #ecfdf3;
  --color-success-border: #bbf7d0;

  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;
  --color-warning-border: #fde68a;

  --color-error: #b91c1c;
  --color-error-bg: #fef2f2;
  --color-error-border: #fecaca;

  --color-info: #1d4ed8;
  --color-info-bg: #eff6ff;
  --color-info-border: #bfdbfe;

  --color-stock-in: #15803d;
  --color-stock-low: #b45309;
  --color-stock-out: #6b7280;
  --color-stock-preorder: #1d4ed8;

  /* ── Color — Borders & Dividers ─────────────────────────── */
  --color-border: #dde1e6;
  --color-border-strong: #c4c9d0;
  --color-border-subtle: #ebedf0;
  --color-divider: #e5e7eb;
  --color-focus-ring: #e85d04;
  --color-focus-ring-offset: #ffffff;

  /* ── Color — Overlays ───────────────────────────────────── */
  --color-overlay: rgba(26, 29, 33, 0.55);
  --color-overlay-light: rgba(26, 29, 33, 0.08);
  --color-scrim: rgba(26, 29, 33, 0.65);

  /* ── Spacing scale (4px base) ───────────────────────────── */
  --space-0: 0;
  --space-px: 1px;
  --space-0-5: 0.125rem;  /* 2px */
  --space-1: 0.25rem;     /* 4px */
  --space-1-5: 0.375rem;  /* 6px */
  --space-2: 0.5rem;      /* 8px */
  --space-2-5: 0.625rem;  /* 10px */
  --space-3: 0.75rem;     /* 12px */
  --space-3-5: 0.875rem;  /* 14px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-7: 1.75rem;     /* 28px */
  --space-8: 2rem;        /* 32px */
  --space-9: 2.25rem;     /* 36px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;       /* 48px */
  --space-14: 3.5rem;     /* 56px */
  --space-16: 4rem;       /* 64px */
  --space-20: 5rem;       /* 80px */
  --space-24: 6rem;       /* 96px */

  /* ── Layout ─────────────────────────────────────────────── */
  --container-max: 90rem;          /* 1440px */
  --container-narrow: 48rem;       /* 768px */
  --container-wide: 96rem;         /* 1536px */
  --container-padding: var(--space-4);
  --container-padding-lg: var(--space-6);

  --header-height: 4.5rem;         /* 72px main header */
  --topbar-height: 2.25rem;        /* 36px */
  --header-total: calc(var(--topbar-height) + var(--header-height));
  --nav-height: 2.75rem;           /* 44px category nav */
  --sticky-atc-height: 4rem;       /* 64px mobile bar */

  --sidebar-width: 17.5rem;        /* 280px filters */
  --cart-drawer-width: 26rem;      /* 416px */
  --search-dropdown-max-height: 28rem;

  /* ── Border Radius ──────────────────────────────────────── */
  --radius-xs: 0.25rem;   /* 4px */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.625rem;  /* 10px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 0.875rem; /* 14px */
  --radius-full: 9999px;  /* chips only */

  /* ── Shadows (subtle, no glass) ─────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(26, 29, 33, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 29, 33, 0.06), 0 1px 2px rgba(26, 29, 33, 0.04);
  --shadow-md: 0 4px 8px rgba(26, 29, 33, 0.06), 0 2px 4px rgba(26, 29, 33, 0.04);
  --shadow-lg: 0 8px 24px rgba(26, 29, 33, 0.08), 0 4px 8px rgba(26, 29, 33, 0.04);
  --shadow-xl: 0 16px 40px rgba(26, 29, 33, 0.1), 0 8px 16px rgba(26, 29, 33, 0.06);
  --shadow-drawer: -4px 0 24px rgba(26, 29, 33, 0.12);
  --shadow-dropdown: 0 8px 24px rgba(26, 29, 33, 0.1), 0 2px 8px rgba(26, 29, 33, 0.06);
  --shadow-sticky: 0 -2px 12px rgba(26, 29, 33, 0.08);

  /* ── Motion ─────────────────────────────────────────────── */
  --duration-instant: 100ms;
  --duration-fast: 150ms;
  --duration-normal: 200ms;
  --duration-slow: 250ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-sharp: cubic-bezier(0.33, 1, 0.68, 1);
  --transition-fast: var(--duration-fast) var(--ease-out);
  --transition-normal: var(--duration-normal) var(--ease-out);
  --transition-slow: var(--duration-slow) var(--ease-out);
  --transition-color: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
  --transition-transform: transform var(--transition-normal);
  --transition-opacity: opacity var(--transition-fast);
  --transition-shadow: box-shadow var(--transition-normal);

  /* ── Z-index scale ──────────────────────────────────────── */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-header: 300;
  --z-overlay: 400;
  --z-drawer: 500;
  --z-modal: 600;
  --z-toast: 700;
  --z-skip-link: 800;

  /* ── Component tokens ───────────────────────────────────── */
  --btn-height-sm: 2rem;       /* 32px */
  --btn-height-md: 2.5rem;     /* 40px */
  --btn-height-lg: 3rem;       /* 48px */
  --btn-padding-x-sm: var(--space-3);
  --btn-padding-x-md: var(--space-4);
  --btn-padding-x-lg: var(--space-6);

  --input-height: 2.5rem;
  --input-height-lg: 3rem;
  --input-padding-x: var(--space-3);
  --input-border-width: 1px;
  --input-bg: var(--color-white);
  --input-border: var(--color-border);
  --input-border-focus: var(--color-accent);
  --input-radius: var(--radius-md);

  --card-padding: var(--space-4);
  --card-border: 1px solid var(--color-border);
  --card-radius: var(--radius-lg);
  --card-bg: var(--color-surface-0);

  --product-card-gap: var(--space-3);
  --product-grid-gap: var(--space-4);
  --product-image-ratio: 1 / 1;

  --badge-height: 1.375rem;
  --badge-padding-x: var(--space-2);

  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* ── Grid columns (product listing) ─────────────────────── */
  --grid-cols-product: 2;
  --grid-cols-category: 2;
}

/* Dark mode hook (optional future) */
@media (prefers-color-scheme: dark) {
  :root.auto-dark {
    --color-surface-0: #1a1d21;
    --color-surface-1: #22262b;
    --color-surface-2: #2a2f36;
    --color-text-primary: #f1f3f5;
    --color-text-secondary: #adb5bd;
    --color-border: #3d4450;
    --color-focus-ring-offset: #1a1d21;
  }
}
