/* ========================================
   KDK MAALIGAI — Design System
   Premium Indian E-Commerce Platform
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Montserrat:wght@300;400;500;600&family=Cinzel:wght@400;600;700&display=swap');

/* ── CSS Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; font-size: 16px; }
body { min-height: 100vh; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; }
table { border-collapse: collapse; }

/* ── Design Tokens ── */
:root {
  /* Primary — Deep Maroon */
  --primary: #8B1A1A;
  --primary-light: #B84040;
  --primary-dark: #5C1010;
  --primary-50: #FDF2F2;
  --primary-100: #F5D5D5;
  --primary-200: #E8A3A3;

  /* Accent — Royal Gold */
  --accent: #D4A853;
  --accent-light: #F0D68A;
  --accent-dark: #B8892A;
  --accent-50: #FDF8EB;
  --accent-100: #F9EDCC;

  /* Neutral Backgrounds */
  --bg-primary: #FEFCF8;
  --bg-secondary: #F5F0E8;
  --bg-tertiary: #EDE5D8;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.35);
  --glass-shadow: 0 8px 32px rgba(139, 26, 26, 0.08);

  /* Text */
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A6E;
  --text-tertiary: #8A8A9E;
  --text-on-primary: #FFFFFF;
  --text-on-accent: #1A1A2E;
  --text-link: #8B1A1A;

  /* Border */
  --border: #E8E0D0;
  --border-light: #F0EBE0;
  --border-focus: #D4A853;

  /* Status */
  --success: #2D8F5E;
  --success-light: #E8F5EE;
  --error: #C0392B;
  --error-light: #FDECEB;
  --warning: #E67E22;
  --warning-light: #FEF5E7;
  --info: #2980B9;
  --info-light: #EBF5FB;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
  --shadow-2xl: 0 25px 60px rgba(0,0,0,0.22);
  --shadow-gold: 0 4px 20px rgba(212,168,83,0.25);
  --shadow-maroon: 0 4px 20px rgba(139,26,26,0.2);
  --shadow-inner: inset 0 2px 4px rgba(0,0,0,0.06);

  /* Spacing */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

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

  /* Typography */
  --font-display: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Montserrat', -apple-system, sans-serif;
  --font-serif: 'Cormorant Garamond', serif;

  --text-xs: 0.75rem;   --text-sm: 0.875rem;  --text-base: 1rem;
  --text-lg: 1.125rem;  --text-xl: 1.25rem;   --text-2xl: 1.5rem;
  --text-3xl: 1.875rem; --text-4xl: 2.25rem;  --text-5xl: 3rem;
  --text-6xl: 3.75rem;  --text-7xl: 4.5rem;

  /* Transitions */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
  --z-tooltip: 600;

  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1200px;
  --container-2xl: 1400px;
}

/* ── Base Styles ── */
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}
h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p { color: var(--text-secondary); line-height: 1.7; }
strong { font-weight: 600; color: var(--text-primary); }

::selection {
  background: var(--accent);
  color: var(--text-on-accent);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ── Focus Styles ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ── Utility Classes ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container-sm { max-width: var(--container-sm); }
.container-lg { max-width: var(--container-2xl); }

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold { color: var(--accent); }
.text-maroon { color: var(--primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 768px) {
  html { font-size: 15px; }
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .container { padding: 0 var(--space-4); }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  h1 { font-size: var(--text-2xl); }
}
