/* Reinicio global y tipografía */
:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #111827;
  background: #f8fafc;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 45%, #ffffff 100%);
  color: #111827;
}

.nivel-vendedor {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.nivel-vendedor--basico {
  background: #fff7ed;
  color: #c2410c;
}

.nivel-vendedor--medio {
  background: #ecfdf5;
  color: #15803d;
}

.nivel-vendedor--avanzado {
  background: #eff6ff;
  color: #0f52ba;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  max-width: 3000px;
  margin: 18px auto;
  padding: 0 12px;
}

.login-page {
  min-height: calc(100vh - 90px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0 48px;
}

.login-card {
  width: 550px;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
  padding: 36px;
}

.login-card__header {
  margin-bottom: 38px;
}


.eyebrow {
  margin: 0 0 10px;
  color: #2563eb;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0;
  font-size: clamp(2rem, 2.4vw, 2.6rem);
  line-height: 1.05;
}

.login-intro {
  margin: 14px 0 0;
  color: #475569;
  line-height: 1.75;
}

.login-form .form-group {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.login-form label {
  font-weight: 600;
  color: #0f172a;
}

.login-form input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  background: white;
  color: black !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-field {
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  padding: 0;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #2563eb;
  color: #ffffff;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.login-form .btn-primary.login-ready {
  background: #1e3a8a;
}

.login-form .btn-primary.login-ready:hover:not(:disabled) {
  background: #172554;
}

.login-form .btn-primary.login-ready:active {
  background: #172554;
}

.login-form .btn-primary:disabled {
  background: #60a5fa !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

.btn-primary:disabled,
.btn-submit:disabled,
button[type="submit"]:disabled,
input[type="submit"]:disabled {
  background: #94a3b8;
  color: rgba(255, 255, 255, 0.9);
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
  transform: none;
}

.form-errors,
.field-error {
  color: #b91c1c;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-top: 8px;
}

.form-group--error select,
.form-group--error input {
  border-color: #dc2626;
}

.form-errors {
  margin-bottom: 18px;
}

.site-message {
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 10px;
  font-weight: 700;
}

.site-message--success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}

.site-message--error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.site-message--warning,
.site-message--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
}

.field-notice--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.login-card__footer {
  margin-top: 16px;
  text-align: center;
  color: #475569;
}

.login-card__footer a {
  color: #2563eb;
  font-weight: 700;
}

@media (max-width: 520px) {
  .login-card {
    padding: 28px 20px;
  }
}

/* ===========================
   ESTILOS DEL NAVBAR
   =========================== */

/* Estilos base para los botones del navbar */
.navbar-btn {
  color: #60a5fa;
  text-decoration: none !important;
  transition: all 0.3s ease;
  padding: 0;
  text-align: center;
  border-radius: 4px;
  display: inline-block;
}

/* Efecto hover: texto blanco y fondo más oscuro para indicar la sesión activa */
.navbar-btn:hover {
  color: white !important;
  background-color: #1e40af;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  text-decoration: none !important;
}

/* Estilos específicos para el logo del navbar - siempre blanco */
.navbar-logo {
  color: white !important;
  font-weight: bold;
  text-decoration: none !important;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-block;
}

/* Efecto hover para el logo: oscurece el fondo y eleva el elemento, mantiene color blanco */
.navbar-logo:hover {
  color: white !important;
  background-color: #1e40af;
  transform: translateY(-2px);
  text-decoration: none !important;
}

/* ===========================
   ESTILOS DEL FOOTER
   =========================== */

/* Contenedor principal del footer con diseño similar al navbar */
.footer {
  background: #1e3a8a;
  color: white;
  padding: 32px 12px;
  border-top: 1px solid #1e40af;
  margin-top: 60px;
}

/* Contenedor flexible para organizar las secciones */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

/* Estilos generales para cada sección del footer */
.footer-section {
  display: flex;
  flex-direction: column;
}

/* Información de la empresa */
.footer-info {
  justify-content: flex-start;
}

/* Título principal del footer */
.footer-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin: 0 0 10px 0;
  color: white;
}

/* Texto de derechos reservados */
.footer-copyright {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Títulos de las secciones */
.footer-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 15px 0;
  color: white;
}

/* Lista de enlaces */
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 10px;
}

/* Estilos para los enlaces del footer */
.footer-link {
  color: #60a5fa;
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 4px 0;
  display: inline-block;
}

/* Efecto hover para enlaces: texto blanco y subrayado */
.footer-link:hover {
  color: white;
  text-decoration: underline;
  transform: translateX(4px);
}

/* Sección de redes sociales */
.footer-social {
  justify-content: flex-start;
}

/* Contenedor de iconos de redes sociales */
.social-icons {
  display: flex;
  gap: 15px;
}

/* Estilos base para iconos sociales */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #1e40af;
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 24px;
}

/* SVG dentro de los iconos sociales */
.social-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Efecto hover para iconos sociales */
.social-icon:hover {
  background-color: #2563eb;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Específico para Instagram */
.social-icon.instagram {
  background: linear-gradient(135deg, #f1375f, #f7a621);
  color: white;
}

.social-icon.instagram:hover {
  background: linear-gradient(135deg, #c41e3a, #ff6b35);
  transform: translateY(-3px) scale(1.05);
}

.social-icon.instagram svg {
  fill: white;
}

/* Específico para Facebook */
.social-icon.facebook {
  background: #4267B2;
  color: white;
}

.social-icon.facebook:hover {
  background: #365dbf;
}

/* Específico para X */
.social-icon.x {
  background: #000;
  color: white;
}

.social-icon.x:hover {
  background: #1f1f1f;
}

/* Específico para LinkedIn */
.social-icon.linkedin {
  background: #0A66C2;
  color: white;
}

.social-icon.linkedin:hover {
  background: #084d99;
}


/* Media queries para responsividad */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer {
    padding: 24px 12px;
    margin-top: 40px;
  }

  .footer-title {
    font-size: 1.1rem;
  }

  .footer-section-title {
    font-size: 0.95rem;
  }

  .social-icons {
    gap: 12px;
  }

  .social-icon {
    width: 36px;
    height: 36px;
  }

  .social-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ===========================
   ESTILOS DE LA PÁGINA DE VEHÍCULOS
   =========================== */

.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.filters-bar .search {
  flex: 1 1 320px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.filters-bar input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  outline: none;
}

.filters-bar select,
.filters-panel select,
.filters-panel input {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  outline: none;
  min-width: 160px;
}

.filters-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.10);
}

.btn-primary {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(0, 153, 255, 0.18);
}

.filters-panel {
  margin: 10px 0 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
}

.col-12 {
  grid-column: span 12;
}

.col-6 {
  grid-column: span 6;
}

.col-4 {
  grid-column: span 4;
}

.col-3 {
  grid-column: span 3;
}

@media (max-width: 980px) {
  .col-6, .col-4, .col-3 {
    grid-column: span 12;
  }
  .filters-bar select {
    min-width: 180px;
  }
}

.section-title {
  font-size: 14px;
  opacity: 0.8;
  margin: 6px 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

details.adv {
  border-top: 1px dashed rgba(255, 255, 255, 0.10);
  margin-top: 10px;
  padding-top: 10px;
}

details.adv > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-weight: 600;
}

details.adv > summary::-webkit-details-marker {
  display: none;
}

.hint {
  font-size: 12px;
  opacity: 0.7;
}

.filters-sticky {
  position: sticky;
  top: 0;
  z-index: 50;
}

.filters-sticky::before {
  content: "";
  position: absolute;
  inset: -12px -12px auto -12px;
  height: 12px;
  pointer-events: none;
}

.filters-sticky {
  background: rgba(15, 15, 15, 0.85);
  padding-top: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filters-sticky .filters-bar,
.filters-sticky .filters-panel {
  backdrop-filter: blur(10px);
}

.vehicles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.vehicle-card {
  border: 1px solid #e9e9e9;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.vehicle-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.vehicle-image-container {
  width: 100%;
  aspect-ratio: 4/3;
  background: #f4f4f4;
}

.vehicle-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vehicle-info {
  padding: 12px;
}

.vehicle-price-year {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.vehicle-price {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.2px;
}

.vehicle-year {
  font-size: 12px;
  color: #666;
  border: 1px solid #eee;
  border-radius: 999px;
  padding: 4px 8px;
}

.vehicle-title {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

.vehicle-details {
  margin-top: 4px;
  color: #666;
  font-size: 13px;
}

.vehicle-link {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.vehicle-link span {
  font-size: 12px;
  background: #f6f6f6;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 6px 8px;
}

/* ===========================
   ESTILOS MODERNOS PARA FILTROS DE VEHÍCULOS
   =========================== */

.vehicles-page {
  display: grid;
  grid-template-columns: 400px 1fr;
  align-items: start;
  gap: 32px;
  max-width: 100%;
  margin: 0;
  padding: 0 12px;
}

.sidebar {
  position: relative;
}

.sidebar-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 28px;
  position: sticky;
  top: 24px;
}

.panel-card__header {
  margin-bottom: 24px;
}

.panel-card__header .eyebrow {
  margin: 0 0 10px;
  color: #2563eb;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.panel-card__header h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.8vw, 1.95rem);
  line-height: 1.15;
}

.panel-card__intro {
  margin: 0;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.6;
}

.panel-section {
  margin-bottom: 24px;
}

.panel-section:last-of-type {
  margin-bottom: 0;
}

.panel-section__title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2563eb;
  margin: 0 0 16px;
  font-weight: 700;
}

.search-form .form-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.search-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.filter-box {
  background: #ffffff !important;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.filter-box__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 18px 20px 10px;
  color: #111827;
}

.filter-box summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 700;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.filter-box[open] summary {
  border-bottom-color: #e5e7eb;
}

.filter-box summary::-webkit-details-marker {
  display: none;
}

.filter-box summary::after {
  content: "\203A";
  transform: rotate(90deg);
  transition: transform 0.2s ease;
  font-size: 1.1rem;
  color: #475569;
}

.filter-box[open] summary::after {
  transform: rotate(-90deg);
}

.filter-body {
  padding: 18px 20px 20px;
  background: #ffffff !important;
}

.filter-box details:not([open]) .filter-body {
  display: none;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-pill,
.type-pill {
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-pill:hover,
.type-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.type-pill.active,
.category-pill.active {
  border-color: #2563eb;
  background: #2563eb;
  color: white;
}

@media (max-width: 980px) {
  .vehicles-page {
    grid-template-columns: 360px 1fr;
  }
  .search-form .form-row {
    grid-template-columns: 1fr;
  }
  .sidebar-card {
    position: static;
  }
}

.type-pill {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.type-pill:hover {
  background: #e2e8f0;
}

.type-pill.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}

@media (max-width: 640px) {
  .sidebar-card {
    padding: 22px;
  }
}

.search-form label {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.95rem;
  display: block;
}

.search-form input[type="text"],
.search-form input[type="number"],
.search-form select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.search-form input[type="text"]:focus,
.search-form input[type="number"]:focus,
.search-form select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: stretch;
  margin-top: 8px;
}

.search-btn {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.search-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.search-btn-secondary {
  width: 100%;
  border-color: #cbd5e1;
  background: white;
  color: #475569;
}

.search-btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #334155;
}

.advanced-toggle {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: flex-start;
  transition: all 0.2s ease;
}

.advanced-toggle:hover {
  color: #1d4ed8;
}

.advanced-toggle::after {
  content: "▼";
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.advanced-toggle.collapsed::after {
  transform: rotate(-90deg);
}

.advanced-section {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.advanced-section.collapsed {
  max-height: 0;
}

.results-area {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.results-count {
  color: #475569;
  font-size: 0.95rem;
}

.sort-select {
  width: 240px;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: white;
  color: #1e293b;
  font-size: 0.95rem;
}

.load-more-container {
  display: flex;
  justify-content: center;
}


