/* ========================================
   DETAIL PRODUK 
======================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.detail-page {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  min-height: 100vh;
  padding: 0;
  margin: 0;
}

/* TOMBOL KEMBALI */
.back-btn {
  display: inline-block;
  margin: 25px 30px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #555;
  transition: color 0.2s;
}

.back-btn:hover {
  color: #e67e22;
}

/* CONTAINER UTAMA */
.detail-container {
  display: flex;
  max-width: 1000px;
  margin: 0 auto 50px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* KIRI (GAMBAR) */
.detail-left {
  width: 40%;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.detail-left img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 10px;
}

/* KANAN (DETAIL) */
.detail-right {
  width: 60%;
  padding: 35px 40px;
}

/* JUDUL */
.detail-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

/* ✅ GRID INFO 2 KOLOM (BIAR NGGAK KAKU) */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  margin-bottom: 25px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-value {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

/* STOK SECTION */
.detail-stok {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.detail-stok .info-label {
  display: block;
  margin-bottom: 8px;
}

.detail-stok .stok-value {
  margin-top: 4px;
}

/* DESKRIPSI */
.detail-deskripsi {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.detail-deskripsi .info-label {
  display: block;
  margin-bottom: 8px;
}

.detail-deskripsi p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

/* BADGE STOK */
.stok-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.stok-badge.tersedia {
  background: #d4edda;
  color: #155724;
}

.stok-badge.menipis {
  background: #fff3cd;
  color: #856404;
}

.stok-badge.habis {
  background: #f8d7da;
  color: #721c24;
}

/* FORM PESAN */
.detail-form {
  margin-top: 20px;
}

.detail-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.detail-form input[type="number"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  margin-bottom: 15px;
  transition: border-color 0.2s;
}

.detail-form input[type="number"]:focus {
  border-color: #e67e22;
}

.btn-pesan {
  width: 100%;
  padding: 14px;
  background: #e67e22;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-pesan:hover:not(:disabled) {
  background: #d35400;
}

.btn-pesan:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* RESPONSIVE (HP) */
@media (max-width: 768px) {
  .detail-container {
    flex-direction: column;
    margin: 0 16px 40px;
  }

  .detail-left {
    width: 100%;
    padding: 20px;
  }

  .detail-right {
    width: 100%;
    padding: 25px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* STOK INFO */
.stok-info {
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
}

.stok-info strong {
  color: #2e7d32;
}

/* PO INFO */
.po-info {
  font-size: 12px;
  color: #ef6c00;
  background: #fff8e1;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
  border-left: 3px solid #ef6c00;
}

/* Warning message di bawah input */
.input-warning {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.input-warning.show {
  display: block;
}

/* Tombol disabled */
.btn-pesan:disabled {
  background: #9ca3af !important;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Info stok habis di form */
.stok-habis-info {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #f3f4f6;
  color: #9ca3af;
  font-weight: 600;
  border-radius: 8px;
}