:root {
  --bg: #f7f5ec;
  --card: #ffffff;
  --text: #25301f;
  --muted: #6b7560;
  --olive: #4f6b2c;
  --olive-dark: #36491c;
  --accent: #c8963e;
  --line: #e4e0cf;
  --radius: 14px;
}

* { 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);
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- Header ---------- */
.hero {
  background: linear-gradient(160deg, var(--olive-dark), var(--olive));
  color: #fff;
  text-align: center;
  padding: 32px 16px 28px;
}
.hero .logo { font-size: 40px; line-height: 1; }
.hero h1 { font-size: 30px; letter-spacing: 3px; text-transform: uppercase; margin-top: 6px; }
.hero p { opacity: .85; font-size: 14px; margin-top: 4px; }
.hero .info { font-size: 12px; opacity: .8; margin-top: 10px; }

/* ---------- Search + tabs ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}
.search {
  display: block;
  width: calc(100% - 32px);
  margin: 0 16px 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}
.search:focus { outline: 2px solid var(--olive); border-color: transparent; }

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { background: var(--olive); color: #fff; border-color: var(--olive); }

/* ---------- Menu ---------- */
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 90px; }

.section { padding-top: 22px; scroll-margin-top: 112px; }
.section h2 { font-size: 20px; color: var(--olive-dark); margin-bottom: 10px; }

.item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
}
.item { align-items: flex-start; }
.item .txt { flex: 1; min-width: 0; }
.item .thumb { flex: 0 0 84px; width: 84px; height: 84px; object-fit: cover; border-radius: 10px; background: #efeddf; cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.item.habis { opacity: .55; }
.item .name { font-weight: 600; font-size: 16px; }
.item .desc { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.item .price { font-weight: 700; color: var(--olive-dark); white-space: nowrap; font-size: 15px; }

.item .price { text-align: right; }
.price .var { font-size: 13px; font-weight: 600; line-height: 1.6; }
.price .var span { font-weight: 400; color: var(--muted); margin-right: 4px; }
.desc em { color: var(--accent); font-style: normal; font-weight: 600; }

.badge.only  { background: #e9e0f5; color: #5a3a8a; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge.best  { background: #fdf0d3; color: #8a5d0a; }
.badge.baru  { background: #dff0e0; color: #1f6a2a; }
.badge.pedas { background: #fbe0dc; color: #a12a1b; }
.badge.vegan { background: #e5efd3; color: #3e5a16; }
.badge.habis { background: #e8e8e8; color: #555; }

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

/* ---------- Footer & WA ---------- */
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 0 16px 100px; }

.wa {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* ---------- Maskot ---------- */
.greet {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 0;
  display: flex;
  align-items: flex-end;
  gap: 6px;
}
.mascot {
  flex: 0 0 auto;
  width: 104px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  transform-origin: 50% 100%;
  animation: mascot-in .8s cubic-bezier(.2, 1.4, .4, 1) both, mascot-bob 3.2s ease-in-out .8s infinite;
}
.mascot img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 90%;
  animation: mascot-wave 2.6s ease-in-out .8s infinite;
  filter: drop-shadow(0 6px 8px rgba(54, 73, 28, .25));
}
.mascot.jump { animation: mascot-jump .6s ease-out; }
.mascot:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; border-radius: 12px; }

.bubble {
  position: relative;
  margin-bottom: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 11px 15px;
  font-size: 15px;
  font-weight: 600;
  color: var(--olive-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  transition: opacity .22s, transform .22s;
  animation: bubble-in .5s ease-out .5s both;
}
.bubble::before { /* ekor balon menunjuk ke maskot */
  content: "";
  position: absolute;
  left: -7px;
  bottom: 14px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}
.bubble.out { opacity: 0; transform: translateY(4px); }

@keyframes mascot-in   { from { opacity: 0; transform: translateY(40px) scale(.7); } to { opacity: 1; transform: none; } }
@keyframes mascot-bob  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes mascot-wave { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes mascot-jump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-22px) scale(1.06, .96); } 60% { transform: translateY(0) scale(.96, 1.04); } 100% { transform: none; } }
@keyframes bubble-in   { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Mode "kurangi gerakan" / hemat baterai: maskot tetap hidup tapi geraknya jauh lebih halus */
@keyframes mascot-bob-soft  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes mascot-wave-soft { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }
@media (prefers-reduced-motion: reduce) {
  .mascot { animation: mascot-in .4s ease-out both, mascot-bob-soft 4s ease-in-out .4s infinite; }
  .mascot img { animation: mascot-wave-soft 4s ease-in-out .4s infinite; }
  .mascot.jump { animation: mascot-bob-soft .5s ease-out; }
  .bubble { animation: none; }
}
