/**
 * Bestsellers API Block - CSS Termodifikasi
 * 
 * Styling untuk Bestsellers block dengan layout sesuai gambar referensi
 */

/* Container utama */
.wp-block-custom-top-picks {
  max-width: 100%;
  width: 100%;
  margin: auto;
  padding: 2rem 0;
  margin-top: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  background-color: #ffffff;
  color: #333333;
}

/* Judul Bestsellers */
.wp-block-custom-top-picks .top-picks-title {
  margin: 0 0 10px 0;
  font-size: 2em;
  font-weight: 700;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* Sub title */
.wp-block-custom-top-picks .top-picks-subtitle {
  margin: 0 0 30px 0;
  font-size: 1.5em;
  font-weight: 500;
  color: #333333;
  text-transform: uppercase;
  text-align: center;
}

/* Container scroll horizontal */
.wp-block-custom-top-picks .top-picks-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.8rem;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  position: relative;
}

/* Styling scrollbar */
.wp-block-custom-top-picks .top-picks-scroll::-webkit-scrollbar {
  height: 6px;
}

.wp-block-custom-top-picks .top-picks-scroll::-webkit-scrollbar-track {
  background: rgba(200, 200, 200, 0.2);
  border-radius: 3px;
}

.wp-block-custom-top-picks .top-picks-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(150, 150, 150, 0.5);
  border-radius: 3px;
}

/* Item produk */
.wp-block-custom-top-picks .product-item {
  flex: 0 0 auto;
  width: 260px;
  color: #333333;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease;
  margin: 0 5px;
}

.wp-block-custom-top-picks .product-item:hover {
  transform: translateY(-5px);
}

/* Thumbnail produk */
.wp-block-custom-top-picks .product-thumb {
  display: block;
  background-color: #fff;
  overflow: hidden;
  margin-bottom: 15px;
}

.wp-block-custom-top-picks .product-thumb img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* Container untuk nama dan harga */
.wp-block-custom-top-picks .product-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
}

/* Judul produk */
.wp-block-custom-top-picks .product-title {
  font-size: 1.1em;
  margin: 0;
  padding: 0;
  text-align: left;
  font-weight: 700;
  color: #333333;
  flex: 1;
}

/* Harga produk */
.wp-block-custom-top-picks .product-price {
  margin: 0;
  font-size: 1em;
  font-weight: 600;
  text-align: right;
}

/* Hapus tombol navigasi */

/* Pesan loading dan error */
.wp-block-custom-top-picks .top-picks-scroll p {
  width: 100%;
  padding: 20px;
  text-align: center;
}

.wp-block-custom-top-picks .top-picks-scroll .error {
  color: #ff6b6b;
}

/* Responsive styles */
@media screen and (max-width: 767px) {
  .wp-block-custom-top-picks {
    padding: 1rem 0;
  }

  .wp-block-custom-top-picks .product-item {
    width: 160px;
  }

  .wp-block-custom-top-picks .product-title {
    font-size: 0.9em;
  }

  .wp-block-custom-top-picks .top-picks-title {
    font-size: 1.5em;
  }
}
