body {
  font-family: Arial, sans-serif;
  background: #f4f4f9;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 900px;
  margin: auto;
  padding: 20px;
}

h1 {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase; /* otomatis huruf besar */
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px; /* jarak ikon 🔍 dengan teks */
  color: #FFD84D; /* Menambahkan warna kuning */
}


/* Search bar */
form {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
}

#searchInput {
  flex: 1;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 20px; /* bulat ala Google */
}

button {
  padding: 6px 10px;
  font-size: 14px;
  border: none;
  border-radius: 50%; /* bulat kecil */
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

button[type="submit"] {
  background: #FFD84D;
  color: white;
}

#scanBtn {
  background: red;
  color: white;
}

/* Produk list kecil */
.grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  padding: 10px;
  cursor: pointer;
  transition: transform .2s;
}

.product:hover {
  transform: scale(1.02);
}

.product-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  width: 70px;
  height: 70px;
  object-fit: contain;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
  text-align: left;
}

.product-info h2 {
  font-size: 14px;
  margin: 0 0 4px;
}

.barcode {
  font-size: 12px;
  color: #666;
  margin: 0 0 4px;
}

.harga {
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.harga-promo {
  background: yellow;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  order: 1;
}

.harga-normal {
  text-decoration: line-through;
  color: #FFD84D;
  order: 2;
  margin-left: 10px; /* spasi antar harga */
}

.harga-satu {
  background: #FFD84D;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,.6);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

#closeModal {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 32px;   /* lebih besar */
  font-weight: bold;
  color: red;        /* merah */
  cursor: pointer;
  transition: transform 0.2s ease;
}

#closeModal:hover {
  transform: scale(1.2); /* efek hover biar makin jelas */
}


.detail-img {
  text-align: center;
  margin-bottom: 15px;
}

.detail-product-img {
  max-width: 300px;
  border-radius: 8px;
}

.barcode-section {
  text-align: center;
  margin: 15px 0;
}

.barcode-img {
  width: 100%;
  max-width: 300px;
  display: block;
  margin: 0 auto;
  background: white;
  padding: 6px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.harga-modal {
  margin-top: 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px; /* jarak antar harga */
}

.harga-promo-besar {
  font-size: 26px;
  font-weight: bold;
  color: #d9534f;
  background: yellow;
  padding: 4px 10px;
  border-radius: 6px;
}

.harga-normal-coret {
  text-decoration: line-through;
  color: black;  
  font-size: 18px;
  background: #FFD84D;        
  padding: 4px 10px;
  border-radius: 6px;
}

.harga-satu-besar {
  font-size: 26px;
  font-weight: bold;
  color: black;
  background: #FFD84D;
  padding: 4px 10px;
  border-radius: 6px;
}


.barcode-text {
  margin-top: 6px;
  font-size: 14px;
  color: #444;
}

/* Spinner */
#loading {
  display: none;
  margin: 15px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #FFD84D;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bot-credit {
  display: block;
  text-align: center;
  margin-top: 2px;      /* jarak dari judul */
  margin-bottom: 10px;  /* jarak ke box cari & kamera */
  font-size: 13px;
  color: red;
}

.bot-credit a {
  color: red;
  text-decoration: none;
  margin: 0 4px;
}

.bot-credit a:hover {
  text-decoration: underline;
}
