/* ============================================================
   Oleh-Oleh Kelas — styles.css
   Tema: hijau mint segar + aksen kuning hangat.
   Mobile-first, tanpa gambar eksternal.
   ============================================================ */

:root {
  --bg: #f3faf6;
  --surface: #ffffff;
  --surface-soft: #f7fcf9;
  --ink: #12251e;
  --muted: #5d7a6f;
  --line: #dfeee7;
  --brand: #0a8062;
  --brand-dark: #076a51;
  --brand-soft: #e2f7ee;
  --accent: #ff9f1c;
  --accent-soft: #fff3dd;
  --danger: #c84545;
  --danger-soft: #fdecec;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(18, 37, 30, 0.04), 0 8px 20px -14px rgba(18, 37, 30, 0.28);
  --shadow-md: 0 14px 40px -18px rgba(18, 37, 30, 0.35);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 100% -10%, #d9f5e7 0%, rgba(217, 245, 231, 0) 62%),
    radial-gradient(720px 420px at -12% -4%, #fff0d6 0%, rgba(255, 240, 214, 0) 58%),
    var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(10, 128, 98, 0.12);
}

body.no-scroll { overflow: hidden; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { display: block; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(15, 157, 118, 0.35);
  outline-offset: 2px;
}

/* ---------- Layout ---------- */

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 130px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -16px;
  padding: 11px 16px;
  background: rgba(243, 250, 246, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(223, 238, 231, 0.75);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}

.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 19px;
  border-radius: 12px;
  background: linear-gradient(145deg, #12a37a, #076a51);
  box-shadow: 0 8px 16px -8px rgba(7, 106, 81, 0.9);
}

.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-text strong {
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text small { font-size: 11.5px; color: var(--muted); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.pill-ok { background: #eafaf3; border-color: #c9eddf; color: var(--brand-dark); }
.pill-ok .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(18, 166, 124, 0.16); }
.pill-warn { background: var(--accent-soft); border-color: #ffe1b3; color: #966000; }
.pill-warn .dot { background: #efa11f; }
.pill-danger { background: var(--danger-soft); border-color: #f7cfcf; color: #ab3838; }
.pill-danger .dot { background: var(--danger); }
.dot--load { animation: pulse 1.2s ease-in-out infinite; }

/* ---------- Hero & identitas ---------- */

.identity-layout { display: block; }

.hero {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  padding: 26px 22px;
  border-radius: 26px;
  color: #fff;
  background: linear-gradient(135deg, #12a37a 0%, #0a8062 55%, #076a51 100%);
  box-shadow: 0 22px 44px -24px rgba(7, 106, 81, 0.75);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before { width: 230px; height: 230px; right: -80px; top: -100px; background: rgba(255, 255, 255, 0.1); }
.hero::after { width: 160px; height: 160px; right: 30px; bottom: -110px; background: rgba(255, 255, 255, 0.07); }

.hero-eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  margin: 14px 0 8px;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 780;
}

.hero p {
  position: relative;
  margin: 0;
  max-width: 46ch;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-steps {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
}
.hero-step i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-dark);
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.notice {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid #ffe1b3;
  background: var(--accent-soft);
  color: #8a5a00;
  font-size: 12.5px;
  line-height: 1.45;
}
.notice strong { color: #714900; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
}

.form-card {
  display: grid;
  gap: 17px;
  margin-top: 14px;
  padding: 18px;
}

.field { display: grid; gap: 8px; }

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 680;
}

.step-num {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; min-height: 38px; align-items: center; }

.chip {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, transform 0.12s;
}
.chip:hover { border-color: #b9dccd; color: var(--ink); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(15, 157, 118, 0.85);
}

.skeleton-chip {
  width: 66px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef6f1 25%, #e2f0e8 37%, #eef6f1 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.select-wrap { position: relative; }

select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 50px;
  padding: 0 42px 0 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 15px;
  font-weight: 550;
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s, background 0.16s;
  text-overflow: ellipsis;
}
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 157, 118, 0.13);
}
select:disabled { background: var(--surface-soft); color: var(--muted); cursor: not-allowed; }

.select-wrap::after {
  content: "";
  position: absolute;
  right: 17px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.hint { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.hint.center { text-align: center; }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 13px;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.alert-icon { flex: none; font-size: 14px; line-height: 1.3; }
.alert--warn { background: var(--accent-soft); border-color: #ffe3b8; color: #865700; }
.alert--error { background: var(--danger-soft); border-color: #f7d2d2; color: #a13737; }
.alert--ok { background: #eafaf3; border-color: #c9eddf; color: #0a6f53; }

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.link-btn {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(15, 157, 118, 0.35);
}
.link-btn:disabled { color: var(--muted); text-decoration-color: transparent; cursor: default; }
.link-btn:hover:not(:disabled) { text-decoration-color: currentColor; }

.footer-note {
  margin: 18px 4px 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 680;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.2s, background 0.2s, filter 0.2s, color 0.2s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, #0a8062, #076a51);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(7, 106, 81, 0.95);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.05); }
.btn-primary:disabled { background: #cfe6dc; color: #f6fffb; box-shadow: none; }

.btn-ghost { background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover:not(:disabled) { border-color: #c3e2d4; background: var(--surface-soft); }
.btn-ghost:disabled { color: #a9bdb5; }

.btn-soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn-soft:hover:not(:disabled) { background: #d3f2e5; }

.btn-block { width: 100%; height: 52px; font-size: 15.5px; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex: none;
}

.icon-btn {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  transition: background 0.16s, color 0.16s;
}
.icon-btn:hover { background: #e9f5ef; color: var(--ink); }

/* ---------- Katalog ---------- */

.userbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
.userbar .btn { margin-left: auto; }

.avatar {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8f5e9, #b4ead7);
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-meta strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 12.5px; color: var(--muted); }

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 22px 2px 12px;
}
.catalog-head h2 { margin: 0; font-size: 20px; letter-spacing: -0.015em; }
.catalog-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.search { position: relative; flex: 1; min-width: 190px; max-width: 310px; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 36px 0 38px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 13.5px;
  transition: border-color 0.16s, box-shadow 0.16s;
}
.search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 157, 118, 0.11);
}
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.search-clear:hover { background: #e9f5ef; color: var(--ink); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(18, 37, 30, 0.03);
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.18s;
}
.product:hover { border-color: #c8e7d9; box-shadow: 0 12px 26px -20px rgba(18, 37, 30, 0.6); }
.product.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 157, 118, 0.1), 0 14px 28px -22px rgba(15, 157, 118, 0.9);
}
.product.bump { animation: bump 0.32s ease; }

.product-top { display: flex; gap: 12px; min-width: 0; }

.thumb {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--tint, #eef7f2);
  font-size: 26px;
  line-height: 1;
  user-select: none;
}

.product-info { min-width: 0; flex: 1; }
.product h3 { margin: 0; font-size: 15px; font-weight: 720; line-height: 1.3; letter-spacing: -0.01em; }
.desc {
  margin: 3px 0 6px;
  font-size: 12.5px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.price { font-size: 16px; font-weight: 780; letter-spacing: -0.015em; white-space: nowrap; }
.price small { font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: 0; }

.stepper {
  display: flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface-soft);
  transition: background 0.16s, border-color 0.16s;
}
.product.is-selected .stepper { background: var(--brand-soft); border-color: #a9e3cd; }

.qty-btn {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-dark);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(18, 37, 30, 0.12);
  transition: background 0.14s, color 0.14s;
}
.qty-btn:not(:disabled):hover { background: var(--brand); color: #fff; }
.qty-btn:not(:disabled):active { transform: scale(0.92); }
.qty-btn:disabled { background: transparent; color: #b9cdc4; box-shadow: none; cursor: not-allowed; }

.qty-input {
  width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}
.qty-input:focus { outline: none; }

.subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
  transition: max-height 0.2s ease, opacity 0.2s ease;
}
.product.is-selected .subtotal { max-height: 24px; opacity: 1; }
.subtotal strong { color: var(--brand-dark); font-size: 12.5px; }

.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 38px 20px;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}
.empty-icon { font-size: 30px; margin-bottom: 4px; }
.empty strong { font-size: 14.5px; }
.empty p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- Bar total ---------- */

.bottombar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -24px rgba(18, 37, 30, 0.5);
}

/* Badge "Powered by Netlify" (paket Free) menutupi area kanan bawah.
   Saat badge ada, naikkan tombol dan beri ruang agar tidak tertutup. */
body:has(#nl-badge-frame) .bottombar {
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}
body:has(#nl-badge-frame) .app {
  padding-bottom: 200px;
}
body:has(#nl-badge-frame) .modal-foot,
body:has(#nl-badge-frame) .success-foot {
  padding-bottom: calc(82px + env(safe-area-inset-bottom));
}

.bb-inner {
  max-width: 948px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bb-total { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.bb-total span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bb-total strong {
  display: block;
  width: 100%;
  font-size: 19px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bb-total strong.pop { animation: pop 0.3s ease; }

.bb-inner .btn { flex: 0 1 300px; height: 46px; }

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 23, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}

.modal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  max-height: 92dvh;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-md);
  animation: sheetUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.modal-handle {
  width: 40px;
  height: 4px;
  flex: none;
  margin: 9px auto 0;
  border-radius: 999px;
  background: #dcebe4;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px 10px;
}
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.015em; }
.modal-head p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }

.modal-body {
  padding: 0 18px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.modal-foot .btn { flex: 1; }
.modal-foot .btn-primary { flex: 1.6; }

.buyer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}
.buyer .avatar { width: 38px; height: 38px; font-size: 14px; }

.summary-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
}
.summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 2px;
  border-bottom: 1px dashed var(--line);
}
.summary-item:last-child { border-bottom: 0; }
.si-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.si-name { font-size: 13.5px; font-weight: 650; }
.si-meta { font-size: 11.5px; color: var(--muted); }
.si-sub { font-size: 13.5px; font-weight: 720; white-space: nowrap; }

.sum-totals {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1.5px dashed var(--line);
  display: grid;
  gap: 7px;
}
.sum-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.sum-row.grand { margin-top: 2px; font-size: 14px; color: var(--ink); }
.sum-row.grand strong { font-size: 21px; letter-spacing: -0.02em; color: var(--brand-dark); font-variant-numeric: tabular-nums; }

#sendError { margin-top: 12px; }

/* ---------- Sukses ---------- */

.success-card { max-width: 420px; }
.success-body { overflow-y: auto; overscroll-behavior: contain; }
.success-head { padding: 22px 22px 6px; text-align: center; }

.check-ring {
  width: 74px;
  height: 74px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-soft);
  animation: pop 0.35s ease;
}
.check-ring svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.check-ring path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.5s 0.12s ease forwards;
}

.success-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.success-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }

.receipt {
  margin: 14px 18px 0;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}
.receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
}
.receipt-row:last-child { border-bottom: 0; }
.receipt-row strong { color: var(--ink); font-weight: 650; text-align: right; }
.receipt-row.total { padding-top: 12px; }
.receipt-row.total strong { color: var(--brand-dark); font-size: 19px; letter-spacing: -0.02em; }

.success-card .alert { margin: 12px 18px 0; }
.success-foot {
  display: flex;
  gap: 10px;
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.success-foot .btn { flex: 1; }
.success-foot .btn-primary { flex: 1.4; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 90;
  transform: translateX(-50%);
  max-width: min(92vw, 380px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(18, 37, 30, 0.94);
  color: #fff;
  font-size: 12.5px;
  font-weight: 550;
  text-align: center;
  box-shadow: 0 12px 30px -14px rgba(18, 37, 30, 0.8);
  animation: toastIn 0.24s ease;
}

/* ---------- Responsif ---------- */

@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
  .modal-card { border-radius: 24px; animation: dialogIn 0.24s cubic-bezier(0.22, 1, 0.36, 1); }
  .modal-handle { display: none; }
  .modal-head { padding-top: 18px; }
  .toast { bottom: 104px; }
}

@media (min-width: 880px) {
  .identity-layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 18px;
    align-items: stretch;
  }
  .hero { margin-top: 14px; padding: 32px 28px; display: flex; flex-direction: column; }
  .hero p { font-size: 14.5px; }
  .hero-steps { margin-top: auto; padding-top: 22px; }
  .form-card { margin-top: 14px; align-content: start; }
  .footer-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  select,
  .search input { font-size: 16px; }
  .qty-input { font-size: 16px; }
}

@media (max-width: 430px) {
  .hide-xs { display: none; }
  .app { padding-left: 14px; padding-right: 14px; }
  .topbar { margin: 0 -14px; padding: 10px 14px; }
  .brand-text small { display: none; }
  .hero { padding: 22px 18px; border-radius: 22px; }
  .hero h1 { font-size: 24px; }
  .form-card { padding: 16px; }
  .bb-total strong { font-size: 17px; }
  .bb-inner .btn { flex: 1; height: 44px; padding: 0 10px; font-size: 13px; }
  .bb-inner { gap: 8px; }
  .product-grid { grid-template-columns: 1fr; }
}

@media (max-width: 359px) {
  .brand-text strong { font-size: 13.5px; }
  .pill { font-size: 10.5px; padding: 5px 8px; }
  .bb-total span { display: none; }
}

@media (max-height: 620px) {
  .success-head { padding: 14px 18px 4px; }
  .check-ring { width: 58px; height: 58px; margin-bottom: 10px; }
  .check-ring svg { width: 28px; height: 28px; }
  .receipt { margin-top: 10px; padding: 2px 14px; }
  .receipt-row { padding: 7px 0; }
  .receipt-row.total { padding-top: 10px; }
  .success-foot { padding-top: 12px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Animasi ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
@keyframes dialogIn { from { transform: translateY(10px) scale(0.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translate(-50%, 8px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes bump { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.015); } }
@keyframes pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

netlify-badge {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
}
