/* CONTENEDOR DEL CARRUSEL */
#productosCarruselRelacionados.productos-scroll-carousel {
  display: flex;
  overflow-x: auto;
  gap: 1rem;
  padding-bottom: 1rem;
  scroll-behavior: smooth;
  width: 100%; /* Asegura que el contenedor ocupe todo el espacio disponible */
}

#productosCarruselRelacionados::-webkit-scrollbar {
  display: none; /* Oculta la barra de desplazamiento */
}

/* CARDS RESPONSIVE */
#productosCarruselRelacionados .product-card {
  flex: 0 0 calc(50% - 0.5rem);  /* Define el tamaño de las cards */
  border-radius: 10px;
  transition: transform 0.25s ease;  /* Transición suave para el hover */
}

#productosCarruselRelacionados .product-card:hover {
  transform: translateY(-3px);  /* Efecto al pasar el mouse */
}

@media (min-width: 576px) {
  #productosCarruselRelacionados .product-card {
    flex: 0 0 calc(33.333% - 0.66rem);  /* En pantallas más grandes (tablet), 3 cards por fila */
  }
}

@media (min-width: 768px) {
  #productosCarruselRelacionados .product-card {
    flex: 0 0 calc(25% - 0.75rem);  /* En pantallas más grandes (computadora), 4 cards por fila */
  }
}

/* IMÁGENES EN LAS CARDS */
#productosCarruselRelacionados .image-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#productosCarruselRelacionados .image-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* FLECHAS DE NAVEGACIÓN */
.carrusel-wrapper {
  position: relative;
}

.carrusel-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);  /* Centra las flechas verticalmente */
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);  /* Fondo blanco con transparencia */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);  /* Sombra sutil */
  color: #333;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;  /* Transición suave */
}

.carrusel-flecha:hover {
  background: #28a745;  /* Color de fondo al hacer hover */
  color: white;
  transform: translateY(-50%) scale(1.08);  /* Aumenta el tamaño de la flecha */
}

/* Posicionamiento de las flechas */
.carrusel-flecha.izquierda {
  left: -15px;  /* Mueve la flecha izquierda hacia la izquierda */
}

.carrusel-flecha.derecha {
  right: -15px;  /* Mueve la flecha derecha hacia la derecha */
}

/* FLECHAS SIEMPRE VISIBLES */
.carrusel-flecha {
  display: block;  /* Asegura que las flechas siempre sean visibles */
}

/* SEGURIDAD SCROLL */
html, body {
  overflow-x: hidden;  /* Previene el desplazamiento horizontal fuera del contenedor */
}
