/* =========================================================
   BASE Y SCROLLBARS
   ========================================================= */
@layer base {
  html, body {
    margin: 0;
    padding: 0;
  }
  body {
    overscroll-behavior: none;
  }
  main > :first-child {
    margin-top: 0 !important;
  }
  main > :last-child {
    margin-bottom: 0 !important;
  }
}

html {
  min-height: 100vh;
  height: auto;
  overflow: hidden auto;
  overscroll-behavior-y: auto !important;
}

body {
  min-height: 100vh;
  height: auto !important;
  overflow: hidden auto !important;
  overscroll-behavior-y: auto !important;
}

::-webkit-scrollbar {
  display: none;
}

/* =========================================================
   TOKENS DE COLORES Y UTILIDADES PERSONALIZADAS 
   ========================================================= */
:root {
  --surface-canvas: #FFFFFF;
  --surface-container-lowest: #ffffff;
  --inverse-surface: #293040;
  --on-primary-fixed: #001d31;
  --on-tertiary-fixed-variant: #005137;
  --surface-container-highest: #dce2f7;
  --on-secondary-fixed: #131b2e;
  --secondary-fixed-dim: #bec6e0;
  --on-surface-variant: #3f4850;
  --tertiary-fixed-dim: #68dba9;
  --surface-container-high: #e1e8fd;
  --border-strong: #CBD5E1;
  --primary-dark: #0369A1;
  --on-primary: #ffffff;
  --on-primary-fixed-variant: #004b73;
  --surface-bright: #f9f9ff;
  --tertiary-fixed: #85f8c4;
  --surface-subtle: #F8F9FA;
  --on-error-container: #93000a;
  --primary-container: #007bb9;
  --primary-fixed: #cce5ff;
  --surface-elevated: #FFFFFF;
  --on-error: #ffffff;
  --primary: #006194;
  --outline-variant: #bfc7d2;
  --surface-container-low: #f1f3ff;
  --on-secondary-fixed-variant: #3f465c;
  --error-container: #ffdad6;
  --on-primary-container: #fdfcff;
  --on-tertiary-container: #f5fff7;
  --surface: #f9f9ff;
  --background: #f9f9ff;
  --badge-emerald: #059669;
  --outline: #707881;
  --on-background: #141b2b;
  --surface-tint: #006398;
  --inverse-on-surface: #edf0ff;
  --tertiary: #006948;
  --surface-dim: #d3daef;
  --on-tertiary: #ffffff;
  --tertiary-container: #00855d;
  --secondary-container: #dae2fd;
  --surface-container: #e9edff;
  --primary-fixed-dim: #93ccff;
  --on-surface: #141b2b;
  --brand-navy: #0D1E4C;
  --error: #ba1a1a;
  --border-subtle: #E2E8F0;
  --inverse-primary: #93ccff;
  --on-secondary-container: #5c647a;
  --on-secondary: #ffffff;
  --on-tertiary-fixed: #002114;
  --secondary-fixed: #dae2fd;
  --surface-variant: #dce2f7;
  --secondary: #565e74;
}


.badge-ofertas {
  background-color: rgb(0, 206, 166);
  color: rgb(0, 32, 24);
}

/* =========================================================
   SOBRESCRITURAS DE TEMA CARMESÍ 
   ========================================================= */
.bg-primary {
  background-color: #d72538 !important;
}

.hover\:bg-primary-dark:hover {
  background-color: #b71c2d !important;
}

.text-primary {
  color: #d72538 !important;
}

.border-primary {
  border-color: #d72538 !important;
}

.accent-primary {
  accent-color: #d72538 !important;
}

#wizard-progress-line {
  background-color: #d72538 !important;
}

#step-badge-1 {
  background-color: #d72538 !important;
  color: #ffffff !important;
}

#dot-0 {
  background-color: #d72538 !important;
}

#tab-btn-comprar.bg-primary {
  background-color: #d72538 !important;
}

.term-btn.bg-primary {
  background-color: #d72538 !important;
}

header nav a[aria-current="page"] {
  color: #d72538 !important;
}

header a[data-path="publicar-auto"] {
  background-color: #d72538 !important;
}

header a[data-path="publicar-auto"]:hover {
  background-color: #b71c2d !important;
}

header a[data-path="asesor"]:hover,
header a[data-path="descargar-app"]:hover {
  color: #d72538 !important;
}

/* =========================================================
   DISEÑO RESPONSIVO Y MÓVIL (MOBILE OVERRIDES)
   ========================================================= */
html, body, main, section {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

@media (max-width: 1023px) {
  header > div {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    justify-content: space-between !important;
  }
  header img {
    max-width: 180px !important;
    height: 36px !important;
  }
  .hero-slide {
    flex-direction: column !important;
    padding: 1.5rem !important;
    justify-content: flex-start !important;
  }
  .hero-slide h1, .hero-slide h2 {
    font-size: 1.75rem !important;
    line-height: 2.25rem !important;
  }
  .hero-slide p {
    font-size: 0.95rem !important;
    line-height: 1.4rem !important;
  }
  .hero-slide > div:last-child {
    height: 240px !important;
    max-height: 260px !important;
    margin-top: 1rem !important;
  }
  .hero-slide img {
    max-height: 220px !important;
  }
  #hero .min-h-\[580px\] {
    min-height: 540px !important;
  }
  #hero .relative.-mt-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    margin-top: 1rem !important;
  }
  #inventario-section .grid,
  #autoremates-section .grid,
  #motor-assist-section .grid,
  #novedades-section .grid,
  footer .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #cotizador-section .grid {
    grid-template-columns: 1fr !important;
  }
  #vehicle-search-form {
    grid-template-columns: 1fr !important;
  }
  #vehicle-search-form > div,
  #vehicle-search-form button,
  #vehicle-search-form select {
    width: 100% !important;
  }
  .wizard-step .grid {
    grid-template-columns: 1fr !important;
  }
  #modal-asesor > div,
  #modal-app > div,
  #modal-publicar > div,
  #modal-perfil > div,
  #modal-interes > div,
  #modal-vehicle-interest > div {
    max-width: 92vw !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    margin: 1rem !important;
  }
}

@media (max-width: 768px) {
  #inventario-section .grid,
  #autoremates-section .grid,
  #motor-assist-section .grid,
  #novedades-section .grid,
  footer .grid,
  #hero .relative.-mt-6,
  .wizard-step .grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  header a span.font-headline-sm {
    display: none !important;
  }
  .hero-slide h1, .hero-slide h2 {
    font-size: 1.5rem !important;
    line-height: 1.9rem !important;
  }
  #hero .min-h-\[580px\] {
    min-height: 580px !important;
  }
  .term-btn {
    padding: 0.5rem 0.25rem !important;
    font-size: 0.75rem !important;
  }
}


#solicitud-agencia,
#solicitud-vehiculo,
#modal-solicitud-agencia,
#modal-solicitud-vehiculo {
  color-scheme: dark;
}

#solicitud-agencia option,
#solicitud-vehiculo option,
#modal-solicitud-agencia option,
#modal-solicitud-vehiculo option {
  background-color: #18181c;
  color: #ffffff;
}