/* === Reset dan Font Dasar === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

/* === Background Persawahan === */
body {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), 
              url('images/padi.jpg') no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
}

/* === Container utama === */
.container {
  position: relative;
  z-index: 2;
}

/* === Tombol Kembali === */
.btn-kembali {
  background: #ffc107;
  color: #000;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-kembali:hover {
  background: #e0a800;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* === Header dengan Tombol Kembali === */
.header-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
}

.btn-kembali {
  background: #ffc107;
  color: #000;
  font-weight: 600;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-width: fit-content;
}

.btn-kembali:hover {
  background: #e0a800;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.header-box {
  background: linear-gradient(135deg, #198754, #20c997);
  padding: 20px 30px;
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
  color: white;
  font-weight: 700;
  font-size: 1.8rem;
  border: 3px solid rgba(255, 255, 255, 0.2);
  flex-grow: 1;
}

/* === Card Produk === */
.card {
  border: 3px solid #198754;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  background: #fff;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  border-color: #20c997;
  border-width: 4px;
}

/* === Card Image === */
.card-img-top {
  height: 200px;
  object-fit: cover;
  border-bottom: 4px solid #198754;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
  border-bottom-color: #20c997;
}

/* === Card Body === */
.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-title {
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.card-text {
  color: #6c757d;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* === Harga === */
.fw-bold.text-success {
  font-size: 1.3rem;
  color: #198754 !important;
  margin-bottom: 10px;
}

.text-muted {
  font-size: 0.9rem;
  font-weight: normal;
}

/* === Info Stok === */
.mb-1 small {
  color: #6c757d;
  font-weight: 500;
}

/* === Tombol dalam Card === */
.d-grid .btn {
  border-radius: 8px;
  font-weight: 600;
  padding: 10px;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #198754, #20c997);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #157347, #1aa179);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

/* === Responsive Design === */
@media (max-width: 768px) {
  .header-section {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .btn-kembali {
    align-self: flex-start;
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .header-box {
    font-size: 1.4rem;
    padding: 15px 20px;
  }
  
  .card-img-top {
    height: 160px;
  }
  
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

@media (max-width: 576px) {
  .header-box {
    font-size: 1.2rem;
    padding: 12px 15px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .card-title {
    font-size: 1.1rem;
  }
  
  .fw-bold.text-success {
    font-size: 1.1rem;
  }
}