:root {
  --bg: #f6f9ff;
  --paper: #ffffff;
  --ink: #1e2433;
  --ink-2: #4b5468;
  --muted: #7a8499;
  --line: #e1e8f7;
  --brand: #1d4ed8;
  --brand-2: #1d4ed8;
  --brand-soft: #e8efff;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-ink: #ffffff;
  --accent-soft: #e8efff;
  --price: #1d4ed8;
  --star: #f59e0b;
  --ok: #15803d;
  --ok-soft: #e4f6ea;
  --warn: #a16207;
  --warn-soft: #fef5d8;
  --bad: #b91c1c;
  --bad-soft: #fde8e8;
  --info: #1d4ed8;
  --info-soft: #e6eeff;
  --r: 16px;
  --shadow: 0 1px 2px rgba(20, 40, 90, .05), 0 8px 24px rgba(20, 40, 90, .07);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.main { padding-top: 24px; padding-bottom: 56px; min-height: 60vh; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 14px; }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

/* ---------- Topbar ---------- */
.topbar { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); color: var(--ink); position: sticky; top: 0; z-index: 20; }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.logo { font-weight: 800; font-size: 1.45rem; color: var(--ink); letter-spacing: -.03em; display: inline-flex; align-items: center; }
.logo:hover { text-decoration: none; }
.logo-coin {
  display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%;
  background: var(--accent); color: #fff; margin-right: 2px; font-size: .95em; line-height: 1; padding-bottom: .12em;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.logo-sm { font-size: 1.2rem; color: var(--ink); }
.search { flex: 1; max-width: 520px; }
.search input {
  width: 100%; height: 40px; border-radius: 999px; border: 1.5px solid transparent; padding: 0 18px;
  font: inherit; background: #f6efe7; color: var(--ink); outline: none;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.nav { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.nav-link { color: var(--ink); font-weight: 600; position: relative; }
.dot { background: var(--accent); color: var(--accent-ink); font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2);
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
}
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.menu-pop {
  position: absolute; right: 0; top: 46px; background: var(--paper); color: var(--ink); min-width: 220px;
  border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: 6px; z-index: 30;
}
.menu-pop a, .menu-pop button {
  display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; color: var(--ink);
  background: none; border: 0; font: inherit; cursor: pointer;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--bg); text-decoration: none; }
.menu-head { padding: 9px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-head small { display: block; color: var(--muted); }
.simbar { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid #f5e6b8; text-align: center; font-size: .82rem; font-weight: 600; padding: 5px 16px; }
@media (max-width: 640px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
}

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid transparent; font: inherit; font-weight: 700; cursor: pointer;
  background: var(--brand); color: #fff; white-space: nowrap; transition: transform .05s, background .15s;
}
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--paper); border-color: var(--ink-2); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #9a1f18; }
.btn-sm { height: 34px; padding: 0 14px; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; padding: 10px 12px;
  font: inherit; color: var(--ink); outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); }
textarea { min-height: 110px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; }
.choice { display: grid; gap: 10px; }
.choice-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; display: flex; gap: 12px; align-items: flex-start; font-weight: 500; margin: 0; }
.choice-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-opt input { margin-top: 4px; accent-color: var(--brand); }
.choice-opt b { display: block; }
.money { position: relative; }
.money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; }
.money input { padding-left: 40px !important; }

/* ---------- Cards / panels ---------- */
.card { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; }
.card-tight { padding: 16px; }
.panel-narrow { max-width: 460px; margin: 20px auto; }
.panel-mid { max-width: 760px; margin: 0 auto; }
.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-weight: 500; }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-error { background: var(--bad-soft); color: var(--bad); }
.flash-info { background: var(--info-soft); color: var(--info); }
.flash-warn { background: var(--warn-soft); color: var(--warn); }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-muted { background: #eeeae0; color: var(--ink-2); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.shield { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: .85rem; }
.shield::before { content: ""; width: 14px; height: 16px; background: var(--brand); clip-path: polygon(50% 0, 100% 18%, 100% 55%, 50% 100%, 0 55%, 0 18%); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 140% at 0% 0%, #fff6ee 0%, #ffe6d5 55%, #fdd9c2 100%); color: var(--ink); border: 1px solid #fbd8c0; border-radius: 22px; padding: 40px; margin-bottom: 28px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; position: relative; overflow: hidden;
}
.hero h1 { font-size: 2.6rem; color: var(--ink); margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--ink-2); font-size: 1.05rem; max-width: 34em; }
.hero .btn-ghost { color: var(--ink); border-color: rgba(42,36,32,.2); background: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: #fff; border-color: var(--ink-2); }
.hero-steps { background: rgba(255,255,255,.75); box-shadow: var(--shadow); border-radius: 16px; padding: 18px; display: grid; gap: 12px; }
.hero-step { display: flex; gap: 12px; align-items: flex-start; }
.hero-step i { font-style: normal; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.hero-step b { display: block; }
.hero-step span { color: var(--muted); font-size: .88rem; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 26px; }
  .hero h1 { font-size: 1.9rem; }
}

/* ---------- Category chips & filters ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: thin; }
.chip { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; font-size: .88rem; }
.chip:hover { border-color: var(--accent); text-decoration: none; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filters select, .filters input { width: auto; padding: 8px 12px; border-radius: 999px; font-size: .88rem; }
.filters .grow { flex: 1; }

/* ---------- Item grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 12px; } }
.item-card { background: var(--paper); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); color: var(--ink); display: flex; flex-direction: column; transition: transform .15s; }
.item-card:hover { transform: translateY(-2px); text-decoration: none; }
.thumb { aspect-ratio: 1 / 1; background: #f3ece3; position: relative; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .noimg { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; }
.thumb .badge { position: absolute; left: 10px; top: 10px; }
.thumb .sold-cover { position: absolute; inset: 0; background: rgba(27,38,32,.55); color: #fff; display: grid; place-items: center; font-weight: 800; letter-spacing: .1em; }
.item-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item-title { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.item-price { font-weight: 800; font-size: 1.08rem; color: var(--price); }
.item-meta { font-size: .8rem; color: var(--muted); margin-top: auto; display: flex; justify-content: space-between; gap: 6px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty b { display: block; font-size: 1.1rem; color: var(--ink); margin-bottom: 6px; }

/* ---------- Item detail ---------- */
.detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } }
.gallery-main { aspect-ratio: 1 / 1; background: #f3ece3; border-radius: var(--r); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; background: #f3ece3; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { flex: none; width: 70px; height: 70px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button.on { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buybox h1 { font-size: 1.5rem; margin-bottom: 8px; }
.price-big { font-size: 1.9rem; font-weight: 800; color: var(--price); margin: 6px 0 12px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: .92rem; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.desc { white-space: pre-line; }
.seller-card { display: flex; gap: 12px; align-items: center; }
.seller-card .avatar { flex: none; }
.protect { background: var(--brand-soft); border-radius: 12px; padding: 14px; font-size: .88rem; color: var(--brand); }
.protect b { display: block; margin-bottom: 4px; }

/* ---------- Comments ---------- */
.comment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.comment .avatar { width: 34px; height: 34px; flex: none; font-size: .78rem; }
.comment-body { white-space: pre-line; }
.tag-seller { font-size: .7rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px; }

/* ---------- Tabs, tables, lists ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1.5px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2.5px solid transparent; margin-bottom: -1.5px; white-space: nowrap; }
.tabs a.on { color: var(--brand); border-color: var(--brand); }
.tabs a:hover { text-decoration: none; color: var(--brand); }
.list-row { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); color: var(--ink); }
.list-row + .list-row { margin-top: 10px; }
.list-row:hover { text-decoration: none; }
.list-row .mini { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: #f3ece3; flex: none; display: grid; place-items: center; font-size: 1.6rem; }
.list-row .mini img { width: 100%; height: 100%; object-fit: cover; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--paper); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #fbf9f4; }

/* ---------- Order page ---------- */
.order-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 860px) { .order-layout { grid-template-columns: 1fr; } }
.progress { display: flex; gap: 0; margin: 6px 0 20px; }
.progress div { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); position: relative; padding-top: 26px; font-weight: 600; }
.progress div::before { content: ""; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 14px; height: 14px; border-radius: 50%; background: var(--line); z-index: 1; }
.progress div::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.progress div:first-child::after { display: none; }
.progress div.done { color: var(--brand); }
.progress div.done::before, .progress div.done::after { background: var(--brand); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 14px 20px; position: relative; font-size: .88rem; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ""; position: absolute; left: 6.5px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.sum { font-size: .92rem; }
.sum div { display: flex; justify-content: space-between; padding: 5px 0; }
.sum .total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.05rem; }
.code-box { font-size: 2.2rem; letter-spacing: .3em; font-weight: 800; text-align: center; background: var(--bg); border: 2px dashed var(--accent); border-radius: 14px; padding: 14px; color: var(--brand); }
.action-box { border: 2px solid var(--brand); border-radius: var(--r); padding: 18px; background: var(--paper); }
.action-box h3 { color: var(--brand); }
.stars { color: var(--star); letter-spacing: 1px; }
.stars .off { color: #e8ded2; }
.stars b { color: var(--ink); letter-spacing: 0; }
.rating-input { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-input input { display: none; }
.rating-input label { font-size: 2rem; color: #e8ded2; cursor: pointer; margin: 0; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: var(--star); }

/* ---------- Upload ---------- */
.uploader { border: 2px dashed var(--line); border-radius: var(--r); padding: 20px; text-align: center; background: #fff; cursor: pointer; display: block; font-weight: 500; }
.uploader:hover { border-color: var(--accent); background: var(--accent-soft); }
.previews { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.previews .pv { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; position: relative; background: #f3ece3; }
.previews .pv img { width: 100%; height: 100%; object-fit: cover; }
.previews .pv label { position: absolute; inset: auto 0 0 0; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; text-align: center; padding: 2px; margin: 0; font-weight: 600; cursor: pointer; }

/* ---------- Content pages ---------- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin: 18px 0; }
.step { background: var(--paper); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.step i { font-style: normal; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; margin-bottom: 8px; }
.faq details { background: var(--paper); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--paper); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.stat small { color: var(--muted); font-weight: 600; display: block; }
.stat b { font-size: 1.45rem; font-weight: 800; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: #f6efe6; padding: 32px 0 20px; }
.footer-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: var(--ink-2); }
.footer-copy { margin-top: 20px; font-size: .82rem; }

/* ---------- Tema Biru Laut ---------- */
.hero { background: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%); color: #fff; border: 0; }
.hero h1 { color: #fff; }
.hero h1 em { color: #fde047; }
.hero p { color: rgba(255,255,255,.9); }
.hero .btn-accent { background: #fff; color: var(--accent-2); }
.hero .btn-accent:hover { background: #f0f5ff; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.hero-steps { background: rgba(255,255,255,.15); box-shadow: none; }
.hero-step b { color: #fff; }
.hero-step span { color: rgba(255,255,255,.82); }
.hero-step i { background: #fff; color: var(--accent-2); }
.chip.on { background: var(--accent); border-color: var(--accent); }
.search input { background: #eef3fc; }
.footer { background: #eaf1fd; }
.thumb, .gallery-main, .gallery-main img, .list-row .mini, .previews .pv { background: #eef2f9; }

.btn-wa { background: #25d366; color: #06381a; }
.btn-wa:hover { background: #1ebe5b; }

.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: var(--paper); border-radius: var(--r); padding: 22px; max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal p { font-weight: 600; margin-bottom: 18px; }
