.related {
  margin: 50px 0;
  position: relative;
}

.related h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #001f3f;
  text-align: center;
}

/* Contenedor del carrusel */
.related__container {
  position: relative;
  overflow: hidden; /* ocultamos scroll manual visible */
}

/* Lista horizontal */
.related__list {
  display: flex;
  gap: 20px;
  overflow-x: auto; /* scroll táctil en móviles */
  scroll-behavior: smooth;
  padding: 10px 0;
  scrollbar-width: none; /* Firefox */
}

.related__list::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Tarjetas */
.related__list article.card {
  min-width: 280px;
  max-width: 300px;
  flex: 0 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.related__list article.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  transition: transform 0.3s ease;
}

.related__list article.card h3 {
  font-size: 1rem;
  margin: 10px 15px 5px 15px;
  color: #001f3f;
}

.related__list article.card p {
  font-size: 0.85rem;
  margin: 0 15px 10px 15px;
  color: #333;
  flex-grow: 1;
  height: 45px; /* limita la descripción */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover */
.related__list article.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.related__list article.card:hover img {
  transform: scale(1.05);
}

/* Botones de navegación */
.related__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(240, 165, 0, 0.9);
  border: none;
  padding: 10px 15px;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s ease;
}

.related__btn:hover {
  background: rgba(240, 165, 0, 1);
}

.related__btn.prev {
  left: 0;
}

.related__btn.next {
  right: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .related__list article.card {
    min-width: 220px;
  }
}

@media (max-width: 600px) {
  .related__list article.card {
    min-width: 80%;
  }
  .related__btn {
    display: none; /* scroll táctil en móvil */
  }
}
