/* DETAIL PRODUK */
.detail-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 30px;
  padding: 20px;
  max-width: 8500px;
  margin: 0 auto;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.detail-container img {
  width: 350px;         /* ukuran tetap */
  height: auto;
  border-radius: 10px;
  flex-shrink: 0;
  object-fit: cover;    /* supaya tidak melar */
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.detail-info h1 {
  margin-bottom: 10px;
  color: #333;
}

.detail-info .kategori {
  font-style: italic;
  color: #888;
}

.detail-info .harga {
  font-weight: bold;
  color: #ff6600;
  margin: 10px 0;
}

.btn-back {
  display: inline-block;
  margin-top: 20px;
  padding: 8px 15px;
  background-color: #0099ff;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-back:hover {
  background-color: #007acc;
}

@media (max-width: 768px) {
  .detail-container {
    flex-direction: column;
    align-items: center;
  }

  .detail-container img {
    width: 100%;
    max-width: 400px;
  }

  .detail-info {
    text-align: center;
  }
}


/* FORM TAMBAH PRODUK */
.form-container {
  max-width: 700px;
  margin: 50px auto;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.form-container h1 {
  text-align: center;
  margin-bottom: 20px;
}

.form-container label {
  display: block;
  margin-top: 10px;
  font-weight: bold;
}

.form-container input,
.form-container textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.form-container button {
  margin-top: 20px;
  width: 100%;
  background: #007bff;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
}

.form-container button:hover {
  background: #0056cc;
}

.message {
  text-align: center;
  color: #007bff;
  font-weight: 600;
  margin-bottom: 15px;
}

/* GRID PRODUK */

/*.produk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  justify-items: center;
  padding: 20px;
} 

.produk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 30px;
} 

/* Kartu produk */
/*.produk-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  text-align: center;
  padding: 15px;
  width: 100%;
  max-width: 280px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.produk-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
} */


/* Grid layout */
.produk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  adding: 20px;
  /*margin-top: 30px;*/
  justify-items: center;
}


/* Responsif tablet */
@media (max-width: 992px) {
  .produk-grid {
    grid-template-columns: repeat(2, 1fr); /* tablet 2 kolom */
  }
}

/* Responsif HP */
@media (max-width: 600px) {
  .produk-grid {
    grid-template-columns: 1fr; /* HP 1 kolom */
  }
}



/* Kartu produk */
.produk-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 370px; /* 🔹 FIXED tinggi agar stabil di semua halaman */
}

.produk-card-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  max-width: 280px;
  min-height: 420px;
}

/* Gambar produk */
.produk-card img {
  width: 100%;
  height: 180px; /* 🔹 Ukuran gambar seragam */
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Nama produk */
.produk-card h2 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  min-height: 42px; /* 🔹 Menjaga agar teks nama sejajar */
  overflow: hidden;
}

/* Kategori & Harga */
.produk-card .kategori {
  font-size: 14px;
  color: #777;
  margin-bottom: 5px;
}

.produk-card .harga {
  font-size: 15px;
  color: #007bff;
  font-weight: 600;
  margin-bottom: 10px;
}

/* Tombol detail */
.produk-card .btn-detail {
  display: inline-block;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.2s;
}

.produk-card .btn-detail:hover {
  background: #0056b3;
  transform: translateY(-2px);
}

/* Hover efek kartu */
.produk-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}



/* Gambar produk */
.produk-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 10px;
}

/* Detail produk */
.produk-card h2 {
  font-size: 1.1em;
  margin: 5px 0;
  color: #111;
}

.produk-card .kategori {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 5px;
}

.produk-card .harga {
  color: #ff6600;
  font-weight: bold;
  margin-bottom: 10px;
}

.produk-card .btn-detail {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 8px 15px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}

.produk-card .btn-detail:hover {
  background: #0056cc;
}


.pagination {
  text-align: center;
  margin: 30px 0;
}

.pagination a {
  color: #007bff;
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 6px;
  margin: 0 3px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.pagination a:hover {
  background-color: #007bff;
  color: #fff;
}

.pagination a.active {
  background-color: #007bff;
  color: white;
  font-weight: bold;
}
