:root {
  --primary:#2563eb;
  --accent:#f97316;
  --bg:#f1f5f9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
}

/* ================= HEADER ================= */
.header {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--primary);
  color: white;
}

.logo a {
  color: white;
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
}

/* SEARCH */
.search {
  margin: 0 20px;
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
}

/* MENU RIGHT */
.menu {
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}

.menu-item {
  color: white;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover {
  text-decoration: underline;
}

.menu-user {
  font-size: 14px;
  opacity: 0.9;
}

.logout {
  color: #fca5a5;
}

/* ================= FILTER ================= */
.filter {
  padding: 15px;
  background: white;
  display: flex;
  gap: 10px;
}

.filter button {
  padding: 8px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  background: #e5e7eb;
}

.filter button.active {
  background: var(--primary);
  color: white;
}

/* ================= GRID ================= */
.products {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
  gap: 15px;
}

/* ================= CARD ================= */
.card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  position: relative;
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.card h4 {
  margin: 8px 0 4px;
  font-size: 15px;
}

.price {
  color: var(--accent);
  font-weight: bold;
}

/* ================= BADGE ================= */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: white;
}

.badge.barang {
  background: var(--primary);
}

.badge.jasa {
  background: var(--accent);
}

/* ================= JASA FORM ================= */
.jasa-form {
  margin-top: 8px;
}

.jasa-form label {
  font-size: 13px;
}

.jasa-form input {
  width: 100%;
  padding: 6px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.total {
  margin-top: 6px;
  font-weight: bold;
}

/* ================= CART BUTTON ================= */
.cart-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.cart-btn:hover {
  background: #1d4ed8;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search {
    margin: 10px 0;
    width: 100%;
  }

  .menu {
    width: 100%;
    justify-content: flex-end;
  }
}
