:root {
  /* tema pantai: pasir, laut, kerang */
  --bg: #fffaf0;        /* pasir terang */
  --card: #ffffff;
  --ink: #22344a;       /* navy laut dalam */
  --muted: #66707e;
  --accent: #2c5fc4;    /* biru laut */
  --accent-ink: #fff;
  --coral: #e2735b;     /* aksen kedua: coral */
  --line: #ebe6d6;
  --soft: #fbecc0;      /* pasir */
  --shell: #f8d3d9;     /* pink kerang */
  --sky: #e3eefb;
  --ok: #3f8a62; --warn: #c0503a; --radius: 18px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }
.hero h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
/* hero selebar layar, isinya sejajar dengan konten lewat .wrap */
.hero { padding: clamp(28px, 6vw, 64px) 0 clamp(20px, 3vw, 36px); background: linear-gradient(180deg, var(--sky), var(--bg)); }
.hero p { font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 40rem; }
.top { position: sticky; top: 0; z-index: 5; background: var(--soft); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 12px; }
.top nav { align-items: center; }
.top nav a { padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.top nav a.active { background: rgba(255, 255, 255, .7); font-weight: 700; }
.price { color: var(--accent); }
.card:hover { box-shadow: 0 6px 18px rgba(34, 52, 74, .08); }
.status { background: var(--shell) !important; }
.banner { border-left: 4px solid var(--coral) !important; }
.brand { font-weight: 800; text-decoration: none; font-size: 1.05rem; }
.top nav { display: flex; gap: 4px; font-size: .95rem; }
.top nav a { text-decoration: none; }
#cart-count { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 99px; background: var(--coral); color: var(--accent-ink); text-align: center; font-size: .8rem; }
main { padding-block: 20px 60px; }
.hero p { color: var(--muted); margin: 0; }
.banner { padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); margin-bottom: 16px; }
.banner.closed { border-color: var(--warn); color: var(--warn); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(14px, 2vw, 24px); }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .card .body { padding: 10px 12px 14px; } .thumb.ph { font-size: .95rem; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; }
.card:hover { border-color: var(--accent); }
.thumb { aspect-ratio: 1; width: 100%; object-fit: cover; display: block; background: var(--soft); }
.thumb.ph { position: relative; overflow: hidden; display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 1.1rem; padding: 12px; text-align: center; }
.thumb.ph > img { position: absolute; inset: 0; height: 100%; background: transparent; }
.card .body { padding: 12px 14px 16px; }
.card .body p { margin: 4px 0 8px; color: var(--muted); font-size: .9rem; }
.price { font-weight: 800; }
.section-title { margin: 28px 0 12px; }
.btn { appearance: none; border: 0; border-radius: 999px; padding: 12px 20px; font: inherit; font-weight: 700; background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.block { width: 100%; }
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgba(0,0,0,.45); }
#modal-body { padding: 20px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.x { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.opt { margin: 14px 0; }
.opt > span { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; color: inherit; }
.chip.selected { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.15); }
.component { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 14px; }
.field { display: block; margin: 10px 0; font-size: .95rem; }
.field em { color: var(--warn); font-style: normal; }
.field input, .field select, .field textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { background: none; border: 0; width: 36px; height: 36px; font-size: 1.1rem; cursor: pointer; color: inherit; }
.qty span { min-width: 2ch; text-align: center; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line small { color: var(--muted); display: block; }
.link { background: none; border: 0; color: var(--warn); cursor: pointer; padding: 0; font: inherit; font-size: .85rem; text-decoration: underline; }
.total { font-size: 1.2rem; font-weight: 800; }
.fulfil { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fulfil button { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.fulfil button.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.fulfil small { display: block; color: var(--muted); }
.note { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.bank { font-family: ui-monospace, monospace; font-size: 1.15rem; font-weight: 700; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; margin: 6px 0; }
th, td { border: 1px solid var(--line); padding: 4px 6px; text-align: center; }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.upload-zone { display: block; border: 2px dashed var(--line); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; }
.upload-zone img { max-width: 100%; max-height: 220px; margin-top: 8px; border-radius: 8px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--soft); font-weight: 700; font-size: .85rem; }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 20; max-width: calc(100vw - 32px); }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 30px; }
@media (max-width: 520px) { .fulfil { grid-template-columns: 1fr; } .brand { font-size: .95rem; } .top nav { font-size: .82rem; gap: 0; } .top nav a { padding: 5px 7px; } }
/* form checkout & cek pesanan tidak perlu selebar katalog */
#co, #lk, #res { max-width: 760px; }
@media print { .top, .foot, .no-print { display: none !important; } body { background: #fff; } }

/* ---------- ikon ---------- */
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.top nav a { display: inline-flex; align-items: center; gap: 6px; }
h1 .ic, h2 .ic { color: var(--accent); vertical-align: -.12em; }
h3 .ic { color: var(--muted); }
.btn, .link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.link { gap: 4px; }
.link .ic { width: 1em; height: 1em; }
.banner { display: flex; align-items: center; gap: 10px; }
.banner > .ic { color: var(--coral); width: 1.3em; height: 1.3em; }
.banner.closed > .ic { color: var(--warn); }
.price-row { display: flex; justify-content: space-between; align-items: center; }
.add-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sky); color: var(--accent); transition: .15s; }
.card:hover .add-ic { background: var(--accent); color: #fff; }
.x .ic { width: 22px; height: 22px; }
.fulfil strong { display: inline-flex; align-items: center; gap: 6px; }
.upload-zone > .ic { display: block; margin: 0 auto 6px; width: 28px; height: 28px; color: var(--accent); }
.note.success { display: flex; align-items: center; gap: 8px; background: #e3f3ea; color: var(--ok); font-weight: 700; }
.panel.empty { text-align: center; padding: 36px 16px; }
.panel.empty > .ic { width: 44px; height: 44px; color: var(--muted); opacity: .5; }
.panel.empty p { color: var(--muted); }
details summary .ic { color: var(--accent); }
.foot .ic { color: var(--ok); }
/* HP: menu cukup ikon, nama toko satu baris */
@media (max-width: 520px) {
  .top nav .lbl { display: none; }
  .top nav a { padding: 8px; }
  .top nav a .ic { width: 22px; height: 22px; }
  .brand { white-space: nowrap; font-size: 1rem; }
}
/* harga selalu sejajar di dasar kartu, berapa pun panjang teksnya */
.card .body { flex: 1; display: flex; flex-direction: column; }
.card .body p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price-row { margin-top: auto; }
/* pilihan wajib yang belum diisi */
.opt.missing > span, .field.missing { color: var(--warn); }
.opt.missing > span::after, .field.missing::after { content: " — wajib dipilih"; font-weight: 400; font-size: .85em; }
.field.missing::after { content: " — wajib diisi"; }
.opt.missing .chip, .field.missing input { border-color: var(--warn); }
.opt.missing .chips, .field.missing input { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
#toast { text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); border-radius: 14px; width: max-content; max-width: min(340px, calc(100vw - 32px)); }

/* ---------- perbaikan tampilan HP ---------- */
/* tombol berdampingan boleh turun ke baris baru, tidak keluar layar */
.row { flex-wrap: wrap; }
.row > .btn { flex: 1 1 auto; }
.line > :first-child { min-width: 0; }
.line > :last-child { white-space: nowrap; }

/* struk: ID pesanan tidak terpotong, status di sebelah/bawahnya */
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.order-id { margin: 0; white-space: nowrap; font-size: clamp(1.2rem, 5.5vw, 1.6rem); }
.status { white-space: nowrap; }
.actions { margin-top: 16px; gap: 10px; }

/* popup: foto tidak terlalu tinggi, tombol beli selalu terlihat di bawah */
#m-thumb .thumb.ph { aspect-ratio: auto; height: min(36vh, 300px); border-radius: 12px; }
.buybar { position: sticky; bottom: -20px; margin: 16px -20px -20px; padding: 12px 20px 16px; background: var(--card);
  border-top: 1px solid var(--line); box-shadow: 0 -6px 16px rgba(34, 52, 74, .06); z-index: 1; }
.buybar .row { margin-bottom: 10px; }
#m-price { font-size: 1.15rem; }
.modal-head p { margin: 0 0 12px; color: var(--muted); }

/* pesan error */
.panel.error { display: flex; align-items: flex-start; gap: 10px; color: var(--warn); border-color: #f0c9bf; background: #fff6f3; }
.panel.error .ic { flex: none; width: 1.3em; height: 1.3em; margin-top: 2px; }
