/* ================================================
   ULTRA-PREMIUM MARKETPLACE DESIGN SYSTEM
   BINOX - Premium International Marketplace
   Inspired by Alibaba/Amazon/Daraz usability
   ================================================ */

:root {
  /* ===== PRIMARY COLOR PALETTE ===== */
  --brand-primary: #0f172a;
  --brand-accent: #f97316;
  --brand-accent-light: #fdba74;
  --brand-accent-dark: #c2410c;
  --brand-success: #10b981;
  --brand-warning: #f59e0b;
  --brand-error: #ef4444;
  
  /* ===== NEUTRAL COLORS ===== */
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;
  
  /* ===== SURFACE COLORS ===== */
  --surface-0: #ffffff;
  --surface-50: #f8fafc;
  --surface-100: #f1f5f9;
  --surface-200: #e2e8f0;
  --surface-300: #cbd5e1;
  
  /* ===== GRADIENTS ===== */
  --gradient-primary: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
  --gradient-premium: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  
  /* ===== SHADOWS ===== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-premium: 0 0 0 1px rgba(249, 115, 22, 0.3), 0 4px 6px -1px rgba(249, 115, 22, 0.1), 0 2px 4px -2px rgba(249, 115, 22, 0.1);
  --shadow-glow: 0 0 40px rgba(249, 115, 22, 0.3);
  
  /* ===== BORDER RADIUS ===== */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;
  
  /* ===== 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;
  
  /* ===== TYPOGRAPHY ===== */
  --font-heading: 'Plus Jakarta Sans', 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  --font-body: 'Inter', 'Hind Siliguri', 'Noto Sans Bengali', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* ===== FONT SIZES ===== */
  --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;
  
  /* ===== FONT WEIGHTS ===== */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* ===== LINE HEIGHTS ===== */
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* ===== LETTER SPACING ===== */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;
  
  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-premium: 400ms cubic-bezier(0.23, 1, 0.32, 1);
  
  /* ===== Z-INDEX ===== */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===== BASE STYLES ===== */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--ink-900);
  background: var(--surface-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===== TYPOGRAPHY HIERARCHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--ink-900);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: var(--font-extrabold);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: var(--font-bold);
}

h4 {
  font-size: clamp(1.125rem, 1.5vw, 1.5rem);
  font-weight: var(--font-semibold);
}

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

h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

p {
  color: var(--ink-600);
  line-height: var(--leading-relaxed);
}

.text-heading {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  color: var(--ink-900);
}

.text-body {
  font-family: var(--font-body);
  color: var(--ink-600);
}

.text-muted {
  color: var(--ink-500);
}

.text-accent {
  color: var(--brand-accent);
}

.text-success {
  color: var(--brand-success);
}

.text-error {
  color: var(--brand-error);
}

/* ===== DISPLAY TEXT ===== */
.display-xl {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--leading-tight);
}

.display-lg {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tighter);
  line-height: var(--leading-tight);
}

.display-md {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
}

/* ===== BUTTON STYLES ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-premium);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-0);
  color: var(--ink-900);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-50);
  border-color: var(--ink-300);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border: none;
}

.btn-ghost:hover {
  background: var(--surface-100);
  color: var(--ink-900);
}

.btn-ghost:active {
  background: var(--surface-200);
}

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

.btn-accent:hover {
  background: var(--brand-accent-dark);
  transform: translateY(-1px);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-xs {
  padding: var(--space-1) var(--space-3);
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== CARD STYLES ===== */
.card {
  background: var(--surface-0);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-premium {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-premium);
}

.card-premium:hover {
  box-shadow: var(--shadow-2xl);
  transform: translateY(-4px) scale(1.01);
}

/* ===== BADGE STYLES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background: var(--brand-accent);
  color: white;
}

.badge-success {
  background: var(--brand-success);
  color: white;
}

.badge-warning {
  background: var(--brand-warning);
  color: white;
}

.badge-error {
  background: var(--brand-error);
  color: white;
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--ink-300);
  color: var(--ink-700);
}

.badge-soft {
  background: var(--surface-100);
  color: var(--ink-700);
}

/* ===== INPUT STYLES ===== */
.input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink-900);
  background: var(--surface-0);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.input::placeholder {
  color: var(--ink-400);
}

.input-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.input-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: 1200px;
}

.container-wide {
  max-width: 1600px;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* ===== FLEX ===== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-start {
  justify-content: flex-start;
}

.justify-end {
  justify-content: flex-end;
}

.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);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .container {
    padding: 0 var(--space-4);
  }
}

@media (max-width: 480px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .grid-6 {
    grid-template-columns: 1fr;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-slow) ease-out;
}

.animate-slide-down {
  animation: slideDown var(--transition-slow) ease-out;
}

.animate-scale-in {
  animation: scaleIn var(--transition-slow) ease-out;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-200) 0%,
    var(--surface-100) 50%,
    var(--surface-200) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-rect {
  aspect-ratio: 16/9;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
  display: none;
}

.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;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
