/* Related Products Carousel Fixes */

/* Container en content fixes */
.tty-related-products-wrapper {
position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  background-color: #edf4f6;
  margin-bottom: 0px;
  padding: 100px 0;
  max-width: 100vw !important;
  overflow: hidden;

}

carousel-item-action.tty-related-product-button {
  display: none;
}

.carousel-item.visible-slide {
  opacity: 1;
}

.tty-related-products-content {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 30px; /* Meer padding om ruimte te maken voor de pijlen */
  position: relative;
}

/* Carousel container fixes */
.treatments-carousel-container {
  position: relative;
  overflow: visible;
  padding: 0 20px; /* Ruimte voor de navigatiepijlen */
  margin: 0 auto;
  width: 100%;
}

/* Slider fixes */
.tty-related-products-grid {
  display: flex;
  transition: transform 0.5s ease;
  overflow: visible !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin: 0 !important; /* Verwijder negatieve marges */
  gap: 20px; /* Gebruik gap in plaats van margins voor consistentere spacing */
}

.tty-related-products-grid::-webkit-scrollbar {
  display: none;
}

/* Item styling fixes */
.carousel-item.tty-related-product-item {
  flex: 0 0 auto;
  width: calc((100% - (3 * 20px)) / 4); /* 4 items per rij met 20px gap */
  margin: 0 !important;
  border: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Navigatiepijlen fixes */
.tty-related-products-wrapper .carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background-color: #fff;
  color: #121212;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20; /* Verhoogde z-index om boven content te blijven */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.tty-related-products-wrapper .carousel-prev {
  left: 5px; /* Aangepast om binnen de container te blijven */
}

.tty-related-products-wrapper .carousel-next {
  right: 5px; /* Aangepast om binnen de container te blijven */
}

/* Responsive styling fixes */
@media (max-width: 1200px) {
  .carousel-item.tty-related-product-item {
    width: calc((100% - (2 * 20px)) / 3); /* 3 items per rij op kleinere desktop */
  }
}

@media (max-width: 992px) {
  .carousel-item.tty-related-product-item {
    width: calc((100% - 20px) / 2); /* 2 items per rij op tablet */
  }
  
  .tty-related-products-content {
    padding: 0 20px;
  }
}


@media (max-width: 768px) {
  .carousel-item.tty-related-product-item {
    width: calc(100% - 40px); /* 1 item per rij op mobiel met marges */
    margin: 0 20px !important;
    scroll-snap-align: center;
  }
  
  .tty-related-products-wrapper {
    padding: 50px 0;
  }
  
  .treatments-carousel-slider {
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px; /* Ruimte voor scroll indicator */
  }
  
  .tty-related-products-wrapper .carousel-nav {
    display: none; /* Verberg pijlen op mobiel */
  }
  
  .carousel-progress-dots {
    display: flex;
    justify-content: center;
    margin-top: 20px;
  }
  
  .carousel-progress-dots .progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    transition: background-color 0.3s ease;
  }
  
  .carousel-progress-dots .progress-dot.active {
    background-color: #005f5f;
  }
}