/**
 * REPUESTÓPOLIS - Variables CSS Globales
 * Sistema de diseño centralizado con variables CSS
 */

:root {
  /* ==================== COLORS - Industrial Palette ==================== */

  /* Garage/Industrial Gray Scale */
  --color-garage-50: rgb(248, 249, 250);
  --color-garage-100: rgb(236, 240, 241);
  --color-garage-200: rgb(189, 195, 199);
  --color-garage-300: rgb(149, 165, 166);
  --color-garage-400: rgb(127, 140, 141);
  --color-garage-500: rgb(52, 73, 94);
  --color-garage-600: rgb(44, 62, 80);
  --color-garage-700: rgb(26, 37, 47);
  --color-garage-800: rgb(26, 31, 46);
  --color-garage-900: rgb(15, 20, 25);

  /* Racing Colors */
  --color-racing-red: rgb(231, 76, 60);
  --color-racing-red-dark: rgb(192, 57, 43);
  --color-racing-red-light: rgb(236, 112, 99);

  --color-racing-green: rgb(46, 204, 113);
  --color-racing-green-dark: rgb(39, 174, 96);

  --color-racing-yellow: rgb(241, 196, 15);
  --color-racing-yellow-dark: rgb(243, 156, 18);

  --color-racing-blue: rgb(52, 152, 219);
  --color-racing-blue-dark: rgb(41, 128, 185);

  /* Metal Colors */
  --color-metal-steel: rgb(113, 118, 123);
  --color-metal-chrome: rgb(192, 192, 192);
  --color-metal-dark: rgb(44, 62, 80);

  /* Semantic Colors */
  --color-success: var(--color-racing-green);
  --color-warning: var(--color-racing-yellow);
  --color-danger: var(--color-racing-red);
  --color-info: var(--color-racing-blue);

  /* ==================== SPACING ==================== */

  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* ==================== TYPOGRAPHY ==================== */

  /* Font Families */
  --font-sans: Inter, system-ui, sans-serif;
  --font-display: Rajdhani, Inter, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 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: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* ==================== BORDERS ==================== */

  --border-width-1: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;
  --border-width-8: 8px;

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.125rem;   /* 2px */
  --radius-base: 0.25rem;  /* 4px */
  --radius-md: 0.375rem;   /* 6px */
  --radius-lg: 0.5rem;     /* 8px */
  --radius-xl: 0.75rem;    /* 12px */
  --radius-2xl: 1rem;      /* 16px */
  --radius-3xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ==================== SHADOWS ==================== */

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* Industrial Shadows */
  --shadow-industrial: 0 4px 6px rgba(26, 31, 46, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --shadow-lift: 0 10px 30px rgba(26, 31, 46, 0.3);
  --shadow-card: 0 2px 8px rgba(26, 31, 46, 0.12);
  --shadow-inset-industrial: inset 0 2px 4px rgba(26, 31, 46, 0.1);

  /* ==================== Z-INDEX ==================== */

  --z-0: 0;
  --z-10: 10;
  --z-20: 20;
  --z-30: 30;
  --z-40: 40;
  --z-50: 50;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;

  /* ==================== ANIMATIONS ==================== */

  /* Durations */
  --duration-75: 75ms;
  --duration-100: 100ms;
  --duration-150: 150ms;
  --duration-200: 200ms;
  --duration-300: 300ms;
  --duration-500: 500ms;
  --duration-700: 700ms;
  --duration-1000: 1000ms;

  /* Animation Speeds */
  --animation-speed-fast: 0.2s;
  --animation-speed-normal: 0.3s;
  --animation-speed-slow: 0.5s;
  --animation-speed-slower: 0.8s;
  --animation-speed-slowest: 1s;

  /* Easing Functions */
  --ease-linear: linear;
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  --ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out-quad: cubic-bezier(0.455, 0.03, 0.515, 0.955);

  --ease-in-cubic: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1);

  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ==================== BREAKPOINTS (for reference) ==================== */

  /* These are used in media queries, not as CSS variables */
  /* --screen-sm: 640px; */
  /* --screen-md: 768px; */
  /* --screen-lg: 1024px; */
  /* --screen-xl: 1280px; */
  /* --screen-2xl: 1536px; */

  /* ==================== CONTAINER ==================== */

  --container-max-width: 1280px;
  --container-padding: var(--space-4);
  --container-padding-sm: var(--space-6);
  --container-padding-lg: var(--space-8);

  /* ==================== FORM ELEMENTS ==================== */

  --input-height: 2.5rem;      /* 40px */
  --input-height-sm: 2rem;     /* 32px */
  --input-height-lg: 3rem;     /* 48px */

  --input-padding-x: var(--space-4);
  --input-padding-y: var(--space-2);

  --input-border-width: var(--border-width-2);
  --input-border-color: var(--color-garage-300);
  --input-border-radius: var(--radius-lg);

  --input-focus-ring-width: 0px;
  --input-focus-ring-color: transparent;
  --input-focus-border-color: var(--color-garage-400);

  /* ==================== BUTTONS ==================== */

  --btn-height: 2.5rem;        /* 40px */
  --btn-height-sm: 2rem;       /* 32px */
  --btn-height-lg: 3rem;       /* 48px */
  --btn-height-xl: 3.5rem;     /* 56px */

  --btn-padding-x: var(--space-4);
  --btn-padding-y: var(--space-2);
  --btn-padding-x-sm: var(--space-3);
  --btn-padding-y-sm: 0.375rem;
  --btn-padding-x-lg: var(--space-6);
  --btn-padding-y-lg: var(--space-3);

  --btn-border-radius: var(--radius-lg);
  --btn-font-weight: var(--font-medium);

  --btn-transition-duration: var(--duration-200);
  --btn-transition-timing: var(--ease-in-out);

  /* ==================== CARDS ==================== */

  --card-padding: var(--space-6);
  --card-border-radius: var(--radius-lg);
  --card-border-width: var(--border-width-1);
  --card-border-color: var(--color-garage-200);
  --card-shadow: var(--shadow-card);

  /* ==================== BADGES ==================== */

  --badge-padding-x: 0.625rem;
  --badge-padding-y: 0.125rem;
  --badge-border-radius: var(--radius-base);
  --badge-font-size: var(--text-xs);
  --badge-font-weight: var(--font-bold);

  /* ==================== OVERLAYS ==================== */

  --overlay-backdrop: rgba(0, 0, 0, 0.5);
  --overlay-backdrop-blur: 4px;

  /* ==================== GRID ==================== */

  --grid-gap: var(--space-4);
  --grid-gap-sm: var(--space-2);
  --grid-gap-lg: var(--space-6);
  --grid-gap-xl: var(--space-8);
}

/* ==================== DARK MODE SUPPORT (Optional) ==================== */

@media (prefers-color-scheme: dark) {
  :root {
    /* Override colors for dark mode if needed */
    /* --color-garage-50: rgb(15, 20, 25); */
    /* --color-garage-900: rgb(248, 249, 250); */
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  :root {
    --shadow-sm: none;
    --shadow-base: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-2xl: none;
    --shadow-industrial: none;
    --shadow-lift: none;
    --shadow-card: none;
  }
}
