/* Design System - Inspired by Tire Rack's Professional Typography System */
/* This file provides consistent design tokens across all pages */

:root {
  /* Typography - Using free alternatives to Gibson/Aleo */
  /* Inter is a free, professional sans-serif similar to Gibson */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-copy: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-base-size: 100%;

  /* Line Heights - Tire Rack System */
  --line-height-header: 1.2;
  --line-height-primary: 1.4;
  --line-height-sm: 1;

  /* Font Sizes - Tire Rack's Modular Scale */
  --font-size-xs: 0.85rem;      /* 13.6px */
  --font-size-sm: 0.95rem;      /* 15.2px */
  --font-size-md: 1rem;         /* 16px - base */
  --font-size-lg: 1.15rem;      /* 18.4px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-xxl: 1.563rem;    /* 25px */
  --font-size-xxxl: 1.953rem;   /* 31.2px */
  --font-size-xxxxl: 2.441rem;  /* 39px */
  --font-size-normal: 1rem;

  /* Spacing Scale - Tire Rack System */
  --space-xxxxs: 0.12rem;
  --space-xxxs: 0.25rem;
  --space-xxs: 0.45rem;
  --space-xs: 0.64rem;
  --space-sm: 0.8rem;
  --space-md: 1rem;
  --space-lg: 1.563rem;
  --space-xl: 1.563rem;
  --space-xxl: 1.953rem;
  --space-xxxl: 2.441rem;
  --space-xxxxl: 3.052rem;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-reg: 400;
  --font-weight-semibold: 500;
  --font-weight-bold: 700;

  /* Colors - Adapted from Tire Rack with your brand colors */
  --color-red: #d70000;
  --color-blacktext: #19170d;
  --color-black: #3c3837;
  --color-blue: #2b7088;
  --color-white: #fff;
  --color-darkgrey: #666;
  --color-grey: silver;
  --color-mediumgrey: #cecece;
  --color-lightgrey: #eaeaea;
  --color-gold: #f2a633;

  /* Keep your existing brand colors */
  --primary: #0066FF;
  --primary-dark: #0052CC;
  --primary-light: #3385FF;
  --accent: #00D4FF;
  --success: #00C853;
  --warning: #FFB300;
  --error: #FF3B30;
  --sold: #6B7280;

  /* Background Colors */
  --bg-main: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-dark: #1A1D23;
  --card-bg: #FFFFFF;
  --card-border: #E5E8EB;

  /* Text Colors */
  --text-primary: #1A1D23;
  --text-secondary: #6B7280;
  --text-light: #9CA3AF;
  --text-on-primary: #FFFFFF;
  --font-color-link: var(--primary);
  --font-color-primary: var(--text-primary);
  --font-color-disabled: var(--color-mediumgrey);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);

  /* UI Elements */
  --border-radius: 3px;
  --button-height: 50px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Typography */
body {
  font-family: var(--font-family-primary);
  font-size: 16px;
  font-weight: var(--font-weight-reg);
  line-height: var(--line-height-primary);
  color: var(--text-primary);
  background-color: var(--bg-main);
  -webkit-text-size-adjust: 100%;
  text-align: left;
  margin: 0;
  padding: 0;
}

/* Heading Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-primary);
  line-height: var(--line-height-header);
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  margin: 0 0 var(--space-md) 0;
}

h1 {
  font-size: var(--font-size-xxxxl);
}

h2 {
  font-size: var(--font-size-xxxl);
}

h3 {
  font-size: var(--font-size-xxl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-md);
}

/* Body Text */
p {
  font-family: var(--font-family-copy);
  font-size: var(--font-size-md);
  line-height: var(--line-height-primary);
  margin: 0 0 var(--space-md) 0;
}

/* Links */
a {
  color: var(--font-color-link);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* Utility Classes for Typography */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-xxl { font-size: var(--font-size-xxl); }
.text-xxxl { font-size: var(--font-size-xxxl); }
.text-xxxxl { font-size: var(--font-size-xxxxl); }

.font-light { font-weight: var(--font-weight-light); }
.font-regular { font-weight: var(--font-weight-reg); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.line-height-header { line-height: var(--line-height-header); }
.line-height-primary { line-height: var(--line-height-primary); }
.line-height-sm { line-height: var(--line-height-sm); }

/* Button Styling - Tire Rack Inspired */
.btn, button {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  height: var(--button-height);
  padding: 0 var(--space-xl);
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-on-primary);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

/* Input Fields */
input, select, textarea {
  font-family: var(--font-family-copy);
  font-size: var(--font-size-md);
  line-height: var(--line-height-primary);
  color: var(--text-primary);
}

input::placeholder, textarea::placeholder {
  color: var(--font-color-disabled);
}

/* Cart Badge Styling */
.nav-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Header Cart Icon (always visible in header bar) */
/* Header Cart Icon - Consistent across all pages */
.header-cart-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem; /* 12px - positioned closer to menu button */
  color: var(--primary);
  transition: var(--transition);
  text-decoration: none;
}

.header-cart-link:hover {
  opacity: 0.8;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc3545;
  color: white;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  z-index: 10;
  pointer-events: none;
  padding: 0 4px;
}

.cart-icon {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
}
