body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: #f7f7f7;
  color: #333;
}

header {
  background: #0f5132;
  color: white;
  padding: 20px;
  text-align: center;
}

h1, h2, p { margin: 5px 0; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0;
}

.tab {
  background: #0f5132;
  color: white;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s;
  font-size: 14px;
}

.tab:hover { background: #145c3b; }
.tab.active { background: #25d366; }

main { padding-bottom: 220px; }

section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  padding: 0 12px;
}

.item {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .25s ease;
}

.item:hover { transform: translateY(-2px); }

.item img {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 12px;
  background: #f5f5f5;
}

.item button {
  background: #0f5132;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  font-size: 15px;
}

.prices { display: flex; gap: 8px; }
.prices button { flex: 1; font-size: 14px; }

.best-seller {
  background: #FFD700;
  color: #0f5132;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
}

.new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff3b3b;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 4px 8px;
  border-radius: 6px;
}

.cart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 2px solid #eee;
  padding: 10px;
}

#cartItems {
  list-style: none;
  padding: 0;
  max-height: 160px;
  overflow-y: auto;
}

#cartItems li {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px dashed #ddd;
  padding: 6px 0;
}

#cartItems span {
  cursor: pointer;
  color: red;
  font-size: 18px;
}

.cart button {
  background: #25D366;
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  font-size: 16px;
  border-radius: 8px;
}

#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f5132;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: .3s;
}
#toast.show { opacity: 1; }
