/* ====== DASAR ====== */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: #f3f3f3;
}

header {
  background: #2e7d32;
  color: #fff;
  padding: 10px;
}

.header-content {
  display: flex;
  align-items: center;
}

.logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  margin-right: 10px;
}

.header-text h1 {
  font-size: 20px;
  margin: 0;
}

.search-box {
  width: 90%;
  display: block;
  margin: 10px auto;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

/* ====== PRODUK ====== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 10px;
}

.product {
  background: #fff;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 10px;
  transition: 0.3s;
}

.product img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

.price {
  color: #2e7d32;
  font-weight: bold;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
}

.cart-btn, .buy-btn {
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.cart-btn {
  background: #ffa500;           /* oranye cerah */
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cart-btn:hover {
  background: #ff8c00;          /* oranye lebih gelap saat hover */
}

.cart-btn i {
  pointer-events: none;         /* biar klik tetap kena tombol, bukan ikon */
}

.buy-btn {
  background: #2e7d32;
  color: #fff;
}

/* ====== NAVBAR ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2e7d32;
  color: white;
  display: flex;
  justify-content: space-around;
  padding: 14px 0;
  z-index: 99;
}

.bottom-nav a {
  color: white;
  text-decoration: none;
  font-size: 14px;
}
/* 🔴 Gaya untuk angka di keranjang (cart count) */
#cartCount {
  background: red;
  color: white;
  border-radius: 70%;
  padding: 2px 6px;
  font-size: 14px;
  font-weight: bold;
  position: relative;
  top: -8px;
  left: 3px;
}


/* ====== CART PAGE ====== */
#cartPage {
  padding: 10px;
}

.cart-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2e7d32;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  margin-top: 8px;
  border-radius: 8px;
  padding: 10px;
}

.item-info {
  flex: 1;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.qty-controls button {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
}

#cartTotalBar {
  position: fixed;
  bottom: 50px;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #ccc;
  padding: 8px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#checkoutBtn {
  background: #2e7d32;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
}

/* ====== POPUP ====== */
#popupOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#popupBox {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  width: 85%;
  max-width: 400px;
}

#popupBox input, #popupBox textarea, #popupBox select {
  width: 100%;
  margin: 5px 0;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.popup-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

#popupCancel {
  background: #ccc;
}

#popupConfirm {
  background: #2e7d32;
  color: white;
}

.hidden {
  display: none;
}

/* ✅ Fix popup selalu muncul di awal */
#popupOverlay.hidden {
  display: none !important;
}
