/*
 * Halaman pembeli Order Online — token yang sama dengan pos/DESIGN.md: flat, kanvas slate
 * sangat terang, permukaan putih bergaris rambut, satu aksen emerald, Archivo berangka
 * tabular. Patokan HP portrait; layar lebar menyesuaikan (kolom 640 di tengah).
 */
@font-face { font-family: Archivo; src: url(/archivo-400.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: Archivo; src: url(/archivo-600.ttf) format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: Archivo; src: url(/archivo-700.ttf) format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --canvas: #F8FAFC; --surface: #FFFFFF; --ink: #0F172A; --body: #64748B; --muted: #94A3B8;
  --hairline: #E2E8F0; --outline: #8391A7; --disabled: #F1F5F9;
  --primary: #059669; --primary-pressed: #047857; --primary-dark: #065F46; --primary-soft: #ECFDF5;
  --primary-border: #A7F3D0; --primary-text: #047857; --focus: #6EE7B7;
  --danger: #DC2626; --danger-soft: #FEF2F2; --warning: #B45309; --warning-soft: #FFFBEB;
  --info: #0369A1; --info-soft: #F0F9FF;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 15px/22px Archivo, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}
button, input, textarea, select { font: inherit; color: inherit; }
/* Tanpa zoom (masukan pemilik 2026-10-12): ketuk dua kali tidak memperbesar halaman
   (`manipulation` = geser dan cubit saja; cubit ditolak meta viewport), dan isian ketik
   minimal 16 px supaya Safari iOS tidak memperbesar saat isian disentuh. Ganti ruginya
   aksesibilitas — lihat catatan di index.html. */
html, body, a, button, label, input, select, textarea, summary, .sheet, .sheet-bg { touch-action: manipulation; }
input:not([type="radio"]):not([type="checkbox"]), select, textarea { font-size: 16px; }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.page { max-width: 640px; margin: 0 auto; min-height: 100dvh; background: var(--canvas); padding-bottom: 104px; }
.loading { min-height: 60dvh; display: grid; place-items: center; gap: 12px; color: var(--body); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--primary-border); border-top-color: var(--primary); border-radius: 50%; animation: putar .8s linear infinite; display: block; margin: 0 auto 8px; }
@keyframes putar { to { transform: rotate(1turn); } }

/* --- Kepala toko --- */
.store { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 20px 16px 16px; }
.store__name { font-size: 24px; line-height: 30px; font-weight: 700; letter-spacing: -0.4px; }
.store__meta { color: var(--body); margin-top: 4px; font-size: 14px; }
.store__row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.store__desc { color: var(--ink); margin-top: 6px; font-size: 15px; line-height: 21px; }
/* Toko bergambar: sampul 3:1 rata tepi, logo bulat menumpuk di tepi bawahnya. */
.store--brand { padding-top: 0; }
.store__cover { margin: 0 -16px; aspect-ratio: 3 / 1; overflow: hidden; }
.store__cover img { width: 100%; height: 100%; object-fit: cover; }
/* Tanpa sampul: pita lebih pendek berwarna tema dengan pola titik halus (flat, tanpa gambar). */
.store__cover--polos { aspect-ratio: 4 / 1; background-color: var(--primary);
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1.2px, transparent 1.7px); background-size: 14px 14px; }
.store__logo { width: 76px; height: 76px; border-radius: 50%; margin-top: -38px; margin-bottom: 10px; position: relative;
  background: var(--surface); border: 3px solid var(--surface); overflow: hidden; display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--hairline); }
.store__logo img { width: 100%; height: 100%; object-fit: cover; }
.store__logo span { font-size: 30px; font-weight: 700; color: var(--primary-text); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.socials__item { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--primary-text);
  background: var(--primary-soft); border: 1px solid var(--primary-border); text-decoration: none; }
.socials__item:active { transform: translateY(1px); }
.ikon { display: inline-grid; place-items: center; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 18px; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill--open { background: var(--primary-soft); color: var(--primary-text); }
.pill--closed { background: var(--danger-soft); color: var(--danger); }
.pill--warn { background: var(--warning-soft); color: var(--warning); }
.pill--plain::before { display: none; }
.pill--plain { background: var(--disabled); color: var(--body); }
.notice { margin: 12px 16px 0; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; line-height: 20px; }
.notice--info { background: var(--info-soft); border-color: #BAE6FD; color: var(--info); }
.notice--warn { background: var(--warning-soft); border-color: #FDE68A; color: var(--warning); }
.notice--danger { background: var(--danger-soft); border-color: #FECACA; color: var(--danger); }
.notice--ok { background: var(--primary-soft); border-color: var(--primary-border); color: var(--primary-text); }
.notice--link { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; }
.notice--link:active { transform: translateY(1px); }
.notice__aksi { white-space: nowrap; }

/* --- Kategori & cari --- */
.toolbar { position: sticky; top: 0; z-index: 3; background: var(--canvas); padding: 12px 16px 8px; border-bottom: 1px solid var(--hairline); }
.search { width: 100%; border: 1px solid var(--outline); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 16px; }
.search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--hairline); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }

/* --- Daftar produk --- */
.section-title { padding: 18px 16px 8px; font-size: 13px; font-weight: 600; color: var(--body); }
.products { margin: 0 16px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; }
.product { display: flex; gap: 12px; padding: 12px; border-top: 1px solid var(--hairline); align-items: center; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
.product:first-child { border-top: 0; }
.product:disabled { cursor: default; }
.product__photo { width: 80px; height: 80px; border-radius: 12px; background: var(--disabled); flex: none; object-fit: cover; display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: 20px; }
.product__photo--kosong { background: var(--primary-soft); color: var(--primary-text); }

/* Label menu pilihan toko (2026-10-11; putaran 8: ikon kecil di depan nama, bukan pil). */
.tanda { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 5px; border-radius: 999px; vertical-align: -4px; }
.tanda svg { stroke-width: 2.2; }
.tanda--laris { background: #FFEDD5; color: #C2410C; }
.tanda--reko { background: var(--primary-soft); color: var(--primary-text); }
.tanda--baru { background: #E0F2FE; color: var(--info); }
.chip { display: inline-flex; align-items: center; gap: 4px; }
.chip .ikon { display: inline-flex; color: #C2410C; }
.product__main { flex: 1; min-width: 0; }
.product__name { font-weight: 600; }
.product__price { margin-top: 2px; font-weight: 700; }
.product__hint { color: var(--body); font-size: 13px; }
.product__qty { flex: none; min-width: 28px; height: 28px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; padding: 0 8px; }
.product__add { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--primary-border); background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-size: 22px; font-weight: 600; }
.soldout { color: var(--danger); font-size: 13px; font-weight: 600; }
.product--off { opacity: .55; }

/* --- Bilah keranjang --- */
.cartbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--hairline); }
.cartbar__inner { max-width: 608px; margin: 0 auto; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid transparent; padding: 12px 16px; font-weight: 600; font-size: 16px; line-height: 22px; cursor: pointer; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-pressed); }
.btn--primary:disabled { background: var(--disabled); color: var(--muted); cursor: not-allowed; transform: none; }
.btn--outline { background: var(--surface); border-color: var(--hairline); color: var(--ink); }
.btn--wa { background: #fff; border-color: #86EFAC; color: #15803D; }
.btn--block { width: 100%; }
.btn--split { justify-content: space-between; }

/* --- Lembar bawah --- */
.sheet-bg { position: fixed; inset: 0; z-index: 10; background: rgba(15, 23, 42, .4); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; overflow: auto; background: var(--surface); border-radius: 16px 16px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet__grip { width: 36px; height: 4px; border-radius: 4px; background: var(--hairline); margin: 4px auto 12px; }
.sheet__title { font-size: 20px; line-height: 26px; font-weight: 700; }
.sheet__photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 12px; margin-bottom: 12px; }
.group { margin-top: 18px; }
.group__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.group__name { font-weight: 600; }
.group__rule { color: var(--body); font-size: 13px; }
.group__rule--req { color: var(--warning); font-weight: 600; }
.opt { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--hairline); cursor: pointer; }
.opt:first-of-type { border-top: 0; }
.opt input { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; flex: none; }
.opt span:first-of-type { flex: 1; }
.opt__price { color: var(--body); }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--body); }
.input { width: 100%; border: 1px solid var(--outline); border-radius: 10px; background: var(--surface); padding: 10px 12px; font-size: 16px; line-height: 24px; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[readonly] { background: var(--disabled); }
.error { color: var(--danger); font-size: 13px; }
/* Turnstile tak terlihat: wadahnya kosong kecuali Cloudflare meminta pembeli mencentang. */
.captcha--tampil { margin-top: 16px; }
.stepper { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--hairline); border-radius: 12px; padding: 2px; }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--primary-soft); color: var(--primary-text); border-radius: 10px; font-size: 20px; font-weight: 600; cursor: pointer; }
.stepper button:disabled { background: var(--disabled); color: var(--muted); }
.stepper output { min-width: 32px; text-align: center; font-weight: 700; font-size: 17px; }
.sheet__foot { display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.sheet__foot .btn { flex: 1; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { border: 1px solid var(--hairline); background: var(--surface); border-radius: 12px; padding: 10px 6px; font-weight: 600; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { border: 2px solid var(--primary); background: var(--primary-soft); color: var(--primary-text); padding: 9px 5px; }

/* --- Ringkasan pesanan --- */
.card { margin: 12px 16px 0; background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px; padding: 14px 16px; }
.card__title { font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.line { display: flex; gap: 10px; padding: 8px 0; border-top: 1px solid var(--hairline); align-items: flex-start; }
.line:first-of-type { border-top: 0; }
.line__qty { font-weight: 700; min-width: 28px; }
.line__main { flex: 1; min-width: 0; }
.line__sub { color: var(--body); font-size: 13px; }
.line__price { font-weight: 600; white-space: nowrap; }
.line__remove { border: 0; background: none; color: var(--danger); font-size: 13px; font-weight: 600; padding: 0; cursor: pointer; margin-top: 2px; }
.total { display: flex; justify-content: space-between; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--hairline); font-weight: 700; font-size: 17px; }
.muted { color: var(--body); }
.small { font-size: 13px; line-height: 18px; }

/* --- Status --- */
.status-hero { background: var(--surface); border-bottom: 1px solid var(--hairline); padding: 24px 16px 20px; text-align: center; }
.status-hero__no { color: var(--body); font-weight: 600; }
.status-hero__title { font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -0.4px; margin-top: 6px; }
.status-hero__sub { color: var(--body); margin-top: 6px; }
.status-hero__total { margin-top: 10px; font-weight: 600; }
.status-hero__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 1px solid var(--hairline); }
.status-hero .socials { justify-content: center; }
.empty { padding: 48px 24px; text-align: center; color: var(--body); }
.empty h1 { color: var(--ink); font-size: 22px; line-height: 28px; margin-bottom: 8px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px; }
.foot a { color: var(--primary-text); text-decoration: none; font-weight: 600; }
/* Logo kata vektor sejajar teks "Powered by": setinggi ±1,2 × huruf di sekitarnya. */
.logo-kata { display: inline-block; height: 1.2em; width: auto; vertical-align: -0.22em; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 96px; z-index: 20; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: calc(100% - 32px); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* Panggil pelayan / minta bill (meja QR). */
.table-actions { margin: 12px 16px 0; display: grid; gap: 8px; }
.table-actions__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.table-actions__row .btn { width: 100%; }
.table-actions__row .btn:disabled { opacity: .55; }
.table-actions__note { color: var(--primary-text); font-size: 14px; min-height: 0; }
.table-actions__note:empty { display: none; }

/* Layar antrean ambil pesanan (TV/tablet): huruf besar, dua kolom, tanpa nama. */
.board-body { background: var(--canvas); }
.board { max-width: none; min-height: 100dvh; padding: 24px 32px; display: flex; flex-direction: column; gap: 20px; }
.board__head { display: flex; align-items: center; gap: 16px; }
.board__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--hairline); }
.board__store { font-size: 28px; line-height: 34px; font-weight: 700; }
.board__sub { color: var(--body); font-size: 16px; }
.board__full { margin-left: auto; }
.board__cols { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.board__col { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 20px 24px; }
.board__col--ready { border-color: var(--primary-border); background: var(--primary-soft); }
.board__title { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.board__col--ready .board__title { color: var(--primary-text); }
.board__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.board__item { font-size: clamp(32px, 4.5vw, 64px); line-height: 1.2; font-weight: 700; letter-spacing: -0.5px; text-align: center; padding: 14px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); font-variant-numeric: tabular-nums; }
.board__col--ready .board__item { color: var(--primary-text); border-color: var(--primary-border); }
.board__item--new { animation: kedip 1s ease-in-out 6; }
@keyframes kedip { 50% { background: var(--primary); color: #fff; } }
.board__empty { color: var(--muted); font-size: 32px; }
.board__foot { color: var(--muted); font-size: 13px; text-align: right; }
@media (max-width: 700px) { .board { padding: 16px; } .board__cols { grid-template-columns: 1fr; } .board__full { display: none; } }
@media (prefers-reduced-motion: reduce) { .board__item--new { animation: none; background: var(--primary); color: #fff; } }

/* ==== Putaran 7 · B: jadwal buka & QR meja — tulis CSS bagian ini di antara dua penanda ini ==== */
.bilah-tutup { margin: 12px 16px 0; border-radius: 12px; background: var(--ink); color: #fff; }
.bilah-tutup > summary, div.bilah-tutup { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 600; font-size: 15px; line-height: 20px; }
.bilah-tutup > summary { cursor: pointer; list-style: none; }
.bilah-tutup > summary::-webkit-details-marker { display: none; }
.bilah-tutup .ikon { flex: none; display: grid; }
.bilah-tutup__teks { flex: 1; min-width: 0; }
.bilah-tutup__lihat { flex: none; font-size: 13px; font-weight: 600; color: #CBD5E1; }
.bilah-tutup__lihat::after { content: ' ›'; }
.bilah-tutup[open] .bilah-tutup__lihat::after { content: ' ‹'; }
.bilah-tutup__jadwal { margin: 0; padding: 0 14px 12px 44px; color: #CBD5E1; font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.product--tutup { opacity: 1; }
.product--tutup .product__photo { filter: grayscale(1); }
.product--tutup .product__name, .product--tutup .product__price { color: var(--body); }
.product__tutup { flex: none; align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: var(--hairline); color: var(--ink); font-size: 13px; font-weight: 600; }
/* ==== akhir Putaran 7 · B ==== */

/* ==== Putaran 7 · grid: tampilan daftar/kisi — tulis CSS bagian ini di antara dua penanda ini ==== */
.toolbar__cari { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar__cari .search { flex: 1 1 160px; min-width: 0; }
.tampilan { flex: none; display: flex; gap: 6px; }
.tampilan__tombol { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 1px solid var(--hairline); border-radius: 10px; background: var(--surface); color: var(--body); cursor: pointer; }
.tampilan__tombol .ikon { display: grid; }
.tampilan__tombol[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
@media (forced-colors: active) {
  .tampilan__tombol[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
}
#daftar { container: daftar / inline-size; }
.kisi { margin: 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@container daftar (max-width: 300px) { .kisi { grid-template-columns: minmax(0, 1fr); } }
@container daftar (min-width: 600px) { .kisi { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container daftar (min-width: 880px) { .kisi { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kisi__kartu { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; background: var(--surface); border: 1px solid var(--hairline); border-radius: 14px; overflow: hidden; cursor: pointer; font: inherit; color: inherit; }
.kisi__kartu:active:not(:disabled) { transform: scale(.98); }
.kisi__kartu:disabled { cursor: default; }
.kisi__foto { position: relative; aspect-ratio: 1; background: var(--disabled); }
.kisi__img { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font-size: 34px; font-weight: 700; color: var(--muted); }
.kisi__img--kosong { background: var(--primary-soft); color: var(--primary-text); }
.kisi__isi { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 12px; }
.kisi__nama { font-weight: 600; font-size: 14px; line-height: 19px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.kisi__bawah { margin-top: auto; }
.kisi__mulai { color: var(--body); font-size: 12px; line-height: 16px; }
.kisi__baris { min-height: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; }
.kisi__harga { font-weight: 700; font-size: 14px; line-height: 19px; white-space: nowrap; }
.kisi__baris > :not(.kisi__harga) { margin-left: auto; }
.kisi .product__add { width: 32px; height: 32px; font-size: 20px; }
.kisi__habis { color: var(--danger); font-size: 13px; line-height: 18px; font-weight: 600; }
.kisi__status { margin-top: 4px; color: var(--body); font-size: 13px; line-height: 18px; font-weight: 600; }
.kisi__status.soldout { color: var(--danger); }
.kisi__kartu--off .kisi__img { filter: grayscale(1); opacity: .55; }
.kisi__kartu--tutup .kisi__img { opacity: 1; }
.kisi__kartu--tutup .kisi__baris { min-height: 0; }
.kisi__kartu--off .kisi__nama, .kisi__kartu--off .kisi__harga { color: var(--body); }
/* ==== akhir Putaran 7 · grid ==== */
/* pemisah */
/* pemisah */

/* ==== Putaran 7 · D: subdomain — tulis CSS bagian ini di antara dua penanda ini ==== */
/* ==== akhir Putaran 7 · D ==== */
/* pemisah */
/* pemisah */
