/* Flota Premium: carrusel de autos con flechas ("Ver todos los autos" lo abre en grilla).
   Cada auto: foto sin caja fundida en el fondo, marca, modelo, datos, precio y botón. */

.autos { padding-block: 64px 96px; }
.autos-cabecera { margin-bottom: 32px; }
.autos-cabecera .section-title { margin-bottom: 0; }
.autos-cabecera p { color: var(--muted); margin: 8px 0 0; max-width: 48ch; }

.autos-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: 600 13px/1 var(--font-body); letter-spacing: 0.02em;
  color: var(--muted); background: transparent;
  border: 1px solid var(--linea); cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.chip:hover { color: var(--texto); border-color: var(--oro); }
.chip.on { color: #1a1408; background: var(--oro); border-color: var(--oro); }

/* carrusel al estilo de las agencias: el auto del centro grande y en foco,
   los de los costados más chicos y apagados; las flechas abrazan al del centro */
.autos-grilla {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc(100cqw / 3); gap: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 8px calc(100cqw / 3) 18px;
}
.autos-grilla::-webkit-scrollbar { display: none; }
.autos.todos .autos-grilla { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 40px 28px; overflow: visible; padding: 8px 0 0; }

.auto {
  display: grid; align-content: start; justify-items: center; text-align: center;
  padding-inline: 14px; scroll-snap-align: center; cursor: pointer;
  transform: scale(0.8); opacity: 0.45; filter: saturate(0.6);
  transition: transform 0.55s cubic-bezier(.2, .7, .2, 1), opacity 0.55s ease, filter 0.55s ease;
}
.auto.activo, .autos.todos .auto { transform: none; opacity: 1; filter: none; cursor: default; }

/* la foto sin caja: se funde en el fondo, con un brillo dorado de piso debajo */
.auto-foto { position: relative; width: 100%; aspect-ratio: 16 / 10; }
.auto-foto::after {
  content: ""; position: absolute; left: 12%; right: 12%; bottom: -6%; height: 22%; z-index: -1;
  background: radial-gradient(50% 50% at 50% 50%, rgba(201, 163, 92, 0.35), transparent 70%);
  filter: blur(6px); opacity: 0; transition: opacity 0.55s ease;
}
.auto.activo .auto-foto::after, .autos.todos .auto-foto::after { opacity: 1; }
.auto-foto img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 18px;
  -webkit-mask-image: radial-gradient(120% 115% at 50% 45%, #000 55%, transparent 78%);
  mask-image: radial-gradient(120% 115% at 50% 45%, #000 55%, transparent 78%);
  transition: transform 0.6s ease;
}
.auto.activo:hover .auto-foto img { transform: scale(1.03); }
.auto-sin-foto {
  position: absolute; inset: 0; display: none; place-items: center; border-radius: 18px;
  background: radial-gradient(80% 80% at 50% 60%, #2a2d34, #15171b);
  font-family: var(--font-display); font-weight: 800; font-size: 28px; color: rgba(255, 255, 255, 0.18); text-transform: uppercase;
}
.auto-foto.sin-foto img { display: none; }
.auto-foto.sin-foto .auto-sin-foto { display: grid; }
.auto-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 6px 10px; border-radius: 999px;
  font: 700 11px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
  color: #1a1408; background: var(--oro-claro);
}

.auto-cuerpo { display: grid; justify-items: center; gap: 4px; padding-top: 18px; width: 100%; }
.auto-marca { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--oro); }
.auto-modelo { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; color: var(--oro-claro); }
.auto-datos { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.auto-datos li { display: inline-flex; align-items: center; gap: 6px; }
.auto-color { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); display: inline-block; }
.auto-desc { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 42ch; }
.auto-pie { display: grid; justify-items: center; gap: 12px; margin-top: 14px; }
.auto-precio { font-size: 12px; color: var(--muted); line-height: 1.3; }
.auto-precio br { display: none; }
.auto-precio b { margin-left: 4px; font-size: 16px; color: var(--texto); }
.auto-cta { min-height: 46px; padding: 0 26px; white-space: nowrap; }
/* los de los costados apagan el botón; sigue en el orden de foco y al enfocarlo el auto viene al centro */
.auto:not(.activo) .auto-pie { opacity: 0; transition: opacity 0.3s ease; }
.auto:not(.activo):focus-within .auto-pie, .autos.todos .auto .auto-pie { opacity: 1; }

.autos-nota { margin: 20px 0 0; font-size: 13px; color: var(--muted); }

@media (max-width: 980px) {
  .autos-grilla { grid-auto-columns: 50cqw; padding-inline: 25cqw; }
  .autos.todos .autos-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .autos { padding-block: 64px; }
  /* en el celu: un auto al centro y la punta de los vecinos */
  .autos-grilla { grid-auto-columns: 80cqw; padding-inline: 10cqw; }
  .auto { padding-inline: 6px; transform: scale(0.88); }
  .autos.todos .autos-grilla { grid-template-columns: 1fr; }
  .autos-filtros { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; }
  .chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auto, .auto-foto img, .auto-foto::after { transition: none; }
}

.autos-fechas { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.autos-fechas b { color: var(--oro-claro); }
.autos-fechas a { margin-left: 8px; color: var(--texto); }

/* el filtro oculta con [hidden]; sin esto el display:grid de .auto le gana */
.auto[hidden] { display: none; }

/* estado en vivo que llega de Flota: punto verde si está libre, dorado si está alquilado */
.auto-estado {
  position: absolute; top: 14px; right: 14px;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px; border-radius: 999px;
  font: 700 11px/1 var(--font-body); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--texto); background: var(--negro); border: 1px solid var(--linea);
}
.auto-estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.auto-estado.libre::before { background: #3ecf8e; }
.auto-estado.ocupado::before { background: var(--oro); }

/* cargando o sin autos: el mensaje ocupa todo el ancho */
.autos-grilla:has(.autos-vacio:not([hidden]), .autos-cargando) { grid-auto-flow: row; grid-auto-columns: auto; }
.autos-vacio { grid-column: 1 / -1; display: grid; justify-items: center; gap: 18px; padding: 48px 16px; text-align: center; color: var(--muted); }
.autos-vacio p { margin: 0; max-width: 46ch; }
.autos-cargando { grid-column: 1 / -1; margin: 0; padding: 56px 0; text-align: center; color: var(--muted); }

/* flota: carrusel con flechas; "Ver todos los autos" la abre en grilla */
.autos-cabecera { display: block; text-align: center; }
.autos-cabecera .kicker { justify-content: center; }
.autos-cabecera .autos-sub { margin: 10px auto 0; }
.autos-cabecera .autos-filtros { justify-content: center; margin-top: 22px; }
.autos-cabecera .autos-fechas { margin-inline: auto; }
.carrusel { position: relative; container-type: inline-size; }
.carrusel-btn {
  position: absolute; top: calc((100cqw / 3 - 28px) * 10 / 16 / 2 + 8px); z-index: 2; translate: 0 -50%; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--negro); border: 1px solid var(--oro); color: var(--oro-claro);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); transition: opacity 0.2s ease, background 0.2s ease;
}
.carrusel-btn:hover { background: var(--grafito-2); }
.carrusel-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.carrusel-prev { left: calc(100cqw / 3 - 23px); }
.carrusel-next { right: calc(100cqw / 3 - 23px); }
@media (max-width: 980px) { .carrusel-prev { left: calc(25cqw - 23px); } .carrusel-next { right: calc(25cqw - 23px); } .carrusel-btn { top: calc((50cqw - 28px) * 10 / 16 / 2 + 8px); } }
.carrusel-btn:disabled { opacity: 0; pointer-events: none; }
.autos.todos .carrusel-btn { display: none; }
.autos-pie { display: grid; justify-items: center; gap: 4px; margin-top: 28px; text-align: center; }
@media (max-width: 620px) { .carrusel-btn { display: none; } }
@media (prefers-reduced-motion: reduce) { .carrusel-btn { transition: none; } }

/* fechas elegidas: cuántos autos libres y el botón para ver también los ocupados */
.autos-ver-ocupados { margin-left: 6px; padding: 0; border: 0; background: none; color: var(--oro-claro); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.autos-ver-ocupados:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; }
.auto[data-libre="no"] .auto-foto img { filter: grayscale(.6) brightness(.8); }
.autos-vacio[hidden] { display: none; }
