/* Estilos globales y optimización móvil para AutoPulse Industrial */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Outfit:wght@500;600;700;800;900&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================================== */
/* 1. TAMAÑOS EN ESCRITORIO (PC) - PRESERVADO EXACTO           */
/* ========================================================== */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

@media (min-width: 921px) {
  html {
    font-size: 16.5px;
  }
}

body {
  overflow-x: hidden;
  font-family: var(--font-main);
  background-color: #F8FAFC;
  color: #0F172A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: 84px;
  line-height: 1.5;
}

@media (min-width: 921px) {
  body {
    padding-bottom: 0;
  }
}

.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Gradientes vivos y modernos */
.bg-gradient-brand {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 40%, #EC4899 75%, #F97316 100%);
}

.bg-gradient-hero {
  background: radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.20) 0%, transparent 40%),
              radial-gradient(circle at 10% 80%, rgba(59, 130, 246, 0.25) 0%, transparent 45%),
              linear-gradient(180deg, #0B1120 0%, #1E293B 100%);
}

.text-gradient {
  background: linear-gradient(135deg, #3B82F6 0%, #EC4899 50%, #F97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #F59E0B 0%, #F97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Insignias DGT con alto contraste */
.badge-dgt-0 {
  background-color: #0284C7;
  color: #FFFFFF;
  font-weight: 900;
}

.badge-dgt-eco {
  background: linear-gradient(135deg, #059669 0%, #0284C7 100%);
  color: #FFFFFF;
  font-weight: 900;
}

.badge-dgt-c {
  background-color: #16A34A;
  color: #FFFFFF;
  font-weight: 900;
}

.badge-dgt-b {
  background-color: #EAB308;
  color: #713F12;
  font-weight: 900;
}

/* Botones táctiles optimizados */
.btn-touch {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  font-weight: 800;
}

/* Efectos de tarjeta */
.card-hover {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
}

/* Barra inferior móvil nativa */
.mobile-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 74px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 921px) {
  .mobile-bottom-bar {
    display: none;
  }
}

/* Scroll horizontal suave */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}


/* ========================================================================== */
/* 2. ESTÁNDARES NATIVOS DE APP MÓVIL (iOS HIG & Material Design 3) <= 920px   */
/* ========================================================================== */
@media (max-width: 920px) {

  /* Aumento de la base tipográfica en smartphones a 18px */
  html {
    font-size: 18px !important;
  }

  /* 1 Vehículo por columna obligatorio en móvil y tablet */
  .vehicle-grid,
  .grid-vehicles {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  /* Sobrescribir tamaños diminutos de Tailwind en móvil */
  .text-xs {
    font-size: 0.85rem !important; /* ~15.3px */
    line-height: 1.35rem !important;
  }

  .text-sm {
    font-size: 0.95rem !important; /* ~17.1px */
    line-height: 1.45rem !important;
  }

  .text-base {
    font-size: 1.05rem !important; /* ~18.9px */
    line-height: 1.55rem !important;
  }

  .text-lg {
    font-size: 1.2rem !important; /* ~21.6px */
    line-height: 1.65rem !important;
  }

  .text-xl {
    font-size: 1.35rem !important; /* ~24.3px */
    line-height: 1.75rem !important;
  }

  .text-2xl {
    font-size: 1.65rem !important; /* ~29.7px */
    line-height: 2rem !important;
  }

  .text-3xl {
    font-size: 1.95rem !important; /* ~35.1px */
    line-height: 2.3rem !important;
  }

  /* Eliminar definitivamente cualquier texto inline por debajo de 14.5px */
  [class*="text-[8px]"],
  [class*="text-[9px]"],
  [class*="text-[10px]"],
  [class*="text-[11px]"] {
    font-size: 0.82rem !important; /* ~14.8px */
    line-height: 1.3rem !important;
  }

  /* FORMULARIO Y SELECTS EN MÓVIL (Estándar iOS 17px con ergonomía táctil) */
  input, select, textarea {
    font-size: 17px !important;
    min-height: 52px !important;
    padding: 12px 16px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
  }

  form label {
    font-size: 15px !important;
    font-weight: 900 !important;
    color: #1E293B !important;
    margin-bottom: 8px !important;
    display: block !important;
  }

  /* Botón de búsqueda hero en móvil */
  form button[type="submit"] {
    min-height: 54px !important;
    font-size: 18px !important;
    font-weight: 900 !important;
  }

  /* Pastillas de búsqueda frecuente (Demandados) */
  .mt-5.pt-4 a {
    font-size: 15px !important;
    font-weight: 800 !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
  }

  /* Carrusel de Fabricantes en Móvil */
  .flex-shrink-0.min-w-\[150px\],
  .flex-shrink-0.min-w-\[130px\],
  .flex-shrink-0.min-w-\[140px\] {
    min-width: 170px !important;
    padding: 16px !important;
  }

  .flex-shrink-0.min-w-\[150px\] span:first-child,
  .flex-shrink-0.min-w-\[140px\] span:first-child {
    font-size: 17px !important;
    font-weight: 900 !important;
  }

  .flex-shrink-0.min-w-\[150px\] span:last-child,
  .flex-shrink-0.min-w-\[140px\] span:last-child {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #64748B !important;
  }

  /* TARJETAS DE VEHÍCULOS EN MÓVIL (Tipografía de Gran Tamaño y Alto Contraste) */
  article {
    border-radius: 24px !important;
    border-width: 1.5px !important;
    border-color: #CBD5E1 !important;
  }

  /* Título del vehículo en la tarjeta */
  article h3,
  article h3 a {
    font-size: 23px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
    color: #0F172A !important;
  }

  /* Subtítulo / Versión */
  article p.line-clamp-1,
  article p {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-top: 4px !important;
    margin-bottom: 14px !important;
  }

  /* Nombre del Concesionario y Ciudad */
  article div.flex.items-center.gap-2.text-xs,
  article div.flex.items-center.gap-1\.5.text-xs {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #1E293B !important;
    margin-bottom: 8px !important;
  }

  /* Precio en la foto */
  article .text-2xl,
  article .text-3xl {
    font-size: 32px !important;
    font-weight: 900 !important;
  }

  article .text-xs.font-bold.text-slate-300 {
    font-size: 13.5px !important;
    font-weight: 800 !important;
  }

  /* Badges DGT, Carrocería y Garantía */
  article .absolute.top-3 a,
  article .absolute.top-3 span,
  article .mb-4 a {
    font-size: 14px !important;
    font-weight: 900 !important;
    padding: 7px 14px !important;
    border-radius: 12px !important;
  }

  /* Cajas de métricas técnicas (Volumen, Carga Útil, Kms) */
  article .grid-cols-3 {
    padding: 12px 14px !important;
    margin-bottom: 18px !important;
    background-color: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
  }

  article .grid-cols-3 span.block {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #475569 !important;
    margin-bottom: 2px !important;
  }

  article .grid-cols-3 span:last-child {
    font-size: 18px !important;
    font-weight: 900 !important;
  }

  /* Botones principales de la tarjeta en móvil */
  article .btn-touch {
    min-height: 54px !important;
    font-size: 16.5px !important;
    font-weight: 900 !important;
    border-radius: 16px !important;
  }

  article .btn-touch svg {
    width: 22px !important;
    height: 22px !important;
  }

  /* BARRA INFERIOR DE NAVEGACIÓN MÓVIL (PWA) */
  .mobile-bottom-bar {
    height: 78px !important;
  }

  .mobile-bottom-bar a span {
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-top: 3px !important;
  }

  .mobile-bottom-bar svg {
    width: 26px !important;
    height: 26px !important;
  }

  /* CABECERA SUPERIOR MÓVIL */
  header .font-display {
    font-size: 26px !important;
  }

  header a[href="/login"] {
    font-size: 15px !important;
    font-weight: 800 !important;
    min-height: 44px !important;
    padding: 8px 18px !important;
  }

}
