/* =========================================================
   Marketplace — design tokens
   Ganti --primary / --primary-dark / --primary-soft di sini
   untuk mengubah seluruh tema (mis. kembali ke biru #0d47a1).
   ========================================================= */
:root {
  --primary: #2e7d4f;
  --primary-dark: #1b5e38;
  --primary-soft: #e8f5ee;
  --primary-soft-2: #d7ede1;
  --accent: #fbc02d;
  --danger: #c62828;
  --bg: #f5f7f5;
  --card: #ffffff;
  --text: #14201a;
  --muted: #6b7a72;
  --border: #e5ebe7;

  --r-xl: 24px;
  --r-lg: 18px;
  --r-md: 14px;
  --r-sm: 10px;
  --pill: 999px;

  --shadow-sm: 0 1px 3px rgba(20, 32, 26, .06);
  --shadow-md: 0 4px 16px rgba(20, 32, 26, .08);
  --shadow-lg: 0 12px 32px rgba(20, 32, 26, .14);
  --shadow-dock: 0 8px 24px rgba(20, 32, 26, .16);

  --appbar-h: 60px;
  --dock-space: 96px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-space) + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

/* Sticky footer: main mengisi sisa tinggi agar .credit selalu di bawah
   (mencegah footer "naik" ke tengah saat halaman pendek). */
main { flex: 1 0 auto; width: 100%; }

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

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* Section header (judul + "Lihat Semua") */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.section-head h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.01em; }
.section-link {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

/* =========================================================
   APP BAR (mobile/tablet)
   ========================================================= */
.appbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}
.appbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: var(--appbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.appbar-loc {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 6px 4px;
  min-width: 0;
  color: var(--text);
}
.appbar-loc > i:first-child { color: var(--primary); font-size: 1rem; }
.appbar-loc-txt { display: flex; flex-direction: column; text-align: left; min-width: 0; }
.appbar-loc-txt small { font-size: .625rem; color: var(--muted); line-height: 1.1; }
.appbar-loc-txt strong {
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.appbar-chev { font-size: .625rem; color: var(--muted); }
.appbar-icon {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 1.0625rem;
  display: grid;
  place-items: center;
}
.appbar-icon:hover { background: var(--primary-soft); border-color: var(--primary-soft-2); color: var(--primary); }

/* Badge jumlah keranjang */
.cart-count {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: var(--pill);
  white-space: nowrap;
}
.appbar-icon .cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  border: 2px solid #fff;
}

/* =========================================================
   SITE HEADER (desktop)
   ========================================================= */
.site-header {
  display: none;
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
  flex-shrink: 0;
  min-width: 0;
}
.logo strong { font-size: 1.125rem; color: var(--primary); }
.logo span { color: var(--muted); font-weight: 400; font-size: .75rem; }
.site-header nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-shrink: 0; }
.site-header nav a {
  padding: 8px 12px;
  color: var(--text);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  border-radius: var(--pill);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.site-header nav a:hover, .site-header nav a.active { background: var(--primary-soft); color: var(--primary); }
.search-bar { display: flex; flex-shrink: 0; }
.search-bar input {
  border: 1px solid var(--border);
  border-right: 0;
  padding: 9px 14px;
  font-size: .875rem;
  width: 200px;
  max-width: 100%;
  outline: none;
  border-radius: var(--pill) 0 0 var(--pill);
  background: #f7f9f7;
}
.search-bar input:focus { border-color: var(--primary); background: #fff; }
.search-bar button {
  background: var(--primary);
  border: 0;
  color: #fff;
  padding: 9px 16px;
  border-radius: 0 var(--pill) var(--pill) 0;
  flex-shrink: 0;
}
.search-bar button:hover { background: var(--primary-dark); }

/* =========================================================
   GREETING (mobile/tablet)
   ========================================================= */
.greeting {
  background: var(--bg);
  padding: 20px 0 4px;
}
.greeting-loc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.greeting-loc i { color: var(--primary); }
.greeting-title {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}
.greeting-title span { color: var(--primary); }

/* Pill search */
.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  padding: 0 8px 0 16px;
  height: 52px;
  box-shadow: var(--shadow-sm);
}
.search-pill-ico { color: var(--muted); font-size: .9375rem; flex-shrink: 0; }
.search-pill input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-size: .875rem;
  color: var(--text);
}
.search-pill-scan {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1rem;
  display: grid;
  place-items: center;
}
.search-pill-scan:hover { background: var(--primary-soft-2); }

/* =========================================================
   HERO (desktop)
   ========================================================= */
.hero { display: none; }

/* =========================================================
   KATEGORI
   ========================================================= */
.categories { padding: 24px 0 4px; background: transparent; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: transform .15s, border-color .15s, background .15s;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-align: center;
}
.category-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.category-card.active { border-color: var(--primary); background: var(--primary-soft); }
.cat-ico {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.category-card.active .cat-ico { background: var(--primary); color: #fff; }
.category-card h3 {
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.25;
  max-width: 100%;
  word-break: break-word;
}
.cat-count { font-size: .625rem; color: var(--muted); }

/* =========================================================
   PROMO BANNER
   ========================================================= */
.promo-wrap { padding: 20px 0 4px; }
.promo {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #3f9d68 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-md);
}
.promo-txt { min-width: 0; }
.promo-txt strong { display: block; font-size: 1.0625rem; font-weight: 800; margin-bottom: 4px; }
.promo-txt p { font-size: .8125rem; opacity: .92; margin-bottom: 14px; max-width: 34ch; }
.promo-btn {
  background: #fff;
  color: var(--primary-dark);
  border: 0;
  border-radius: var(--pill);
  padding: 10px 20px;
  font-size: .8125rem;
  font-weight: 700;
}
.promo-btn:hover { background: #f1f6f2; }
.promo-badge {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 2px dashed rgba(255, 255, 255, .5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
}
.promo-badge i { font-size: 1.125rem; }
.promo-badge span { font-size: 1.125rem; font-weight: 800; }

/* =========================================================
   PRODUK
   ========================================================= */
.featured { padding: 24px 0 8px; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-media {
  position: relative;
  aspect-ratio: 1/1;
  background: #f2f5f2;
  overflow: hidden;
  flex-shrink: 0;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-media img { transform: scale(1.05); }

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: var(--danger);
  color: #fff;
  font-size: .625rem;
  font-weight: 700;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--pill);
  box-shadow: var(--shadow-sm);
}
.product-badge.cat-tag { background: rgba(20, 32, 26, .72); backdrop-filter: blur(4px); }

.fav {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .92);
  color: #8a9890;
  font-size: .8125rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  transition: color .15s, transform .15s;
}
.fav:hover { transform: scale(1.08); }
.fav.on { color: var(--danger); }

.product-body {
  padding: 10px 11px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 6px;
}
.product-body h3 {
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-height: 2.6em;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .6875rem;
  color: var(--muted);
  min-width: 0;
}
.product-rating .stars { color: var(--accent); letter-spacing: -.5px; white-space: nowrap; }
.product-rating span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.product-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.product-price { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.current-price {
  font-size: .9375rem;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.original-price {
  font-size: .6875rem;
  color: var(--muted);
  text-decoration: line-through;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-add {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--pill);
  border: 0;
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: background .15s, transform .15s;
  box-shadow: 0 3px 10px rgba(46, 125, 79, .3);
}
.product-add:hover { background: var(--primary-dark); transform: scale(1.06); }
.product-add:active { transform: scale(.94); }

/* Empty state */
.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  font-size: .875rem;
}
.empty i { display: block; font-size: 2rem; margin-bottom: 10px; color: var(--border); }

/* =========================================================
   BUTTONS (dipakai modal)
   ========================================================= */
.btn {
  padding: 10px 14px;
  border: 0;
  border-radius: var(--pill);
  font-size: .8125rem;
  font-weight: 700;
  transition: background .15s;
  text-align: center;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-block { display: block; width: 100%; padding: 14px; font-size: .9375rem; }

/* =========================================================
   CREDIT BAR (pengganti footer)
   ========================================================= */
.credit { background: #14201a; color: #8a9890; padding: 18px 0; text-align: center; font-size: .8125rem; margin-top: 28px; }
.credit p { letter-spacing: .01em; }
.credit strong { color: #6ddc9c; font-weight: 700; }

/* =========================================================
   VIEW + PAGE HEAD
   ========================================================= */
.view[hidden] { display: none; }
.page-head {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: calc(var(--appbar-h) + env(safe-area-inset-top, 0px));
  z-index: 55;
}
.page-head .container { display: flex; align-items: center; gap: 10px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
.page-back {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: .9375rem;
}
.page-back:hover { background: var(--primary-soft-2); }
.page-title {
  font-size: 1.0625rem; font-weight: 800; letter-spacing: -.01em;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-title small { display: block; font-size: .6875rem; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.page-block { padding-top: 16px; padding-bottom: 16px; }

/* Utilitas */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.center { text-align: center; }
.muted-sm { font-size: .75rem; color: var(--muted); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); }
.card.pad { padding: 16px; }

/* Tautan di dalam kartu produk */
.media-link { display: block; width: 100%; height: 100%; }
.media-link img { width: 100%; height: 100%; object-fit: cover; }
.product-body h3 a { color: inherit; text-decoration: none; }

/* =========================================================
   CHIP FILTER
   ========================================================= */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--pill);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =========================================================
   DETAIL PRODUK
   ========================================================= */
.pd-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; }
.pd-media { position: relative; background: #f2f5f2; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1/1; }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-cat { display: inline-block; font-size: .6875rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 4px 10px; border-radius: var(--pill); }
.pd-info h2 { font-size: 1.25rem; font-weight: 800; line-height: 1.3; margin: 8px 0; }
.pd-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 10px 0 4px; }
.pd-price .current-price { font-size: 1.5rem; }
.pd-disc { font-size: .6875rem; font-weight: 700; color: var(--danger); background: #fdecec; padding: 3px 8px; border-radius: var(--pill); }
.pd-meta { margin: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; display: flex; flex-direction: column; gap: 9px; }
.pd-meta > div { display: flex; justify-content: space-between; gap: 12px; font-size: .8125rem; }
.pd-meta dt { color: var(--muted); }
.pd-meta dd { font-weight: 600; text-align: right; min-width: 0; }
.pd-desc { font-size: .875rem; color: #3b4a42; line-height: 1.65; }
.pd-bar{display:flex;gap:10px;margin-top:18px;position:sticky;bottom:calc(58px + env(safe-area-inset-bottom,0px));z-index:60;background:var(--bg);padding:10px 0 4px}
.pd-bar::before{content:"";position:absolute;left:0;right:0;top:-16px;height:16px;background:linear-gradient(to top,var(--bg),rgba(0,0,0,0));pointer-events:none}
.pd-bar .btn { flex: 1; padding: 13px 14px; }
.pd-fav {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--card); color: var(--muted); font-size: .6875rem; font-weight: 600;
}
.pd-fav.on { color: var(--danger); border-color: var(--danger); background: #fdecec; }
.btn-outline { background: var(--card); color: var(--primary-dark); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }

/* =========================================================
   KERANJANG
   ========================================================= */
.cart-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cart-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; }
.ci-thumb { width: 64px; height: 64px; border-radius: var(--r-md); object-fit: cover; flex-shrink: 0; background: #f2f5f2; }
.ci-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ci-mid .ci-name { font-size: .8125rem; font-weight: 600; color: inherit; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ci-mid .ci-price { font-size: .8125rem; font-weight: 800; color: var(--primary-dark); }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.qty { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--pill); overflow: hidden; }
.qty button { width: 30px; height: 30px; border: 0; background: var(--card); color: var(--primary-dark); font-size: 1rem; font-weight: 700; }
.qty button:hover { background: var(--primary-soft); }
.qty span { min-width: 26px; text-align: center; font-size: .8125rem; font-weight: 700; }
.ci-del { border: 0; background: none; color: var(--muted); font-size: .875rem; padding: 4px; }
.ci-del:hover { color: var(--danger); }
.cart-summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-top: 16px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: .875rem; padding: 6px 0; }
.cart-summary .row .free { color: var(--primary); font-weight: 700; }
.cart-summary .row.total { border-top: 2px solid var(--text); margin-top: 8px; padding-top: 12px; font-size: 1rem; }
.cart-summary .row.total strong { font-size: 1.25rem; color: var(--primary-dark); }
.cart-summary .btn-block { margin-top: 14px; }

/* =========================================================
   PESANAN
   ========================================================= */
.order-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; margin-bottom: 12px; }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.order-id { font-weight: 800; font-size: .875rem; margin-right: 8px; }
.order-date { font-size: .6875rem; color: var(--muted); }
.order-status { font-size: .6875rem; font-weight: 700; color: var(--primary-dark); background: var(--primary-soft); padding: 4px 10px; border-radius: var(--pill); white-space: nowrap; }
.order-items { list-style: none; padding: 8px 0; }
.order-items li { display: flex; gap: 10px; font-size: .8125rem; padding: 4px 0; }
.order-items .oi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-items .oi-qty { color: var(--muted); flex-shrink: 0; }
.order-items .oi-price { font-weight: 700; flex-shrink: 0; }
.order-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; font-size: .875rem; }
.order-foot strong { color: var(--primary-dark); font-size: 1.0625rem; }
.order-pay { font-size: .6875rem; color: var(--muted); margin-top: 6px; }

/* =========================================================
   AKUN
   ========================================================= */
.profile-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border-radius: var(--r-xl); padding: 18px; box-shadow: var(--shadow-md); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 1.5rem; flex-shrink: 0; }
.profile-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-info strong { font-size: 1.0625rem; }
.profile-info span { font-size: .75rem; opacity: .92; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-addr { display: flex; align-items: center; gap: 6px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 6px; color: inherit; }
.stat:hover { border-color: var(--primary); background: var(--primary-soft); }
.stat i { color: var(--primary); font-size: 1rem; }
.stat strong { font-size: 1.125rem; }
.stat span { font-size: .6875rem; color: var(--muted); font-weight: 600; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px 14px; color: inherit; width: 100%; text-align: left; }
.menu-item:hover { border-color: var(--primary); background: var(--primary-soft); }
.mi-ico { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; flex-shrink: 0; font-size: 1rem; }
.mi-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mi-txt strong { font-size: .875rem; }
.mi-txt small { font-size: .6875rem; color: var(--muted); }
.mi-arrow { color: var(--muted); font-size: .75rem; flex-shrink: 0; }

/* =========================================================
   FORM (jual / akun)
   ========================================================= */
.fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fld > span { font-size: .75rem; font-weight: 700; }
.fld input, .fld select, .fld textarea {
  border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 11px 13px; font-size: .875rem; font-family: inherit;
  background: #f7f9f7; outline: none; width: 100%; color: var(--text);
}
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--primary); background: #fff; }
.fld textarea { resize: vertical; }
.fld small { font-size: .6875rem; color: var(--muted); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.search-inline { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: var(--pill); padding: 6px 6px 6px 16px; }
.search-inline > i { color: var(--muted); flex-shrink: 0; }
.search-inline input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: .875rem; padding: 8px 0; color: var(--text); }
.search-inline .btn { flex-shrink: 0; }

/* =========================================================
   FLOATING BOTTOM DOCK (mobile/tablet)
   ========================================================= */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 70;
  width: calc(100% - 24px);
  max-width: 520px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-dock);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 6px;
  gap: 2px;
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 7px 4px;
  border-radius: var(--pill);
  transition: color .15s, background .2s;
  min-width: 0;
}
.bn-ico { position: relative; font-size: 1.0625rem; display: grid; place-items: center; }
.bn-label { font-size: .625rem; font-weight: 600; line-height: 1; }
.bn-item.active {
  flex: 1.6;
  flex-direction: row;
  gap: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.bn-item.active .bn-label { font-size: .75rem; }
.bn-item:hover:not(.active) { color: var(--primary-dark); }
.bn-count {
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: 2px;
}

/* =========================================================
   TOAST
   ========================================================= */
.notification {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock-space) + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px);
  background: #14201a;
  color: #fff;
  padding: 11px 16px;
  border-radius: var(--pill);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .2s, transform .2s;
  z-index: 9999;
  font-size: .8125rem;
  font-weight: 600;
  max-width: calc(100% - 32px);
}
.notification.show { opacity: 1; transform: translate(-50%, 0); }
.notification i { color: #6ddc9c; }

/* =========================================================
   CHECKOUT MODAL — bottom sheet di mobile
   ========================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 32, 26, .5);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--card);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 22px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: sheet-up .25s ease-out;
}
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal-grip {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  border-radius: var(--pill);
  background: var(--border);
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #f2f5f2;
  font-size: 1.375rem;
  line-height: 1;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--primary-soft); color: var(--primary-dark); }
.modal h2 { font-size: 1.1875rem; font-weight: 800; margin-bottom: 16px; padding-right: 40px; }
.checkout-step[hidden] { display: none; }
.checkout-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.checkout-items { list-style: none; margin-bottom: 14px; max-height: 220px; overflow-y: auto; }
.checkout-items li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: .8125rem;
}
.checkout-items li .ci-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkout-items li .ci-qty { color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.checkout-items li .ci-price { font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.checkout-empty { color: var(--muted); font-size: .8125rem; text-align: center; padding: 12px 0; }
.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9375rem;
  padding: 12px 0;
  border-top: 2px solid var(--text);
  margin-bottom: 16px;
}
.checkout-total strong { color: var(--primary-dark); font-size: 1.125rem; white-space: nowrap; }
.qr-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 12px;
  overflow: hidden;
}
.qr-box img { max-width: 100%; height: auto; }
.qr-loading { position: absolute; color: var(--muted); font-size: .875rem; }
.qr-loading[hidden] { display: none; }
.qr-amount { text-align: center; font-size: .9375rem; margin-bottom: 4px; }
.qr-amount strong { color: var(--primary-dark); }
.qr-expiry { text-align: center; font-size: .75rem; color: var(--muted); margin-bottom: 12px; }
.qr-status {
  text-align: center;
  font-size: .875rem;
  color: var(--primary-dark);
  font-weight: 700;
  padding: 11px;
  background: var(--primary-soft);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.qr-status.paid { background: #e8f5e9; color: #2e7d32; }
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.done-icon, .error-icon { font-size: 3rem; text-align: center; margin-bottom: 8px; }
.done-icon { color: #2e7d32; }
.error-icon { color: var(--danger); }
.checkout-step h3 + p { text-align: center; color: var(--muted); font-size: .875rem; margin-bottom: 16px; }

/* =========================================================
   TABLET  ≥ 640px
   ========================================================= */
@media (min-width: 640px) {
  .container { padding: 0 24px; }
  .appbar-inner { padding: 0 24px; }
  .greeting { padding: 26px 0 6px; }
  .greeting-title { font-size: 1.875rem; }
  .category-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .cat-ico { width: 52px; height: 52px; font-size: 1.375rem; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .promo { padding: 26px 28px; }
  .promo-badge { width: 104px; height: 104px; }
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: var(--r-xl); padding-bottom: 22px; }
  .modal-grip { display: none; }
  .pd-wrap { grid-template-columns: 1fr 1fr; align-items: start; }
  .pd-media { position: sticky; top: 80px; }
  .pd-bar { position: static; padding-top: 0; }
  .pd-bar::before { display: none; }
  .menu-list { display: grid; grid-template-columns: 1fr 1fr; }
  .bottom-nav { width: calc(100% - 48px); }
}

/* =========================================================
   DESKTOP  ≥ 1024px  — layout klasik, dock/AppBar disembunyikan
   ========================================================= */
@media (min-width: 1024px) {
  body { padding-bottom: 0; }

  .appbar, .greeting, .bottom-nav { display: none; }
  .site-header { display: block; }

  .hero {
    display: block;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, #3f9d68 100%);
    color: #fff;
    padding: 56px 0;
    text-align: center;
  }
  .hero h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
  .hero p { font-size: 1rem; opacity: .92; max-width: 560px; margin: 0 auto 20px; }
  .hero-search { display: flex; max-width: 540px; margin: 0 auto; }
  .hero-search input {
    flex: 1;
    min-width: 0;
    padding: 13px 18px;
    border: 0;
    border-radius: var(--pill) 0 0 var(--pill);
    font-size: .9375rem;
    outline: none;
  }
  .hero-search button {
    padding: 13px 24px;
    background: #fff;
    color: var(--primary-dark);
    border: 0;
    font-weight: 700;
    border-radius: 0 var(--pill) var(--pill) 0;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hero-search button:hover { background: #f1f6f2; }

  .categories { padding: 40px 0 8px; }
  .section-head h2 { font-size: 1.375rem; }
  .category-grid { gap: 14px; }
  .promo-wrap { padding: 24px 0 4px; }
  .promo { padding: 32px 36px; }
  .promo-txt strong { font-size: 1.375rem; }
  .promo-txt p { font-size: .9375rem; }
  .featured { padding: 36px 0 12px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
  .product-body { padding: 12px 13px 14px; }
  .product-body h3 { font-size: .875rem; }
  .current-price { font-size: 1rem; }
  .product-add { width: 42px; height: 42px; }
  .notification { bottom: 24px; left: auto; right: 24px; transform: translateY(20px); }
  .notification.show { transform: none; }
  .credit { margin-top: 48px; padding: 24px 0; }
  .page-head { top: 64px; }
}

/* =========================================================
   Aksesibilitas
   ========================================================= */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =========================================================
   ADMIN DASHBOARD
   ========================================================= */
.nav-admin {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--pill);
  background: var(--primary-soft); color: var(--primary-dark) !important;
  font-weight: 600;
}
.nav-admin:hover { background: var(--primary-soft-2); }

body.admin-mode { padding-bottom: 0; background: #eef2ef; }
body.admin-mode .appbar,
body.admin-mode .site-header,
body.admin-mode .bottom-nav { display: none !important; }
body.admin-mode main { padding-bottom: 0; }
body.admin-mode .credit { margin-top: 0; }

/* --- top bar --- */
.admin-top {
  position: sticky; top: 0; z-index: 80;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.admin-top-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 62px; padding-top: 8px; padding-bottom: 8px;
}
.admin-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.admin-logo {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--primary); color: #fff; font-size: .95rem;
}
.admin-brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.admin-brand-txt strong { font-size: .95rem; color: var(--text); }
.admin-brand-txt small { font-size: .75rem; color: var(--muted); }

.admin-tabs { display: flex; align-items: center; gap: 4px; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 13px; border: 0; background: transparent; cursor: pointer;
  border-radius: var(--r-md); font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--muted); white-space: nowrap;
}
.admin-tab:hover { background: var(--primary-soft); color: var(--primary-dark); }
.admin-tab.active { background: var(--primary); color: #fff; }
.admin-dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--pill); background: var(--accent); color: #5a4400;
  font-size: .6875rem; font-style: normal; font-weight: 700;
}
.admin-user { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.btn-sm { padding: 8px 12px; font-size: .8125rem; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f3f5f4; color: var(--text); }

/* --- body --- */
.admin-body { padding: 22px 0 56px; }
.admin-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-sec-head h1 { font-size: 1.375rem; color: var(--text); }
.admin-sec-head p { font-size: .875rem; color: var(--muted); margin-top: 3px; }
.admin-sec-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* --- KPI --- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 15px 16px; box-shadow: var(--shadow-sm);
}
.kpi-ico { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: var(--r-md); background: var(--primary-soft); color: var(--primary-dark); font-size: 1rem; }
.kpi-amber .kpi-ico { background: #fff4d6; color: #8a6300; }
.kpi-red .kpi-ico { background: #fde8e8; color: #9b1c1c; }
.kpi-blue .kpi-ico { background: #e7effd; color: #1d4ed8; }
.kpi-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.kpi-txt strong { font-size: 1.1875rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-txt span { font-size: .75rem; color: var(--muted); margin-top: 2px; }

/* --- cards / columns --- */
.adm-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; align-items: start; }
.adm-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.adm-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.adm-card-head h2 { font-size: .9375rem; color: var(--text); }
.adm-card-head small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.adm-card-body { padding: 14px 16px; }
.adm-card-body.tight { padding: 6px 16px 12px; }

/* --- chart --- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 158px; padding: 8px 2px 0; }
.bar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bar { width: 100%; max-width: 46px; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); min-height: 3px; transition: height .35s ease; }
.bar-col:hover .bar { background: linear-gradient(180deg, #3f9d68, var(--primary)); }
.bar-lbl { font-size: .6875rem; color: var(--muted); }
.bar-val { font-size: .625rem; color: var(--muted); }

/* --- list rows --- */
.adm-list { display: flex; flex-direction: column; }
.adm-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.adm-row:last-child { border-bottom: 0; }
.adm-row-main { flex: 1 1 auto; min-width: 0; }
.adm-row-main strong { display: block; font-size: .8125rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-row-main span { font-size: .75rem; color: var(--muted); }
.adm-row-val { font-size: .8125rem; font-weight: 700; color: var(--text); white-space: nowrap; }

/* --- toolbar --- */
.adm-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.adm-search { position: relative; flex: 1 1 220px; min-width: 180px; }
.adm-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8125rem; }
.adm-search input { width: 100%; padding: 11px 13px 11px 36px; border: 1px solid var(--border); border-radius: var(--r-md); font: inherit; font-size: .875rem; background: var(--card); color: var(--text); }
.adm-select { padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-md); font: inherit; font-size: .875rem; background: var(--card); color: var(--text); }
.adm-search input:focus, .adm-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 7px 13px; border: 1px solid var(--border); background: var(--card);
  border-radius: var(--pill); font: inherit; font-size: .8125rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- table --- */
.adm-table-wrap { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow-x: auto; }
table.adm-table { width: 100%; min-width: 700px; border-collapse: collapse; font-size: .875rem; }
.adm-table thead th {
  text-align: left; padding: 12px 14px; background: #f7faf8;
  border-bottom: 1px solid var(--border);
  font-size: .75rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.adm-table tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #fafcfb; }
.adm-table tr.row-off { opacity: .55; }
.adm-thumb img { width: 44px; height: 44px; border-radius: var(--r-sm); object-fit: cover; background: #eef2ef; display: block; }
.adm-name { font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sub { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.adm-num { font-weight: 600; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.adm-strike { font-weight: 500; font-size: .75rem; color: var(--muted); text-decoration: line-through; }
.adm-actions { display: flex; gap: 6px; justify-content: flex-end; }
.adm-empty { text-align: center; color: var(--muted); padding: 28px 14px !important; }
.cat-pill { display: inline-block; padding: 3px 9px; border-radius: var(--pill); background: var(--primary-soft); color: var(--primary-dark); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill { display: inline-block; padding: 3px 9px; border-radius: var(--pill); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.pill-green { background: var(--primary-soft); color: var(--primary-dark); }
.pill-green-soft { background: #eaf6ee; color: #256b45; }
.pill-amber { background: #fff4d6; color: #8a6300; }
.pill-red { background: #fde8e8; color: #9b1c1c; }
.pill-blue { background: #e7effd; color: #1d4ed8; }
.pill-grey { background: #eceeed; color: var(--muted); }
.ico-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); border-radius: var(--r-sm);
  color: var(--muted); cursor: pointer; font-size: .8125rem;
}
.ico-btn:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
.ico-btn.danger:hover { border-color: var(--danger); color: var(--danger); background: #fdecec; }
.adm-status-select { padding: 7px 9px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; font-size: .8125rem; background: var(--card); color: var(--text); }

/* --- forms --- */
.adm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm-form-grid .span-2 { grid-column: 1 / -1; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border);
  border-radius: var(--r-md); font: inherit; font-size: .875rem;
  background: var(--card); color: var(--text);
}
.fld textarea { resize: vertical; min-height: 74px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.check-line { display: flex; align-items: center; gap: 9px; font-size: .875rem; color: var(--text); }
.check-line input { width: 18px; height: 18px; accent-color: var(--primary); }
.hint { font-size: .75rem; color: var(--muted); }

/* --- gate (login) --- */
.admin-gate { padding: 6vh 0 8vh; }
.gate-card { max-width: 430px; margin: 0 auto; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 28px 24px; }
.gate-ico { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-size: 1.375rem; }
.gate-card h1 { font-size: 1.25rem; color: var(--text); }
.gate-card > p { font-size: .875rem; color: var(--muted); margin-top: 6px; }
.gate-card form { margin-top: 18px; text-align: left; display: flex; flex-direction: column; gap: 12px; }
.gate-err { background: #fdecec; color: #9b1c1c; border-radius: var(--r-md); padding: 10px 12px; font-size: .8125rem; margin-top: 14px; }
.gate-hint { font-size: .75rem; color: var(--muted); margin-top: 14px; }
.gate-hint code { background: #f1f4f2; padding: 2px 6px; border-radius: 6px; font-size: .75rem; color: var(--text); }

/* --- listings --- */
.lcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.lcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column; }
.lcard-top { display: flex; gap: 12px; padding: 14px 16px; }
.lcard-img { width: 62px; height: 62px; flex: 0 0 auto; border-radius: var(--r-md); object-fit: cover; background: #eef2ef; }
.lcard-info { min-width: 0; flex: 1 1 auto; }
.lcard-info strong { display: block; font-size: .875rem; color: var(--text); }
.lcard-info .adm-sub { margin-top: 3px; }
.lcard-meta { padding: 0 16px 12px; font-size: .8125rem; color: var(--muted); }
.lcard-meta .adm-num { color: var(--text); }
.lcard-desc { padding: 0 16px 12px; font-size: .8125rem; color: var(--muted); line-height: 1.5; max-height: 66px; overflow: hidden; }
.lcard-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); margin-top: auto; }
.lcard-actions .btn { flex: 1 1 0; justify-content: center; }
.lcard.done { opacity: .72; }
.mt-16 { margin-top: 16px; }
.center { text-align: center; }
.danger-zone { border-color: #f2cccc; }
.danger-zone .adm-card-head h2 { color: #9b1c1c; }

/* --- admin responsive --- */
@media (max-width: 900px) {
  .adm-cols { grid-template-columns: 1fr; }
  .admin-top-inner { flex-wrap: wrap; gap: 10px; }
  .admin-tabs { order: 3; width: 100%; padding-bottom: 4px; }
  .admin-user { margin-left: auto; }
}
@media (max-width: 620px) {
  .admin-brand-txt small { display: none; }
  .admin-user .btn span { display: none; }
  .admin-tab { padding: 9px 11px; flex: 1 1 0; justify-content: center; }
  .admin-tab span { display: none; }
  .admin-tabs { gap: 4px; }
  .admin-gate { min-height: calc(100vh - 150px); }
  .admin-body { padding: 16px 0 48px; }
  .adm-form-grid { grid-template-columns: 1fr; }
  .admin-sec-head h1 { font-size: 1.1875rem; }
  table.adm-table { min-width: 620px; }
  .adm-thumb img { width: 38px; height: 38px; }
  .bar-chart { height: 130px; }
  .bar-val { display: none; }
}

/* =========================================================
   ADMIN v2 — kosakata kelas yang sebelumnya TANPA CSS
   (admin-section, admin-card, adm-note, listing-grid, dll.)
   + komponen baru (ulasan, kupon, pengumuman) + tabel responsif.
   ========================================================= */

/* --- kerangka section & kartu --- */
.admin-section { margin: 0 0 22px; }
.admin-section > * + * { margin-top: 16px; }
.admin-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-sec-head h2 { font-size: 1.125rem; font-weight: 700; }
.admin-sec-head .muted-sm { font-size: .8125rem; color: var(--muted); }

.admin-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.admin-card { display: flex; flex-direction: column; }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.admin-card-head h3 { font-size: .9375rem; font-weight: 700; }
.admin-card-head .muted-sm { font-size: .75rem; color: var(--muted); font-weight: 500; }

/* --- chart batang --- */
.bar-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 170px; padding-top: 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; flex: 1 1 0; height: 100%; }
.bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, var(--primary), var(--primary-dark)); border-radius: 8px 8px 4px 4px; min-height: 4px; transition: height .3s ease; }
.bar-val { font-size: .6875rem; color: var(--muted); font-weight: 600; }
.bar-lbl { font-size: .6875rem; color: var(--muted); }

/* --- daftar stok menipis & terlaris --- */
.low-stock, .top-products { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.low-stock li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); }
.ls-name { font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-products li { display: flex; align-items: center; gap: 10px; }
.top-products img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--primary-soft); flex: none; }
.tp-name { flex: 1 1 auto; font-size: .875rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-sold { font-size: .75rem; color: var(--muted); white-space: nowrap; }

/* --- tabel admin --- */
.adm-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.adm-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.adm-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: var(--primary-soft); }
.adm-thumb img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--primary-soft); }
.adm-name { font-weight: 600; }
.adm-sub { font-size: .75rem; color: var(--muted); }
.adm-num { white-space: nowrap; }
.adm-strike { display: block; font-size: .75rem; color: var(--muted); text-decoration: line-through; }
.adm-actions { display: flex; gap: 6px; }
.adm-items { max-width: 240px; }
.adm-items span { display: block; font-size: .8125rem; color: var(--muted); }
.adm-items b { color: var(--text); }
.adm-empty { text-align: center; color: var(--muted); padding: 26px 12px; font-size: .875rem; }
.row-off { opacity: .6; }
.adm-table-wrap { overflow-x: auto; border-radius: var(--r-lg); }

/* --- kontrol toolbar --- */
.adm-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.adm-search { display: flex; align-items: center; gap: 8px; flex: 1 1 240px; padding: 9px 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-sm); }
.adm-search i { color: var(--muted); }
.adm-search input { border: 0; outline: 0; background: transparent; font: inherit; width: 100%; }
.adm-select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--card); font: inherit; color: inherit; }
.adm-status { min-width: 116px; }
.adm-order-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

/* --- pill status dinamis (st-*) --- */
.adm-status.st-baru { border-color: #f0c36d; color: #8a6d1b; }
.adm-status.st-diproses { border-color: #9cc3f0; color: #1c4e8a; }
.adm-status.st-dikirim { border-color: #c3a9ee; color: #5a3fa0; }
.adm-status.st-selesai { border-color: #a6d8b8; color: var(--primary-dark); }
.adm-status.st-batal { border-color: #f2c2c2; color: var(--danger); }
.pill.st-baru { background: #fdf3df; color: #8a6d1b; }
.pill.st-diproses { background: #e6f0fb; color: #1c4e8a; }
.pill.st-dikirim { background: #efe7fb; color: #5a3fa0; }
.pill.st-selesai { background: var(--primary-soft); color: var(--primary-dark); }
.pill.st-batal { background: #fbe6e6; color: var(--danger); }
.ico-btn.danger { color: var(--danger); }

/* --- tombol tambahan --- */
.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.btn-danger:hover { filter: brightness(.94); }
.link-btn { background: none; border: 0; color: var(--primary-dark); font: inherit; font-weight: 600; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.link-btn:hover { background: var(--primary-soft); }
.mt-8 { margin-top: 8px; }

/* --- form --- */
.fld-check { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: .875rem; cursor: pointer; }
.fld-check input { width: 18px; height: 18px; accent-color: var(--primary); }
.checkout-body .fld { margin-bottom: 12px; }
.gate-sub { color: var(--muted); font-size: .875rem; text-align: center; margin: 4px 0 12px; }

/* --- catatan / meta / help --- */
.adm-note { display: flex; align-items: flex-start; gap: 8px; font-size: .8125rem; color: var(--muted); background: var(--primary-soft); border-radius: var(--r-sm); padding: 10px 12px; margin: 10px 0; }
.adm-note.warn { background: #fdf3df; color: #8a6d1b; }
.adm-meta { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .875rem; margin: 4px 0 12px; }
.adm-meta dt { color: var(--muted); }
.adm-meta dd { font-weight: 600; text-align: right; }
.adm-help { font-size: .75rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }

/* --- modal admin --- */
.admin-modal { z-index: 60; }
.admin-modal .modal { max-height: 90vh; overflow-y: auto; }

/* --- kartu listing (jualan masuk) --- */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.listing-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.listing-card > img { width: 100%; height: 150px; object-fit: cover; background: var(--primary-soft); }
.lc-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; flex: 1; }
.lc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lc-body h3 { font-size: .9375rem; font-weight: 700; }
.lc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .75rem; color: var(--muted); }
.lc-desc { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.lc-actions { display: flex; gap: 8px; margin-top: auto; }
.lc-actions .btn { flex: 1 1 0; justify-content: center; }

/* --- badge stok habis / tombol nonaktif --- */
.product-badge.habis { position: absolute; top: 8px; left: 8px; background: var(--danger); color: #fff; }
.product-add.off { opacity: .5; cursor: not-allowed; }

/* ===== Komponen baru: kartu generik, kupon, ulasan, pengumuman ===== */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.adm-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-sm); }
.adm-item.off { opacity: .55; }
.adm-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.coupon-card .cp-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .06em; font-size: 1rem; color: var(--primary-dark); background: var(--primary-soft); border: 1px dashed var(--primary); border-radius: var(--r-sm); padding: 6px 10px; display: inline-block; }
.coupon-card .cp-val { font-weight: 700; font-size: .9375rem; }
.cp-meta { font-size: .75rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.cp-actions { display: flex; gap: 8px; margin-top: auto; }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--card); }
.review-item.hidden-rev { opacity: .55; border-style: dashed; }
.rev-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rev-name { font-weight: 600; font-size: .875rem; }
.rev-stars { color: var(--accent); font-size: .8125rem; }
.rev-meta { font-size: .75rem; color: var(--muted); }
.rev-body { margin-top: 6px; font-size: .875rem; color: var(--text); line-height: 1.55; }
.rev-actions { display: flex; gap: 8px; margin-top: 10px; }
.star-pick { display: flex; gap: 6px; }
.star-pick button { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--border); cursor: pointer; padding: 2px; }
.star-pick button.on { color: var(--accent); }

.ann-card .ann-cat { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-dark); background: var(--primary-soft); padding: 3px 9px; border-radius: var(--pill); }
.ann-card h3 { font-size: .9375rem; font-weight: 700; }
.ann-body { font-size: .875rem; color: var(--muted); line-height: 1.55; white-space: pre-wrap; }
.ann-meta { font-size: .75rem; color: var(--muted); }
.ann-pin { color: var(--accent); }

/* --- storefront: banner, kupon, bantuan --- */
.info-banner { display: flex; align-items: center; gap: 12px; background: var(--primary-soft); border: 1px solid var(--primary-soft-2); border-radius: var(--r-md); padding: 12px 14px; margin: 14px 0; }
.info-banner i { color: var(--primary-dark); font-size: 1.1rem; }
.info-banner strong { display: block; font-size: .875rem; }
.info-banner span { font-size: .8125rem; color: var(--muted); }
.pd-protect { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--primary-dark); background: var(--primary-soft); border-radius: var(--r-sm); padding: 9px 11px; margin-top: 10px; }
.coupon-row { display: flex; gap: 8px; margin: 10px 0; }
.coupon-row input { flex: 1 1 auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); font: inherit; text-transform: uppercase; }
.disc-line { color: var(--primary-dark); font-weight: 600; }
.help-list { display: flex; flex-direction: column; gap: 12px; }
.help-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; background: var(--card); }
.help-item h3 { font-size: .9375rem; margin-bottom: 4px; }
.help-item p { font-size: .875rem; color: var(--muted); line-height: 1.6; }

/* ===== Responsif: tabel admin jadi mode kartu (anti-luber) ===== */
@media (max-width: 780px) {
  table.adm-table { min-width: 0; }
  .adm-table thead { display: none; }
  .adm-table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; }
  .adm-table tr { border: 1px solid var(--border); border-radius: var(--r-md); margin: 0 0 12px; padding: 6px 12px; background: var(--card); }
  .adm-table tbody tr:hover { background: var(--card); }
  .adm-table td { border: 0; padding: 7px 0; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 14px; text-align: right; }
  .adm-table td::before { content: attr(data-lbl); flex: 0 0 auto; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); text-align: left; }
  .adm-table td:empty { display: none; }
  .adm-table td.adm-thumb { justify-content: flex-start; }
  .adm-table td.adm-thumb::before { content: ""; }
  .adm-table td.adm-actions { justify-content: flex-end; }
  .adm-table td.adm-empty { justify-content: center; }
  .adm-table td.adm-empty::before { content: ""; }
  .adm-items { max-width: none; text-align: right; }
}
@media (max-width: 900px) {
  .admin-grid-2 { grid-template-columns: 1fr; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: flex-start; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: 0 0 auto; }
  .admin-tab span { display: inline; }
}
@media (max-width: 680px) {
  .adm-toolbar { flex-direction: column; align-items: stretch; }
  .adm-search { flex: 1 1 auto; }
  .adm-cards { grid-template-columns: 1fr; }
  .listing-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-chart { height: 140px; }
}

/* ===== Header admin: taruh tab di barisnya sendiri agar tak menabrak tombol user ===== */
.admin-top-inner { flex-wrap: wrap; row-gap: 10px; }
.admin-tabs { order: 3; width: 100%; min-width: 0; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab { flex: 0 0 auto; white-space: nowrap; }
.admin-tab span { display: inline; }
.admin-user { margin-left: auto; }

/* ============================================
   MULTI-TOKO (penjual) + CHAT
   ============================================ */

/* nama toko di kartu produk */
.product-store {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .72rem; color: var(--muted);
  text-decoration: none; margin: 2px 0 4px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.product-store:hover { color: var(--primary); }
.product-store i { font-size: .68rem; }

/* link toko di halaman produk */
.pd-store-link { color: var(--primary); font-weight: 600; text-decoration: none; }
.pd-store-link i { font-size: .7rem; margin-left: 2px; }

/* baris aksi penjual */
.pd-seller-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pd-seller-actions .btn { flex: 1 1 auto; min-width: 140px; }

/* hero toko (etalase) */
.store-hero { display: flex; gap: 16px; align-items: flex-start; }
.store-ava {
  flex: 0 0 auto; width: 68px; height: 68px; border-radius: var(--r-lg);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.7rem;
}
.store-info { flex: 1 1 auto; min-width: 0; }
.store-info h2 { font-size: 1.25rem; margin-bottom: 4px; }
.store-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 8px 0; color: var(--muted); font-size: .8rem; }
.store-meta span { display: inline-flex; align-items: center; gap: 5px; }
.store-desc { color: var(--text); font-size: .875rem; line-height: 1.55; margin-top: 6px; }

/* chat list */
.chat-list { display: flex; flex-direction: column; gap: 2px; }
.chat-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; background: var(--card); border: 1px solid var(--border);
  border-bottom-width: 0; text-align: left; cursor: pointer; color: inherit;
}
.chat-item:first-child { border-radius: var(--r-md) var(--r-md) 0 0; }
.chat-item:last-child { border-radius: 0 0 var(--r-md) var(--r-md); border-bottom-width: 1px; }
.chat-item:only-child { border-radius: var(--r-md); border-bottom-width: 1px; }
.chat-item:hover { background: var(--primary-soft); }
.chat-ava {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.chat-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.chat-mid strong { font-size: .9rem; }
.chat-mid small { color: var(--muted); font-size: .75rem; }
.chat-preview { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chat-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.chat-side small { color: var(--muted); font-size: .7rem; }
.chat-badge {
  font-style: normal; background: var(--danger); color: #fff;
  font-size: .68rem; font-weight: 700; border-radius: var(--pill);
  padding: 1px 7px; min-width: 20px; text-align: center;
}

/* chat thread + bubble */
.chat-thread {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 16px; min-height: 320px; max-height: 52vh; overflow-y: auto; margin-bottom: 12px;
}
.chat-thread.admin { min-height: 360px; max-height: 56vh; background: var(--card); }
.bubble { max-width: 76%; align-self: flex-start; }
.bubble.seller { align-self: flex-end; }
.bubble-txt {
  background: var(--card); border: 1px solid var(--border); color: var(--text);
  padding: 9px 13px; border-radius: var(--r-md); font-size: .875rem; line-height: 1.5;
  word-break: break-word;
}
.bubble.seller .bubble-txt { background: var(--primary); border-color: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.bubble.buyer .bubble-txt { border-bottom-left-radius: 6px; }
.bubble-meta { font-size: .66rem; color: var(--muted); margin-top: 3px; text-align: right; }

/* chat compose */
.chat-compose { display: flex; gap: 8px; }
.chat-compose input {
  flex: 1 1 auto; padding: 11px 14px; border: 1px solid var(--border);
  border-radius: var(--pill); font-size: .9rem; font-family: inherit;
}
.chat-compose input:focus { outline: none; border-color: var(--primary); }
.chat-compose .btn { border-radius: var(--pill); padding: 0 20px; }

/* daftar penjual (admin) */
.seller-list { display: flex; flex-direction: column; gap: 8px; }
.seller-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md);
}
.seller-row.off { opacity: .6; }
.seller-ava {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: var(--r-md);
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.seller-mid { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.seller-mid strong { font-size: .92rem; }
.seller-mid small { color: var(--muted); font-size: .74rem; }
.seller-rate { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .78rem; margin-top: 3px; }
.seller-rate .stars { color: var(--accent); }
.seller-side { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

@media (max-width: 680px) {
  .store-hero { flex-direction: column; }
  .pd-seller-actions .btn { min-width: 0; }
  .bubble { max-width: 86%; }
  .seller-row { flex-wrap: wrap; }
  .seller-side { width: 100%; justify-content: flex-end; }
}

/* ============================================
   AVATAR (img menutupi ikon; onerror -> ikon)
   ============================================ */
.store-ava, .seller-ava, .chat-ava { position: relative; overflow: hidden; }
.store-ava img, .seller-ava img, .chat-ava img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit; z-index: 1;
}
.store-ava i, .seller-ava i, .chat-ava i { position: relative; z-index: 0; }

/* badge belum dibaca (ikon pesan di appbar) */
.chat-count {
  position: absolute; top: -4px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff;
  font-size: .68rem; font-weight: 700; line-height: 18px;
  border-radius: var(--pill); text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
}
.appbar-icon { position: relative; }
