:root {
  --bg: #0f172a;
  --card: #1e293b;
  --accent: #22c55e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --wa: #25d366;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh;
}
header {
  text-align: center; padding: 28px 16px 18px;
  background: linear-gradient(135deg, #052e16, #0f172a);
  border-bottom: 2px solid var(--accent);
}
.brand { font-size: 28px; font-weight: 800; letter-spacing: 1px; }
.tagline { color: var(--muted); margin-top: 6px; font-size: 14px; }

.toolbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15,23,42,.95); backdrop-filter: blur(6px);
  padding: 12px 16px; border-bottom: 1px solid #334155;
}
#search {
  width: 100%; padding: 10px 14px; border-radius: 10px;
  border: 1px solid #334155; background: var(--card); color: var(--text);
  font-size: 15px;
}
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 20px;
  border: 1px solid #334155; background: var(--card); color: var(--muted);
  font-size: 13px; cursor: pointer;
}
.chip.active { background: var(--accent); color: #052e16; border-color: var(--accent); font-weight: 700; }

#grid {
  display: grid; gap: 14px; padding: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  max-width: 1100px; margin: 0 auto;
}
.card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  border: 1px solid #334155; display: flex; flex-direction: column;
}
.card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  cursor: zoom-in; background: #0b1220;
}
.card .body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card h3 { font-size: 14px; line-height: 1.3; }
.harga { color: var(--accent); font-weight: 800; font-size: 15px; }
.badge {
  align-self: flex-start; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 12px;
}
.badge.Baru { background: #14532d; color: #86efac; }
.badge.Second { background: #713f12; color: #fde68a; }
.desc { font-size: 12px; color: var(--muted); line-height: 1.4; }
.wa-btn {
  margin-top: auto; text-align: center; text-decoration: none;
  background: var(--wa); color: #052e16; font-weight: 700; font-size: 13px;
  padding: 9px; border-radius: 10px;
}
.wa-btn:active { transform: scale(.97); }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }

footer { text-align: center; padding: 26px 16px 40px; color: var(--muted); font-size: 13px; }
footer a {
  display: inline-block; background: var(--wa); color: #052e16;
  font-weight: 800; text-decoration: none; padding: 12px 26px;
  border-radius: 30px; margin-bottom: 12px;
}

/* Lightbox */
#lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.92);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; }
#lbClose {
  position: absolute; top: 16px; right: 20px; font-size: 28px;
  color: #fff; cursor: pointer;
}
#lbCap { color: #fff; margin-top: 12px; font-size: 15px; text-align: center; }
