/* site.css — overrides compartidos (contraste WCAG AA, breakpoint tablet, filtros, trust) */

/* Ocultar skip link "Saltar al contenido" (por solicitud del propietario) */
a.visually-hidden-focusable[href="#main"] { display: none !important; }

/* === #18 Contraste: reemplazar opacity:.7/.5/.8 con colores sólidos === */
footer p,
footer h5,
footer h6,
footer ul a,
footer .row p,
footer .container p {
  opacity: 1 !important;
}
footer p[style*="opacity"],
footer a[style*="opacity"] {
  color: #d8dee9 !important;
}
footer .text-center[style*="opacity"] {
  color: #b0b8c4 !important;
}
footer ul a:hover {
  color: #fff !important;
  text-decoration: underline !important;
}
.nav-link[style*="opacity"] {
  color: #fff !important;
}
.step-card p[style*="opacity"],
.benefit-card p[style*="opacity"],
.hero p[style*="opacity"] {
  color: #4a5568 !important;
  opacity: 1 !important;
}
.hero p[style*="opacity"] {
  color: rgba(255,255,255,.92) !important;
}
.cta-section p[style*="opacity"] {
  color: rgba(255,255,255,.92) !important;
}
.info-card p[style*="opacity"],
.info-card td[style*="opacity"] {
  color: #4a5568 !important;
  opacity: 1 !important;
}

/* === #19 Breakpoint tablet (769–1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero h1 { font-size: 2.3rem !important; }
  .hero { padding: 4rem 0 3rem !important; min-height: auto !important; }
  .hero p { font-size: 1.05rem !important; }
  .section-title { font-size: 1.6rem !important; margin-bottom: 2rem !important; }
  .benefit-card { padding: 1.4rem 1rem !important; }
  .step-card { padding: 1.5rem 1rem !important; }
  .info-card { padding: 1.5rem !important; }
  .navbar-nav .nav-link { font-size: .85rem !important; padding: .35rem .55rem !important; }
  .container { max-width: 960px; }
  .filtros-card .col-lg-2 { flex: 0 0 auto; width: 33.3333%; }
}

/* === #4 Filtros persistentes: chips más visibles === */
.filtros-activos {
  background: #fff3cd !important;
  color: #664d03 !important;
  border: 1px solid #ffecb5 !important;
  font-weight: 600 !important;
  padding: .45rem .75rem !important;
}
.filtros-activos::before {
  content: "\F2F0";
  font-family: "bootstrap-icons";
  margin-right: .35rem;
}
#btnLimpiarFiltros:hover {
  background: #dc3545 !important;
  color: #fff !important;
  border-color: #dc3545 !important;
}
.filtro-label {
  font-size: .78rem;
  font-weight: 600;
  color: #2F4F76;
  text-transform: uppercase;
  letter-spacing: .3px;
  margin-bottom: .3rem;
}

/* === Trust badges (para home #17) === */
.trust-strip {
  background: #fff;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  padding: 1.75rem 0;
}
.trust-strip .trust-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #2F4F76;
  font-weight: 600;
  font-size: .92rem;
}
.trust-strip .trust-item i {
  font-size: 1.7rem;
  color: #28a745;
}

/* === Requisitos section (para home #16) === */
.requisitos-section {
  background: #f1f5f9;
  padding: 4rem 0;
}
.requisito-item {
  background: #fff;
  border-left: 4px solid #2F4F76;
  border-radius: .5rem;
  padding: 1.1rem 1.25rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.05);
  height: 100%;
}
.requisito-item h6 {
  color: #2F4F76;
  font-weight: 700;
  margin-bottom: .35rem;
  font-size: 1rem;
}
.requisito-item p {
  color: #4a5568;
  font-size: .88rem;
  margin: 0;
}

/* === Focus visible (accesibilidad) === */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #90ee90 !important;
  outline-offset: 2px !important;
}

/* ============================================================
   20 MEJORAS UI
   ============================================================ */

/* === UI#1,#4,#5,#18,#19 Tokens de diseño (tipografía, radio, espaciado, elevación) === */
:root {
  --fs-xs: .75rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;
  --radius-sm: .375rem;
  --radius-md: .625rem;
  --radius-lg: 1rem;
  --radius-pill: 999px;
  --space-1: .5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --elev-1: 0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --elev-2: 0 4px 12px rgba(16,24,40,.08), 0 2px 4px rgba(16,24,40,.05);
  --elev-3: 0 12px 32px rgba(16,24,40,.12), 0 4px 8px rgba(16,24,40,.06);
  --color-acento: #F5A623;
  --color-primario-hover: #1f3550;
}

/* === UI#18 Smooth scroll + respeto a reduced motion === */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* === UI#2 Acento complementario y badge de cuota destacada === */
.precio-semanal {
  display: inline-block;
  background: linear-gradient(135deg, #28a745, #1e7e34);
  color: #fff !important;
  padding: .5rem 1rem !important;
  border-radius: var(--radius-pill) !important;
  font-weight: 700 !important;
  font-size: 1.05rem !important;
  box-shadow: var(--elev-2);
  margin: .5rem 0 1rem !important;
}
.precio-semanal small {
  color: rgba(255,255,255,.85) !important;
}

/* === UI#3 Sistema de elevación consistente === */
.benefit-card, .info-card, .step-card, .requisito-item,
.card-auto, .filtros-card, .card.shadow-sm, .card.shadow {
  box-shadow: var(--elev-1) !important;
  transition: box-shadow .2s ease, transform .2s ease;
}
.benefit-card:hover, .info-card:hover, .card-auto:hover {
  box-shadow: var(--elev-3) !important;
  transform: translateY(-4px);
}

/* === UI#4 Border-radius consistente === */
.benefit-card, .info-card, .requisito-item, .filtros-card,
.card-auto, .modal-content { border-radius: var(--radius-lg) !important; }
.btn, .form-control, .form-select, .badge { border-radius: var(--radius-md) !important; }

/* === UI#6 Botones con todos los estados === */
.btn {
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease !important;
}
.btn:active { transform: translateY(1px) !important; }
.btn:disabled, .btn.disabled {
  opacity: .55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}
.btn-whatsapp:focus-visible,
.btn-catalogo:focus-visible {
  outline: 3px solid #90ee90 !important;
  outline-offset: 3px !important;
}

/* === UI#7 Skeleton loaders (reemplazar spinner genérico en catálogo) === */
.loader-container { position: relative; }
.loader-container::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 1140px;
  margin: 2rem auto 0;
  min-height: 420px;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent) 0 0 / 200% 100% no-repeat,
    repeating-linear-gradient(
      to right,
      #e9ecef 0, #e9ecef 32%, #fff 33%, #fff 33.5%,
      #e9ecef 33.5%, #e9ecef 65.5%, #fff 66.5%, #fff 67%,
      #e9ecef 67%, #e9ecef 100%
    );
  border-radius: var(--radius-lg);
  animation: tccShimmer 1.4s linear infinite;
}
@keyframes tccShimmer {
  0% { background-position: -100% 0, 0 0; }
  100% { background-position: 200% 0, 0 0; }
}

/* === UI#8 Animación al marcar favorito === */
.btn-favorito { transition: transform .2s ease; }
.btn-favorito.activo {
  animation: tccHeartPop .4s ease;
}
@keyframes tccHeartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.35); }
  70%  { transform: scale(.9); }
  100% { transform: scale(1); }
}
.btn-favorito:hover { transform: scale(1.12); }

/* === UI#9 Toasts con slide-in y barra de progreso === */
.toast-container .toast {
  animation: tccToastIn .35s cubic-bezier(.2,.7,.3,1);
  border-radius: var(--radius-md) !important;
  box-shadow: var(--elev-3) !important;
  position: relative;
  overflow: hidden;
}
.toast-container .toast::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.7);
  animation: tccToastBar 3s linear forwards;
}
@keyframes tccToastIn {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes tccToastBar {
  from { width: 100%; }
  to   { width: 0%; }
}

/* === UI#10 Backdrop blur en modales === */
.modal-backdrop.show {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(10,14,22,.55) !important;
  opacity: 1 !important;
}

/* === UI#11 Filtros compactos (sin sticky) === */
.filtros-card {
  border: 1px solid rgba(47,79,118,.12);
}
.filtros-card .card-body {
  padding: 1rem 1.25rem !important;
}
.filtros-card .row.mb-3 {
  margin-bottom: .5rem !important;
}

/* === UI#13 Hover reveal sobre tarjetas del catálogo === */
.card-auto {
  position: relative;
  overflow: hidden;
}
.card-auto .card-body .d-flex.gap-2 {
  transition: opacity .25s ease, transform .25s ease;
}
@media (hover: hover) and (min-width: 992px) {
  .card-auto .card-body .d-flex.gap-2 {
    opacity: .85;
    transform: translateY(4px);
  }
  .card-auto:hover .card-body .d-flex.gap-2 {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === UI#15 Iconos en info-items de ficha === */
.info-item .info-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.info-item .info-label::before {
  font-family: "bootstrap-icons";
  color: var(--color-primario);
  font-size: 1rem;
}
.info-item:has(.info-label:contains("Combustible")) .info-label::before { content: "\F4C5"; }

/* === UI#16 Bottom navigation en mobile === */
.tcc-bottom-nav {
  display: none;
}
@media (max-width: 767.98px) {
  .tcc-bottom-nav {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -4px 16px rgba(16,24,40,.08);
    z-index: 1040;
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: stretch;
  }
  .tcc-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: #6c757d;
    text-decoration: none;
    font-size: .68rem;
    font-weight: 600;
    padding: .35rem .15rem;
    border-radius: var(--radius-md);
  }
  .tcc-bottom-nav a i {
    font-size: 1.2rem;
  }
  .tcc-bottom-nav a.active,
  .tcc-bottom-nav a:hover {
    color: #2F4F76;
    background: #f1f5f9;
  }
  body { padding-bottom: 70px; }
  .floating-whatsapp { bottom: 80px !important; }
}

/* === UI#17 Logo más pequeño === */
.navbar-brand img {
  height: 40px !important;
  border-radius: var(--radius-sm) !important;
  padding: 3px 8px !important;
}

/* === UI#19 WhatsApp flotante con etiqueta expandible + pulse === */
.floating-whatsapp {
  width: auto !important;
  min-width: 60px;
  padding-right: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: tccPulse 3s ease-in-out infinite;
}
.floating-whatsapp::after {
  content: "¿Dudas? Escríbenos";
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  font-size: .9rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 0;
  transition: max-width .35s ease, margin-left .35s ease, padding-right .35s ease;
  padding-right: 0;
}
@media (hover: hover) and (min-width: 992px) {
  .floating-whatsapp:hover {
    border-radius: var(--radius-pill) !important;
    padding-right: 1.2rem !important;
  }
  .floating-whatsapp:hover::after {
    max-width: 220px;
    margin-left: .5rem;
  }
}
@keyframes tccPulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37,211,102,.4); }
  50%      { box-shadow: 0 4px 25px rgba(37,211,102,.85), 0 0 0 6px rgba(37,211,102,.18); }
}

/* ============================================================
   SEGUNDA TANDA — 20 MEJORAS UI ADICIONALES
   ============================================================ */

/* === #1 Breadcrumbs === */
.tcc-breadcrumbs {
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  padding: .65rem 0;
  font-size: .82rem;
}
.tcc-breadcrumbs .container {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
}
.tcc-breadcrumbs a {
  color: #2F4F76;
  text-decoration: none;
  font-weight: 500;
}
.tcc-breadcrumbs a:hover { text-decoration: underline; }
.tcc-breadcrumbs span[aria-current] {
  color: #6c757d;
  font-weight: 600;
}
.tcc-bc-sep {
  font-size: .7rem;
  color: #adb5bd;
}

/* === #2 Shrinking navbar === */
nav.navbar {
  transition: padding .25s ease, box-shadow .25s ease;
}
nav.navbar.navbar-shrunk {
  padding: .15rem 0 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
nav.navbar.navbar-shrunk .navbar-brand img {
  height: 32px !important;
  transition: height .25s ease;
}
nav.navbar.navbar-shrunk .navbar-brand {
  font-size: .95rem !important;
}

/* === #3 Back to top === */
#tccBackTop {
  position: fixed;
  left: 25px;
  bottom: 25px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: #2F4F76;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: var(--elev-2);
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
#tccBackTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#tccBackTop:hover { background: #1f3550; }
@media (max-width: 767.98px) {
  #tccBackTop { bottom: 85px; left: 15px; width: 40px; height: 40px; }
}

/* === #4 Scroll progress === */
#tccScrollProgress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #90ee90, #28a745);
  z-index: 2000;
  transition: width .1s linear;
  pointer-events: none;
}

/* === #5 Wave divider === */
.tcc-wave {
  display: block;
  width: 100%;
  height: 60px;
  background-repeat: no-repeat;
  background-size: cover;
}
.tcc-wave-down {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'><path fill='%23f8f9fa' d='M0,32 C360,72 720,0 1440,40 L1440,60 L0,60 Z'/></svg>");
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.tcc-wave-up {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'><path fill='%23ffffff' d='M0,28 C360,0 720,60 1440,20 L1440,60 L0,60 Z'/></svg>");
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

/* === #6 Fade-in stagger en tarjetas === */
@keyframes tccFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
#autosGrid > .col-12,
#autosGrid > .col-md-6 {
  animation: tccFadeUp .5s ease both;
}
#autosGrid > div:nth-child(1) { animation-delay: .02s; }
#autosGrid > div:nth-child(2) { animation-delay: .08s; }
#autosGrid > div:nth-child(3) { animation-delay: .14s; }
#autosGrid > div:nth-child(4) { animation-delay: .20s; }
#autosGrid > div:nth-child(5) { animation-delay: .26s; }
#autosGrid > div:nth-child(6) { animation-delay: .32s; }
#autosGrid > div:nth-child(7) { animation-delay: .38s; }
#autosGrid > div:nth-child(8) { animation-delay: .44s; }
#autosGrid > div:nth-child(9) { animation-delay: .50s; }

/* === #7 Blur-up en img-lazy === */
.card-auto .img-lazy {
  filter: blur(8px);
  transition: filter .4s ease;
  background: linear-gradient(110deg, #e9ecef 20%, #f1f3f5 40%, #e9ecef 60%);
  background-size: 200% 100%;
  animation: tccShimmer 1.6s linear infinite;
}
.card-auto .img-lazy[src]:not([src=""]) {
  filter: blur(0);
  animation: none;
  background: none;
}

/* === #8 Ribbon diagonal === */
.badge-especial {
  position: absolute !important;
  top: 12px !important;
  left: -32px !important;
  transform: rotate(-35deg);
  padding: .35rem 2.5rem !important;
  font-size: .72rem !important;
  font-weight: 700 !important;
  letter-spacing: .5px;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  z-index: 5;
}
.badge-especial.badge-mejor-precio { background: #28a745 !important; color: #fff !important; }
.badge-especial.badge-mas-visto    { background: #F5A623 !important; color: #1a1a2e !important; }
.badge-especial.badge-ultimo       { background: #dc3545 !important; color: #fff !important; }

/* === #9 Gradient border hover en tarjetas === */
.card-auto {
  border: 2px solid transparent !important;
  background-clip: padding-box;
  position: relative;
}
.card-auto::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
}
.card-auto:hover::before {
  background: linear-gradient(135deg, #90ee90, #2F4F76, #F5A623);
  opacity: 1;
}

/* === #10 Search highlight === */
mark.tcc-mark {
  background: #fff3a0;
  color: #2a2a2a;
  padding: 0 .15rem;
  border-radius: 3px;
  font-weight: 600;
}

/* === #11 Filter chips removibles === */
.tcc-filter-chips {
  display: none;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .6rem;
  padding-top: .6rem;
  border-top: 1px dashed #dee2e6;
}
.tcc-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #e7f1ff;
  color: #0b3d7a;
  border: 1px solid #b6d4fe;
  border-radius: var(--radius-pill);
  padding: .25rem .35rem .25rem .7rem;
  font-size: .78rem;
  font-weight: 500;
}
.tcc-chip strong { font-weight: 700; }
.tcc-chip button {
  background: #0b3d7a;
  color: #fff;
  border: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: .85rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tcc-chip button:hover { background: #dc3545; }

/* === #12 Colores por tipo de combustible (aplicado a <small> vía data o clases genéricas) === */
.card-auto .text-muted small {
  font-variant-numeric: tabular-nums;
}
.card-auto .card-body p.text-muted:first-of-type small {
  position: relative;
}
/* Aplicación automática: marcamos contenido vía :has() donde exista */
@supports (selector(:has(*))) {
  .card-auto:has(small:contains("Gasolina")) .card-body p.text-muted small {
    color: #8a6d00 !important;
  }
}
/* Alternativa: clases utilitarias para aplicar a futuro */
.fuel-gasolina { color: #b08600 !important; }
.fuel-diesel   { color: #495057 !important; }
.fuel-hibrido  { color: #198754 !important; }
.fuel-electrico{ color: #0d6efd !important; }

/* === #13 Barra de kilometraje === */
.km-bar {
  display: block;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #e9ecef;
  overflow: hidden;
  margin-top: .3rem;
}
.km-bar > span {
  display: block;
  height: 100%;
  transition: width .4s ease;
}
.km-low    > span { background: #28a745; width: 25%; }
.km-medium > span { background: #F5A623; width: 60%; }
.km-high   > span { background: #dc3545; width: 90%; }

/* === #14 Punto pulsante "disponible ahora" === */
.tcc-pulse-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #28a745;
  margin-right: .55rem;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(40,167,69,.6);
  animation: tccPulseDot 2s ease-in-out infinite;
}
@keyframes tccPulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(40,167,69,.6); }
  50%      { box-shadow: 0 0 0 8px rgba(40,167,69,0); }
}

/* === #15 Pill "Reservado" === */
.pill-reservado {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #6c757d;
  color: #fff;
  padding: .25rem .7rem;
  border-radius: var(--radius-pill);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.pill-reservado::before {
  content: "\F47A";
  font-family: "bootstrap-icons";
}

/* === #16 Custom tooltip === */
[data-tooltip] {
  position: relative;
}
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1a1a2e;
  color: #fff;
  padding: .4rem .7rem;
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 2000;
  box-shadow: var(--elev-2);
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* === #17 Typing caret === */
.tcc-caret {
  display: inline-block;
  color: #90ee90;
  font-weight: 400;
  margin-left: 2px;
  animation: tccBlink 1s steps(1) infinite;
}
@keyframes tccBlink {
  50% { opacity: 0; }
}

/* === #18 Parallax — (solo transition, el JS hace el transform) === */
.hero .col-lg-5 > div {
  will-change: transform;
  transition: transform .1s linear;
}

/* === #19 Tabular nums en precios y cifras === */
.precio-semanal,
.precio-valor,
.precio-destacado,
#totalAutos,
.card-auto .badge,
.contador-fotos {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* === #20 Página 404 === */
.tcc-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a2e, #2f4f76);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}
.tcc-404 .num {
  font-size: clamp(6rem, 20vw, 12rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #90ee90, #F5A623);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  margin: 0;
}
.tcc-404 h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 1rem 0 .5rem;
}
.tcc-404 p {
  font-size: 1rem;
  max-width: 520px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,.88);
}
.tcc-404 .car-ico {
  font-size: 5rem;
  color: rgba(255,255,255,.2);
  animation: tccWobble 2.2s ease-in-out infinite;
  display: block;
  margin-bottom: 1rem;
}
@keyframes tccWobble {
  0%, 100% { transform: rotate(-8deg); }
  50%      { transform: rotate(8deg); }
}

/* ============================================================
   TERCERA TANDA — 20 MEJORAS UI
   ============================================================ */

/* === #1 Grid / List toggle === */
.tcc-view-toggle {
  display: inline-flex;
  border: 1.5px solid #2F4F76;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-left: .5rem;
}
.tcc-view-toggle button {
  background: #fff;
  color: #2F4F76;
  border: none;
  padding: .35rem .6rem;
  font-size: .9rem;
  transition: background .15s, color .15s;
}
.tcc-view-toggle button.active {
  background: #2F4F76;
  color: #fff;
}
#autosGrid.view-list > div {
  flex: 0 0 100% !important;
  max-width: 100% !important;
  width: 100% !important;
}
#autosGrid.view-list .card-auto {
  flex-direction: row;
}
#autosGrid.view-list .card-gallery,
#autosGrid.view-list .sin-imagen {
  max-width: 280px;
  min-width: 200px;
  flex: 0 0 35%;
}
#autosGrid.view-list .card-body {
  text-align: left !important;
  flex: 1;
}

/* === #2 Quick view modal === */
.tcc-quickview {
  position: fixed;
  inset: 0;
  background: rgba(10,14,22,.75);
  backdrop-filter: blur(6px);
  z-index: 1055;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tcc-quickview.open { display: flex; animation: tccFadeUp .25s ease; }
.tcc-quickview-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  position: relative;
  box-shadow: var(--elev-3);
}
.tcc-quickview-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  z-index: 2;
}
.tcc-quickview-box img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.tcc-quickview-body { padding: 1.5rem; }
.tcc-quickview-body h3 { color: #2F4F76; font-weight: 700; }
.tcc-quickview-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem 1rem;
  font-size: .88rem;
  margin: 1rem 0;
}
.tcc-quickview-specs div strong { color: #2F4F76; }

/* === #3 Comparador multi-select === */
.tcc-compare-check {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.95);
  border: 2px solid #2F4F76;
  z-index: 4;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .95rem;
  color: transparent;
}
.tcc-compare-check.checked {
  background: #2F4F76;
  color: #fff;
}
.tcc-compare-check.checked::before { content: "\F633"; font-family: "bootstrap-icons"; }
.tcc-compare-bar {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(120%);
  background: #2F4F76;
  color: #fff;
  padding: .85rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: var(--elev-3);
  display: flex;
  align-items: center;
  gap: .85rem;
  z-index: 1030;
  transition: transform .3s ease;
  font-weight: 600;
}
.tcc-compare-bar.visible { transform: translateX(-50%) translateY(0); }
.tcc-compare-bar button {
  background: #90ee90;
  color: #1a1a2e;
  border: none;
  padding: .4rem .9rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
}

/* === #4 Scroll snap en galería horizontal === */
.vistos-scroll,
.card-gallery-track {
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}
.visto-item,
.card-gallery-slide {
  scroll-snap-align: start;
}

/* === #5 Command palette (Cmd+K) === */
.tcc-cmdk {
  position: fixed;
  inset: 0;
  background: rgba(10,14,22,.75);
  backdrop-filter: blur(8px);
  z-index: 1070;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}
.tcc-cmdk.open { display: flex; }
.tcc-cmdk-box {
  background: #fff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  box-shadow: var(--elev-3);
  overflow: hidden;
  animation: tccFadeUp .25s ease;
}
.tcc-cmdk-input {
  width: 100%;
  border: none;
  padding: 1.2rem 1.5rem;
  font-size: 1.1rem;
  outline: none;
  border-bottom: 1px solid #e9ecef;
}
.tcc-cmdk-results {
  max-height: 50vh;
  overflow-y: auto;
}
.tcc-cmdk-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1.5rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f3f5;
  color: #2a2a2a;
  text-decoration: none;
}
.tcc-cmdk-item:hover,
.tcc-cmdk-item.active {
  background: #f1f5f9;
}
.tcc-cmdk-item i { color: #2F4F76; }
.tcc-cmdk-hint {
  padding: .55rem 1.5rem;
  background: #f8f9fa;
  font-size: .72rem;
  color: #6c757d;
  display: flex;
  gap: .75rem;
}
.tcc-cmdk-hint kbd {
  background: #e9ecef;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

/* === #6 Floating labels en filtros === */
.filtros-card .floating {
  position: relative;
}
.filtros-card .floating label.filtro-label {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  background: #fff;
  padding: 0 6px;
  font-size: .78rem;
  color: #6c757d;
  pointer-events: none;
  transition: top .15s ease, font-size .15s ease, color .15s ease;
  text-transform: none;
  letter-spacing: 0;
  margin: 0;
}
.filtros-card .floating:focus-within label.filtro-label,
.filtros-card .floating.has-value label.filtro-label {
  top: 0;
  font-size: .68rem;
  color: #2F4F76;
  font-weight: 700;
}

/* === #7 Inline validation === */
input:not(:placeholder-shown):valid,
.form-control:not(:placeholder-shown):valid {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%2328a745' d='M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px !important;
}
input:not(:placeholder-shown):invalid,
.form-control:not(:placeholder-shown):invalid {
  border-color: #dc3545 !important;
}

/* === #8 Shake animation en errores === */
@keyframes tccShake {
  0%, 100% { transform: translateX(0); }
  15%, 55% { transform: translateX(-6px); }
  35%, 75% { transform: translateX(6px); }
}
.tcc-shake { animation: tccShake .4s ease; }

/* === #9 Print stylesheet para ficha === */
@media print {
  nav.navbar,
  .floating-whatsapp,
  #tccBackTop,
  #tccScrollProgress,
  .tcc-bottom-nav,
  .tcc-breadcrumbs,
  footer,
  .galeria-nav,
  .galeria-dots,
  .swipe-indicator,
  .modal,
  .btn-favorito,
  .btn-favorito-detalle,
  .btn-whatsapp,
  .btn-reservar,
  .btn-volver,
  .btn-qr,
  .btn-copiar,
  .btn-ficha,
  .recomendaciones-section,
  .toast-container,
  .filtros-card { display: none !important; }
  body { background: #fff !important; padding: 0 !important; }
  .card-vehiculo,
  .card-auto { border: 1px solid #000 !important; box-shadow: none !important; }
  .galeria-track { height: auto !important; }
  .galeria-slide img { max-height: 300px; object-fit: contain !important; }
  .precio-destacado { background: #f0f0f0 !important; color: #000 !important; -webkit-print-color-adjust: exact; }
  a::after { content: ""; }
}

/* === #10 Auto-hide navbar === */
nav.navbar.navbar-hidden {
  transform: translateY(-105%);
  box-shadow: none !important;
}

/* === #11 Scroll-triggered reveals === */
.tcc-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.tcc-reveal.tcc-in {
  opacity: 1;
  transform: translateY(0);
}

/* === #12 Counters animados (sección) === */
.tcc-stats {
  background: #fff;
  padding: 3rem 0;
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
}
.tcc-stat {
  text-align: center;
}
.tcc-stat .num {
  display: block;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: #2F4F76;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.tcc-stat .label {
  display: block;
  font-size: .9rem;
  color: #6c757d;
  font-weight: 600;
  margin-top: .4rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* === #13 Timeline con línea conectora en Cómo funciona === */
@media (min-width: 768px) {
  section:has(> .container > h2.section-title) .row.g-4:has(.step-card) {
    position: relative;
  }
  section:has(> .container > h2.section-title) .row.g-4:has(.step-card)::before {
    content: "";
    position: absolute;
    top: 70px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: repeating-linear-gradient(
      to right,
      #2F4F76 0, #2F4F76 8px, transparent 8px, transparent 16px
    );
    animation: tccDashMove 18s linear infinite;
    z-index: 0;
  }
  .step-card { position: relative; z-index: 1; }
  .step-card .step-icon { background: linear-gradient(135deg, #2F4F76, #4a7ab5); }
}
@keyframes tccDashMove {
  from { background-position: 0 0; }
  to   { background-position: 200px 0; }
}

/* === #14 Cursor personalizado "ver más" === */
.tcc-cursor {
  position: fixed;
  top: 0; left: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(47,79,118,.92);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.5);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 9998;
}
.tcc-cursor.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
@media (hover: none), (max-width: 991px) {
  .tcc-cursor { display: none !important; }
}

/* === #15 Banner de conexión offline === */
.tcc-offline-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #F5A623;
  color: #1a1a2e;
  text-align: center;
  padding: .55rem 1rem;
  font-size: .85rem;
  font-weight: 600;
  z-index: 2001;
  transform: translateY(-100%);
  transition: transform .3s ease;
}
.tcc-offline-banner.visible { transform: translateY(0); }
.tcc-offline-banner i { margin-right: .4rem; }

/* === #17 Social proof ticker === */
.tcc-ticker {
  position: fixed;
  left: 20px;
  bottom: 100px;
  background: #fff;
  color: #2a2a2a;
  padding: .65rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--elev-3);
  font-size: .82rem;
  font-weight: 500;
  z-index: 1010;
  max-width: 280px;
  transform: translateX(-120%);
  transition: transform .4s ease;
  display: flex;
  align-items: center;
  gap: .55rem;
  border-left: 3px solid #28a745;
}
.tcc-ticker.visible { transform: translateX(0); }
.tcc-ticker i { color: #28a745; font-size: 1.1rem; }
@media (max-width: 767.98px) {
  .tcc-ticker { left: 10px; right: 10px; max-width: none; bottom: 140px; }
}

/* === #18 Gradient text en headings === */
.section-title,
.tcc-gradient-text {
  background: linear-gradient(135deg, #2F4F76 0%, #4a7ab5 40%, #28a745 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
  display: inline-block;
}
.hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, #90ee90 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent !important;
}

/* === #19 3D tilt en tarjetas === */
.card-auto {
  transform-style: preserve-3d;
  transition: transform .18s ease, box-shadow .18s ease;
  will-change: transform;
}
.card-auto.tcc-tilt {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

/* === #20 Toggle manual dark/light === */
.tcc-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  padding: .4rem .85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: .82rem;
  font-weight: 600;
  transition: background .2s ease;
}
.tcc-theme-toggle:hover { background: rgba(255,255,255,.16); }
.tcc-theme-toggle i { font-size: 1rem; }

/* Forzar dark cuando html tiene data-theme="dark" (toggle manual) */
html[data-theme="dark"] body {
  background: #0f1420 !important;
  color: #e5e9f0 !important;
}
html[data-theme="dark"] section[style*="background:#f8f9fa"],
html[data-theme="dark"] .requisitos-section,
html[data-theme="dark"] .trust-strip,
html[data-theme="dark"] .tcc-stats {
  background: #161c2d !important;
}
html[data-theme="dark"] .benefit-card,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .requisito-item,
html[data-theme="dark"] .filtros-card,
html[data-theme="dark"] .card-auto,
html[data-theme="dark"] .tcc-quickview-box,
html[data-theme="dark"] .tcc-cmdk-box {
  background: #1c2338 !important;
  color: #e5e9f0 !important;
}
html[data-theme="dark"] .section-title {
  background: linear-gradient(135deg, #cde2ff, #90ee90) !important;
  -webkit-background-clip: text !important;
}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
  background: #1c2338 !important;
  color: #e5e9f0 !important;
  border-color: rgba(255,255,255,.12) !important;
}
html[data-theme="light"] body { background: #fff !important; color: #1a1a2e !important; }
html[data-theme="light"] * { color-scheme: light; }

/* === UI#20 Dark mode automático === */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0f1420;
    --color-surface: #161c2d;
    --color-text: #e5e9f0;
  }
  body { background: var(--color-bg) !important; color: var(--color-text); }
  section[style*="background:#f8f9fa"],
  .requisitos-section,
  .trust-strip { background: var(--color-surface) !important; }
  .benefit-card, .info-card, .requisito-item, .filtros-card, .card-auto {
    background: #1c2338 !important;
    color: var(--color-text) !important;
    border-color: rgba(255,255,255,.06) !important;
  }
  .benefit-card h6, .info-card h5, .requisito-item h6, .section-title {
    color: #cde2ff !important;
  }
  .benefit-card p, .info-card p, .requisito-item p, .step-card p {
    color: #a5b1c7 !important;
  }
  .form-control, .form-select {
    background: #1c2338 !important;
    color: var(--color-text) !important;
    border-color: rgba(255,255,255,.12) !important;
  }
  .trust-strip .trust-item { color: #cde2ff !important; }
  .filtro-label { color: #cde2ff !important; }
  .tcc-bottom-nav { background: #161c2d; border-top-color: rgba(255,255,255,.08); }
  .tcc-bottom-nav a { color: #a5b1c7; }
  .tcc-bottom-nav a.active, .tcc-bottom-nav a:hover {
    color: #90ee90; background: rgba(255,255,255,.05);
  }
}
