/* ================= FILTER BAR SEJAJAR ================= */

.filter-bar {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

/* SEARCH LEBIH PANJANG */
#search-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
  background: #fff;
}

/* KATEGORI LEBIH KECIL */
#filterKategori {
  width: 140px;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
  outline: none;
}

/* Biar tidak pecah di layar kecil */
.filter-bar input,
.filter-bar select {
  min-width: 0;
}


/* === GRID KATALOG === */
#catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 14px;
}

/* Desktop 4 kolom */
@media (min-width: 992px) {
  #catalog {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === CARD PRODUK === */
.product-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

/* Gambar produk */
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f5f5f5;
}

/* Info produk */
.product-card h3 {
  font-size: 14px;
  margin: 10px;
  line-height: 1.4;
  height: 40px;
  overflow: hidden;
}

.product-card p {
  font-size: 12px;
  margin: 0 10px 10px;
  color: #666;
  height: 36px;
  overflow: hidden;
}

/* Tombol */
.product-card a {
  margin: 10px;
  padding: 8px;
  text-align: center;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.2s ease;
}

.product-card a:hover {
  background: #333;
}
/* Badge diskon */
.badge-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e53935;
  color: #fff;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  font-weight: bold;
  z-index: 2;
}

/* Wrapper gambar agar badge bisa nempel */
.product-image-wrap {
  position: relative;
}

/* Rating bintang */
.rating {
  font-size: 12px;
  color: #f5a623;
  margin: 0 10px 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating span {
  color: #444;
  font-size: 12px;
}
/* =========================
   WRAPPER SEARCH (opsional tapi disarankan)
========================= */
.search-wrap {
  padding: 14px;
}

/* =========================
   SEARCH BOX RESPONSIVE
========================= */
#search-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  outline: none;
  box-sizing: border-box;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

#search-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* Desktop agak lebih lebar & nyaman */
@media (min-width: 768px) {
  .search-wrap {
    max-width: 600px;
    margin: 0 auto;
  }

  #search-input {
    font-size: 15px;
    padding: 14px 16px;
  }
}


#search-input:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* =========================
   LOAD MORE BUTTON
========================= */
#loadMoreBtn {
  display: block;
  margin: 20px auto 30px;
  padding: 10px 18px;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

#loadMoreBtn:hover {
  background: #333;
  transform: translateY(-2px);
}

#loadMoreBtn:active {
  transform: translateY(0);
}

/* Saat semua produk sudah tampil */
#loadMoreBtn:disabled {
  background: #ccc;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

