/* ============================================================
   Product Carousel — shared carousel track and arrow styles
   Used by: related-products carousel (product detail) and
            featured-products carousel (homepage)
   ============================================================ */

/* ---- Related Products Carousel ---- */

.related-products-carousel {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.related-products__arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--navy-800);
  font-size: var(--font-size-lg);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  line-height: 1;
}

.related-products__arrow:hover {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
  box-shadow: var(--shadow-lg);
}

.related-products__arrow:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.related-products__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.related-products-carousel__track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2);
  padding-right: var(--space-5);
  scrollbar-width: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

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

.related-products-carousel__item {
  flex: 0 0 280px;
  scroll-snap-align: start;
  min-width: 0;
}

/* ---- Product Carousel (featured products, homepage) ---- */

.product-carousel {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
}

@media (min-width: 768px) {
  .product-carousel::after {
    content: '';
    position: absolute;
    top: 0;
    right: calc(2.5rem + var(--space-3));
    bottom: 0;
    width: 10px;
    background: linear-gradient(to right, transparent, var(--carousel-fade-bg, white));
    pointer-events: none;
    z-index: 1;
  }
}

.product-carousel__track {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-2);
  padding-right: var(--space-5);
  scrollbar-width: none;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.product-carousel__track::-webkit-scrollbar {
  display: none;
}

.product-carousel__item {
  flex: 0 0 300px;
  scroll-snap-align: start;
  min-width: 0;
}

.product-carousel__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--white);
  color: var(--navy-800);
  font-size: var(--font-size-lg);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  line-height: 1;
}

.product-carousel__arrow:hover {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
  box-shadow: var(--shadow-lg);
}

.product-carousel__arrow:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.product-carousel__arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ---- Responsive ---- */

@media (max-width: 991px) {
  .related-products-carousel__item {
    flex: 0 0 260px;
  }

  .product-carousel__item {
    flex: 0 0 260px;
  }
}

@media (max-width: 575px) {
  .related-products__arrow {
    display: none;
  }

  .related-products-carousel__item {
    flex: 0 0 80vw;
    max-width: 300px;
  }

  .product-carousel__arrow {
    display: none;
  }

  .product-carousel__item {
    flex: 0 0 80vw;
    max-width: 300px;
  }

  .featured-products__actions {
    flex-wrap: wrap;
  }
}
