/* ===== DYNTHEX MAIN STYLES ===== */

/* Import layout and responsive - must be at the top */
@import url('layout.css');
@import url('responsive.css');

/* Component imports - reusable UI elements */
@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/modals.css');
@import url('components/forms.css');
@import url('components/badges.css');
@import url('components/empty-states.css');
@import url('components/tooltips.css');
@import url('components/slider.css');

/* Feature imports - page-specific and feature-specific styles */
@import url('features/index.css');
@import url('features/header.css');
@import url('features/store.css');
@import url('features/cart.css');
@import url('features/checkout.css');
@import url('features/custom-order.css');
@import url('features/product-detail.css');
@import url('features/process.css');
@import url('features/material-advisor.css');
@import url('features/material-comparison.css');
@import url('features/stl-uploader.css');

/* ===== CSS VARIABLES & THEMES ===== */
:root {
  /* Base Colors */
  --white: #ffffff;
  --black: #000000;
  --red: #ff0000;
  --accent-secondary: #2fbd63;
  --accent: #00a85a;
  --overlay-white-translucent: rgba(255, 255, 255, 0.3);

  --size-xxs: 0.125rem;
  --size-xs: 0.25rem;
  --size-sm: 0.5rem;
  --size-md: 0.75rem;
  --size-lg: 1rem;
  --size-xl: 1.5rem;
  --size-xxl: 2rem;
  --size-xxxl: 2.5rem;

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.25s ease-in-out;
  --transition-slow: 0.3s ease-in-out;

  /* Typography */
  --font-family: System-ui, Arial;
  --font-size-sm: 0.75rem;
  --font-size-md: 0.875rem;
  --font-size-lg: 1rem;
  --line-height: 1.45;

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 9999;
  --z-modal: 10000;
  --z-tooltip: 10001;
}

/* ===== DARK THEME ===== */
html.dark {
  --bg: #0b0b0b;
  --bg-secondary: #1d1d1d;
  --fg: #f5f5f5;
  --fg-muted: #9aa0a6;

  --surface: #0f0f0f;
  --surface-glass: rgba(255, 255, 255, 0.04);
  --surface-glass-hover: rgba(255, 255, 255, 0.08);

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);

  --shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.45);
  --shadow-inset: rgba(0, 0, 0, 0.1);

  --accent-hover: rgba(57, 193, 106, 0.14);
  --accent-border: rgba(57, 193, 106, 0.35);
  --accent-medium: rgba(57, 193, 106, 0.45);
  --accent-shadow: rgba(57, 193, 106, 0.3);

  --tooltip-bg: rgba(20, 20, 20, 0.98);
  --tooltip-border: rgba(255, 255, 255, 0.1);
}

/* ===== LIGHT THEME ===== */
html.light {
  --bg: #ffffff;
  --bg-secondary: #e0e0e0;
  --fg: #111111;
  --fg-muted: #55595b;

  --surface: #fbfbfb;
  --surface-glass: rgba(0, 0, 0, 0.05);
  --surface-glass-hover: rgba(0, 0, 0, 0.08);

  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);

  --shadow: 0 0.625rem 2.25rem rgba(0, 0, 0, 0.15);
  --shadow-inset: rgba(0, 0, 0, 0.05);

  --accent-hover: rgba(46, 167, 90, 0.1);
  --accent-border: rgba(46, 167, 90, 0.28);
  --accent-medium: rgba(46, 167, 90, 0.45);
  --accent-shadow: rgba(46, 167, 90, 0.25);

  --tooltip-bg: #ffffff;
  --tooltip-border: rgba(0, 0, 0, 0.12);
}

/* ===== CSS RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-lg);
  line-height: var(--line-height);
  color: var(--fg);
  background: var(--bg);
  height: 100%;
  overflow-x: hidden;
  transition: var(--transition-normal);
}

/* Reset all headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  padding: 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
}

h5,
h6 {
  font-size: 1rem;
  font-weight: 600;
}

p,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

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

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

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

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

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

/* ===== ICON FONT FIXES ===== */
i[class^="fi-rs-"],
i[class*=" fi-rs-"],
span[class^="fi-rs-"],
span[class*=" fi-rs-"] {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

/* Fix baseline alignment for icon pseudo-elements */
i[class^="fi-rs-"]:before,
i[class*=" fi-rs-"]:before,
span[class^="fi-rs-"]:before,
span[class*=" fi-rs-"]:before {
  display: inline-block;
  vertical-align: top;
  line-height: 1;
  height: 1em;
}

/* ===== UTILITY STYLES - REUSABLE COMPONENTS ===== */

/* ===== LAYOUT UTILITIES ===== */
row {
  display: flex;
  align-items: center;
  gap: var(--size-md);
}

column {
  display: flex;
  flex-direction: column;
  gap: var(--size-md);
}

grid {
  display: grid;
  gap: var(--size-md);
}

center {
  display: flex;
  align-items: center;
  justify-content: center;
}

spacer {
  flex: 1;
}

/* ===== BUTTON UTILITIES ===== */
btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--size-sm);
  padding: var(--size-md) var(--size-lg);
  border: 0.125rem solid var(--border);
  border-radius: var(--size-sm);
  background: var(--surface-glass);
  color: var(--fg);
  font-family: inherit;
  font-size: var(--font-size-md);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

btn:hover {
  background: var(--surface-glass-hover);
  border-color: var(--accent-border);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
}

btn:active {
  box-shadow: none;
}