    * {
  font-family: 'Lato', sans-serif;
}

.contenedor-filtros-resultados {
  display: flex;
  gap: 2em;
  align-items: flex-start;
}

.filtros-titulo {
  background: black;
  color: white;
  font-weight: bold;
  padding: 10px 20px;
  font-size: 16px;
  display: inline-block;
  margin-bottom: -1px;
  margin-left: 2em;
}


.filtros-box {
    position: sticky;
    height: fit-content;
    flex: 0 0 400px;
    background: #fff;
    font-family: 'Lato', sans-serif;
    max-width: 400px;
    padding: 1em 1em 0 1em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
  }
  



  .filtros-box h3 {
    margin-bottom: 20px;
  }

  .filtro-linea {
    display: grid;
    grid-template-columns: 1fr 2fr;
    align-items: center;
    gap: 10px;
    margin-bottom: 2em;
  }

  .filtro-linea-meses {
    display: flex;
    flex-direction: column;
    margin-bottom: 3em;
  }
  
  .filtro-linea-meses label {
    margin-bottom: 1.5em;
  }

  .filtro-slider {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
}

label {
  margin: 1em 0;
}




.slider-wrap {
  position: relative;
  margin-top: 1.5em;
  width: 100%;
}

.slider-wrap input[type="range"] {
  width: 100%;
}

.slider-burbuja {
  position: absolute;
  top: -35px;
  left: 0;
  color: black;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: left 0.1s ease;
}

 label {
    font-weight: bold;
  }

  .filtro-linea select,
  .filtro-linea input[type="range"] {
    width: 100%;
    padding: 6px;
  }

  .filtro-linea select, .filtro-select{
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    color: #333;
    appearance: none; /* quita estilo nativo del navegador */
    background-color: white;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23000" height="10" viewBox="0 0 24 24" width="10" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
  }

  .filtro-linea span {
    grid-column: 2;
    font-weight: bold;
    color: #333;
    margin-top: 5px;
  }

  .desplegable-selector {
    background-color: white;
  }

.toggle-group {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 0 !important;
  margin-top: 8px !important;
}

.toggle-btn {
  padding: 0 !important;
  width: 3em !important;
  height: 2.5em !important;
  background: white !important;
  border: 1px solid #333 !important;
  color: #000 !important;
  font-weight: 900 !important;
  font-size: 0.75em !important;
  text-align: center !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  transition: all 1s ease !important;
  margin: 0 !important;
}

.toggle-btn.active,
.toggle-btn:hover,
.toggle-btn:focus {
  background: #000 !important;
  color: white !important;
}


  .filtros-box button[type="submit"] {
    display: block;
    margin: 0 auto 3em auto;
    padding: 0.5em 4em;
    background: black;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .filtros-box button[type="submit"]:hover, .filtros-box button[type="submit"]:focus {
  background: #333;
}

input[type="range"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: transparent;
  outline: none;
  margin: 0;
}

/* TRACK - Webkit (Chrome, Edge, Opera, Safari) */
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: #000000;
  border-radius: 4px;
}

/* TRACK - Firefox */
input[type="range"]::-moz-range-track {
  height: 8px;
  background: #000000;
  border-radius: 4px;
}

/* THUMB - Webkit */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><text x='5' y='20' font-size='18' font-family='Arial'>&lt;&gt;</text></svg>") center center no-repeat;
  background-size: 16px 16px;
  border: 1px solid #000000;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -10px; /* alinea con la barra */
}

/* THUMB - Firefox */
input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: white url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'><text x='5' y='20' font-size='18' font-family='Arial'>&lt;&gt;</text></svg>") center center no-repeat;
  background-size: 16px 16px;
  border: 1px solid black;
  border-radius: 50%;
  cursor: pointer;
}


.filtro-linea-cuota {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.filtro-linea-pagina {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  align-items: center;
}

.cuota-control {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cuota-control label {
  font-weight: bold;
  margin-bottom: 4px;
}

.cuota-control input[type="number"] {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 100%;
}

.filtro-linea-compacta {
    margin: 3em 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px !important;
    gap: 10px;
}

.filtro-linea-compacta label {
  margin: 0;
  font-weight: bold;
  white-space: nowrap;
}

.filtro-linea-compacta select {
  width: 20%;
  padding: 4px 8px;
  font-size: 13px;
}

.cuota-error {
  color: red;
  font-size: 13px;
  margin-top: -10px;
  margin-bottom: 10px;
  display: none;
}


.tarjeta-coche {
  text-decoration: none !important;
  background: white;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); 
  padding: 1em;
  font-family: 'Lato', sans-serif;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 300px;
  will-change: transform !important; 
}

.tarjeta-coche *{
  color: black;
}

.tarjeta-coche:hover {
  /* transform: translateY(-5px); */
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  z-index: 2;
}

.tarjeta-header {
  background: black;
  color: white;
  padding: 0.3em 0.7em;
  font-weight: bold;
  font-size: 12px;
  display: inline-block;
  width: fit-content;
}

.tarjeta-img-wrap {
  position: relative;
  width: 100%;
  height: 250px !important;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tarjeta-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.tarjeta-coche:hover .tarjeta-img-wrap .tarjeta-img {
  transform: scale(1.2);  /* Zoom al hacer hover */
}

.tarjeta-ubicacion {
  position: absolute;
  bottom: 5px;
  right: 10px;
  background: black;
  color: white;
  padding: 0.2em 0.5em;
  font-size: 12px;
  border-radius: 3px;
}

.tarjeta-coche > h3 {
  margin: -0.5em 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tarjeta-subtitulo {
  font-weight: 400;
  color: #444;
  margin-top: -0.5em;
  /* margin-bottom: 0.2em; */
  height: 1em;
}

.tarjeta-detalles {
  font-size: 14px;
  color: #555;
  height: 2em;
  margin-top: 0.8em;
}





.cuota-entrada {
  color: #333;
  font-size: 14px;
}

/* .tarjeta-precio {
    display: flex;
    flex-direction: row;
    justify-content:space-around;
    font-size: 14px;
    line-height: 1.4;
    color: #222;
} */

.tarjeta-contenido-limitado {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  margin: 0 auto; /* centra el conjunto si quieres */
}

.tarjeta-precios {
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: start;
  font-size: 1em;
  line-height: 1.4;
  color: #000000;
  gap: 1em;
  padding: 0;
}

.tarjeta-financiado, .tarjeta-cuota {
  width: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.cuota-valor {
  background: #ffd700;
  font-weight: bold;
  font-size: 1.5em;
  padding: 0 0.2em;
}

.financiado-valor {
  font-size: 1.5em;
  font-weight: bold;
}

.euro-cuota {
  font-size: 0.6em;
  font-weight: bold;
}

.entrada-valor, .financiado-texto {
  font-size: 0.8em;
  color: gray
}

.botonera-bottom-tarjeta{
  margin-top: 1.5em;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  gap: 1em;
}

.btn-descubre {
  display: flex;
  flex-direction: row;
  justify-content: center;
  background-color: #ffd700;
  width: 100%;
  font-weight: bold;
  height: 36px;
  align-items: center
}

.tag-ubi {
  background-color: black;
  color: white;
  width: 100%;
  padding: 0.5em 0.1em;
  font-weight: bold;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  height: 36px;
  gap: 0.8em;
  font-size: 0.7em;
}

.icon-ubi {
  width: 1.3em;
}

.tarjeta-precio span.financiado {
  background-color: #28a745; /* verde */
  color: white;
  border-radius: 8px;
  padding: 0.5em 0.8em;
  font-weight: bold;
}

.tarjeta-precio span.financiado .etiqueta {
  font-size: 0.9em;
  margin-bottom: 4px;
}

.tarjeta-precio span.financiado .precio {
  font-size: 1.5em;
}

/* Estilo para precio contado */
.tarjeta-precio span.contado {
  color: #222;
  font-weight: bold;
}

.tarjeta-precio span.contado .etiqueta {
  font-size: 0.9em;
  margin-bottom: 4px;
}

.tarjeta-precio span.contado .precio {
  font-size: 1.5em;
}

#resultados-coches > div {
  margin: 1em 1em 0 1em;
  display: grid;
  grid-template-columns: repeat(auto-fill, 300px);
  gap: 1.5em;
}

  /* #resultados-coches {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5em;
} */

.paginacion {
  display: flex;
  justify-content: center !important;
  gap: 5px;
  margin-top: 20px;
}

#paginacion-coches {
  width: 100%;
  margin-top: 20px;
}

.paginacion-btn {
  color: black;
  padding: 6px 12px;
  border: 1px solid #000000;
  background: white;
  cursor: pointer;
  transition: background-color 1s;
}
.paginacion-btn:hover {
  background: #000000;
}


.zona-resultados {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  
  height: 100vh;
  height: auto;
}

.zona-resultados::-webkit-scrollbar {
  display: none; /* Chrome, Safari y Opera */
}

.paginacion-btn.activa {
  background-color: black;
  color: white;
  font-weight: bold;
}


/* .spinner-coche {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2em;
  font-size: 16px;
  color: #333;
  animation: fadeIn 0.3s ease-in;
}

.spinner-coche .coche {
  width: 60px;
  height: 30px;
  background: url('https://cdn-icons-png.flaticon.com/512/7436/7436239.png') no-repeat center;
  background-size: contain;
  animation: moverCoche 2s linear infinite;
  margin-bottom: 1em;
}

@keyframes moverCoche {
  0% { transform: translateX(-20px); }
  50% { transform: translateX(20px); }
  100% { transform: translateX(-20px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
} */





#loading-overlay {
  /* position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh; */
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.spinner-wrap {
  animation: botar 0.6s ease-in-out infinite alternate;
}

.spinner-wheel {
  width: 150px;
  height: 150px;
  animation: girar 1s linear infinite;
  display: block;
  margin: 0 auto;
}


@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


@keyframes botar {
  0% { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

.texto-carga {
  margin-top: 2em;
  font-size: 3em;
}

.oculto {
  display: none !important;
}


.loader-infinito {
  text-align: center;
  padding: 2em 0;
  font-size: 1.1em;
  color: #555;
  transition: opacity 0.3s ease;
}

.loader-infinito .puntos::after {
  content: '';
  display: inline-block;
  animation: puntosAnimados 1s steps(4, end) infinite;
}

@keyframes puntosAnimados {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}

.oculto {
  display: none;
}


.cerrar-modal {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: black;
}


/*ocultar*/

.filtro-slider,
.filtro-linea-meses {
  display: none !important;
}


.filtros-toggle {
  display: none;
}

@media (max-width: 768px) {
  .filtros-titulo {
    display: none;
  }

  .contenedor-filtros-resultados {
    display: flex;
    flex-direction: column;
    gap: 2em;
    align-items: center;
  }

  .filtros-toggle {
    display: flex;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .filtros-toggle button {
    font-size: 1.2em;
    background: black;
    color: white;
    border: none;
    padding: 0.5em 1em;
    border-radius: 6px;
    cursor: pointer;
  }

  
  .filtros-box {
    position: fixed;
    top: 10%;
    left: 0;
    width: 100%;
    background: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
    padding: 2em 1em;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
  }

  .filtros-box.activo {
    transform: translateX(0);
    left: auto;
  }

  .filtros-box button[type="submit"] {
    margin-top: 1em;
    background: black;
    color: white;
    border: none;
    padding: 0.5em 1em;
    width: 100%;
    border-radius: 6px;
    font-size: 1em;
    margin-bottom: 0.5em;
  }

  .cerrar-modal {
    position: absolute;
    top: -0.5em;
    right: 10px;
    font-size: 2em;
    background: none;
    border: none;
    color: black;
    z-index: 10000;
    cursor: pointer;
    display: block;
  }

  #loading-overlay {
    display: flex;
    flex-direction: column;
    justify-content: start;
    font-size: 1em;
    text-align: center;
    padding: 25% 10%;
  }

  .texto-carga {
    margin-top: 0;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
  }

  #resultados-coches {
    display: flex;
    flex-direction: column;
  }


  .modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4); /* ⬅️ Puedes ajustar opacidad o color */
  z-index: 9998;
  transition: opacity 0.3s ease;
}

.modal-overlay.oculto {
  display: none;
}

#abrir-filtros:focus {
  background-color: black !important;
}


}


#cargar-mas-wrap {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center;
}

.boton-cargar-mas {
  color: white;
  background-color: black;
  border: 1px solid black;
  transition: transform ease 0.5s;
}

.boton-cargar-mas:hover{
  background-color: rgba(0, 0, 0, 0.601);
  transform: scale(1.1);
}

.boton-cargar-mas:active{
  background-color: black !important;
}


.skeleton-card-coche {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1em;
  animation: fadeIn 0.3s ease-in;
}

.skeleton-img {
  position: relative;
  width: 100%;
  height: 180px;
  border-radius: 8px;
  background-image: url('http://ginestarocasion.com/wp-content/uploads/2025/06/ChatGPT-Image-Jun-30-2025-11_43_16-AM.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

/* Shimmer encima con pseudo-elemento */
.skeleton-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  pointer-events: none;
}

.skeleton-text {
  height: 1.5em;
  border-radius: 4px;
  background: linear-gradient(100deg, #e0e0e0 30%, #f5f5f5 50%, #e0e0e0 70%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text.titulo {
  width: 70%;
  height: 18px;
  margin-top: 1em;
}

.skeleton-text.precio {
  width: 40%;
  height: 1.5em;
  margin: 1em;
}

.skeleton-text.info {
  width: 90%;
  height: 1em;
  margin: 1em;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


#scroll-top-btn {
  position: fixed;
  bottom: 20px;
  right: 40%;
  font-size: 18px;
  background-color: #333;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  z-index: 999;
  transition: opacity 0.3s;
  padding: 1em 0.9em 0.9em 0.9em;
}

#scroll-top-btn > img{
  margin-top: 0.1em;
  width: 1.5em;
}

#scroll-top-btn:hover {
  opacity: 1;
}

[type=button]:focus{
  background-color: black !important;
}
