/* =====================================================
   UPGRADE UI/UX - ALLBIKES SHOP
   Paleta de cores moderna, animações, tipografia
   ===================================================== */

:root {
  /* ===== PALETA MODERNA ===== */
  /* Primary: Azul vibrante (confiança, profissionalismo) */
  --primary: #0f766e; /* Teal escuro */
  --primary-light: #14b8a6; /* Teal claro */
  --primary-lighter: #2dd4bf; /* Teal mais claro */
  --primary-dark: #0d5a54; /* Teal escuro extra */

  /* Secondary: Laranja quente (energia, ação) */
  --secondary: #ea580c;
  --secondary-light: #ff7a2f;
  --secondary-lighter: #ffb366;
  --secondary-dark: #c9430a;

  /* Accent: Rosa/Magenta (destaque) */
  --accent: #d946ef;
  --accent-light: #e879f9;
  --accent-lighter: #f0abfc;

  /* Neutrals: Tons sofisticados */
  --bg: #fafbfb; /* Quase branco */
  --bg-secondary: #f3f4f6; /* Cinza claro */
  --bg-tertiary: #e5e7eb; /* Cinza médio */

  --card: #ffffff; /* Branco puro */
  --card-hover: #f9fafb; /* Cinza super leve */

  --text: #111827; /* Preto suave */
  --text-secondary: #4b5563; /* Cinza escuro */
  --muted: #8b92a7; /* Cinza médio */

  --border: #d1d5db; /* Borda cinza */
  --border-light: #e5e7eb; /* Borda cinza clara */

  /* Semantic */
  --success: #10b981; /* Verde moderno */
  --warning: #f59e0b; /* Âmbar */
  --danger: #ef4444; /* Vermelho */
  --info: #06b6d4; /* Cyan */

  /* Shadows: Elevation system */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(15, 23, 42, 0.1);

  /* Transitions (velocidades padrão) */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --easing-in: cubic-bezier(0.4, 0, 1, 1);
  --easing-out: cubic-bezier(0, 0, 0.2, 1);
  --easing-inout: cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing (melhorado) */
  --spacing-xs: 0.25rem; /* 4px */
  --spacing-sm: 0.5rem; /* 8px */
  --spacing-md: 1rem; /* 16px */
  --spacing-lg: 1.5rem; /* 24px */
  --spacing-xl: 2rem; /* 32px */
  --spacing-2xl: 3rem; /* 48px */

  /* Touch targets */
  --touch-min: 44px;

  /* Border radius (rounded hierarchy) */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 999px;

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: "Fira Code", "Courier New", monospace;
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 1.875rem; /* 30px */
  --font-size-4xl: 2.25rem; /* 36px */

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

  /* Line heights */
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
}

/* ===== DARK MODE ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #14b8a6;
    --primary-light: #2dd4bf;
    --primary-lighter: #67e8f9;
    --primary-dark: #0d9488;

    --secondary: #ff7a2f;
    --secondary-light: #ffb366;
    --secondary-lighter: #ffddb3;
    --secondary-dark: #cc5f1d;

    --accent: #ec4899;

    --bg: #0f172a;
    --bg-secondary: #1a2845;
    --bg-tertiary: #253456;

    --card: #1e293b;
    --card-hover: #334155;

    --text: #f8fafc;
    --text-secondary: #cbd5e1;
    --muted: #94a3b8;

    --border: #475569;
    --border-light: #334155;

    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #22d3ee;
  }
}

/* ===== RESET GLOBAL ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--text);
  background: var(--bg);
  transition:
    background-color var(--duration-base) var(--easing-inout),
    color var(--duration-base) var(--easing-inout);
}

/* ===== TIPOGRAFIA PREMIUM ===== */
h1 {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-sm);
}

h4,
h5,
h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

small {
  font-size: var(--font-size-sm);
  color: var(--muted);
}

/* ===== LINKS ===== */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing-out);
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

a:active {
  color: var(--primary-dark);
}

/* ===== BOTÕES PREMIUM ===== */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.625rem 1.25rem;
  min-height: var(--touch-min);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing-out);
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

/* Botão primary (destaque) */
.btn-primary,
button[type="submit"] {
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
button[type="submit"]:hover {
  background: linear-gradient(
    135deg,
    var(--primary-light) 0%,
    var(--primary) 100%
  );
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

/* Botão soft (secundário) */
.btn-soft {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-soft:hover {
  background: var(--bg-tertiary);
  border-color: var(--border);
  transform: translateY(-1px);
}

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

/* Botão outline */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Botão link */
.btn-link {
  background: none;
  color: var(--primary);
  border: none;
  padding: 0;
  min-height: auto;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--primary-light);
}

/* Botão danger */
.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

/* Tamanhos de botão */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-sm);
  min-height: 32px;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: var(--font-size-lg);
  min-height: 48px;
}

/* ===== CARDS PREMIUM ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-base) var(--easing-out);
}

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

.card-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.card-body {
  margin-bottom: var(--spacing-md);
}

.card-footer {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ===== MODAIS PREMIUM ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: var(--spacing-lg);
  animation: fadeIn var(--duration-base) var(--easing-out);
}

.modal-backdrop.show {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 500px;
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-2xl);
  overflow: hidden;
  animation: slideUp var(--duration-base) var(--easing-out);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  width: var(--touch-min);
  height: var(--touch-min);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--duration-fast) var(--easing-out);
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: var(--spacing-lg);
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: var(--spacing-md);
  justify-content: flex-end;
}

/* ===== INPUTS PREMIUM ===== */
input,
textarea,
select {
  width: 100%;
  padding: 0.625rem var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--card);
  color: var(--text);
  font-size: var(--font-size-base);
  font-family: var(--font-sans);
  min-height: var(--touch-min);
  transition: all var(--duration-fast) var(--easing-out);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

input::placeholder {
  color: var(--muted);
}

/* ===== ANIMAÇÕES ===== */
@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 pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

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

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

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}
