:root {
  --bg: #FBF8F3;
  --ink: #16161A;
  --ink-2: #3A3A42;
  --muted: #5C5C66;
  --line: #ECE6DC;
  --line-2: #E3DCCF;
  --card: #FFFFFF;
  --chip-bg: #EFE9DF;
  --accent: #D9F36B;
  --star: #B86E0C;
  --heart: #E5484D;
  --display: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --r-lg: 24px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 8px; }
.brand { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -0.03em; text-decoration: none; }
.top-nav { display: flex; align-items: center; gap: 6px; }
.top-link { display: none; min-height: 44px; padding: 0 14px; border: 0; background: none; font-weight: 700; align-items: center; text-decoration: none; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
.icon-btn[aria-pressed="true"] svg { stroke: #fff; }
.badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.icon-btn[aria-pressed="true"] .badge { background: var(--accent); color: var(--ink); }

/* hero */
.hero { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 8px; }
.finder { flex: 1 1 320px; min-width: 0; background: var(--accent); border-radius: var(--r-lg); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.finder .eyebrow { display: none; margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.finder label { font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.08; letter-spacing: -0.02em; }
.finder-row { display: flex; gap: 8px; }
.code-box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; background: #fff; border-radius: 14px; padding: 0 14px; min-height: 56px; }
.code-box span { font-family: var(--display); font-size: 26px; font-weight: 800; color: #8A8A94; }
.code-box input { flex: 1; min-width: 0; width: 100%; border: 0; outline: none; background: transparent; font-family: var(--display); font-size: 26px; font-weight: 800; letter-spacing: .04em; min-height: 52px; }
.go-btn { min-width: 56px; min-height: 56px; border: 0; border-radius: 14px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 16px; padding: 0 16px; }
.go-btn .lbl { display: none; }
.finder-msg { margin: 0; font-size: 13px; font-weight: 700; min-height: 0; }

.colls { flex: 1 1 420px; min-width: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 10px; }
.sec-head h2 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -0.02em; }
.sec-head span { font-size: 13px; font-weight: 600; color: var(--muted); }
.coll-row { display: flex; gap: 10px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
.coll-row::-webkit-scrollbar { display: none; }
.coll { flex: none; width: 128px; min-height: 150px; padding: 12px; border-radius: 18px; border: 2px solid transparent; text-align: left; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.coll[aria-pressed="true"] { border-color: var(--ink); }
.coll .ic { width: 40px; height: 40px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; }
.coll b { display: block; font-family: var(--display); font-size: 16px; line-height: 1.1; font-weight: 800; }
.coll small { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-top: 4px; }

/* browse */
.browse { padding-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.browse-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.browse h2 { display: none; margin: 0; font-family: var(--display); font-size: 34px; font-weight: 800; letter-spacing: -0.03em; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--chip-bg); flex: 1 1 auto; }
.tab { min-height: 44px; border: 0; border-radius: 12px; background: transparent; font-weight: 800; color: var(--ink-2); padding: 0 18px; }
.tab[aria-selected="true"] { background: var(--ink); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -18px; padding: 0 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 13px; font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] svg { stroke: #fff; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.banner button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); font-weight: 700; font-size: 13px; }

/* grid */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding: 14px 0 0; }
.card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.media { position: relative; }
.thumb { display: flex; width: 100%; aspect-ratio: 4 / 5; border: 0; padding: 0; border-radius: 20px; overflow: hidden; align-items: center; justify-content: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.code-tag { position: absolute; top: 8px; left: 8px; font-family: var(--display); font-size: 15px; font-weight: 800; padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; }
.pre-tag { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: #fff; color: #11573A; }
.sold-tag { position: absolute; inset: auto 8px 8px auto; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 8px; background: var(--ink); color: #fff; }
.save { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.save span { width: 32px; height: 32px; border-radius: 999px; background: #fff; display: flex; align-items: center; justify-content: center; }
.pills { position: absolute; bottom: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.pill { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.pill.coll-pill { background: #fff; color: var(--ink); font-weight: 700; }
.card h3 { margin: 0; font-size: 14px; line-height: 1.3; font-weight: 700; padding: 0 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pre-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 2px; }
.price { font-family: var(--display); font-size: 18px; font-weight: 800; }
.stars { display: inline-flex; gap: 1px; }
.cta { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 12px; border-radius: 12px; font-size: 13px; font-weight: 800; text-decoration: none; }
.cta.big { min-height: 56px; justify-content: center; font-size: 16px; border-radius: 16px; gap: 8px; }
.cta[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.empty { margin: 16px 0 0; padding: 28px; border-radius: 18px; border: 1px dashed #D8D0C2; text-align: center; color: var(--muted); }
.loading .grid { opacity: .4; }

/* platform colours */
.p-shopee { --pbg: #FFE3D8; --pfg: #A3300F; --cbg: #C9351A; --cfg: #fff; }
.p-lazada { --pbg: #E2E6FF; --pfg: #1F2E8C; --cbg: #1F2E8C; --cfg: #fff; }
.p-tiktok { --pbg: #16161A; --pfg: #fff; --cbg: #16161A; --cfg: #fff; }
.p-other  { --pbg: #EFE9DF; --pfg: #16161A; --cbg: #16161A; --cfg: #fff; }
.p-pre    { --pbg: #DDF2E6; --pfg: #11573A; --cbg: var(--accent); --cfg: #16161A; }
.pill.plat { background: var(--pbg); color: var(--pfg); }
.cta { background: var(--cbg); color: var(--cfg); }
.cta svg { stroke: var(--cfg); }

/* footer */
.foot { margin-top: 36px; background: var(--ink); color: #C9C9D1; font-size: 12px; }
.foot .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 8px; }
.foot b { font-family: var(--display); font-size: 20px; color: #fff; letter-spacing: -0.03em; }

/* sheet / modal */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(22,22,26,.55); display: flex; flex-direction: column; justify-content: flex-end; }
.overlay[hidden] { display: none; }
.overlay .scrim { flex: 1; border: 0; background: transparent; }
.sheet { position: relative; background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px 22px; display: flex; flex-direction: column; gap: 14px; max-height: 92vh; overflow-y: auto; }
.grab { width: 40px; height: 5px; border-radius: 999px; background: #D8D0C2; align-self: center; flex: none; }
.close { display: none; position: absolute; top: 18px; right: 18px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--chip-bg); align-items: center; justify-content: center; }
.sheet-media { display: flex; flex-direction: column; gap: 10px; }
.photo { position: relative; height: 330px; border-radius: 22px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .nav { position: absolute; top: 0; bottom: 0; width: 45%; border: 0; background: transparent; }
.photo .nav.prev { left: 0; } .photo .nav.next { right: 0; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.dots i { height: 7px; width: 7px; border-radius: 999px; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dots i.on { width: 20px; background: var(--ink); }
.thumbs { display: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.thumbs button { aspect-ratio: 1; border-radius: 12px; border: 2px solid transparent; padding: 0; overflow: hidden; background: #eee; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sheet-info { display: flex; flex-direction: column; gap: 12px; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.meta .pill { font-size: 12px; }
.sheet h3 { margin: 0; font-family: var(--display); font-size: 24px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.pre-box { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.pre-box .price { font-size: 28px; }
.why { margin: 0 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.note { margin: 0; font-size: 15px; color: #2A2A30; white-space: pre-line; }
.sheet-actions { display: flex; gap: 8px; }
.sheet-actions .cta { flex: 1; }
.ghost { min-width: 56px; min-height: 56px; border-radius: 16px; border: 1px solid #D8D0C2; background: #fff; display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; padding: 0 14px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; z-index: 60; }
.toast[hidden] { display: none; }

/* ---------- wide screens ---------- */
@media (min-width: 760px) {
  .wrap { padding: 0 24px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 18px; }
  .coll-row, .chips { margin: 0; padding: 0 0 4px; flex-wrap: wrap; overflow: visible; }
  .card h3 { font-size: 15px; }
}
@media (min-width: 1000px) {
  body { font-size: 16px; }
  .top { padding: 22px 0 12px; }
  .brand { font-size: 30px; }
  .top-link { display: inline-flex; }
  .finder { padding: 36px; border-radius: 32px; justify-content: space-between; gap: 28px; min-height: 320px; }
  .finder .eyebrow { display: block; }
  .finder label { font-size: 50px; line-height: .98; letter-spacing: -0.035em; }
  .finder-row { max-width: 480px; }
  .code-box { min-height: 68px; border-radius: 18px; }
  .code-box span, .code-box input { font-size: 32px; }
  .go-btn { min-height: 68px; border-radius: 18px; padding: 0 22px; }
  .go-btn .lbl { display: inline; }
  .colls { background: #fff; border: 1px solid var(--line); border-radius: 32px; padding: 24px; display: flex; flex-direction: column; }
  .sec-head h2 { font-size: 24px; }
  .coll-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex: 1; }
  .coll { width: auto; min-height: 120px; border-radius: 22px; padding: 14px; }
  .coll b { font-size: 21px; }
  .browse { padding-top: 40px; }
  .browse h2 { display: block; }
  .tabs { flex: 0 0 auto; display: flex; }
  .overlay { align-items: center; justify-content: center; padding: 24px; }
  .overlay .scrim { position: absolute; inset: 0; }
  .sheet { width: 100%; max-width: 900px; border-radius: 32px; padding: 20px; flex-direction: row; flex-wrap: wrap; gap: 24px; max-height: 100%; }
  .grab { display: none; }
  .close { display: flex; }
  .sheet-media { flex: 1 1 360px; min-width: 0; }
  .photo { height: auto; aspect-ratio: 4 / 5; max-height: 540px; border-radius: 24px; }
  .thumbs { display: grid; }
  .sheet-info { flex: 1 1 320px; min-width: 0; padding: 14px 6px 6px; gap: 16px; }
  .sheet-info .meta { padding-right: 48px; }
  .sheet h3 { font-size: 38px; line-height: 1; }
  .sheet-actions { margin-top: auto; }
}
