:root {
  --ink: #1f2430;
  --mut: #5f6873;
  --line: #e4e8ee;
  --bg: #f2f4f7;
  --card: #ffffff;
  --ac: #f97316;
  --ac2: #fb923c;
  --ac-dk: #c2410c;
  --price: #dd2a2a;
  --ok: #16a34a;
  --warn: #dc2626;
  --dark: #111827;
  --shadow: 0 2px 4px rgba(17, 24, 39, .04), 0 8px 22px rgba(17, 24, 39, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--ac-dk); text-decoration: none; }
a:hover { color: var(--ac); }
img { max-width: 100%; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

.hide { display: none !important; }
.muted { color: var(--mut); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------- Micro top bar ---------- */
.microbar { background: var(--dark); color: #cbd5e1; font-size: 12px; }
.micro-inner { display: flex; justify-content: space-between; align-items: center; height: 32px; gap: 10px; }
.micro-links { display: flex; gap: 16px; }
.micro-links a { color: #cbd5e1; }
.micro-links a:hover { color: #fff; }
/* Skrin kecil: bar micro disusun jadi dua baris penuh — mesej di atas,
   pautan (Semak Pesanan · Wishlist · Bantuan) di bawah — supaya SEMUA
   teks kelihatan tanpa dipotong. */
@media (max-width: 640px) {
  .micro-inner {
    flex-direction: column; height: auto; gap: 3px; padding: 7px 16px;
    text-align: center; justify-content: center;
  }
  .micro-links { gap: 14px; flex-wrap: wrap; justify-content: center; }
}

/* ---------- Main header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.bar-inner { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; flex: none; }
/* Baris logo+judul & kotak carian sebaris; carian dihalakan ke kanan. */
.brand-top { display: flex; align-items: center; gap: 18px; flex: 1 1 auto; min-width: 0; }
.brand .logo {
  width: 40px; height: 40px; object-fit: contain; border-radius: 10px;
  box-shadow: 0 4px 10px rgba(249, 115, 22, .18);
}
.brand b { color: #c2410c; font-size: 16px; }
.brand span.bt { font-size: 14px; }
/* Pembungkus jenama: desktop = logo+judul, nama+3 ikon & butang akaun sebaris;
   skrin kecil bertindan (lihat @media 820px). */
.brandwrap { display: flex; align-items: center; gap: 10px; color: var(--ink); white-space: nowrap; flex: 1 1 auto; min-width: 0; }
/* Baris nama profil + ikon (troli/wishlist/pesanan); ikon dihalakan ke kanan. */
.brandrow { display: flex; align-items: center; gap: 8px; flex: none; }
.brand-user { display: inline; color: var(--ac-dk); font-size: 12px; font-weight: 700; text-decoration: none; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.searchbar { flex: 1 1 auto; display: flex; max-width: 620px; min-width: 0; margin: 0 auto; }
.searchbar input {
  flex: 1; border: 2px solid var(--ac);
  border-right: 0; border-radius: 10px 0 0 10px;
  padding: 10px 14px; font-size: 14px; outline: none; min-width: 0;
}
.searchbar button {
  border: 0; background: linear-gradient(135deg, var(--ac2), var(--ac));
  color: #fff; border-radius: 0 10px 10px 0; padding: 0 18px;
  cursor: pointer; display: grid; place-items: center;
}

.brand-account { display: flex; align-items: center; gap: 6px; flex: none; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  background: #fff; transition: border-color .15s;
}
.icon-btn:hover { color: var(--ac); border-color: var(--ac); }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: -5px; right: -7px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--ac-dk); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 17px; text-align: center;
  box-shadow: 0 0 0 2px #fff;
}
.user-chip { display: none !important; color: var(--ink); font-size: 13px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.user-chip { text-decoration: none; }
a.user-chip:hover { color: var(--ac); }

/* ---------- Category bar ---------- */
.catbar { background: #fff; border-bottom: 1px solid var(--line); }
.cat-inner { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cat-inner::-webkit-scrollbar { display: none; }
.cat-all {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ac-dk); color: #fff; font-weight: 700; font-size: 13.5px;
  padding: 8px 14px; border-radius: 9px; flex: none;
}
.cat-all:hover { color: #fff; background: #9a3412; }
.cat-links a {
  display: inline-block; padding: 6px 11px; color: #374151; font-size: 13.5px; border-radius: 8px;
}
/* Boleh tatal mendatar (kiri↔kanan) pada skrin kecil — senarai kategori
   tidak boleh dipadamkan; kotak ini menjadi gelongsor, bukan pemotong. */
.cat-links { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-links::-webkit-scrollbar { display: none; }
.cat-links a:hover { color: var(--ac); background: rgba(249, 115, 22, .08); }
.nav-admin {
  flex: none; white-space: nowrap; padding: 6px 11px; border-radius: 8px;
  color: var(--ink); font-weight: 600;
}
.nav-admin:hover { color: var(--ac); background: rgba(249, 115, 22, .08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; border-radius: 10px;
  padding: 11px 18px; font-size: 14.5px; font-weight: 700;
  text-align: center; transition: transform .08s, opacity .15s, background .15s; font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn-orange { background: linear-gradient(135deg, var(--ac2), var(--ac)); color: #fff; box-shadow: 0 4px 12px rgba(249, 115, 22, .3); }
.btn-orange:hover { color: #fff; filter: brightness(1.04); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { color: #fff; background: #1f2937; }
.btn-ghost-nav { background: #fff; color: var(--ac-dk); border: 1.5px solid var(--ac); }
.btn-ghost-nav:hover { background: rgba(249, 115, 22, .08); }
/* Butang Bantuan: ikon soalan + teks supaya jelas dan mudah dikesan. */
.btn-help { display: inline-flex; align-items: center; gap: 5px; }
.btn-help svg { flex: none; }
.btn-ghost { background: #fff; color: #374151; border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--ac); border-color: var(--ac); }
.btn-danger { background: rgba(220, 38, 38, .1); color: var(--warn); border: 1px solid rgba(220, 38, 38, .35); }
.btn-ok { background: rgba(22, 163, 74, .12); color: var(--ok); border: 1px solid rgba(22, 163, 74, .4); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

main#app { flex: 1; padding-top: 22px; padding-bottom: 46px; }
.page-h { margin: 6px 0 14px; font-size: 24px; }
.page-sub { color: var(--mut); margin: -6px 0 18px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  border-radius: 16px; overflow: hidden; color: #fff; position: relative;
  background: linear-gradient(120deg, #0f1b2d 0%, #1e3a5f 55%, #26486f 100%);
  padding: 34px 30px; margin-bottom: 26px;
}
.hero .deco { position: absolute; right: -30px; top: -30px; font-size: 190px; opacity: .14; transform: rotate(-12deg); }
.hero .hero-badge {
  display: inline-block; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25); color: #fbbf24;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 12px;
}
.hero h1 { margin: 0 0 8px; font-size: 27px; max-width: 560px; }
.hero p { margin: 0 0 18px; color: #cbd5e1; max-width: 520px; }
.hero .hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 22px 0 6px; max-width: 840px; }
.hb { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); border-radius: 14px; padding: 14px 16px; }
.hb h2 { margin: 0 0 9px; font-size: 13px; color: #fbbf24; text-transform: uppercase; letter-spacing: .5px; }
.hb ul { margin: 0; padding: 0; list-style: none; }
.hb li { position: relative; padding-left: 19px; margin-bottom: 7px; font-size: 13px; color: #e2e8f0; line-height: 1.5; }
.hb li::before { content: '\2713'; position: absolute; left: 0; top: 0; color: #4ade80; font-weight: 800; }
.hb b { color: #fff; }
.hero .trust { display: flex; gap: 20px; margin-top: 22px; flex-wrap: wrap; font-size: 12.5px; color: #e2e8f0; }
.hero .trust b { display: block; color: var(--ac2); font-size: 15px; }
@media (max-width: 640px) { .hero-benefits { grid-template-columns: 1fr; } .hero { padding: 26px 20px; } }

/* ---------- Home sections ---------- */
.home-section { margin-bottom: 30px; }
.sec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sec-head .bar { width: 5px; height: 22px; border-radius: 3px; background: linear-gradient(var(--ac2), var(--ac)); }
.sec-head h2 { margin: 0; font-size: 19px; flex: 1; }
.sec-head a.more { font-size: 13px; font-weight: 600; }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
.cat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 8px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.cat-tile:hover { transform: translateY(-2px); border-color: var(--ac); box-shadow: var(--shadow); color: var(--ac-dk); }
.cat-tile .ic { font-size: 27px; line-height: 1; }
.cat-tile span.cnt { font-size: 11px; color: var(--mut); font-weight: 500; }

/* ---------- Product cards ---------- */
.grid.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.item-card {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; transition: transform .15s, border-color .15s, box-shadow .15s; display: flex; flex-direction: column;
}
.item-card:hover { transform: translateY(-3px); border-color: var(--ac); box-shadow: var(--shadow); }
.item-card a.th { display: block; position: relative; aspect-ratio: 4/3; background: #f6f7f9; overflow: hidden; }
.item-card .th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.item-card:hover .th img { transform: scale(1.04); }
.item-card .ph { display: grid; place-items: center; width: 100%; height: 100%; color: #c3c9d1; font-size: 34px; }
.item-card .feat-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: linear-gradient(135deg, var(--ac2), var(--ac)); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
}
.item-card .cond-chip {
  position: absolute; left: 8px; bottom: 8px; z-index: 2;
  background: rgba(17, 24, 39, .78); color: #fff; font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px; backdrop-filter: blur(2px); max-width: 78%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.item-card > .wish-btn {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .95); box-shadow: 0 2px 8px rgba(17, 24, 39, .18); font-size: 16px;
}
.item-body { padding: 11px 13px 12px; display: flex; flex-direction: column; flex: 1; gap: 5px; }
.item-body .p { font-weight: 800; color: var(--price); font-size: 16.5px; }
.item-body .p .old { color: var(--mut); text-decoration: line-through; font-weight: 500; font-size: 12px; margin-left: 6px; }
.item-body .t { font-weight: 600; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; font-size: 14px; }
.item-body .t a { color: var(--ink); }
.item-body .t a:hover { color: var(--ac-dk); }
.item-body .seller { font-size: 12.5px; color: var(--mut); display: flex; align-items: center; gap: 5px; }
.verify {
  display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex: none;
  background: #0284c7; color: #fff; border-radius: 50%; font-size: 9.5px; font-weight: 800;
}
.item-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }

.tag { display: inline-block; background: #fff7ed; color: var(--ac-dk); border: 1px solid #fed7aa; border-radius: 20px; padding: 1px 9px; font-size: 11.5px; }
.tag.cond { background: #f0fdf4; color: var(--ok); border-color: #bbf7d0; }
.tag.bad { background: #fef2f2; color: var(--warn); border-color: #fecaca; }
.tag.grey { background: #f3f4f6; color: var(--mut); border-color: var(--line); }
.tag.loc { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }

.wish-btn {
  width: 30px; height: 30px; flex: none; border-radius: 8px; cursor: pointer;
  display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: #9ca3af;
  font-size: 15px; transition: all .15s; line-height: 1;
}
.wish-btn.on { color: var(--warn); border-color: rgba(220, 38, 38, .5); background: #fef2f2; }

/* ---------- Filters ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.filter-bar input, .filter-bar select { border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 13.5px; background: #fff; color: var(--ink); }
.filter-bar select { min-width: 135px; }
.filter-bar input { flex: 1; min-width: 200px; }
.filter-bar button { border: 0; }

/* ---------- Browse (sidebar + grid) ---------- */
.browse { display: grid; grid-template-columns: 258px 1fr; gap: 18px; align-items: start; margin-bottom: 30px; }
.filters-side {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; position: sticky; top: 120px; box-shadow: var(--shadow);
}
.filters-side h3 { margin: 0 0 6px; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.filters-side h3::before { content: '\2193'; color: var(--ac2); font-size: 16px; }
.filters-side label { margin: 12px 0 4px; }
.filters-side input, .filters-side select { font-size: 13.5px; padding: 9px 11px; }
.filters-side .btn { font-size: 14px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.filter-toggle { display: none; }

/* ---------- Featured carousel ---------- */
.carousel {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 12px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.carousel::-webkit-scrollbar { height: 8px; }
.carousel::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 20px; }
.carousel .item-card { min-width: 224px; flex: 0 0 224px; scroll-snap-align: start; }

@media (max-width: 900px) {
  .browse { grid-template-columns: 1fr; }
  .filters-side { position: static; display: none; }
  .filters-side.open { display: block; }
  .filter-toggle { display: inline-flex; align-items: center; gap: 6px; }
}
@media (max-width: 640px) {
  .carousel .item-card { min-width: 186px; flex-basis: 186px; }
  .grid.cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .item-card > .wish-btn { top: 7px; right: 7px; width: 30px; height: 30px; }
  .item-card .feat-tag { top: 6px; left: 6px; font-size: 10px; }
  .item-card .cond-chip { left: 6px; bottom: 6px; font-size: 10px; }
}

input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search],
select, textarea {
  width: 100%; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: 14.5px; font-family: inherit; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--ac); }
select option { background: #fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin: 4px 0 5px; font-size: 13px; font-weight: 600; color: var(--mut); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.alert { border-radius: 10px; padding: 12px 15px; font-size: 14px; margin: 10px 0; }
.alert.err { background: #fef2f2; border: 1px solid #fecaca; color: var(--warn); }
.alert.ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--ok); }
.alert.info { background: #fff7ed; border: 1px solid #fed7aa; color: var(--ac-dk); }

/* Pengingat "lengkapkan profil" — muncul atas halaman untuk pengguna yang belum lengkap */
.profile-reminder {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 14px;
  padding: 14px 16px; margin: 0 0 16px; box-shadow: var(--shadow);
  position: relative;
}
.profile-reminder .pr-ico { font-size: 24px; line-height: 1; }
.profile-reminder > div:not(.row) { flex: 1; min-width: 200px; }
.profile-reminder .btn { white-space: nowrap; }

/* ---------- Detail ---------- */
.bcrumb { font-size: 13px; color: var(--mut); margin-bottom: 12px; }
.bcrumb a { color: var(--mut); }
.bcrumb a:hover { color: var(--ac); }
.detail { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .bar-inner { height: auto; padding: 10px 16px; } }
/* Skrin kecil: logo+SBC Marketplace & carian sebaris (carian dihalakan kanan),
   kemudian nama profil + 3 ikon (nama kiri, ikon kanan), kemudian Log Masuk/
   Log Keluar + Jual Sekarang dipusatkan di baris bawah nama+ikon. */
@media (max-width: 820px) {
  .brandwrap { flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
  .brand-top { width: 100%; gap: 8px; }
  .brandrow { width: 100%; justify-content: space-between; padding: 0 10px; }
  .brand-account { justify-content: center; flex-wrap: wrap; }
  .brand-actions .icon-btn { width: 34px; height: 34px; border-radius: 9px; }
  .brand-account .btn-sm { padding: 6px 10px; font-size: 12.5px; }
  .brand .logo { width: 32px; height: 32px; box-shadow: 0 3px 8px rgba(249,115,22,.18); }
  .brand span.bt { font-size: 12.5px; }
  .searchbar input { padding: 8px 10px; font-size: 13px; }
  .searchbar button { padding: 0 12px; }
}
.gal-main { background: #fff; border: 1px solid var(--line); border-radius: 14px; aspect-ratio: 4/3; overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.gal-main img { width: 100%; height: 100%; object-fit: contain; }
.gal-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gal-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; border: 2px solid var(--line); cursor: pointer; }
.gal-thumbs .on { border-color: var(--ac); }

.pdetail { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); }
.pdetail h1 { font-size: 20px; margin: 0 0 4px; }
.pdetail .big-p { font-size: 26px; font-weight: 800; color: var(--price); margin: 6px 0 12px; }
.spec { display: grid; grid-template-columns: 120px 1fr; row-gap: 6px; font-size: 14px; }
.spec dt { color: var(--mut); }
.spec dd { margin: 0; }

.seller-box { margin-top: 14px; }
.seller-box .sbox { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff;
  background: linear-gradient(135deg, #1e3a5f, #0f1b2d);
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rate { display: flex; gap: 2px; color: #f59e0b; font-size: 13px; }
.stars { letter-spacing: 1px; }
.rate.v0 .stars { color: #d1d5db; }
.sb-stats { display: flex; gap: 16px; margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 12.5px; color: var(--mut); }
.sb-stats b { color: var(--ink); }

.trust-panel { margin-top: 14px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; padding: 12px 14px; }
.trust-panel .tp { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: #166534; }
.trust-panel b { color: var(--ok); }

/* ---------- Booth ---------- */
.booth-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.booth-head .avatar { width: 64px; height: 64px; font-size: 24px; }
.booth-head h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 8px; }
.booth-stats { display: flex; gap: 26px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; color: var(--mut); }
.booth-stats b { color: var(--ink); font-size: 16px; display: block; }

.review-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.review-card .rate { font-size: 13px; }

/* ---------- Orders ---------- */
.order-line { display: flex; gap: 14px; align-items: flex-start; }
.order-line img, .order-line .thumb-ph { width: 74px; height: 74px; border-radius: 10px; object-fit: cover; background: #f6f7f9; flex: none; display: grid; place-items: center; color: var(--mut); font-size: 22px; }
.order-info { flex: 1; }
.order-info .oh { font-weight: 700; }
.order-act { margin-top: 8px; }
.money-row { display: flex; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 8px; font-size: 14px; }
/* Ringkasan jumlah troli — diletakkan DI ATAS senarai item supaya pengguna
   nampak jumlah bayaran (escrow) terlebih dahulu. */
.cart-tot { border: 2px solid var(--ac); background: linear-gradient(135deg, #fff7ed, #fff); }
.cart-tot .ct-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: var(--ac-dk); }
.cart-tot .ct-ico { font-size: 18px; }
.cart-tot .ct-line { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.cart-tot .ct-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 6px; font-size: 16px; font-weight: 800; }
.cart-tot .ct-total b { font-size: 26px; color: var(--price); }
.cart-tot .ct-note { margin: 0 0 10px; font-size: 12.5px; color: var(--mut); }
.cart-items { display: grid; gap: 12px; margin-top: 14px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs button { background: var(--card); color: var(--mut); border: 1px solid var(--line); border-radius: 10px; padding: 9px 16px; cursor: pointer; font-weight: 600; }
.tabs button.on { color: var(--ac-dk); border-color: var(--ac); background: #fff7ed; }

/* ---------- Brands ---------- */
.brand-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-chip {
  background: var(--card); border: 1px solid var(--line); border-radius: 30px;
  padding: 6px 14px; font-size: 13px; color: #374151; font-weight: 600; cursor: pointer;
}
.brand-chip:hover { border-color: var(--ac); color: var(--ac-dk); background: #fff7ed; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px);
  background: var(--dark); color: #fff; border-radius: 12px; padding: 12px 18px; font-size: 14px; opacity: 0;
  transition: opacity .25s, transform .25s; z-index: 99; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--warn); }

.previews { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.previews .pv { position: relative; width: 96px; height: 96px; }
.previews img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.previews .rm {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--warn); color: #fff; border: 0; font-weight: 700; font-size: 13px; cursor: pointer; line-height: 1;
}

/* ---------- Footer ---------- */
.site-foot { background: var(--dark); color: #cbd5e1; margin-top: 36px; padding: 34px 0 30px; }
.site-foot a { color: #9ca3af; }
.site-foot a:hover { color: #fff; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 24px; }
/* Skrin kecil: blok jenama (logo+tajuk, sosial, hak cipta) diberi satu baris
   PENUH di atas; "Marketplace" + "Maklumat" kekal dua lajur; blok pembayaran
   diberi satu baris penuh di bawah supaya lencana tidak sesak. */
@media (max-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .foot-grid > div:first-child { grid-column: 1 / -1; text-align: center; }
  .foot-grid > div:first-child .foot-brand,
  .foot-grid > div:first-child .social-row { justify-content: center; }
  .foot-grid > div:last-child { grid-column: 1 / -1; }
  .site-foot { padding: 28px 0 26px; }
}
.foot-brand .bt { color: #cbd5e1; }
.foot-grid h3 { color: #fff; margin: 0 0 10px; font-size: 14px; }
.foot-grid a.small { display: block; margin-bottom: 6px; font-size: 13px; }
.pay-badges {
  display: flex; flex-wrap: wrap; gap: 7px;
  /* Baris lencana pembayaran: latar putih supaya ikon kelihatan kemas di atas
     footer gelap; saiz setiap ikon kekal 64x36 seperti sedia ada. */
  background: #fff; border-radius: 14px; padding: 8px 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}
/* Lencana logo kaedah pembayaran rasmi: petak putih SAIZ SERAGAM (lebar sama)
   + <img> logo jenama di tengah, jadi panjang setiap logo padan (mis. visa &
   mastercard tidak lagi jauh berbeza). */
.pay-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 36px; padding: 4px; border-radius: 9px;
  background: #fff; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}
.pay-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.pay-disclaimer { margin-top: 8px; font-size: 11px; line-height: 1.55; color: #94a3b8; }

.spinner { border: 3px solid var(--line); border-top-color: var(--ac); border-radius: 50%; width: 34px; height: 34px; margin: 40px auto; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 44px 10px; color: var(--mut); }
.empty .big { font-size: 44px; margin-bottom: 8px; }

.step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.step .dot {
  width: 26px; height: 26px; border-radius: 50%; background: var(--card); border: 1px solid var(--ac);
  color: var(--ac); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; margin-top: 2px;
}
.step.done .dot { background: var(--ac); color: #fff; }
.step .lbl { font-size: 14px; }
.step.done .lbl b { color: var(--ac-dk); }

/* ---------- Social icons (footer) ---------- */
.social-row { display: flex; gap: 8px; margin-top: 12px; }
.social-ico {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #1f2937; border: 1px solid #374151; color: #e5e7eb; transition: all .15s;
}
.social-ico:hover { color: #fff; border-color: var(--ac); background: #111827; }

/* ---------- Share row (item detail) ---------- */
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- Modal ---------- */
.modal-ov {
  position: fixed; inset: 0; z-index: 80; background: rgba(17, 24, 39, .55);
  display: grid; place-items: center; padding: 18px;
}
.modal {
  width: 100%; max-width: 460px; background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); padding: 24px; position: relative; max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin: 0 0 6px; font-size: 19px; }
.modal .close-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 0; background: var(--bg); border-radius: 8px; cursor: pointer; font-size: 15px; color: var(--mut); }
.modal .close-x:hover { color: var(--ink); }
.rate-sel { display: flex; gap: 6px; }
.rate-sel button {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 18px; cursor: pointer; color: #d1d5db;
}
.rate-sel button:hover { transform: translateY(-1px); }
.rate-sel button.on { background: #fff7ed; border-color: var(--ac); color: #f59e0b; }
/* ---------- Consent banner (PDPA) ---------- */
.consent-bar {
  position: fixed; left: 50%; bottom: 18px; z-index: 95;
  transform: translateX(-50%) translateY(16px); opacity: 0;
  width: min(680px, calc(100% - 24px));
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #111827; color: #e5e7eb; border: 1px solid #374151; border-radius: 14px;
  box-shadow: 0 16px 44px rgba(0,0,0,.3); padding: 13px 15px;
  transition: opacity .25s, transform .25s;
}
.consent-bar.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.consent-bar .consent-text { font-size: 12.5px; line-height: 1.6; flex: 1 1 340px; }
.consent-bar .consent-text b { color: #fdba74; }
.consent-bar a { color: #fdba74; text-decoration: underline; }
.consent-bar .consent-btns { display: flex; gap: 8px; flex: none; }
.consent-bar .btn-ghost { background: transparent; color: #e5e7eb; border-color: #4b5563; }

/* Skip link + focus */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  left: 12px; top: 12px; width: auto; height: auto; z-index: 1000;
  padding: 8px 12px; border-radius: 10px; background: #fff; color: var(--ink);
  box-shadow: var(--shadow); border: 2px solid var(--ac);
}
:focus-visible {
  outline: 3px solid var(--ac); outline-offset: 2px; border-radius: 8px;
}


/* ===== Penambahbaikan mudah alih (semakan 2026-10) ===== */
/* 1. Elak iOS auto-zoom apabila medan borang difokus (perlu >=16px). */
@media (max-width: 820px) {
  input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=search],
  select, textarea { font-size: 16px; }

  /* 2. Saiz sentuh lebih besar (hampir 44px) untuk butang & pautan utama. */
  .icon-btn { min-width: 44px; min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .cat-inner a { min-height: 44px; display: inline-flex; align-items: center; }
  .wish-btn { min-width: 40px; min-height: 40px; }

  /* 3. Hormat takuk/palang rumah iOS (viewport-fit=cover). */
  .topbar { padding-top: env(safe-area-inset-top); }
}
/* 3b. Elemen tetap di atas selamat area bawah (env() = 0 jika disokong). */
#toast { bottom: calc(22px + env(safe-area-inset-bottom)); }
.consent-bar { bottom: calc(18px + env(safe-area-inset-bottom)); }

/* 4. Kontras WCAG: teks pada latar gelap perlu lebih terang. */
.site-foot .small.muted { color: #9ca3af; }
.site-foot .brand b { color: #fbbf24; }
