/* =========================
   GALERÍA DE IMÁGENES AUTO
   ========================= */

.main-gallery-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 38px;
  flex-wrap: wrap;
}

.main-image-block {
  flex: 1 1 370px;
  max-width: 380px;
  text-align: center;
}

.main-img-grande {
  width: 100%;
  max-width: 370px;
  height: 250px;
  object-fit: cover;
  border-radius: 14px;
  background: #181d1f;
  box-shadow: 0 4px 18px rgba(30,230,150,0.10);
  cursor: pointer;
  transition: box-shadow .2s;
  margin: 0 auto;
  display: block;
}
.main-img-grande:hover {
  box-shadow: 0 8px 32px #45efb870;
}

.gallery-thumbs-grid {
  width: 100%;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  justify-items: stretch;    /* <- Hace que las thumbs llenen el ancho de su columna */
  align-items: stretch;      /* <- Opcional: llena el alto también */
}

.gallery-thumb {
  width: 100%;
  height: 70px; /* O 100% si quieres cuadrados perfectos */
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  background: #23272b;
  transition: border .17s, box-shadow .16s, opacity .13s;
  opacity: 0.86;
  display: block;           /* <- Quita cualquier espacio blanco tipo inline */
}
.gallery-thumb.active,
.gallery-thumb:hover {
  border: 2.5px solid #45efb8;
  box-shadow: 0 4px 18px #45efb89c;
  opacity: 1;
}

.auto-precio {
  color: #45efb8;
  font-size: 1.35rem;
  font-weight: bold;
  margin-bottom: 3px;
  margin-top: 17px;
  text-align: center;
  letter-spacing: 1px;
}

.main-gallery-datos {
  flex: 1 1 420px;
  max-width: 500px;
}

.top-title-bar {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.contactar-btn {
  background: #25d366;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 22px;
  box-shadow: 0 2px 8px #25d36636;
  transition: background .16s, color .18s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: 8px;
}
.contactar-btn:hover {
  background: #20bd5a;
  color: #eafff4;
}

.datos-carro-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px 24px;
  font-size: 15px;
}
.datos-carro-grid div span {
  color: #A7FFEB;
  font-weight: 500;
  margin-right: 4px;
}

.notas-carro-box {
  background: #181d1f;
  border-radius: 12px;
  margin-top: 36px;
  padding: 18px 19px;
  box-shadow: 0 2px 8px #00ffc61f;
  border-left: 6px solid #45efb8;
}
.notas-title {
  font-weight: bold;
  color: #48fae2;
  font-size: 1.11rem;
  margin-bottom: 7px;
}
.notas-content {
  color: #f7fff8;
  font-size: 1rem;
  margin-top: -10px;
}
/* ==============================
   CARD MODERNO PARA OTROS AUTOS
   ============================== */
.car-hover-link {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #23272b;
  border-radius: 12px;
  border: 1px solid #444;
  color: #f1f1f1;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(0,0,0,0.11);
  transition: box-shadow 0.23s, transform 0.23s, background 0.22s;
  min-width: 0;
  height: 100%;
}
.car-hover-link:hover,
.car-hover-link:focus-visible {
  background: #191c1e;
  box-shadow: 0 12px 34px rgba(34,197,162,0.15);
  transform: translateY(-6px) scale(1.03);
}

.car-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(58, 197, 162, 0.31);
  color: #fff;
  font-size: 1.22rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  font-family: 'Oswald',sans-serif;
  font-weight: 700;
  letter-spacing: 2px;
  z-index: 3;
  transition: opacity 0.22s;
}
.car-hover-link:hover .car-hover-overlay,
.car-hover-link:focus-visible .car-hover-overlay {
  opacity: 1;
  pointer-events: auto;
}

.car-hover-link img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px 5px 0 0;
  border-bottom: 1px solid #444;
}
.p-4 { padding: 1rem; }
.car-title {
  font-family: 'Oswald',sans-serif;
  font-weight: 600;
  font-size: 1.18rem;
  margin-bottom: 4px;
  color: #fff;
}
.text-sm { font-size: 0.98rem; }
.font-semibold { font-weight: 600; }
.mb-1 { margin-bottom: .24rem; }
.car-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.car-price {
  color: #45efb8;
  font-size: 1.11rem;
  font-weight: bold;
}
.label-sale {
  background-color: #0a7a2f;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  white-space: nowrap;
  margin-left: 5px;
}

/* ===================
   MEDIA QUERIES
   =================== */
@media (max-width: 960px) {
  .main-gallery-container {
    flex-direction: column;
    align-items: center;
    gap: 22px;
  }
  .main-image-block, .main-gallery-datos {
    max-width: 98vw;
  }
  .car-hover-link { width: 95%; max-width: 400px; }
}

@media (max-width: 700px) {
  .section-cars .relative {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-bottom: 0;
  }
  .cars-container {
    gap: 12px;
    margin: 0;
    width: 100%;
    justify-content: center;
  }
  .arrow-left, .arrow-right {
    position: absolute;
    top: 50%;
    left: unset;
    right: unset;
    bottom: unset;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    font-size: 21px;
    background: #23272b;
    opacity: 0.93;
    box-shadow: 0 1px 8px #222a;
    z-index: 9;
  }
  .arrow-left { left: 12px; right: unset; }
  .arrow-right { right: 12px; left: unset; }
  #carsSlider {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    position: relative;
  }
}
