/* ===== QPay Simple — base styles ===== */

:root {
  --color-brand: #4f46e5;
  --color-brand-dark: #4338ca;
  --color-brand-light: #eef2ff;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html {
  /* Anchor jump halus; dihormati reduced-motion di aturan di bawah. */
  scroll-behavior: smooth;
  /* Matikan flash biru default saat tap di mobile; diganti highlight brand halus di elemen interaktif. */
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  /* Guard overflow horizontal di mobile (mencegah scroll samping gara-gara
     satu elemen yang lebarnya overshoot). */
  overflow-x: hidden;
}
/* Body saat modal terbuka: lock scroll supaya background tidak ikut ter-scroll
   di iOS. Dipasang oleh Q.modal.lock() via class `.modal-open`. Style `top`
   dynamic di-inject JS untuk preserve scroll position. */
body.modal-open {
  position: fixed;
  left: 0; right: 0;
  width: 100%;
  overflow: hidden;
  touch-action: none;
}
img { display: block; max-width: 100%; }
a { color: var(--color-brand); text-decoration: none; -webkit-tap-highlight-color: rgba(79, 70, 229, 0.12); }
a:hover { text-decoration: underline; }
button, .btn, label, input, select, textarea { -webkit-tap-highlight-color: rgba(79, 70, 229, 0.12); }

h1, h2, h3, h4 { margin: 0; line-height: 1.25; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .05s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .25);
}

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

.btn-outline { background: #fff; color: var(--color-text); border-color: var(--color-border); }
.btn-outline:hover:not(:disabled) { background: #f1f5f9; }

.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-success { background: var(--color-success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-ghost { background: transparent; color: var(--color-text); }
.btn-ghost:hover:not(:disabled) { background: #f1f5f9; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Card ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 13px;
  color: var(--color-muted);
  font-weight: 500;
}
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 14px;
  color: var(--color-text);
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.input:disabled, .select:disabled { background: #f8fafc; color: #94a3b8; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
}
.textarea { resize: vertical; min-height: 90px; }
/* iOS Safari auto-zoom trigger di input < 16px — paksa 16px di mobile biar
   layout tidak melompat saat user tap input. Tidak dipakai di desktop supaya
   density form tetap rapat. */
@media (max-width: 640px) {
  .input, .select, .textarea { font-size: 16px; padding: 11px 12px; }
  .textarea { resize: none; }
  .qty-stepper input { font-size: 16px !important; }
  .copy-group input { font-size: 15px; }
  .voucher-group input { font-size: 16px; }
}

.form-grid { display: grid; gap: 12px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-paid      { background: #dcfce7; color: #166534; }
.badge-expired   { background: #e5e7eb; color: #374151; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: #111827;
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  animation: toast-in .2s ease;
  transition: opacity .25s, transform .25s;
}
.toast-out { opacity: 0; transform: translateY(-6px); }
.toast-success { background: #047857; }
.toast-error   { background: #b91c1c; }
.toast-warning { background: #b45309; }
@keyframes toast-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
  overflow-y: auto;
  animation: fade-in .15s ease;
}
.modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  animation: modal-in .2s ease;
}
.modal-box.wide { max-width: 560px; }
.modal-box.xl { max-width: 880px; max-height: calc(100vh - 40px); overflow-y: auto; }

/* ---------- Admin: Landing editor repeater ---------- */
.landing-group {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px;
  margin-top: 8px;
  background: #fafbfc;
}
.landing-group > summary {
  cursor: pointer;
  font-weight: 600;
  padding: 4px 0;
  user-select: none;
  list-style: none;
}
.landing-group > summary::-webkit-details-marker { display: none; }
.landing-group > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 8px;
  transition: transform .2s;
}
.landing-group[open] > summary::before { transform: rotate(90deg); }
.landing-group[open] > summary { margin-bottom: 12px; }
.repeater-item {
  border: 1px solid var(--color-border);
  background: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  display: grid;
  gap: 6px;
}
.repeater-item .row { display: grid; gap: 6px; grid-template-columns: auto 1fr auto; align-items: center; }
.repeater-item .row.grow { grid-template-columns: 1fr auto; }
.repeater-item input.input, .repeater-item textarea.textarea { margin: 0; }
.repeater-add {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 13px;
  background: #eef2ff; color: #4338ca;
  border: 1px dashed #c7d2fe; border-radius: 8px;
  cursor: pointer; font-weight: 600;
}
.repeater-add:hover { background: #e0e7ff; }
.repeater-remove {
  background: transparent; color: #dc2626; border: none;
  cursor: pointer; font-size: 18px; line-height: 1; padding: 4px 8px;
  border-radius: 6px;
}
.repeater-remove:hover { background: #fee2e2; }

/* ======= Multi-image uploader (admin) ======= */
.img-uploader {
  display: flex; flex-direction: column; gap: 10px;
}
.img-uploader-input { display: none; }
.img-uploader-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 18px 14px;
  border: 2px dashed #c7d2fe;
  background: #f5f7ff;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  user-select: none;
}
.img-uploader-drop:hover { background: #eef2ff; border-color: #a5b4fc; }
.img-uploader-drop.drop-active { background: #e0e7ff; border-color: #6366f1; transform: scale(1.01); }
.img-uploader-drop.loading { opacity: .7; pointer-events: none; }
.img-uploader-icon { font-size: 28px; line-height: 1; }
.img-uploader-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}
.img-uploader-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 10px;
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  background: #fafbff;
}
.img-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f1f5f9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  cursor: grab;
  transition: transform .1s, box-shadow .1s, border-color .1s;
}
.img-thumb:active { cursor: grabbing; }
.img-thumb.dragging { opacity: .5; }
.img-thumb.drop-over { border-color: #6366f1; box-shadow: 0 0 0 2px rgba(99,102,241,.35); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.img-thumb-remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px;
  background: rgba(15, 23, 42, .75); color: #fff;
  border: none; border-radius: 50%;
  font-size: 16px; line-height: 1;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .1s;
}
.img-thumb-remove:hover { background: #dc2626; transform: scale(1.08); }
.img-thumb-order {
  position: absolute; bottom: 4px; left: 4px;
  padding: 2px 6px; font-size: 10px; font-weight: 700;
  background: rgba(15, 23, 42, .75); color: #fff;
  border-radius: 6px;
}

/* ======= Description image stack (public product page) ======= */
.desc-images {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 14px;
}
.desc-img {
  margin: 0; padding: 0;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
}
.desc-img img {
  display: block; width: 100%; height: auto;
  object-fit: contain;
}
@media (min-width: 640px) {
  .desc-images { gap: 14px; }
  .desc-img { border-radius: 14px; }
}
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }
@keyframes modal-in {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Spinner ---------- */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
.spinner.dark {
  border-color: rgba(15, 23, 42, .2);
  border-top-color: var(--color-brand);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Skeleton ---------- */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 50%, #f1f5f9 100%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 640px;
}
.table th, .table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table th {
  font-weight: 600;
  color: var(--color-muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  position: sticky;
  top: 0;
  z-index: 1;
}
.table tbody tr:hover td { background: #fafbff; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: 6px; }

/* Admin daftar produk: tanpa scroll horizontal, link dipotong */
.table-wrap.table-wrap--fit {
  overflow-x: hidden;
}
.table.table-products {
  min-width: 0;
  table-layout: fixed;
}
.table-products th:nth-child(1),
.table-products td:nth-child(1) {
  width: 4.5rem;
}
.table-products th:nth-child(2),
.table-products td:nth-child(2) {
  width: 18%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.table-products th:nth-child(3),
.table-products td:nth-child(3) {
  width: 21%;
  overflow: hidden;
  vertical-align: middle;
}
.table-products th:nth-child(4),
.table-products td:nth-child(4) {
  width: 5.25rem;
}
.table-products th:nth-child(5),
.table-products td:nth-child(5) {
  width: 3rem;
}
.table-products th:nth-child(6),
.table-products td:nth-child(6) {
  width: 7rem;
}
.table-products th:nth-child(7),
.table-products td:nth-child(7) {
  width: 4.25rem;
}
.table-products th:nth-child(8),
.table-products td:nth-child(8) {
  width: 8.75rem;
}
.table-products .product-link-rows {
  display: grid;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.table-products .product-link-row {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}
.table-products .product-link-row > a.mono {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-products .product-link-row .btn {
  flex-shrink: 0;
}
.table-products .actions {
  min-width: 8.75rem;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a5b4fc;
  font-size: 32px;
  overflow: hidden;
}
.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .2s;
}
.product-card img.lazy { opacity: 0; }
.product-card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card .price {
  color: var(--color-brand);
  font-weight: 700;
  font-size: 16px;
}
.product-card .name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Admin shell ---------- */
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: #0f172a;
  color: #cbd5e1;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar h1 {
  color: #fff;
  font-size: 18px;
  margin: 0 0 20px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.admin-sidebar h1 .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, #15803d, #eab308);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px;
}
.admin-sidebar h1 .logo-img {
  width: 30px; height: 30px; border-radius: 8px;
  object-fit: contain; background: #fff; padding: 2px;
  flex: 0 0 30px;
}
.admin-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 500;
}
.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
  text-decoration: none;
}
.admin-sidebar nav a .nav-count {
  margin-left: auto;
  background: var(--color-danger);
  color: #fff;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
}
.admin-main {
  padding: 24px 28px;
  min-width: 0;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-header h2 { font-size: 22px; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: static;
    height: auto;
    padding: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .admin-sidebar h1 { width: 100%; margin-bottom: 10px; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
  .admin-sidebar nav a { padding: 8px 12px; flex: 1 1 auto; justify-content: center; }
  .admin-main { padding: 16px; }
}

/* ---------- Stat card ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.stat-grid.stat-grid--dashboard {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.stat {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}
.stat .label {
  color: var(--color-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  font-weight: 600;
}
.stat .value { font-size: 26px; font-weight: 700; margin-top: 6px; }
.stat .delta { font-size: 12px; margin-top: 4px; color: var(--color-muted); }
.stat-grid--dashboard .stat {
  min-width: 0;
  overflow: hidden;
}
.stat-grid--dashboard .stat .label {
  line-height: 1.35;
}
.stat-grid--dashboard .stat .value {
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stat-grid--dashboard .stat .delta {
  overflow-wrap: anywhere;
}

/* ---------- Payment / order UI ---------- */
.payment-option {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: #fff;
  align-items: center;
}
.payment-option:hover { background: #fafbff; }
.payment-option.active {
  border-color: var(--color-brand);
  background: var(--color-brand-light);
}
.payment-option input[type=radio] { accent-color: var(--color-brand); }

.bank-option {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  align-items: center;
  background: #fff;
}
.bank-option:hover { background: #fafbff; }
.bank-option.active {
  border-color: var(--color-brand);
  background: var(--color-brand-light);
}
.bank-option .bank-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bank-option .bank-logo--fallback {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.bank-option .bank-logo--image {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 6px;
}
.bank-option .bank-logo--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Logo bank — admin settings list (ukuran seragam) */
.bank-logo-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bank-logo-thumb--fallback {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.bank-logo-thumb--image {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 5px;
}
.bank-logo-thumb--image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Bank detail box on payment page */
.bank-detail {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
}
.bank-detail .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--color-border);
}
.bank-detail .row:last-child { border-bottom: none; }
.bank-detail .row .label {
  color: var(--color-muted);
  font-size: 13px;
}
.bank-detail .row .value {
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

/* ---------- QR box ---------- */
.qr-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.qr-box img {
  max-width: 280px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  border: 1px solid #e2e8f0;
  margin: 0 auto;
}

/* ---------- Empty state ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
}
.empty .icon { font-size: 44px; margin-bottom: 8px; }

/* ---------- Utility ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.text-muted { color: var(--color-muted); }
.text-small { font-size: 12px; }
.hide-mobile { display: initial; }
@media (max-width: 640px) {
  .hide-mobile { display: none; }
}

/* ---------- Autocomplete ---------- */
.autocomplete {
  position: relative;
}
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  display: none;
}
.autocomplete-list.show { display: block; }
.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  transition: background .1s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.active { background: var(--color-brand-light); }
.autocomplete-item .primary { font-weight: 600; }
.autocomplete-item .secondary { font-size: 12px; color: var(--color-muted); margin-top: 2px; }
.autocomplete-empty {
  padding: 14px;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
}
.input.error { border-color: #dc2626 !important; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }

/* ---------- Promo banner (orderan pertama) ---------- */
.promo-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 50%, #ec4899 100%);
  color: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.25);
  animation: promoPulse 2.4s ease-in-out infinite;
}
.promo-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,0.25), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(255,255,255,0.18), transparent 40%);
  pointer-events: none;
}
.promo-confetti {
  font-size: 36px;
  animation: confettiSpin 3s ease-in-out infinite;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.promo-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.promo-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 2px;
}
.promo-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}
.promo-accent {
  display: inline-block;
  background: #fff;
  color: #dc2626;
  padding: 0 6px;
  border-radius: 4px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.promo-desc {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
  opacity: 0.95;
}
.promo-badge {
  flex-shrink: 0;
  background: #fff;
  color: #dc2626;
  text-align: center;
  padding: 8px 10px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  transform: rotate(-6deg);
  position: relative;
  z-index: 1;
}
.promo-badge span { font-size: 9px; font-weight: 700; letter-spacing: 0.05em; }

@keyframes promoPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(236, 72, 153, 0.25); }
  50%      { box-shadow: 0 12px 32px rgba(236, 72, 153, 0.45); }
}
@keyframes confettiSpin {
  0%   { transform: rotate(-10deg) scale(1); }
  50%  { transform: rotate(10deg) scale(1.15); }
  100% { transform: rotate(-10deg) scale(1); }
}

@media (max-width: 480px) {
  .promo-banner { padding: 14px; gap: 10px; }
  .promo-title { font-size: 16px; }
  .promo-confetti { font-size: 28px; }
  .promo-badge { font-size: 16px; padding: 6px 8px; }
}

/* ---------- Checkout / mobile polish ---------- */
.page-topbar {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-topbar .back {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--color-text);
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
}
.page-topbar .back:hover { background: #f1f5f9; }
.page-topbar .title { font-weight: 600; font-size: 16px; }

.page-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}
@media (min-width: 640px) { .page-container { padding: 24px; } }

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin: 0 0 10px;
}

.sticky-bottom-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: 12px 16px;
  z-index: 10;
  box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.04);
}
@media (min-width: 640px) {
  .sticky-bottom-bar { border-radius: var(--radius); border: 1px solid var(--color-border); position: static; box-shadow: none; margin-top: 16px; }
}

/* Button xl for main CTA */
.btn-xl { padding: 14px 20px; font-size: 15px; }

/* Qty stepper */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff;
}
.qty-stepper button {
  width: 40px; height: 40px;
  border: none;
  background: #f8fafc;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-text);
}
.qty-stepper button:hover:not(:disabled) { background: #e2e8f0; }
.qty-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.qty-stepper input {
  width: 56px;
  height: 40px;
  border: none;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
.qty-stepper input:focus { outline: none; }

/* Copy input group */
.copy-group {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.copy-group input {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f8fafc;
  cursor: text;
  user-select: all;
}

/* Storefront hero */
.hero {
  background: linear-gradient(135deg, #eef2ff, #fafbff);
  padding: 48px 24px 28px;
  border-bottom: 1px solid var(--color-border);
}
.hero h1 {
  font-size: clamp(24px, 4vw, 34px);
  margin-bottom: 8px;
}
.hero .sub { color: var(--color-muted); margin-bottom: 20px; }

/* ================================================
   LANDING PAGE (product.html)
   ================================================ */
.page-container.landing {
  padding: 0 0 calc(90px + env(safe-area-inset-bottom, 0px));
  max-width: 960px;
}
@media (min-width: 640px) {
  .page-container.landing { padding: 16px 20px calc(100px + env(safe-area-inset-bottom, 0px)); }
}

/* Urgency marquee */
.urgency-bar {
  background: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b);
  background-size: 200% 100%;
  color: #fff; font-weight: 700; font-size: 13px;
  padding: 8px 0;
  overflow: hidden; position: relative;
  animation: urgency-gradient 4s linear infinite;
}
.urgency-track {
  display: flex; gap: 40px;
  white-space: nowrap;
  animation: urgency-scroll 22s linear infinite;
  width: max-content;
}
.urgency-track span { padding: 0 20px; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
@keyframes urgency-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes urgency-gradient {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Hero section */
.lp-hero {
  background: #fff;
  padding: 16px;
}
@media (min-width: 640px) {
  .lp-hero { padding: 20px; border-radius: var(--radius); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
}
.lp-hero-grid { display: grid; gap: 20px; }
@media (min-width: 860px) {
  .lp-hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 28px; align-items: start;
  }
}

/* Gallery */
.hero-gallery { display: flex; flex-direction: column; gap: 10px; }
.hero-main {
  position: relative; aspect-ratio: 1/1; background: #f1f5f9;
  border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 860px) {
  .hero-main { max-height: 520px; }
  .hero-main.placeholder { aspect-ratio: auto; height: 420px; }
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-main.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  font-size: 16px;
  line-height: 1.4;
}
.hero-main.placeholder .ph-inner {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: #6366f1; padding: 24px;
  max-width: 80%;
}
.hero-main.placeholder .ph-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  background: rgba(255, 255, 255, .6);
  border-radius: 50%;
  font-size: 44px !important;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .18);
}
.hero-main.placeholder .ph-label {
  font-weight: 600 !important;
  font-size: 13px !important;
  line-height: 1.35 !important;
  text-align: center;
  color: #64748b;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.hero-badge {
  position: absolute; top: 12px; left: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: .5px; padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(239, 68, 68, .35);
  text-transform: uppercase;
}
.hero-discount {
  position: absolute; top: 12px; right: 12px;
  background: #dc2626; color: #fff;
  font-weight: 800; font-size: 16px;
  padding: 8px 14px; border-radius: 10px;
  box-shadow: 0 4px 12px rgba(220, 38, 38, .4);
  transform: rotate(-4deg);
}
.hero-thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
}
.hero-thumb {
  aspect-ratio: 1/1; padding: 0; border: 2px solid transparent;
  background: #f1f5f9; border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.hero-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hero-thumb:hover { transform: translateY(-2px); }
.hero-thumb.active { border-color: var(--color-brand); }

/* Hero info */
.lp-hero-info { display: flex; flex-direction: column; }
.hero-cat-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.hero-title {
  font-size: clamp(20px, 4vw, 28px);
  line-height: 1.25;
  margin: 4px 0 6px;
  font-weight: 800;
  color: #0f172a;
}
.hero-tagline {
  font-size: 15px; color: #475569; margin: 0 0 12px; line-height: 1.5;
}

.social-proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fef9c3, #fef3c7);
  border: 1px solid #fde68a;
  border-radius: 12px; font-size: 13px; color: #713f12;
  margin-bottom: 14px;
  line-height: 1.4;
}
.social-proof > span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rating-stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; margin-right: 4px; }
.rating-num { font-weight: 700; color: #92400e; }
.proof-sold strong { color: #166534; }
.proof-live {
  color: #047857;
}
.proof-live::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
  animation: pulse-dot 1.8s ease-out infinite;
  margin-right: 2px;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); }
  100% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.price-block { margin: 6px 0 14px; }
.price-old {
  font-size: 15px; color: #94a3b8; text-decoration: line-through;
  margin-bottom: 2px;
}
.price-main {
  font-size: 30px; font-weight: 800; color: #4f46e5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  line-height: 1.1;
}
.price-save {
  background: #dcfce7; color: #166534;
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  letter-spacing: .3px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 4px;
  width: 100%;
  min-width: 0;
}
.trust-badge {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start;
  gap: 4px; padding: 10px 6px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-align: center;
  min-height: 78px;
  min-width: 0;
  overflow: hidden;
  transition: transform .15s, box-shadow .15s;
}
.trust-badge:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.trust-ic {
  font-size: 22px !important;
  line-height: 1;
  margin-bottom: 2px;
}
.trust-badge strong {
  display: block !important;
  color: #0f172a;
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1.2;
  width: 100%;
  text-align: center;
}
.trust-badge small {
  display: block;
  color: #64748b;
  font-size: 10.5px !important;
  line-height: 1.3;
  font-weight: 500;
  width: 100%;
  text-align: center;
}
@media (max-width: 360px) {
  .trust-badge { padding: 8px 4px; min-height: 72px; }
  .trust-ic { font-size: 20px !important; }
  .trust-badge strong { font-size: 11px !important; }
  .trust-badge small { font-size: 10px !important; }
}

.hero-cta-row { display: flex; gap: 8px; margin: 4px 0 12px; }

/* Sections */
.lp-section {
  background: #fff;
  padding: 18px 16px;
  margin-top: 14px;
}
@media (min-width: 640px) {
  .lp-section { padding: 24px; border-radius: var(--radius); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
}
.lp-h2 {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 800; color: #0f172a;
  margin: 0 0 14px;
  line-height: 1.3;
}

/* Benefits */
.benefits-list {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 10px;
}
.benefits-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  color: #14532d; font-size: 14px; line-height: 1.5;
}
.benefits-list .bullet {
  flex-shrink: 0; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #16a34a; color: #fff;
  border-radius: 50%; font-size: 13px; font-weight: 800;
}

/* Features */
.features-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 520px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  padding: 16px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
}
.feature-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  border-radius: 12px; font-size: 22px; margin-bottom: 10px;
}
.feature-title { font-weight: 700; color: #0f172a; margin-bottom: 4px; font-size: 15px; }
.feature-desc { color: #475569; font-size: 13px; line-height: 1.55; }

/* Extra gallery strip (horizontal scroll) */
.gallery-strip {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery-strip img {
  flex: 0 0 auto;
  width: 200px; aspect-ratio: 1/1; object-fit: cover;
  border-radius: 12px; background: #f1f5f9;
  scroll-snap-align: start;
}
@media (min-width: 640px) { .gallery-strip img { width: 240px; } }

/* Reviews */
.review-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 520px) { .review-grid { grid-template-columns: 1fr 1fr; } }
.review-card {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute; top: 0; right: 12px;
  font-size: 60px; line-height: 1; color: #e0e7ff;
  font-family: Georgia, serif;
}
.review-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  object-fit: cover; background: #eef2ff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #4338ca;
}
.review-avatar.placeholder { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.review-name { font-weight: 700; color: #0f172a; font-size: 14px; }
.review-meta { color: #64748b; font-size: 12px; }
.review-stars { margin-left: auto; color: #f59e0b; letter-spacing: 1px; font-size: 14px; }
.review-text { color: #334155; font-size: 14px; line-height: 1.6; }
.review-summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 10px;
}
.review-empty {
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
}
.review-empty .icon { font-size: 26px; margin-bottom: 6px; }
.review-submit-card { padding: 16px; }
.field-help { font-size: 12px; color: #64748b; margin-top: 4px; }
.review-trust-note {
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: #334155;
}
.rating-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 6px 8px;
}
.rating-picker button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: #cbd5e1;
  padding: 0 2px;
}
.rating-picker button.active { color: #f59e0b; }
.rating-picker button:hover { transform: translateY(-1px); }

.product-desc {
  color: #334155; line-height: 1.7; font-size: 14px; margin: 0;
  white-space: pre-wrap;
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer; user-select: none;
  padding: 14px 16px;
  font-weight: 600; color: #0f172a;
  display: flex; align-items: center; justify-content: space-between;
  list-style: none;
  font-size: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 22px; font-weight: 400; color: #64748b;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 16px 14px;
  color: #475569; line-height: 1.6; font-size: 14px;
  white-space: pre-wrap;
}

/* Final CTA */
.final-cta {
  background: linear-gradient(135deg, #eef2ff, #fef3c7) !important;
  border: 2px solid #c7d2fe !important;
}

/* Sticky bar inner layout */
.sticky-bar-inner {
  display: flex; gap: 10px; align-items: center;
  max-width: 720px; margin: 0 auto;
  flex-wrap: nowrap;
}
.sticky-price {
  display: flex; flex-direction: column; flex-shrink: 0;
  min-width: 90px; line-height: 1.1;
}
.sticky-bottom-bar .qty-stepper { flex-shrink: 0; }
.sticky-bottom-bar .btn { flex: 1; min-width: 0; white-space: nowrap; }
@media (max-width: 520px) {
  .sticky-bar-inner { gap: 8px; }
  .sticky-price { min-width: 74px; }
  .sticky-price > div:first-child { font-size: 15px !important; }
  .sticky-bottom-bar .qty-stepper button { width: 36px; height: 36px; }
  .sticky-bottom-bar .qty-stepper input { width: 40px; height: 36px; font-size: 14px; }
  .sticky-bottom-bar .btn-xl { padding: 10px 12px; font-size: 14px; }
}
@media (max-width: 360px) {
  .sticky-price > div:not(:first-child) { display: none; }
}

/* Force sticky bottom bar to stay sticky even on large screens for landing */
body:has(.page-container.landing) .sticky-bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  border-radius: 0; border: none;
  border-top: 1px solid var(--color-border);
  margin-top: 0;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
  z-index: 50;
  background: #fff;
}

/* ================================================
   Shared conversion components (CS FAB, ticker, tier)
   ================================================ */

/* Floating WhatsApp CS button */
.qpay-cs-fab {
  position: fixed; right: 16px;
  /* Angkat FAB di atas sticky bottom bar (~90px) + safe-area iOS. Kalau sticky
     bar tidak ada (mis. halaman info), posisi dasar tetap 16px. */
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, .4);
  z-index: 80;
  transition: transform .15s, box-shadow .15s;
  text-decoration: none;
}
.qpay-cs-fab:hover { transform: scale(1.08); box-shadow: 0 10px 24px rgba(37, 211, 102, .5); text-decoration: none; }
.qpay-cs-fab .qpay-cs-dot {
  position: absolute; top: 2px; right: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #ef4444; border: 2px solid #fff;
  animation: cs-pulse 1.8s ease-out infinite;
}
@keyframes cs-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); }
  100% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}
/* Beri margin ekstra kalau ada sticky bottom bar */
body:has(.sticky-bottom-bar) .qpay-cs-fab { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) {
  body:not(:has(.page-container.landing)) .qpay-cs-fab { bottom: 16px; }
}

/* Social proof ticker */
.qpay-ticker {
  position: fixed; left: 12px; bottom: 16px;
  max-width: 300px; min-width: 240px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .15);
  padding: 10px 28px 10px 12px;
  display: none;
  align-items: center; gap: 10px;
  z-index: 70;
  animation: ticker-in .35s ease;
}
.qpay-ticker.show { display: flex; }
.qpay-ticker-icon { font-size: 22px; flex-shrink: 0; }
.qpay-ticker-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.35; }
.qpay-ticker-name { color: #0f172a; }
.qpay-ticker-product { color: #475569; }
.qpay-ticker-product span { font-weight: 600; color: #4f46e5; }
.qpay-ticker-time { color: #94a3b8; font-size: 11px; margin-top: 2px; }
.qpay-ticker-close {
  position: absolute; top: 6px; right: 8px;
  background: transparent; border: none; color: #94a3b8;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.qpay-ticker-close:hover { color: #0f172a; }
body:has(.qpay-cs-fab) .qpay-ticker { bottom: 86px; }
body:has(.sticky-bottom-bar) .qpay-ticker { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
body:has(.qpay-cs-fab):has(.sticky-bottom-bar) .qpay-ticker { bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
@keyframes ticker-in {
  from { transform: translateY(12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Bundle / tier pricing cards */
.tier-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 12px 0 4px;
}
.tier-card {
  position: relative;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 10px 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, transform .1s, box-shadow .15s;
}
.tier-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tier-card.active {
  border-color: var(--color-brand);
  background: var(--color-brand-light);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.tier-card.popular { border-color: #f59e0b; }
.tier-card.popular.active { border-color: #ef4444; }
.tier-card .tier-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff;
  font-size: 10px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 999px;
  text-transform: uppercase; white-space: nowrap;
}
.tier-card .tier-qty { font-size: 22px; font-weight: 800; color: #0f172a; }
.tier-card .tier-qty span { font-size: 12px; font-weight: 600; color: #64748b; margin-left: 2px; }
.tier-card .tier-price { color: var(--color-brand); font-weight: 700; font-size: 15px; margin-top: 4px; }
.tier-card .tier-save {
  font-size: 11px; color: #16a34a; font-weight: 700; margin-top: 2px;
}
.tier-card .tier-unit { font-size: 11px; color: #94a3b8; margin-top: 2px; }

/* Checkout stepper */
.stepper {
  display: flex; align-items: center; gap: 4px;
  background: #fff; padding: 12px 14px;
  border: 1px solid var(--color-border); border-radius: 12px;
  margin-bottom: 14px;
  overflow-x: auto;
}
.stepper .step {
  display: flex; align-items: center; gap: 8px;
  color: #94a3b8; font-size: 13px; font-weight: 600;
  white-space: nowrap;
}
.stepper .step.done, .stepper .step.active { color: #0f172a; }
.stepper .step .idx {
  width: 24px; height: 24px; border-radius: 50%;
  background: #e2e8f0; color: #64748b;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.stepper .step.done .idx { background: #16a34a; color: #fff; }
.stepper .step.active .idx { background: var(--color-brand); color: #fff; }
.stepper .connector {
  flex: 1; height: 2px; background: #e2e8f0; border-radius: 2px;
  min-width: 20px;
}
.stepper .step.done + .connector { background: #16a34a; }

/* Voucher input group */
.voucher-group {
  display: flex; gap: 8px; align-items: stretch;
  background: #f8fafc; border: 1px dashed #c7d2fe;
  border-radius: 10px; padding: 4px;
}
.voucher-group input {
  flex: 1; border: none; background: transparent;
  padding: 10px 12px; font-size: 14px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: #0f172a; font-family: inherit;
}
.voucher-group input:focus { outline: none; }
.voucher-group button { flex-shrink: 0; }
.voucher-msg { font-size: 12px; margin-top: 6px; min-height: 16px; }
.voucher-msg.is-ok { color: #166534; }
.voucher-msg.is-err { color: #b91c1c; }

/* Stock urgency banner */
.stock-urgency {
  background: linear-gradient(135deg, #fef3c7, #fee2e2);
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.stock-urgency .sb-ic { font-size: 18px; animation: confettiSpin 1.4s ease-in-out infinite; }
.stock-urgency-bar {
  height: 6px; background: #fee2e2; border-radius: 999px; overflow: hidden; margin-top: 6px;
}
.stock-urgency-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width .35s ease;
}

/* ===========================================================
   Global footer (trust + business info)
   =========================================================== */
.qpay-footer {
  background: linear-gradient(180deg, #fafbff, #f1f5f9);
  border-top: 1px solid #e2e8f0;
  margin-top: 48px;
  padding: 40px 20px 24px;
  color: #334155;
  font-size: 14px;
}
.qpay-footer-inner { max-width: 1200px; margin: 0 auto; }
.qpay-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.qpay-footer-col h4 {
  font-size: 13px; font-weight: 700; color: #0f172a;
  text-transform: uppercase; letter-spacing: .5px;
  margin: 0 0 12px;
}
.qpay-footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.qpay-footer-col a { color: #475569; text-decoration: none; transition: color .15s; }
.qpay-footer-col a:hover { color: #4f46e5; text-decoration: none; }
.qpay-footer-brand .qpay-footer-logo {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
}
.qpay-footer-logo-img {
  width: 40px; height: 40px; border-radius: 10px;
  object-fit: contain; background: #fff; padding: 2px;
  flex: 0 0 40px;
}
.qpay-footer-logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #15803d, #eab308);
  color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.qpay-footer-brand strong { font-size: 17px; color: #0f172a; }
.qpay-footer-tagline {
  margin: 0 0 14px; line-height: 1.55; color: #64748b;
  max-width: 360px;
}
.qpay-footer-socials { display: flex; gap: 8px; }
.qpay-footer-socials a {
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; border: 1px solid #e2e8f0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #475569;
}
.qpay-footer-socials a:hover { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.qpay-footer-trust {
  display: flex; flex-wrap: wrap; gap: 10px;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 16px;
}
.qpay-footer-trust-item {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #0f172a;
}
.qpay-footer-bottom {
  text-align: center; color: #94a3b8; font-size: 12.5px; line-height: 1.6;
}
.qpay-footer-bottom strong { color: #475569; }

@media (max-width: 780px) {
  .qpay-footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .qpay-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .qpay-footer { padding: 28px 16px 20px; }
  .qpay-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .qpay-footer-trust { justify-content: center; }
}

/* ===========================================================
   Topbar WA quick access
   =========================================================== */
.qpay-topbar-wa {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: #25D366; color: #fff !important;
  font-size: 13px; font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(37, 211, 102, .3);
  transition: transform .1s;
}
.qpay-topbar-wa:hover { transform: translateY(-1px); }
.qpay-topbar-wa-ic { font-size: 14px; line-height: 1; }
@media (max-width: 480px) {
  .qpay-topbar-wa-txt { display: none; }
  .qpay-topbar-wa { padding: 7px 10px; }
}

/* ===========================================================
   Homepage trust strip & mini stats
   =========================================================== */
.home-trust-strip {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.home-trust-strip .tbadge {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.home-trust-strip .tbadge .ic {
  font-size: 22px; flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 10px;
  background: #eef2ff; color: #4338ca;
  display: inline-flex; align-items: center; justify-content: center;
}
.home-trust-strip .tbadge .tt strong { display: block; color: #0f172a; font-size: 13.5px; line-height: 1.25; }
.home-trust-strip .tbadge .tt small  { display: block; color: #64748b; font-size: 11.5px; margin-top: 1px; }

.home-stats {
  max-width: 1200px; margin: 0 auto 20px;
  padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 14px 28px;
  justify-content: center; align-items: center;
  color: #475569; font-size: 13px;
}
.home-stats .sep { color: #cbd5e1; }
.home-stats b { color: #0f172a; font-weight: 700; }

/* ===========================================================
   Checkout reassurance blocks
   =========================================================== */
.checkout-reassure-list {
  display: grid; gap: 6px; margin: 10px 0 0;
  font-size: 12.5px; color: #475569;
}
.checkout-reassure-list li {
  list-style: none;
  display: flex; align-items: flex-start; gap: 6px;
}
.checkout-reassure-list li::before { content: '✓'; color: #16a34a; font-weight: 700; }
.submit-trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  justify-content: center; align-items: center;
  padding: 10px 12px;
  font-size: 12px; color: #64748b;
  text-align: center;
}
.submit-trust-row b { color: #0f172a; }

/* ===========================================================
   Payment help card
   =========================================================== */
.pay-help-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #ecfeff, #eef2ff);
  border: 1px solid #c7d2fe;
  border-radius: 14px;
  padding: 16px 18px;
}
.pay-help-card h3 { margin: 0 0 6px; color: #312e81; font-size: 15px; }
.pay-help-card p  { margin: 0 0 12px; color: #475569; font-size: 13px; line-height: 1.5; }
.pay-help-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pay-help-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 16px; border-radius: 10px;
  background: #25D366; color: #fff !important;
  font-weight: 700; font-size: 13.5px;
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(37, 211, 102, .3);
}
.pay-help-cta.secondary { background: #fff; color: #312e81 !important; border: 1px solid #c7d2fe; box-shadow: none; }
.pay-help-faq details { margin-top: 6px; border-top: 1px dashed #c7d2fe; padding-top: 8px; }
.pay-help-faq details:first-of-type { border-top: 0; padding-top: 0; }
.pay-help-faq summary { cursor: pointer; font-weight: 600; color: #312e81; font-size: 13px; padding: 6px 0; list-style: none; }
.pay-help-faq summary::-webkit-details-marker { display: none; }
.pay-help-faq summary::before { content: '▸ '; color: #6366f1; }
.pay-help-faq[data-open] summary::before,
.pay-help-faq details[open] summary::before { content: '▾ '; }
.pay-help-faq .ans { padding: 0 0 8px; color: #475569; font-size: 12.5px; line-height: 1.55; }

/* ===========================================================
   Static info pages (/info/*.html)
   =========================================================== */
.info-page {
  max-width: 760px; margin: 0 auto; padding: 32px 20px 40px;
}
.info-page h1 {
  font-size: 28px; color: #0f172a; margin: 0 0 12px;
  letter-spacing: -.3px;
}
.info-page .info-sub { color: #64748b; margin: 0 0 24px; font-size: 14px; }
.info-page .info-body {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 24px 26px; line-height: 1.7; color: #334155; font-size: 15px;
}
.info-page .info-body p      { margin: 0 0 14px; }
.info-page .info-body p:last-child { margin-bottom: 0; }
.info-page .info-body strong { color: #0f172a; }
.info-page .info-body ul     { padding-left: 20px; margin: 0 0 14px; }
.info-page .info-body h2     { font-size: 18px; color: #0f172a; margin: 18px 0 10px; }
.info-page .info-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px;
}
.info-page .info-nav a {
  padding: 7px 12px; border-radius: 999px;
  background: #fff; border: 1px solid #e2e8f0;
  color: #475569; font-size: 13px; text-decoration: none;
}
.info-page .info-nav a.active, .info-page .info-nav a:hover {
  background: #4f46e5; color: #fff; border-color: #4f46e5;
}

/* ===========================================================
   Mobile optimization batch (M1–M18)
   — kumpulan fix yang dipakai lintas halaman publik
   =========================================================== */

/* M3/M4: Safe-area padding untuk sticky bottom bar (iOS home indicator).
   Juga tambahkan extra space supaya footer global tidak ketutup sticky bar
   saat bar dalam mode fixed (landing page). */
.sticky-bottom-bar {
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Landing page pakai sticky bar yang fixed → footer global harus geser
   ke atas supaya copyright/link legal kelihatan semua saat user scroll
   sampai bawah. Nilai 100px = tinggi bar (±68px) + margin nafas. */
body:has(.page-container.landing) .qpay-footer {
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
}

/* M2: Naikkan FAB lebih tinggi saat sticky bar fixed (landing page),
   supaya tidak menindih tombol "Beli Sekarang". Default tetap 16px untuk
   halaman biasa. */
body:has(.page-container.landing) .qpay-cs-fab,
body:has(.sticky-bar-fixed) .qpay-cs-fab {
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}

/* M6: Target sentuh minimum 44×44 di perangkat touch — sesuai Apple HIG
   & Material tap-target spec. Tidak dipaksa di desktop karena tetris-layout
   admin density-nya tinggi. */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; padding: 8px 14px; }
  .qty-stepper button { width: 44px; height: 44px; font-size: 20px; }
  .qty-stepper input { height: 44px; width: 60px; }
  .pagination button, .pagination .page { min-height: 40px; min-width: 40px; }
  /* Pastikan anchor-link yang dipakai sebagai CTA cukup besar. */
  .info-nav a { padding: 9px 14px; }
  .badge { padding: 5px 10px; }
}

/* Override qty-stepper di sticky bar sempit: tetap tappable tapi tidak menggigit
   ruang CTA. */
@media (max-width: 520px) and (pointer: coarse) {
  .sticky-bottom-bar .qty-stepper button { width: 40px; height: 40px; font-size: 18px; }
  .sticky-bottom-bar .qty-stepper input  { width: 44px; height: 40px; font-size: 16px; }
}

/* M7: Toast — pindah ke atas-tengah di mobile biar tidak saling tindih dengan
   tombol "Chat CS" di topbar. Lebar full width untuk keterbacaan. */
@media (max-width: 640px) {
  .toast-host {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
    align-items: stretch;
  }
  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
    font-size: 14px;
    text-align: center;
  }
}

/* M11: Page topbar — jaga supaya di layar sempit tidak pecah dan title
   tetap terbaca meski ada tombol back + CS di kanan. */
.page-topbar { gap: 10px; flex-wrap: nowrap; }
.page-topbar .title, .page-topbar h2 {
  min-width: 0; flex: 1 1 auto;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 360px) {
  .qpay-topbar-wa-txt { display: none; }
  .page-topbar { padding: 10px 12px; }
}

/* M12: Stabilkan aspect ratio product-card thumb supaya Core Web Vitals (CLS)
   aman — tidak ada layout shift saat gambar async load. */
.product-card .thumb {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: #f8fafc;
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* M3b: Home stats / trust strip padding-bottom saat di landing body utk
   keterbacaan, sudah diatur di .home-stats margin sendiri. No-op, cukup catat. */

/* M8: Hormati user yang pilih "reduce motion" di OS. Matikan animasi dekoratif
   yang bisa memicu motion-sickness. Fungsional animation (spinner, toast)
   tetap jalan tapi pendek. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  /* Nonaktifkan marquee, ticker, urgency scroll sama sekali. */
  .urgency-track,
  .stock-urgency .sb-ic,
  .qpay-ticker-card { animation: none !important; }
  .qpay-ticker-card { transform: none !important; }
}

/* Homepage topbar — inline style sebelumnya terlalu panjang dan tidak responsif.
   Dipecah ke class supaya bisa dioverride di mobile. */
.home-topbar {
  position: sticky; top: 0; z-index: 10;
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
}
.home-topbar-brand {
  display: flex; align-items: center; gap: 6px;
  color: inherit; text-decoration: none;
  min-width: 0;
}
.home-topbar-brand strong { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-topbar-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #15803d, #eab308);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex: 0 0 34px;
}
.home-topbar-logo-img {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px; object-fit: contain;
  background: #fff;
}
@media (max-width: 420px) {
  .home-topbar { padding: 10px 14px; }
  .home-topbar-brand strong { font-size: 16px; }
  .home-topbar-logo-img { width: 36px; height: 36px; flex-basis: 36px; }
}

/* Hero durian illustration (home). Subtle float + drop-shadow agar terasa premium. */
.hero-durian {
  display: block;
  width: 160px; height: 160px;
  margin: 0 auto 12px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(21, 128, 61, .25));
  animation: heroDurianFloat 4.5s ease-in-out infinite;
}
@keyframes heroDurianFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (max-width: 640px) {
  .hero-durian { width: 120px; height: 120px; margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-durian { animation: none; }
}

/* M10 bonus: Safe-area lateral untuk iPhone landscape (iOS notch di sisi).
   Hanya diterapkan jika safe-area insetnya > 0 (ditambah ke padding existing),
   jadi tidak mengubah layout di device biasa. */
@supports (padding: max(0px)) {
  .page-topbar {
    padding-left:  max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .sticky-bottom-bar {
    padding-left:  max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .qpay-cs-fab {
    right: max(16px, env(safe-area-inset-right, 0px));
  }
}

