/* ============================================
   NOVA STORE — Design System Tokens
   Modern Premium E-commerce for Global Market
   ============================================ */

:root {
  /* ── Color Palette (Warm Neutrals + Amber) ── */
  --color-bg: #FAF8F5;           /* Warm white background */
  --color-bg-secondary: #F3EFE9; /* Card / section bg */
  --color-bg-tertiary: #EBE6DD;  /* Input / hover state */
  --color-surface: #FFFFFF;      /* Pure white surfaces */
  --color-overlay: rgba(26, 24, 22, 0.6);

  --color-text-primary: #1A1816;     /* Near black */
  --color-text-secondary: #6B6560;   /* Medium gray */
  --color-text-tertiary: #9C958E;    /* Light gray */
  --color-text-inverse: #FAF8F5;

  --color-accent: #C4822A;           /* Amber gold */
  --color-accent-hover: #A86D20;
  --color-accent-light: rgba(196, 130, 42, 0.12);
  --color-accent-surface: #FFF8E7;

  --color-success: #2D8B6F;
  --color-error: #C44536;
  --color-info: #3B82B6;

  --color-border: #E5DED4;
  --color-border-light: #F0EAE0;

  /* ── Typography Scale (Modular) ── */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-xs: clamp(0.7rem, 0.66rem + 0.18vw, 0.8rem);
  --text-sm: clamp(0.78rem, 0.73rem + 0.24vw, 0.875rem);
  --text-base: clamp(0.88rem, 0.83rem + 0.28vw, 1rem);
  --text-lg: clamp(1rem, 0.92rem + 0.38vw, 1.175rem);
  --text-xl: clamp(1.15rem, 1.04rem + 0.52vw, 1.375rem);
  --text-2xl: clamp(1.35rem, 1.2rem + 0.72vw, 1.75rem);
  --text-3xl: clamp(1.6rem, 1.38rem + 1.02vw, 2.25rem);
  --text-4xl: clamp(1.95rem, 1.6rem + 1.45vw, 3rem);
  --text-5xl: clamp(2.5rem, 2rem + 2.2vw, 4rem);

  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.55;
  --leading-relaxed: 1.7;

  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* ── Spacing Scale ── */
  --space-xs: clamp(0.25rem, 0.22rem + 0.14vw, 0.375rem);
  --space-sm: clamp(0.5rem, 0.44rem + 0.28vw, 0.75rem);
  --space-md: clamp(0.875rem, 0.8rem + 0.36vw, 1.25rem);
  --space-lg: clamp(1.25rem, 1.14rem + 0.54vw, 1.875rem);
  --space-xl: clamp(2rem, 1.8rem + 0.96vw, 3rem);
  --space-2xl: clamp(3rem, 2.6rem + 1.8vw, 5rem);
  --space-3xl: clamp(4.5rem, 3.8rem + 3vw, 8rem);

  /* ── Layout ── */
  --max-width: 1280px;
  --content-padding: clamp(1rem, 1.8rem + 1vw, 2.5rem);

  /* ── Radius ── */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ── Shadows (warm, subtle) ── */
  --shadow-sm: 0 1px 3px rgba(26, 24, 22, 0.06);
  --shadow-md: 0 4px 16px rgba(26, 24, 22, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 24, 22, 0.12);
  --shadow-glow: 0 0 0 3px var(--color-accent-light);

  /* ── Transitions ── */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;

  /* ── Z-index ── */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

ul, ol { list-style: none; }

/* ── Utility Classes ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--content-padding);
}

.section-spacing {
  padding-block: var(--space-3xl);
}

/* ── Typography Helpers ── */
.text-display {
  font-family: var(--font-display);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

.text-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-tertiary);
}

/* ── Button Base Styles ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75em 1.5em;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-out-quart);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out-quart);
}

.btn:hover::after { opacity: 0.06; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-accent);
  color: white;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--color-text-tertiary);
  background: var(--color-bg-secondary);
}

.btn-ghost {
  color: var(--color-text-secondary);
}
.btn-ghost:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-tertiary);
}

.btn-lg {
  padding: 1em 2em;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.5em 1em;
  font-size: var(--text-xs);
}

/* ── Form Elements ── */
.input-field {
  width: 100%;
  padding: 0.875em 1.125em;
  font-size: var(--text-base);
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--duration-fast) var(--ease-out-quart),
              box-shadow var(--duration-fast) var(--ease-out-quart);
}

.input-field:focus {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-glow);
}

.input-field::placeholder {
  color: var(--color-text-tertiary);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2em 0.65em;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  line-height: 1.4;
}

.badge-accent {
  background: var(--color-accent-surface);
  color: var(--color-accent);
}

.badge-success {
  background: rgba(45, 139, 111, 0.1);
  color: var(--color-success);
}

.badge-error {
  background: rgba(196, 69, 54, 0.1);
  color: var(--color-error);
}

/* ── Animations ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fade-in-up {
  animation: fadeInUp var(--duration-slow) var(--ease-out-quart) both;
}

.animate-fade-in {
  animation: fadeIn var(--duration-normal) var(--ease-out-quart) both;
}

.animate-scale-in {
  animation: scaleIn var(--duration-normal) var(--ease-out-quart) both;
}

/* Stagger children */
.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 60ms; }
.stagger-children > *:nth-child(3) { animation-delay: 120ms; }
.stagger-children > *:nth-child(4) { animation-delay: 180ms; }
.stagger-children > *:nth-child(5) { animation-delay: 240ms; }
.stagger-children > *:nth-child(6) { animation-delay: 300ms; }
.stagger-children > *:nth-child(7) { animation-delay: 360ms; }
.stagger-children > *:nth-child(8) { animation-delay: 420ms; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-text-tertiary); }
