/* ── KS Buscador por Matrícula ─────────────────────────────────────────── */

.ks-matricula-page {
  max-width: 1024px;
  margin: 2rem auto;
  padding: 0 1rem 3rem;
  font-family: inherit;
}
@media (max-width: 600px) {
  .ks-matricula-page { margin: 1rem auto; padding: 0 .75rem 2rem; }
}

/* ── Cabecera hero ── */
.ks-mat-header {
  background: linear-gradient(135deg, #1a2e4a 0%, #1d5087 100%);
  color: #fff;
  text-align: center;
  border-radius: 16px 16px 0 0;
  padding: 2.5rem 2rem 4rem;
  margin-bottom: 0;
  position: relative;
}
.ks-mat-header-icon {
  display: flex;
  justify-content: center;
  margin-bottom: .75rem;
  opacity: .7;
}
.ks-mat-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2.5rem;
  background: #fff;
  clip-path: ellipse(60% 100% at 50% 100%);
}
.ks-mat-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #fff;
}
.ks-mat-subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 520px;
  margin: 0 auto;
}

/* Hero badge — "● Disponible ahora" */
.ks-mat-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 20px;
  padding: .3rem .95rem;
  font-size: .74rem;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: .85rem;
  letter-spacing: .025em;
}
.ks-mat-hero-badge__dot {
  width: 7px;
  height: 7px;
  background: #4ade80;
  border-radius: 50%;
  flex-shrink: 0;
  animation: ks-pulse-dot 2.3s ease-in-out infinite;
}
@keyframes ks-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
  60%       { box-shadow: 0 0 0 5px rgba(74,222,128,0); }
}

/* Trust badges dentro del hero (fondo oscuro) */
.ks-mat-trust-badges {
  display: flex;
  justify-content: center;
  gap: .45rem 1.4rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  position: relative;
  z-index: 1;
}
.ks-mat-trust-badge {
  display: flex;
  align-items: center;
  gap: .38rem;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  white-space: nowrap;
}
.ks-mat-trust-badge svg { flex-shrink: 0; color: #6dd5a8; }

/* ── Formulario ── */
.ks-mat-form-wrap {
  background: #fff;
  border-radius: 0 0 16px 16px;
  padding: 2.25rem 2rem 1.75rem;
  box-shadow: 0 6px 28px rgba(0,0,0,.10);
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}
.ks-mat-label {
  display: block;
  font-weight: 700;
  margin-bottom: .75rem;
  font-size: .92rem;
  color: #555;
  text-align: center;
  letter-spacing: .01em;
}
.ks-mat-honeypot {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ── Placa europea ── */
.ks-mat-plate-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding-bottom: 15px;
}
.ks-mat-plate {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 3.5px solid #111;
  border-radius: 10px;
  position: relative;
  /* NO overflow:hidden — evita el bug de iOS Safari que desplaza el contenido
     al aparecer el teclado virtual, ocultando la sección EU.
     El redondeo de esquinas se gestiona con border-radius en cada hijo. */
  box-shadow: 0 6px 24px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  width: 100%;
  max-width: 480px;
}
.ks-mat-plate-eu {
  background: #003399;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px 6px;
  gap: 2px;
  flex-shrink: 0;
  border-radius: 6px 0 0 6px;
}
.ks-mat-eu-stars {
  width: 36px;
  height: 36px;
  display: block;
}
.ks-mat-eu-code {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #FFD700;
  line-height: 1;
}

/* Fondo verde cuando la matrícula es válida */
.ks-mat-plate--valid {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.18), 0 6px 24px rgba(0,0,0,.22);
  transition: border-color .2s, box-shadow .2s;
}
.ks-mat-plate--valid .ks-mat-input { background: #f0fdf4; }

/* Hints bajo el bloque de input */
.ks-mat-hint,
.ks-mat-privacy {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .72rem;
  color: #64748b;
  margin: .35rem 0 0;
  line-height: 1.45;
}
.ks-mat-hint svg,
.ks-mat-privacy svg { flex-shrink: 0; margin-top: .1rem; }
.ks-mat-hint strong { font-weight: 700; color: #1a2e4a; }

/* Flash del hint cuando la matrícula no coincide — sin cambiar layout */
@keyframes ks-hint-flash {
  0%   { color: #64748b; text-shadow: none; }
  20%  { color: #92400e; text-shadow: 0 0 8px rgba(234,179,8,.55); }
  55%  { color: #b45309; text-shadow: 0 0 12px rgba(234,179,8,.45); }
  80%  { color: #92400e; text-shadow: 0 0 6px rgba(234,179,8,.3); }
  100% { color: #64748b; text-shadow: none; }
}
.ks-hint--flash {
  animation: ks-hint-flash .75s ease forwards;
}

/* Highlight de la sección "buscar por vehículo" cuando la matrícula no es válida */
@keyframes ks-alt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.45); }
  40%  { box-shadow: 0 0 0 8px rgba(245,158,11,.25); }
  70%  { box-shadow: 0 0 0 12px rgba(245,158,11,.08); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
/* Versión para fondo claro (matricula.tpl) */
.ks-alt-highlight {
  animation: ks-alt-pulse .9s ease-out;
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  transition: background .4s, border-color .4s;
}
.ks-alt-highlight .ks-mat-alt-inline__title {
  color: #92400e;
  font-weight: 600;
  transition: color .3s, font-weight .3s;
}
/* Versión para fondo oscuro (widget) */
.ks-alt-highlight-dark {
  animation: ks-alt-pulse .9s ease-out;
  background: rgba(245,158,11,.18) !important;
  transition: background .4s;
}
.ks-alt-highlight-dark .ks-wmat-alt__title {
  color: #fbbf24;
  transition: color .3s;
}

.ks-mat-input {
  flex: 1;
  padding: .75rem 1rem;
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: .15em;
  text-transform: uppercase;
  text-align: center;
  border: none;
  outline: none;
  background: #fff;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
  color: #111;
  min-width: 0;
  border-radius: 0 6px 6px 0; /* esquinas derechas */
}
.ks-mat-input::placeholder { color: #888; letter-spacing: .05em; font-weight: 400; font-size: 1.3rem; }
.ks-mat-input:focus { background: #fffde7; outline: none; }
/* Foco visible en la placa completa */
.ks-mat-plate:focus-within {
  border-color: #e8a020;
  box-shadow: 0 0 0 3px rgba(232,160,32,.2), 0 6px 24px rgba(0,0,0,.22);
  transition: border-color .2s, box-shadow .2s;
}

.ks-mat-btn {
  width: 100%;
  max-width: 480px;
  padding: 1rem 2rem;
  background: #e8a020;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .12s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(232,160,32,.38);
  letter-spacing: .01em;
}
.ks-mat-btn:hover  { background: #cf8c18; transform: translateY(-2px); box-shadow: 0 7px 20px rgba(232,160,32,.42); }
.ks-mat-btn:active { transform: translateY(0); box-shadow: 0 3px 10px rgba(232,160,32,.3); }
.ks-mat-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
/* Icono lupa en el botón */
.ks-mat-btn svg { flex-shrink: 0; }
.ks-mat-btn-loading { display: flex; align-items: center; gap: .4rem; }

/* Spinner */
.ks-mat-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ks-spin .7s linear infinite;
}
@keyframes ks-spin { to { transform: rotate(360deg); } }

/* ── Resultado ── */
.ks-mat-result { margin-bottom: 2rem; }

.ks-mat-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-primary, #1a2e4a);
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid #e8ecf0;
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.ks-mat-plate-tag {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #1a2e4a;
  background: #f0f4f8;
  border: 2px solid #c0cad6;
  border-radius: 4px;
  padding: .1rem .5rem;
  line-height: 1.4;
}

/* Vehículo */
.ks-mat-vehicle {
  background: #fff;
  border: 1.5px solid #e0e6ee;
  border-radius: 14px;
  padding: 0;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
}

/* Header */
.ks-mat-vehicle__header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.5rem;
  background: linear-gradient(135deg, #1a2e4a 0%, #1d5087 100%);
  color: #fff;
  flex-wrap: wrap;
}
.ks-mat-vehicle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  flex-shrink: 0;
}
.ks-mat-vehicle__icon svg { color: #fff; width: 20px; height: 20px; }
.ks-mat-vehicle__title {
  font-size: .95rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  white-space: nowrap;
}

/* Mini placa EU — misma altura que el icono (36px) */
.ks-mat-mini-plate {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 5px;
  overflow: hidden;
  height: 36px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.ks-mat-mini-plate__eu {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #003399;
  padding: 0 4px;
  flex-shrink: 0;
}
.ks-mat-mini-plate__text {
  font-family: 'Courier New', monospace;
  font-size: .85rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #1a2e4a;
  padding: 0 .55rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

/* Badge "Resultado instantáneo" en header */
.ks-mat-cache-badge--header {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .65rem;
  font-weight: 600;
  color: #86efac;
  background: rgba(134,239,172,.12);
  border: 1px solid rgba(134,239,172,.3);
  border-radius: 10px;
  padding: .1rem .5rem;
}
.ks-mat-cache-badge--header svg { color: #4ade80; }

/* Nombre destacado del vehículo */
.ks-mat-vehicle__name {
  padding: .85rem 1.5rem .1rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a2e4a;
  letter-spacing: -.01em;
}
.ks-mat-vehicle__engine {
  font-weight: 500;
  color: #64748b;
  font-size: .95rem;
}

/* Grid de datos — chips centrados, ocupando el ancho */
.ks-mat-vehicle-data {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: .4rem;
  margin: 0;
  padding: .85rem 1.5rem 1.15rem;
}
.ks-mat-data-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  font-size: .82rem;
  padding: .38rem .75rem;
  background: #f1f5f9;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: fit-content;
}
.ks-mat-data-row dt,
.ks-mat-data-row dd {
  display: contents;
}
.ks-mat-data-row dt { color: #64748b; font-weight: 600; }
.ks-mat-data-row dd { margin: 0; color: #1e293b; font-weight: 600; }
.ks-mat-data-row svg { color: #94a3b8; flex-shrink: 0; width: 13px; height: 13px; vertical-align: middle; }

/* Texto introductorio de resultados compatibles */
.ks-mat-results-intro {
  font-size: .93rem;
  color: #444;
  margin: 0 0 1rem;
  line-height: 1.55;
}

/* Badge de estado año en el título de baterías compatibles */
.ks-mat-year-status {
  display: inline-flex;
  align-items: center;
  padding: .15rem .6rem;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: .5rem;
}
.ks-mat-year-status--ok      { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.ks-mat-year-status--approx  { background: #fff8e1; color: #e65100; border: 1px solid #ffcc80; }
.ks-mat-year-status--unknown { background: #f5f5f5; color: #888;    border: 1px solid #ddd; }

/* Entradas del buscador — bloque destacado */
.ks-mat-results {
  background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
  border: 2px solid #3b82f6;
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 4px 20px rgba(59,130,246,.12), 0 1px 4px rgba(0,0,0,.06);
  position: relative;
  overflow: hidden;
}
.ks-mat-results::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 50%, #3b82f6 100%);
  background-size: 200% 100%;
  animation: ks-results-bar 2s ease-in-out;
}
@keyframes ks-results-bar {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.ks-mat-results .ks-mat-section-title {
  color: #1e40af;
}
.ks-mat-entries {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ks-mat-entry {
  border-radius: 10px;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.ks-mat-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(59,130,246,.22);
}
.ks-mat-entry-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.1rem;
  min-width: 0;
  background: #fff;
  border: 1.5px solid #3b82f6;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.ks-mat-entry-link:hover {
  background: #eff6ff;
  border-color: #2563eb;
  text-decoration: none;
}
.ks-mat-entry-logo {
  width: auto;
  height: 24px;
  max-width: 56px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}
.ks-mat-entry-name {
  font-weight: 600;
  color: #1a2e4a;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ks-mat-entry-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #3b82f6;
  color: #fff;
  border-radius: 50%;
  font-size: .85rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-left: auto;
  transition: background .15s, transform .15s;
}
.ks-mat-entry:hover .ks-mat-entry-arrow {
  background: #2563eb;
  transform: translateX(2px);
}

/* Error */
.ks-mat-error, .ks-mat-no-results {
  background: #fff8f0;
  border: 1px solid #f5c96a;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.ks-mat-error-icon { font-size: 1.3rem; margin-right: .4rem; }
.ks-mat-error p, .ks-mat-no-results p { margin: 0 0 .75rem; color: #555; }

/* Botón link */
.ks-mat-link-btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  background: var(--clr-primary, #1a2e4a);
  color: #fff !important;
  text-decoration: none;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  transition: background .2s;
  margin-top: .25rem;
}
.ks-mat-link-btn:hover { background: #2a4a72; }
.ks-mat-link-btn--outline {
  background: transparent;
  color: var(--clr-primary, #1a2e4a) !important;
  border: 2px solid var(--clr-primary, #1a2e4a);
}
.ks-mat-link-btn--outline:hover { background: var(--clr-primary, #1a2e4a); color: #fff !important; }

/* ── Búsqueda alternativa por vehículo (inline, dentro del form-wrap) ── */
.ks-mat-alt-inline {
  border-top: 1px solid #e8ecf0;
  margin-top: 1.25rem;
}

.ks-mat-alt-inline__title {
  font-size: .8rem;
  font-weight: 500;
  color: #64748b;
  margin: 0;
  padding: .85rem 1rem .6rem;
  line-height: 1.4;
  text-align: center;
}

/* Grid de tipos — estilo widget_buscador (columnas iguales, separadas por borde) */
.ks-mat-alt-inline__list {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  margin: 0;
}
.ks-mat-alt-inline__list li {
  flex: 1 1 0;
  min-width: 0;
  border-right: 1px solid #e8ecf0;
}
.ks-mat-alt-inline__list li:last-child { border-right: none; }

.ks-mat-alt-inline__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  padding: 1rem .5rem .85rem;
  text-decoration: none;
  color: #1a2e4a;
  transition: background .15s, color .15s, transform .1s;
  text-align: center;
  box-sizing: border-box;
}
.ks-mat-alt-inline__btn:hover {
  background: #eef4ff;
  color: #1d5087;
  transform: translateY(-2px);
  text-decoration: none;
}

.ks-mat-alt-inline__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: #f0f5ff;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}
.ks-mat-alt-inline__btn:hover .ks-mat-alt-inline__icon {
  background: #d8e8ff;
  transform: scale(1.08);
}
.ks-mat-alt-inline__icon svg { width: 26px; height: 26px; color: #1d5087; }
.ks-mat-alt-inline__name {
  font-size: .73rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: .01em;
  word-break: break-word;
  hyphens: auto;
}

/* Footer: beneficios + CTA (misma estructura que widget_buscador) */
.ks-mat-alt-inline__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid #e8ecf0;
  flex-wrap: wrap;
}
.ks-mat-alt-inline__benefits {
  display: flex;
  align-items: center;
  gap: .6rem 1.25rem;
  flex-wrap: wrap;
}
.ks-mat-alt-inline__benefits span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .77rem;
  font-weight: 600;
  color: #1a2e4a;
}
.ks-mat-alt-inline__benefits svg { color: #27ae60; flex-shrink: 0; }
.ks-mat-alt-inline__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.15rem;
  background: var(--clr-primary, #1a2e4a);
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  flex-shrink: 0;
}
.ks-mat-alt-inline__cta:hover { background: #2a4a72; transform: translateY(-1px); text-decoration: none; }
.ks-mat-alt-inline__cta:active { transform: scale(.97); }

/* ── Bloque SEO ── */
.ks-mat-seo { margin-top: 2.5rem; border-top: 1px solid #e8ecf0; padding-top: 2rem; }
.ks-mat-seo-section { margin-bottom: 2rem; }
.ks-mat-seo-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--clr-primary, #1a2e4a);
  margin-bottom: .75rem;
}
.ks-mat-seo-section p { color: #555; line-height: 1.65; margin-bottom: .5rem; }

/* Steps — horizontal cards en desktop */
.ks-mat-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.ks-mat-steps li {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: #f8fafd;
  border: 1px solid #e8ecf2;
  border-radius: 12px;
  padding: 1.15rem 1.1rem;
  position: relative;
}
/* Conector → entre steps */
.ks-mat-steps li:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -.7rem;
  top: 1.3rem;
  font-size: .9rem;
  color: #c0cad6;
  z-index: 1;
}
.ks-mat-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e8a020;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(232,160,32,.35);
}
.ks-mat-steps li strong { display: block; margin-bottom: .15rem; color: #1a2e4a; font-size: .93rem; }
.ks-mat-steps li p { margin: 0; color: #666; font-size: .84rem; line-height: 1.5; }
@media (max-width: 600px) {
  .ks-mat-steps { grid-template-columns: 1fr; }
  .ks-mat-steps li:not(:last-child)::after { content: '↓'; right: auto; left: 1.3rem; top: auto; bottom: -.7rem; }
}


/* ── 7. Fade-in del resultado ── */
.ks-mat-result {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s ease, transform .22s ease;
}
.ks-mat-result--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 2. Historial de búsquedas recientes ── */
.ks-mat-history {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .6rem;
  min-height: 1.8rem;
}
.ks-mat-history-label {
  font-size: .78rem;
  color: #888;
  white-space: nowrap;
}
/* ── Indicador de validez de matrícula ─────────────────────── */
.ks-plate-indicator {
  position: absolute;
  right: .5rem; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; pointer-events: none;
  transition: opacity .15s; z-index: 1;
}
.ks-plate-indicator--valid   { background: rgba(39,174,96,.14); color: #27ae60; }
.ks-plate-indicator--invalid { background: rgba(229,57,53,.12); color: #e53935; }

.ks-mat-history-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .05rem;
  padding: .2rem .65rem;
  background: #e8edf5;
  border: 1px solid #c8d4e8;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  color: #1a2e4a;
  cursor: pointer;
  letter-spacing: .06em;
  transition: background .15s, border-color .15s;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
}
.ks-mat-history-chip:hover { background: #d0dbed; border-color: #a0b4cc; }
.ks-mat-history-plate { font-family: 'Arial Black', 'Helvetica Neue', sans-serif; font-weight: 700; letter-spacing: .06em; }
.ks-mat-history-vehicle {
  font-size: .62rem; color: #6b8eb5; font-weight: 400;
  letter-spacing: 0; font-family: inherit;
  max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 5. Badge resultado de caché ── */
.ks-mat-cache-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  color: #27ae60;
  font-weight: 600;
  background: #eafaf1;
  border: 1px solid #a9dfbf;
  border-radius: 12px;
  padding: .15rem .6rem;
  margin-left: .75rem;
  vertical-align: middle;
}

/* ── 6. Error inline de validación mínima ── */
.ks-mat-inline-error {
  font-size: .82rem;
  color: #c0392b;
  margin: .4rem 0 0;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.ks-mat-inline-error::before {
  content: '⚠';
  font-size: .9rem;
}

/* ── 3. Botón nueva búsqueda ── */
.ks-mat-new-search-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: none;
  border: none;
  color: #1a2e4a;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  padding: .4rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-top: .5rem;
}
.ks-mat-new-search-btn:hover { color: #2a4a72; }

/* ── Barra de acciones (compartir + nueva búsqueda) ── */
.ks-mat-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .75rem;
  flex-wrap: wrap;
}

/* ── Botón compartir ── */
.ks-mat-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: none;
  border: 1px solid #c8d4e8;
  border-radius: 6px;
  color: #1a2e4a;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  padding: .35rem .75rem;
  transition: background .15s, border-color .15s, color .15s;
}
.ks-mat-share-btn:hover { background: #eef3fa; border-color: #a0b4cc; }
.ks-mat-share-btn--copied {
  color: #27ae60;
  border-color: #a9dfbf;
  background: #eafaf1;
}

/* ── Mis vehículos ── */
.ks-mat-my-vehicles {
  margin-top: .5rem;
  position: relative;
}
.ks-mat-my-vehicles-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #eef3fa;
  border: 1px solid #c8d4e8;
  border-radius: 20px;
  color: #1a2e4a;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  padding: .3rem .85rem;
  transition: background .15s;
}
.ks-mat-my-vehicles-btn:hover { background: #dde7f5; }
.ks-mat-my-vehicles-caret {
  transition: transform .2s;
}
.ks-mat-my-vehicles-btn[aria-expanded="true"] .ks-mat-my-vehicles-caret {
  transform: rotate(180deg);
}
.ks-mat-my-vehicles-list {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .4rem;
  padding: .5rem .6rem;
  background: #fff;
  border: 1px solid #e0e6ee;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.ks-mat-my-vehicles-chip {
  display: inline-flex;
  align-items: center;
  padding: .22rem .7rem;
  background: #f4f7fb;
  border: 1px solid #c8d4e8;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
  color: #1a2e4a;
  cursor: pointer;
  letter-spacing: .06em;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
  transition: background .15s, border-color .15s;
}
.ks-mat-my-vehicles-chip:hover { background: #dde7f5; border-color: #a0b4cc; }

/* ── Widget matrícula — hero full-width ── */
.ks-widget-mat {
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a2e4a 0%, #1d5087 100%);
  color: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  margin: 1.25rem 0;
  width: 100%;
}

/* ── Cabecera full-width ── */
.ks-widget-mat__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1rem 2rem .85rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  text-align: center;
}
.ks-widget-mat__heading-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
}

/* ── Sección principal: dos columnas (features + formulario) ── */
.ks-widget-mat__inner {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0;
}

/* ── Columna izquierda ── */
.ks-widget-mat__left {
  padding: 1.25rem 2rem 1.25rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
  border-right: 1px solid rgba(255,255,255,.1);
}
.ks-widget-mat__icon {
  flex-shrink: 0;
  opacity: .85;
}
.ks-widget-mat__title {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 700;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}
.ks-widget-mat__subtitle {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin: 0;
  line-height: 1.45;
}
.ks-widget-mat__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.ks-widget-mat__features li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  font-weight: 500;
  color: rgba(255,255,255,.88);
}
.ks-widget-mat__features li svg {
  flex-shrink: 0;
  color: #6dd5a8;
}

/* ── Columna derecha (formulario) ── */
.ks-widget-mat__right {
  padding: 1rem 2.25rem 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ks-widget-mat__form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  width: 90%;
}
.ks-widget-mat__label {
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ks-widget-mat__plate-wrap {
  display: flex;
  gap: .6rem;
  align-items: stretch;
}
.ks-widget-mat__plate {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 2.5px solid #fff;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,.25);
  flex: 1;
  min-width: 0;
}
.ks-widget-mat__eu {
  background: #003399;
  color: #FFD700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px 6px 4px;
  gap: 2px;
  flex-shrink: 0;
}
.ks-widget-mat__stars {
  display: block;
  flex-shrink: 0;
}
.ks-widget-mat__code {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #FFD700;
}
.ks-widget-mat__input {
  flex: 1;
  padding: .55rem .6rem;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
  border: none;
  outline: none;
  background: #fff;
  font-family: 'Arial Black', 'Helvetica Neue', sans-serif;
  color: #111;
  min-width: 0;
}
.ks-widget-mat__input::placeholder {
  color: #888;
  font-size: .78rem;
  font-weight: 400;
  letter-spacing: .02em;
}
.ks-widget-mat__input:focus { background: #fffde7; }

/* Fondo verde widget cuando matrícula válida */
.ks-widget-mat__plate--valid {
  border-color: #16a34a;
  box-shadow: 0 0 0 2px rgba(22,163,74,.2);
  transition: border-color .2s, box-shadow .2s;
}
.ks-widget-mat__plate--valid .ks-widget-mat__input { background: #f0fdf4; }
.ks-widget-mat__plate--wide .ks-widget-mat__input {
  min-width: 140px;
}
.ks-widget-mat__hint {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  color: rgba(255,255,255,.8);
  margin: -.15rem 0 0;
  line-height: 1.4;
}
.ks-widget-mat__hint svg { flex-shrink: 0; }
.ks-widget-mat__hint strong { color: rgba(255,255,255,.85); font-weight: 700; }

@keyframes ks-hint-flash-dark {
  0%   { color: rgba(255,255,255,.58); text-shadow: none; }
  20%  { color: #fbbf24; text-shadow: 0 0 10px rgba(251,191,36,.6); }
  55%  { color: #fcd34d; text-shadow: 0 0 14px rgba(251,191,36,.5); }
  80%  { color: #fbbf24; text-shadow: 0 0 8px rgba(251,191,36,.35); }
  100% { color: rgba(255,255,255,.58); text-shadow: none; }
}
.ks-widget-mat__hint.ks-hint--flash {
  animation: ks-hint-flash-dark .75s ease forwards;
}
.ks-widget-mat__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  background: #e8a020;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s, transform .1s;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0,0,0,.22);
}
.ks-widget-mat__btn:hover:not(:disabled)  { background: #cf8c18; }
.ks-widget-mat__btn:active:not(:disabled) { transform: scale(.97); }
.ks-widget-mat__btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.ks-widget-mat__privacy {
  display: flex;
  align-items: flex-start;
  gap: .35rem;
  font-size: .73rem;
  color: rgba(255,255,255,.8);
  margin: 0;
  line-height: 1.4;
}
.ks-widget-mat__privacy svg { flex-shrink: 0; margin-top: .1rem; }

/* ── Sección alternativa: buscar por tipo de vehículo ── */
.ks-wmat-alt {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: .55rem 1.25rem .6rem;
  background: rgba(0,0,0,.14);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .3rem;
}

/* Visually hidden but in DOM for SEO & screen readers */
.ks-wmat-alt__label {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Título visible centrado */
.ks-wmat-alt__title {
  margin: 0;
  text-align: center;
  font-size: .7rem;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  line-height: 1.35;
  letter-spacing: .01em;
}

/* Fila horizontal: iconos + CTA */
.ks-wmat-alt__row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.ks-wmat-alt__row nav {
  flex: 1;
  min-width: 0;
  display: flex;
}

.ks-wmat-alt__list {
  flex: 1;
  display: flex;
  list-style: none;
  padding: 0; margin: 0;
  justify-content: space-evenly;
  align-items: center;
  gap: .15rem;
  overflow: hidden;
}
.ks-wmat-alt__list li {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Prefijo .ks-widget-mat para bumpear especificidad a 0-2-0.
   Necesario porque contenedores externos (p.ej. ks_localidades con
   .kls-skin a = 0-1-1) hunden el color de los <a> del widget,
   dejando los iconos invisibles (stroke: currentColor). */
.ks-widget-mat .ks-wmat-alt__btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .32rem .45rem;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: .7rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.ks-widget-mat .ks-wmat-alt__btn:hover {
  color: #fff;
  background: rgba(255,255,255,.1);
  text-decoration: none;
}

.ks-wmat-alt__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px; height: 18px;
  opacity: .8;
}
.ks-wmat-alt__btn:hover .ks-wmat-alt__icon { opacity: 1; }
.ks-wmat-alt__icon svg { width: 18px; height: 18px; stroke: currentColor; display: block; }
.ks-wmat-alt__name { letter-spacing: -.01em; }

/* Separador vertical entre items y CTA */
.ks-wmat-alt__row nav + a.ks-wmat-alt__cta::before {
  content: '';
  display: inline-block;
  width: 1px; height: 1.1em;
  background: rgba(255,255,255,.15);
  margin-right: .6rem;
  vertical-align: middle;
}

/* CTA "Ver todos" — pill ámbar al final de la tira.
   Prefijo .ks-widget-mat: mismo motivo que .ks-wmat-alt__btn. */
.ks-widget-mat .ks-wmat-alt__cta {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .3rem .7rem .3rem .55rem;
  background: rgba(245,158,11,.14);
  border: 1px solid rgba(245,158,11,.32);
  border-radius: 20px;
  color: #fbbf24;
  text-decoration: none;
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .18s, border-color .18s, color .18s;
}
.ks-widget-mat .ks-wmat-alt__cta:hover {
  background: rgba(245,158,11,.28);
  border-color: rgba(245,158,11,.55);
  color: #fde68a;
  text-decoration: none;
}
.ks-wmat-alt__cta svg { opacity: .85; }

/* ── Tablet (1 columna, form debajo del copy) ── */
@media (max-width: 860px) {
  .ks-widget-mat__heading { padding: .9rem 1.5rem .85rem; }
  .ks-widget-mat__inner {
    grid-template-columns: 1fr;
  }
  .ks-widget-mat__left {
    padding: .9rem 1.75rem;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.12);
    gap: .6rem;
  }
  .ks-widget-mat__features {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .35rem .85rem;
    padding-top: .1rem;
  }
  .ks-widget-mat__features li {
    font-size: .8rem;
    background: rgba(255,255,255,.07);
    border-radius: 20px;
    padding: .25rem .65rem .25rem .45rem;
  }
  .ks-widget-mat__right {
    padding: 1.4rem 1.75rem 1.6rem;
    justify-content: flex-start;
  }
  .ks-widget-mat__form { max-width: 520px; }
  .ks-wmat-alt { padding: .45rem 1.25rem .5rem; }
}

/* ── Móvil (< 600px) ── */
@media (max-width: 600px) {
  .ks-widget-mat { border-radius: 12px; margin: 1rem 0; }
  .ks-widget-mat__heading { padding: .8rem 1.25rem .75rem; gap: .6rem; }
  .ks-widget-mat__icon svg { width: 24px; height: 24px; }
  .ks-widget-mat__left { padding: .75rem 1.25rem; gap: .5rem; }
  .ks-widget-mat__right { padding: 1.1rem 1.25rem 1.35rem; }
  .ks-widget-mat__form { max-width: 100%; }
}

/* ── Móvil pequeño (< 480px) — apila matrícula + botón ── */
@media (max-width: 480px) {
  .ks-widget-mat { border-radius: 10px; }
  .ks-widget-mat__heading { padding: .7rem 1rem .65rem; }
  .ks-widget-mat__title { font-size: 1rem; }
  .ks-widget-mat__subtitle { font-size: .83rem; }
  .ks-widget-mat__left { padding: .6rem 1rem; }
  .ks-widget-mat__right { padding: 1rem 1rem 1.2rem; }
  .ks-widget-mat__plate-wrap { flex-direction: column; gap: .5rem; }
  .ks-widget-mat__plate { flex: 1; }
  .ks-widget-mat__input {
    font-size: 1.05rem;
    letter-spacing: .12em;
    padding: .6rem .7rem;
  }
  .ks-widget-mat__btn { width: 100%; justify-content: center; padding: .7rem 1rem; }
  .ks-widget-mat__eu { padding: 0 .5rem; }
  .ks-widget-mat__features { gap: .3rem .6rem; }
  .ks-widget-mat__features li { font-size: .75rem; }
}

/* ── Móvil muy pequeño (< 380px) ── */
@media (max-width: 380px) {
  .ks-widget-mat__heading { padding: .6rem .85rem .55rem; gap: .5rem; }
  .ks-widget-mat__icon { display: none; }
  .ks-widget-mat__left { padding: .5rem .85rem; }
  .ks-widget-mat__right { padding: .9rem .85rem 1rem; }
  .ks-widget-mat__title { font-size: .95rem; }
  .ks-widget-mat__features li { padding: .2rem .5rem .2rem .35rem; }
}

/* ── Compatibilidad con producto ── */
.ks-mat-compat-banner {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .7rem 1rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.ks-mat-compat-banner--ok {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}
.ks-mat-compat-banner--no {
  background: #fff8e1;
  color: #e65100;
  border: 1px solid #ffcc80;
}
.ks-mat-compat-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.ks-mat-entry--compat .ks-mat-entry-link { color: inherit; }
.ks-mat-entry--no-compat .ks-mat-entry-link { color: #777; }
.ks-mat-entry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ks-mat-entry-badge--ok {
  background: #e8f5e9;
  color: #2e7d32;
}
.ks-mat-entry-badge--no {
  background: #fff8e1;
  color: #e65100;
}

/* ── Trust badges ── */
.ks-mat-trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  padding: .75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e0e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  margin-bottom: 1.5rem;
}
.ks-mat-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: #1a2e4a;
}
.ks-mat-trust-badge svg { color: var(--clr-primary, #1a2e4a); flex-shrink: 0; }

/* ── Por qué buscar por matrícula ── */
.ks-mat-seo-why {
  background: #f4f8ff;
  border-left: 4px solid var(--clr-primary, #1a2e4a);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.25rem;
}
.ks-mat-seo-why h2 { margin-top: 0; }

/* ── EEAT especialistas ── */
.ks-mat-eeat {
  background: #f8fafc;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
}
.ks-mat-eeat h2 {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 0;
}
.ks-mat-eeat h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 1.2em;
  background: var(--clr-primary, #1a2e4a);
  border-radius: 3px;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .ks-mat-header { border-radius: 12px 12px 0 0; padding: 2rem 1.25rem 3rem; }
  .ks-mat-form-wrap { padding: 1.5rem 1rem 1.25rem; }
  .ks-mat-input { font-size: 2rem; }
  .ks-mat-trust-badges { border-radius: 0 0 8px 8px; gap: .5rem 1rem; }
  /* Vehículo identificado — 1 columna en móvil */
  .ks-mat-vehicle { border-radius: 10px; }
  .ks-mat-vehicle__header { padding: .6rem .85rem; gap: .45rem; }
  .ks-mat-vehicle__icon { width: 30px; height: 30px; border-radius: 6px; }
  .ks-mat-vehicle__icon svg { width: 17px; height: 17px; }
  .ks-mat-vehicle__title { font-size: .82rem; }
  .ks-mat-mini-plate { height: 30px; border-width: 1.5px; }
  .ks-mat-mini-plate__text { font-size: .72rem; padding: 0 .4rem; letter-spacing: .07em; }
  .ks-mat-mini-plate__eu { padding: 0 3px; }
  .ks-mat-mini-plate__eu svg { width: 9px; height: 9px; }
  .ks-mat-cache-badge--header { font-size: .56rem; padding: .06rem .35rem; }
  .ks-mat-vehicle__name { padding: .7rem 1rem .1rem; font-size: 1rem; }
  .ks-mat-vehicle__engine { font-size: .85rem; }
  .ks-mat-vehicle-data { padding: .6rem .85rem .9rem; gap: .3rem; }
  .ks-mat-data-row { font-size: .74rem; padding: .3rem .5rem; white-space: normal; }
  .ks-mat-data-row svg { width: 11px; height: 11px; }
  /* Resultados compatibles — ajustes móvil */
  .ks-mat-results { padding: 1.1rem 1rem 1rem; border-radius: 12px; }
  .ks-mat-results-intro { font-size: .84rem; }
  .ks-mat-entry-link { padding: .7rem .75rem; font-size: .86rem; }
  .ks-mat-entry-name { white-space: normal; font-size: .84rem; }
  .ks-mat-entry-logo { height: 20px; max-width: 44px; }
  .ks-mat-section-title { font-size: 1.05rem; }
  /* Compat banner */
  .ks-mat-compat-banner { font-size: .82rem; padding: .6rem .75rem; }
  /* Acciones */
  .ks-mat-actions { flex-direction: column; gap: .5rem; }
  .ks-mat-share-btn, .ks-mat-new-search-btn { width: 100%; justify-content: center; }
  /* Alt vehicle search inline — wrap 3+2, centrado */
  .ks-mat-alt-inline__title { font-size: .74rem; padding: .7rem .75rem .45rem; }
  .ks-mat-alt-inline__list { flex-wrap: wrap; justify-content: center; }
  .ks-mat-alt-inline__list li {
    flex: 0 0 calc(33.333%);
    border-right: 1px solid #e8ecf0;
    border-bottom: none;
  }
  .ks-mat-alt-inline__list li:nth-child(3n),
  .ks-mat-alt-inline__list li:last-child { border-right: none; }
  .ks-mat-alt-inline__list li:nth-child(n+4) { border-top: 1px solid #e8ecf0; }
  .ks-mat-alt-inline__btn { padding: .85rem .4rem .7rem; gap: .4rem; }
  .ks-mat-alt-inline__icon { width: 42px; height: 42px; }
  .ks-mat-alt-inline__icon svg { width: 22px; height: 22px; }
  .ks-mat-alt-inline__name { font-size: .68rem; }
  .ks-mat-alt-inline__footer { padding: .65rem .75rem; }
  .ks-mat-alt-inline__benefits { gap: .3rem .7rem; font-size: .73rem; }
}
@media (max-width: 420px) {
  .ks-mat-alt-inline__footer { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .ks-mat-alt-inline__cta { width: 100%; justify-content: center; }
  .ks-mat-alt-inline__benefits { flex-direction: column; gap: .25rem; }
}
@media (max-width: 380px) {
  .ks-mat-alt-inline__btn { padding: .7rem .3rem .6rem; }
  .ks-mat-alt-inline__icon { width: 36px; height: 36px; }
  .ks-mat-alt-inline__icon svg { width: 19px; height: 19px; }
  .ks-mat-alt-inline__name { font-size: .63rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   WIDGET BUSCADOR DE VEHÍCULOS
   ═══════════════════════════════════════════════════════════════════════════ */

.ks-widget-bus {
  background: #fff;
  border: 1px solid #e0e8f0;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  overflow: hidden;
  margin: 1.25rem 0;
  width: 100%;
  font-family: inherit;
}

/* ── Cabecera ── */
.ks-widget-bus__header {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.5rem 1.75rem 1.35rem;
  background: linear-gradient(135deg, #1a2e4a 0%, #1d5087 100%);
  color: #fff;
}
.ks-widget-bus__header-top {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}
.ks-widget-bus__intro {
  font-size: .83rem;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
  margin: 0;
  padding-top: .1rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.ks-widget-bus__header-icon {
  flex-shrink: 0;
  opacity: .8;
  margin-top: .1rem;
}
.ks-widget-bus__title {
  font-size: clamp(.95rem, 2vw, 1.15rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 .3rem;
  line-height: 1.25;
}
.ks-widget-bus__subtitle {
  font-size: .83rem;
  color: rgba(255,255,255,.75);
  margin: 0;
  line-height: 1.5;
}

/* ── Grid de tipos de vehículo (5 columnas) ── */
.ks-widget-bus__types {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  margin: 0;
  border-bottom: 1px solid #e8ecf0;
}
.ks-widget-bus__types li {
  flex: 1 1 0;
  min-width: 0;
  border-right: 1px solid #e8ecf0;
}
.ks-widget-bus__types li:last-child { border-right: none; }
.ks-widget-bus__type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .6rem;
  padding: 1.4rem .6rem 1.2rem;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: #1a2e4a;
  transition: background .15s, color .15s, transform .1s;
  text-align: center;
  box-sizing: border-box;
}
.ks-widget-bus__type-btn:hover {
  background: #eef4ff;
  color: #1d5087;
  transform: translateY(-2px);
  text-decoration: none;
}
.ks-widget-bus__type-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: #f0f5ff;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .15s, transform .15s;
}
.ks-widget-bus__type-btn:hover .ks-widget-bus__type-icon {
  background: #d8e8ff;
  transform: scale(1.08);
}
.ks-widget-bus__type-icon svg {
  width: 30px;
  height: 30px;
  color: #1d5087;
}
.ks-widget-bus__type-label {
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.3;
  color: inherit;
  letter-spacing: .01em;
  word-break: break-word;
  hyphens: auto;
}
.ks-widget-bus__type-count {
  font-size: .62rem;
  font-weight: 500;
  color: #6b8eb5;
  line-height: 1;
  margin-top: .1rem;
  display: block;
  white-space: nowrap;
}

/* ── Footer: beneficios + CTA ── */
.ks-widget-bus__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.75rem;
  background: #f8fafc;
  flex-wrap: wrap;
}
.ks-widget-bus__benefits {
  display: flex;
  align-items: center;
  gap: .6rem 1.25rem;
  flex-wrap: wrap;
}
.ks-widget-bus__benefits span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 600;
  color: #1a2e4a;
}
.ks-widget-bus__benefits svg { color: #27ae60; flex-shrink: 0; }
.ks-widget-bus__cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  background: var(--clr-primary, #1a2e4a);
  color: #fff !important;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, transform .1s;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  flex-shrink: 0;
}
.ks-widget-bus__cta:hover { background: #2a4a72; transform: translateY(-1px); text-decoration: none; }
.ks-widget-bus__cta:active { transform: scale(.97); }

/* ── Tablet (≤860px): 5 cols compactos ── */
@media (max-width: 860px) {
  .ks-widget-bus__type-btn { padding: 1.2rem .4rem 1rem; gap: .5rem; }
  .ks-widget-bus__type-icon { width: 52px; height: 52px; }
  .ks-widget-bus__type-icon svg { width: 27px; height: 27px; }
  .ks-widget-bus__header { padding: 1.25rem 1.25rem 1.1rem; gap: .75rem; }
  .ks-widget-bus__footer { padding: .85rem 1.25rem; }
}

/* ── Móvil (≤640px): 3+2 centrado ── */
@media (max-width: 640px) {
  .ks-widget-bus { border-radius: 12px; margin: 1rem 0; }
  .ks-widget-bus__header { padding: 1rem 1rem .9rem; gap: .65rem; }
  .ks-widget-bus__header-top { gap: .65rem; }
  .ks-widget-bus__header-icon svg { width: 26px; height: 26px; }
  .ks-widget-bus__intro { display: none; }
  .ks-widget-bus__title { font-size: .95rem; }
  .ks-widget-bus__footer { padding: .75rem 1rem; }
  .ks-widget-bus__benefits { gap: .3rem .7rem; font-size: .73rem; }

  /* Wrap en 3 cols, última fila (2 ítems) centrada */
  .ks-widget-bus__types { flex-wrap: wrap; justify-content: center; }
  .ks-widget-bus__types li {
    flex: 0 0 calc(33.333%);
    border-right: 1px solid #e8ecf0;
    border-bottom: none;
  }
  /* Eliminar borde derecho en último de cada fila (3.º, 5.º = last-child) */
  .ks-widget-bus__types li:nth-child(3n),
  .ks-widget-bus__types li:last-child { border-right: none; }
  /* Borde superior en fila 2 */
  .ks-widget-bus__types li:nth-child(n+4) { border-top: 1px solid #e8ecf0; }
  .ks-widget-bus__type-btn { padding: 1.1rem .4rem .9rem; gap: .5rem; }
  .ks-widget-bus__type-icon { width: 50px; height: 50px; }
  .ks-widget-bus__type-icon svg { width: 26px; height: 26px; }
  .ks-widget-bus__type-label { font-size: .72rem; }
}

/* ── Móvil pequeño (≤420px) ── */
@media (max-width: 420px) {
  .ks-widget-bus__footer { flex-direction: column; align-items: flex-start; gap: .65rem; }
  .ks-widget-bus__cta { width: 100%; justify-content: center; }
  .ks-widget-bus__header { padding: .85rem .85rem .75rem; gap: .55rem; }
  .ks-widget-bus__type-btn { padding: .9rem .3rem .8rem; }
  .ks-widget-bus__type-icon { width: 44px; height: 44px; }
  .ks-widget-bus__type-icon svg { width: 23px; height: 23px; }
  .ks-widget-bus__type-label { font-size: .67rem; }
  .ks-widget-bus__footer { padding: .65rem .85rem; }
  .ks-widget-bus__benefits { flex-direction: column; gap: .25rem; }
}

/* ── Save vehicle widget in matricula result ─────────────────── */
.ks-svw {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  background: #f0f5ff;
  border: 1px solid #c7d9f5;
  border-radius: 10px;
  padding: .6rem 1rem;
  margin: .5rem 0 1rem;
  font-size: .83rem;
}
.ks-svw__vehicle {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #1d3d6b;
  flex: 1;
  min-width: 0;
}
.ks-svw__vehicle strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ks-svw__btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #1d5087;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: .4rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, transform .1s;
}
.ks-svw__btn:hover { background: #2a4a72; }
.ks-svw__btn:active { transform: scale(.97); }
.ks-svw__btn:disabled { opacity: .6; cursor: not-allowed; }
.ks-svw__saved-state--done {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  color: #1a6b3a;
  font-weight: 600;
  font-size: .82rem;
  flex-shrink: 0;
}
.ks-svw__saved-state--done svg { fill: #1a6b3a; }
@media (max-width: 480px) {
  .ks-svw { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .ks-svw__btn { width: 100%; justify-content: center; }
}

/* ── Widget tipos — responsive ── */
@media (max-width: 600px) {
  .ks-wmat-alt { padding: .4rem .75rem .45rem; gap: .2rem; }
  .ks-wmat-alt__title { font-size: .63rem; }
  /* On small screens hide text labels, show only icons */
  .ks-wmat-alt__name { display: none; }
  .ks-wmat-alt__btn { padding: .3rem .3rem; gap: 0; }
  .ks-wmat-alt__icon { width: 22px; height: 22px; }
  .ks-wmat-alt__icon svg { width: 22px; height: 22px; }
  /* CTA text label also hidden on very small, keep pill */
  .ks-wmat-alt__cta { font-size: 0; padding: .3rem .45rem; gap: 0; border-radius: 50%; }
  .ks-wmat-alt__cta svg { font-size: initial; opacity: 1; }
  .ks-wmat-alt__row nav + a.ks-wmat-alt__cta::before { display: none; }
}
@media (max-width: 380px) {
  .ks-wmat-alt__title { font-size: .58rem; }
  .ks-wmat-alt__icon svg { width: 20px; height: 20px; }
}
