/* ============================================================
   A2ZDukaan — Global Design System
   Premium B2B Marketplace
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS RESET & BASE
   ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

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

ul,
ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

/* Remove default focus outline and add custom */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Remove animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ------------------------------------------------------------
   2. CSS CUSTOM PROPERTIES — Light Theme (Default)
   ------------------------------------------------------------ */
:root {
  /* Brand Colors */
  --primary: #0F766E; /* Teal */
  --primary-hover: #115E59;
  --primary-light: rgba(15, 118, 110, 0.08);
  --secondary: #0F172A;
  --accent: #F59E0B; /* Amber/Yellow */
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.1);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.1);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.1);

  /* Light Theme Surfaces */
  --bg-primary: #FAFAFA;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --border-color: #E2E8F0;
  --border-light: #F1F5F9;

  /* Glass Morphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: blur(24px);

  /* Elevation Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(245, 158, 11, 0.2);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

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

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --container-base: 1200px;
  --container-wide: 1400px;
  --nav-height: 64px;
}


/* ------------------------------------------------------------
   3. DARK THEME
   ------------------------------------------------------------ */
[data-theme='dark'] {
  --bg-primary: #0B0F19;
  --bg-secondary: #131B2E;
  --bg-tertiary: #1A2332;
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --border-color: #1E293B;
  --border-light: #1A2332;

  --glass-bg: rgba(19, 27, 46, 0.8);
  --glass-border: rgba(30, 41, 59, 0.5);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 60px rgba(0, 0, 0, 0.5);
}


/* ------------------------------------------------------------
   4. TYPOGRAPHY SYSTEM
   ------------------------------------------------------------ */
h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

h4 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h5 {
  font-family: var(--font-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
}

h6 {
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Display — hero / splash headings */
.text-display {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

/* Headline — section headings */
.text-headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* Title — card / panel headings */
.text-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Body */
.text-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.text-body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Caption */
.text-caption {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-tertiary);
}

/* Overline — tiny uppercase labels */
.text-overline {
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Gradient text utility */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}


/* ------------------------------------------------------------
   5. KEYFRAME ANIMATIONS
   ------------------------------------------------------------ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

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

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  60% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}


/* ------------------------------------------------------------
   6. ANIMATION UTILITY CLASSES
   ------------------------------------------------------------ */
.animate-fade-in {
  animation: fadeIn var(--transition-slow) both;
}

.animate-fade-in-up {
  animation: fadeInUp 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-left {
  animation: slideInLeft 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-right {
  animation: slideInRight 600ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-scale-in {
  animation: scaleIn 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Stagger delays */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* Continuous float */
.animate-float {
  animation: float 3s ease-in-out infinite;
}


/* ------------------------------------------------------------
   7. LAYOUT UTILITIES
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

/* Flexbox shortcuts */
.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-wrap   { flex-wrap: wrap; }

/* Grid shortcuts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

/* Gap utilities */
.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Visibility */
.hidden { display: none !important; }

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


/* ------------------------------------------------------------
   8. SECTION UTILITIES
   ------------------------------------------------------------ */
.section {
  padding: var(--space-4xl) 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-full);
  border: 1px solid rgba(10, 102, 194, 0.15);
}


/* ------------------------------------------------------------
   9. BUTTON SYSTEM
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  font-family: var(--font-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition:
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary */
.btn-primary {
  color: #FFFFFF;
  background: var(--primary);
  border-color: var(--primary);
}

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: var(--shadow-glow);
  }
}

/* Secondary (outlined) */
.btn-secondary {
  color: var(--primary);
  background: transparent;
  border-color: var(--primary);
}

@media (hover: hover) {
  .btn-secondary:hover {
    background: var(--primary-light);
  }
}

/* Ghost */
.btn-ghost {
  color: var(--text-secondary);
  background: transparent;
}

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

/* Accent — gradient */
.btn-accent {
  color: #FFFFFF;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
}

@media (hover: hover) {
  .btn-accent:hover {
    box-shadow: var(--shadow-glow);
    filter: brightness(1.08);
  }
}

/* Success */
.btn-success {
  color: #FFFFFF;
  background: var(--success);
  border-color: var(--success);
}

@media (hover: hover) {
  .btn-success:hover {
    background: #15803d;
    border-color: #15803d;
  }
}

/* Warning */
.btn-warning {
  color: #FFFFFF;
  background: var(--warning);
  border-color: var(--warning);
}

@media (hover: hover) {
  .btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
  }
}

/* WhatsApp */
.btn-whatsapp {
  color: #FFFFFF;
  background: #25D366;
  border-color: #25D366;
}

@media (hover: hover) {
  .btn-whatsapp:hover {
    background: #1fb855;
    border-color: #1fb855;
    box-shadow: 0 0 24px rgba(37, 211, 102, 0.25);
  }
}

/* Sizes */
.btn-lg {
  padding: 14px 32px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

/* Icon button (circle) */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.btn-icon.btn-sm {
  width: 32px;
  height: 32px;
}

.btn-icon.btn-lg {
  width: 48px;
  height: 48px;
}


/* ------------------------------------------------------------
   10. SCROLLBAR STYLING
   ------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}


/* ------------------------------------------------------------
   11. SELECTION STYLING
   ------------------------------------------------------------ */
::selection {
  background: var(--primary);
  color: #FFFFFF;
}

::-moz-selection {
  background: var(--primary);
  color: #FFFFFF;
}


/* ------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS (mobile-first helpers)
   ------------------------------------------------------------ */

/* ---- Mobile: ≤ 640px ---- */
@media (max-width: 640px) {
  .container,
  .container-wide {
    padding-inline: var(--space-md);
  }

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

  .section-header {
    margin-bottom: var(--space-2xl);
  }

  .section-header p {
    font-size: 1rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .text-display {
    font-size: 2.25rem;
  }
}

/* ---- Tablet: ≤ 768px ---- */
@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  }
}

/* ---- Desktop: ≤ 1024px ---- */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px;
  }
}

/* ---- Wide: ≤ 1280px ---- */
@media (max-width: 1280px) {
  .container-wide {
    padding-inline: var(--space-xl);
  }
}
