/* ============================================================
   carousel.css - Bestseller-Carousel (index.php & product.php)
   ------------------------------------------------------------
   Aus style.css ausgelagert, weil das Carousel NUR auf der
   Startseite und der Produktseite vorkommt - nicht auf
   new-arrivals.php. Gehoert inhaltlich zu carousel.js
   (Drag-to-Scroll mit der Maus).
   ============================================================ */

.best-sellers {
  padding-bottom: 40px;
}

.best-sellers__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 48px;
  scrollbar-width: none;
  user-select: none;
  cursor: grab;
}

.best-sellers__scroll::-webkit-scrollbar {
  display: none;
}

.best-sellers__track {
  display: flex;
  gap: 16px;
  width: max-content;
}

/* Breite Carousel-Kachel. Mit 28vw passen rund 3 Kacheln nebeneinander,
   die 4. schaut am rechten Rand heraus und deutet das Scrollen an. */
.best-sellers__item {
  position: relative;
  width: 28vw;
  height: 320px;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: block;
}

/* Hintergrundbilder auf ::before auslagern, damit nur dieses
   Layer unscharf wird und Produkt-Foto + Text scharf bleiben. */
.best-sellers__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(4px);
  z-index: 0;
}

.best-sellers__item:nth-child(1)::before {
  background-image: url("../images/bestsellers/bs-1.webp");
}
.best-sellers__item:nth-child(2)::before {
  background-image: url("../images/bestsellers/bs-2.webp");
}
.best-sellers__item:nth-child(3)::before {
  background-image: url("../images/bestsellers/bs-3.webp");
}
.best-sellers__item:nth-child(4)::before {
  background-image: url("../images/bestsellers/bs-4.webp");
}
.best-sellers__item:nth-child(5)::before {
  background-image: url("../images/bestsellers/bs-5.webp");
}
.best-sellers__item:nth-child(6)::before {
  background-image: url("../images/bestsellers/bs-6.webp");
}

.best-sellers__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

/* Schwarz-zu-transparenter Verlauf am unteren Rand der Kachel,
   damit die weisse Schrift (Name + Preis) gut lesbar ist. */
.best-sellers__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 50%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px 20px;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.55) 50%,
    rgba(0, 0, 0, 0) 100%
  );
}

.best-sellers__name {
  color: #fff;
  font-size: 15px;
}

.best-sellers__price {
  color: #fff;
  font-size: 13px;
  margin-top: 2px;
}

/* Auf Mobile schmalere und niedrigere Kacheln. */
@media (max-width: 768px) {
  .best-sellers__item {
    width: 75vw;
    height: 240px;
  }
}

/* Dunkle Variante des Bestseller-Carousels (product.php) */
.best-sellers--dark {
  background: #111;
}

/* Weisse Beschriftung in der dunklen Variante (gut lesbar auf #111). */
.best-sellers--dark .section-label {
  color: #fff;
}
