/* ===========================================================
   Variables: Automotive + Modern E‑commerce (Toy Cars / Models)
   =========================================================== */
:root {
  /* Color scheme */
  color-scheme: light;

  /* Brand palette */
  --color-primary: #E10600; /* bright racing red */
  --color-navy: #0B1D3A;    /* deep navy blue */
  --color-black: #0A0A0A;
  --color-silver: #C9CDD1;  /* metallic silver */

  /* Functional colors */
  --color-success: #16A34A; /* green 600 */
  --color-warning: #F59E0B; /* amber 500 */
  --color-danger:  #DC2626; /* red 600 */

  /* Neutral grayscale (cool, slightly metallic) */
  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Surfaces */
  --color-background: #F5F6F8; /* cool light with a hint of silver */
  --color-surface: #FFFFFF;     /* base surface */
  --color-surface-elevated: #F3F5F8; /* subtle elevation */
  --color-border: var(--gray-200);
  --color-text: #121417;        /* rich near-black */
  --color-text-muted: var(--gray-600);

  /* Metallic accent (for optional effects) */
  --metal-sheen: linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,1) 60%, rgba(225,229,235,1) 100%);

  /* Typography */
  --font-sans: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, -apple-system, sans-serif;
  --font-display: "Oswald", "Montserrat", "Impact", var(--font-sans);

  --fs-xxs: 0.75rem;  /* 12px */
  --fs-xs:  0.8125rem;/* 13px */
  --fs-sm:  0.875rem; /* 14px */
  --fs-md:  1rem;     /* 16px */
  --fs-lg:  1.125rem; /* 18px */
  --fs-xl:  1.25rem;  /* 20px */
  --fs-2xl: 1.5rem;   /* 24px */
  --fs-3xl: 1.875rem; /* 30px */
  --fs-4xl: 2.25rem;  /* 36px */

  --lh-tight: 1.15;
  --lh-normal: 1.5;
  --lh-relaxed: 1.7;

  /* Spacing scale (0–96px, 4px steps) */
  --space-0: 0px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-11: 44px;
  --space-12: 48px;
  --space-13: 52px;
  --space-14: 56px;
  --space-15: 60px;
  --space-16: 64px;
  --space-17: 68px;
  --space-18: 72px;
  --space-19: 76px;
  --space-20: 80px;
  --space-21: 84px;
  --space-22: 88px;
  --space-23: 92px;
  --space-24: 96px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows (high DPI friendly) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 3px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-focus: 0 0 0 3px color-mix(in srgb, var(--color-primary) 30%, transparent);

  /* Transitions */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  /* Layout */
  --container-max: 1200px;
  --container-pad: var(--space-6);
}


/* ==================
   Reset / Normalize
   ================== */
*, *::before, *::after { box-sizing: border-box; }

/* Remove default margins */
body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

/* Improve text rendering */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Responsive media */
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }

/* Inherit fonts for form controls */
button, input, select, textarea { font: inherit; color: inherit; }

/* Remove default link underline; maintain focus styles later */
a { text-decoration: none; color: inherit; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}


/* =====
   Base
   ===== */
body {
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-normal);
  accent-color: var(--color-primary);
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

/* Headings: bold, compact, automotive vibe */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -0.01em; color: var(--color-text); }

h1 { font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 1rem + 0.9vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Consistent vertical rhythm */
p, ul, ol, dl, blockquote, pre { margin-block: 0; }
:where(p, ul, ol, dl, blockquote, pre) + :where(p, ul, ol, dl, blockquote, pre) { margin-top: var(--space-4); }

/* Paragraph measure for comfortable reading */


/* Links with brand accent */
a, .link { color: var(--color-primary); text-underline-offset: 2px; text-decoration-thickness: from-font; }

/* Hover reveals subtle underline for clarity */
a:hover, .link:hover { text-decoration: underline; }

/* Focus visible accessibility */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Lists */
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

/* Tables (minimal) */
table { border-collapse: collapse; width: 100%; }
th, td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); text-align: left; }


/* ==========
   Utilities
   ========== */
/* Container */
.container { width: min(100% - calc(var(--container-pad) * 2), var(--container-max)); margin-inline: auto; }

/* Spacing utilities (a small curated set) */
.mt-0 { margin-top: 0 !important; }
.mt-2 { margin-top: var(--space-2) !important; }
.mt-4 { margin-top: var(--space-4) !important; }
.mt-6 { margin-top: var(--space-6) !important; }
.mb-2 { margin-bottom: var(--space-2) !important; }
.mb-4 { margin-bottom: var(--space-4) !important; }
.mb-6 { margin-bottom: var(--space-6) !important; }
.p-0 { padding: 0 !important; }
.p-2 { padding: var(--space-2) !important; }
.p-4 { padding: var(--space-4) !important; }
.p-6 { padding: var(--space-6) !important; }

/* Flex helpers */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }

/* Grid helpers */
.grid { display: grid !important; }
.grid-auto-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--grid-min, 16rem), 1fr)); gap: var(--space-6); }

/* Metallic utility (optional accent surface) */
.is-metallic { background: var(--metal-sheen); }

/* Screen reader only */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }


/* ============
   Components
   ============ */
/* Buttons */
.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: #FFFFFF;
  --btn-border: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  padding: 0.65rem 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1px solid var(--btn-border);
  color: var(--btn-fg);
  background: var(--btn-bg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard), background-color var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; box-shadow: var(--shadow-focus); }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Variants */
.btn--primary { --btn-bg: var(--color-primary); --btn-fg: #fff; }
.btn--navy { --btn-bg: var(--color-navy); --btn-fg: #fff; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--color-text); --btn-border: var(--color-border); background: transparent; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--color-primary); --btn-border: currentColor; background: transparent; color: var(--color-primary); }

/* Inputs */
.input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="search"], input[type="number"], select, textarea {
  display: block;
  width: 100%;
  padding: 0.65rem 0.75rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  box-shadow: 0 0 0 0 rgba(0,0,0,0);
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.input::placeholder, input::placeholder, textarea::placeholder { color: var(--gray-500); }
.input:focus, input:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--color-primary) 50%, var(--color-border)); box-shadow: var(--shadow-focus); }
.input--invalid, input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }

/* Checkbox/Radio accent via accent-color on body */
input[type="checkbox"], input[type="radio"] { accent-color: var(--color-primary); }

/* Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
}
.card--elevated { background: var(--color-surface-elevated); box-shadow: var(--shadow-lg); }
.card--metallic { background: var(--metal-sheen); border-color: color-mix(in srgb, var(--gray-300) 70%, white); }

/* Badges (useful for inventory status) */
.badge { display: inline-flex; align-items: center; gap: 0.35em; padding: 0.25rem 0.5rem; border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1; border: 1px solid transparent; }
.badge--success { background: color-mix(in srgb, var(--color-success) 16%, white); color: var(--color-success); border-color: color-mix(in srgb, var(--color-success) 36%, white); }
.badge--warning { background: color-mix(in srgb, var(--color-warning) 16%, white); color: #8A5A00; border-color: color-mix(in srgb, var(--color-warning) 36%, white); }
.badge--danger  { background: color-mix(in srgb, var(--color-danger) 16%, white); color: var(--color-danger); border-color: color-mix(in srgb, var(--color-danger) 36%, white); }

/* Link buttons (textual CTA) */
.link-cta { color: var(--color-primary); font-weight: 600; }
.link-cta:hover { text-decoration: underline; }


/* ======================
   Themed Accent Elements
   ====================== */
/* Racing stripe divider */
.hr-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary) 0 25%, var(--color-navy) 25% 50%, var(--gray-700) 50% 75%, var(--color-silver) 75% 100%);
  border: 0;
}

/* Pill CTA container */
.cta-band {
  background: linear-gradient(90deg, color-mix(in srgb, var(--color-navy) 92%, white), var(--color-navy));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}


/* =====================
   Helper Accessibility
   ===================== */
/* Reduce motion specific to components that might animate */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* Focus-visible for common interactive elements */
button:focus-visible, [role="button"]:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* Hover/active states respect coarse pointers */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: none; }
}

/* ==================
   Misc Base Tweaks
   ================== */
/* Section spacing helpers for pages */
.section { padding-block: clamp(var(--space-12), 4vw, var(--space-20)); }
.section--tight { padding-block: clamp(var(--space-8), 3vw, var(--space-14)); }

/* Typography helpers */
.lead { font-size: clamp(1.125rem, 0.5rem + 1vw, 1.375rem); line-height: var(--lh-relaxed); color: var(--color-text); }
.muted { color: var(--color-text-muted); }

/* Image treatment: subtle rounded corners */
.img-rounded { border-radius: var(--radius-md); }

/* Link color utilities */
.text-primary { color: var(--color-primary) !important; }
.text-navy { color: var(--color-navy) !important; }
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-danger { color: var(--color-danger) !important; }

/* Background utilities */
.bg-surface { background: var(--color-surface) !important; }
.bg-elevated { background: var(--color-surface-elevated) !important; }
.bg-navy { background: var(--color-navy) !important; color: #fff !important; }
.bg-primary { background: var(--color-primary) !important; color: #fff !important; }

/* Border utility */
.border { border: 1px solid var(--color-border) !important; border-radius: var(--radius-md); }

/* Max width helpers for readable blocks */
.max-w-wide { max-width: 1200px; }

/* End of base.css */


/* ===================================================
   Header & Footer styles (from home.css, shared)
   =================================================== */
/* Accessibility: skip to content link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  background: #fff;
  color: var(--color-navy);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 1000;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  color: var(--color-navy);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand-accent {
  width: 28px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0 50%, var(--gray-800) 50% 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.75);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
}
.nav-toggle .bar {
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
}

.primary-nav {
  position: relative;
}
.nav-list {
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.nav-list a {
  color: var(--color-text);
  font-weight: 600;
}
.nav-list a:hover {
  color: var(--color-primary);
  text-decoration: none;
}

.nav-search {
  display: none;
  gap: var(--space-3);
  align-items: center;
  margin-left: var(--space-6);
}

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .primary-nav { display: flex; align-items: center; }
  .nav-search { display: inline-flex; }
}

/* Mobile menu */
#primaryNav {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 1px);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-4) var(--space-6);
  display: none;
}
#primaryNav.open {
  display: block;
}
#primaryNav .nav-list {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}
#primaryNav .nav-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  margin: 0;
}

@media (min-width: 960px) {
  #primaryNav {
    position: static;
    display: flex;
    box-shadow: none;
    border: 0;
    padding: 0;
  }
  #primaryNav .nav-list {
    flex-direction: row;
  }
}

/* Footer */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-12);
}
.footer-grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
  padding-block: var(--space-10);
}
.footer-title {
  font-size: 1rem;
  margin-bottom: var(--space-4);
}
.footer-links {
  display: grid;
  gap: 0.5rem;
}
.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-4);
  display: flex;
  justify-content: center;
}

@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  padding-block: var(--space-4);
  z-index: 100;
}
.cookie-inner {
  display: flex;
  gap: var(--space-6);
  align-items: center;
  justify-content: space-between;
}
.cookie-text {
  color: var(--color-text);
  max-width: 70ch;
}
.cookie-actions {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 720px) {
  .cookie-inner { flex-direction: column; align-items: stretch; text-align: left; }
  .cookie-actions { justify-content: flex-end; }
}
/* End Header & Footer Styles */
