/* Section Container */
.recommended-section {
  max-width: 1200px;
  margin: auto;
  padding: 40px 25px;
  text-align: left;
}

/* Title Styling */
.recommended-title {
  font-size: 34px;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* Carousel Wrapper */
.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Carousel Container */
.recommended-carousel {
  overflow: hidden;
  width: 85%;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: 20px;
  transition: transform 0.5s ease-in-out;
}

/* Product Card */
.recommended-box {
  flex: 0 0 calc(100% / 3 - 20px);
  /* Default 3 items per row */
  text-align: left;
}

/* Recommended Link - Full Card Clickable */
.recommended-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 10px;
  overflow: hidden;
}

.recommended-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Image Card */
.recommended-image {
  width: 100%;
  height: 250px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 10px;
  background-color: #f4f4f4;
}

/* Text & Description */
.recommended-text {
  margin-top: 10px;
  margin-left:10px;
}

.recommended-text h3 {
  font-size: 2rem;
  font-weight: 200;
  font-family: "Avenir55Roman", sans-serif;
  margin: 0 0 5px 0;
  color: #000;
}

.recommended-text p {
  font-size: 1.3rem;
  color: #555;
  line-height: 1.5;
  margin: 0;
}

/* Carousel Buttons */
.carousel-prev,
.carousel-next {
  color: #000;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  font-size: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(255, 255, 255, 1);
}

.carousel-prev {
  left: 10px;
}

.carousel-next {
  right: 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .recommended-box {
    flex: 0 0 calc(100% / 2 - 20px);
    /* 2 items per row */
  }
}

@media (max-width: 768px) {
  .recommended-section {
    padding: 30px 15px;
  }

  .recommended-title {
    font-size: 24px;
    margin-bottom: 15px;
  }

  .carousel-wrapper {
    overflow: visible;
    padding: 0 40px; /* Add padding to prevent nav overlap */
  }

  .recommended-carousel {
    width: 100%;
  }

  .carousel-track {
    gap: 15px;
  }

  .recommended-box {
    flex: 0 0 calc(100% / 2 - 15px);
    /* 2 items per row on tablets */
  }

  .recommended-image {
    height: 200px;
  }

  .recommended-text h3 {
    font-size: 1.5rem;
  }

  .recommended-text p {
    font-size: 1rem;
  }

  .carousel-prev,
  .carousel-next {
    padding: 8px 12px;
    font-size: 20px;
  }

  .carousel-prev {
    left: 5px;
  }

  .carousel-next {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .recommended-section {
    padding: 20px 10px;
  }

  .recommended-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .carousel-wrapper {
    padding: 0 50px; /* Increase padding for mobile to prevent overlap */
  }

  .recommended-carousel {
    width: 100%;
  }

  .carousel-track {
    gap: 10px;
  }

  .recommended-box {
    flex: 0 0 calc(100% - 10px);
    /* 1 item per row on small mobile */
  }

  .recommended-image {
    height: 180px;
  }

  .recommended-text {
    margin-top: 8px;
  }

  .recommended-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }

  .recommended-text p {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .carousel-prev,
  .carousel-next {
    padding: 6px 10px;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .carousel-prev {
    left: 5px;
  }

  .carousel-next {
    right: 5px;
  }
}
