/* ===== 妮选优品 · 浅金 × 浅紫 ===== */
:root {
  --gold: #D4B896;
  --gold-mid: #E8D5B8;
  --gold-light: #FAF3E8;
  --gold-dark: #B89878;
  --gold-deep: #9B7BB0;
  --purple: #C4A8D4;
  --purple-mid: #B898C8;
  --purple-light: #EDE4F3;
  --purple-dark: #9B7BB0;
  --purple-deep: #7A6888;
  --brand: #B898C8;
  --brand-light: #D4C0E0;
  --brand-dark: #9B7BB0;
  --brand-bg: #FAF5F8;
  --brand-glow: rgba(184, 152, 200, 0.2);
  --leaf: #B898C8;
  --leaf-light: #EDE4F3;
  --leaf-bright: #C4A8D4;
  --leaf-bg: #F8F4FA;
  --accent-red: #D47070;
  --accent: #B898C8;
  --accent-light: #EDE4F3;
  --danger: #DC2626;
  --text: #4A4048;
  --text-secondary: #7A6F78;
  --text-muted: #A898A8;
  --bg: #FDFAF8;
  --surface: #FFFFFF;
  --border: #E8DCE8;
  --shadow-xs: 0 1px 2px rgba(122, 104, 136, .05);
  --shadow-sm: 0 2px 8px rgba(122, 104, 136, .07);
  --shadow-md: 0 8px 24px rgba(122, 104, 136, .09);
  --shadow-brand: 0 4px 16px rgba(155, 123, 176, 0.18);
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 999px;
  --tabbar-h: 52px;
  --max-w: 1200px;
  --ease: cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans TC', 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(180deg, #FAF3E8 0%, #F5EDE8 80px, #F8F4FA 200px, var(--bg) 100%);
  color: var(--text);
  font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

.safe-bottom { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0)); }
.page {
  max-width: var(--max-w); margin: 0 auto;
  padding: 14px 14px 24px;
  animation: fadeUp .4s var(--ease) both;
}
@media(min-width:768px) {
  .safe-bottom { padding-bottom: 0; }
  .page { padding: 24px 20px 48px; }
}

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, #FAF0E0 0%, #F5EDE8 45%, #EDE4F3 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.85) inset, var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}
.site-header::after { display: none; }
.header-wrap { position: relative; max-width: var(--max-w); margin: 0 auto; padding: 10px 14px 12px; }
.header-row { display: flex; align-items: center; gap: 10px; }
.header-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 0; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: #fff; color: var(--purple-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.logo-text { color: var(--purple-deep); font-weight: 700; font-size: 15px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { flex: 1; min-width: 0; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #aaa; pointer-events: none; }
.search-input {
  width: 100%; border: none; outline: none;
  background: #fff; border-radius: var(--radius-pill);
  padding: 10px 16px 10px 40px; font-size: 13px; color: var(--text);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: box-shadow .2s;
}
.search-input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.4), 0 2px 8px rgba(0,0,0,.1); }
.search-input::placeholder { color: #bbb; }
.header-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.trust-lang { padding: 0 2px; overflow: visible; position: relative; z-index: 10; }

/* ===== Language picker ===== */
.lang-open-btn {
  border: none; background: transparent; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  font: inherit; color: inherit;
}
.lang-open-btn--inline {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.lang-open-btn--inline .ti-icon { margin-bottom: 4px; }
.lang-open-btn--inline > span {
  display: block; font-size: 9px; color: var(--text-secondary); font-weight: 600;
  line-height: 1.25; white-space: nowrap;
}
.lang-open-btn--inline:active .ti-icon { transform: scale(.95); }
.lang-open-btn--drawer {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  background: var(--brand-bg); color: var(--brand); border: 1px solid var(--border);
  font-weight: 600; font-size: 14px;
}
.lang-open-globe { width: 18px; height: 18px; flex-shrink: 0; }
.lang-open-arrow { width: 16px; height: 16px; margin-left: auto; opacity: .45; }

.lang-sheet {
  position: fixed; inset: 0; z-index: 1200;
  visibility: hidden; pointer-events: none;
  transition: visibility .25s;
}
.lang-sheet.open {
  visibility: visible; pointer-events: auto;
}
.lang-sheet-mask {
  position: absolute; inset: 0; background: rgba(0, 0, 0, 0);
  transition: background .25s;
}
.lang-sheet.open .lang-sheet-mask { background: rgba(0, 0, 0, .42); }
.lang-sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .12);
  transform: translateY(100%);
  transition: transform .28s var(--ease);
}
.lang-sheet.open .lang-sheet-panel { transform: translateY(0); }
.lang-sheet-handle {
  width: 36px; height: 4px; border-radius: 99px; background: #ddd;
  margin: 4px auto 14px;
}
.lang-sheet-title {
  font-size: 16px; font-weight: 800; color: var(--text);
  text-align: center; margin-bottom: 12px; letter-spacing: -.02em;
}
.lang-sheet-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(52vh, 420px); overflow-y: auto;
  -webkit-overflow-scrolling: touch; padding-right: 2px;
}
.lang-sheet-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: 2px 12px; align-items: center;
  padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.lang-sheet-item-main { font-size: 15px; font-weight: 700; color: var(--text); grid-column: 1; }
.lang-sheet-item-sub { font-size: 12px; color: var(--text-muted); grid-column: 1; }
.lang-sheet-check { width: 20px; height: 20px; color: var(--purple-mid); grid-column: 2; grid-row: 1 / span 2; }
.lang-sheet-item.is-active {
  border-color: rgba(184, 152, 200, .45);
  background: linear-gradient(135deg, #FAF5F8, #fff);
  box-shadow: 0 4px 14px rgba(184, 152, 200, .12);
}
.lang-sheet-item:active { transform: scale(.985); }
body.lang-sheet-open { overflow: hidden; }

@media (min-width: 768px) {
  .lang-open-btn--inline > span { font-size: 10px; }
  .lang-open-btn--inline .ti-icon { margin-bottom: 6px; }
  .lang-sheet-panel {
    left: 50%; right: auto; bottom: auto; top: 50%;
    width: 360px; max-width: calc(100vw - 32px);
    border-radius: var(--radius-xl);
    padding: 20px 18px 18px;
    transform: translate(-50%, -46%) scale(.94);
    opacity: 0;
  }
  .lang-sheet.open .lang-sheet-panel {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  .lang-sheet-handle { display: none; }
}

.drawer-lang-label { padding: 4px 16px 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.lang-open-btn--drawer { margin: 0 12px 8px; width: calc(100% - 24px); }
.icon-btn {
  width: 38px; height: 38px; border: none; border-radius: 10px;
  background: rgba(184, 152, 200, 0.14); color: var(--purple-deep);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  backdrop-filter: blur(4px); transition: background .15s;
}
.icon-btn:hover { background: rgba(184, 152, 200, 0.22); }
.icon-btn svg { width: 20px; height: 20px; }
.mobile-search { margin-top: 10px; }
.desktop-nav {
  display: none; flex-wrap: wrap; align-items: center; gap: 4px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(184, 152, 200, .2);
}
.desktop-nav a {
  color: var(--purple-deep); font-size: 13px; font-weight: 500;
  padding: 6px 14px; border-radius: 20px; transition: background .15s;
}
.desktop-nav a:hover { background: rgba(184, 152, 200, 0.12); }
.nav-pill-white { background: #fff !important; color: var(--purple-dark) !important; font-weight: 700; box-shadow: var(--shadow-sm); }
@media(min-width:768px) {
  .mobile-drawer-btn, .mobile-search { display: none; }
  .desktop-nav { display: flex; }
  .logo-text { font-size: 18px; }
}

/* ===== Bottom Tab ===== */
.mobile-tab {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0));
  padding-bottom: env(safe-area-inset-bottom, 0);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.05);
}
@media(min-width:768px) { .mobile-tab { display: none; } }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-muted); font-size: 10px; font-weight: 600;
  transition: color .2s; position: relative;
  font-family: 'Noto Sans TC', 'Noto Sans Thai', 'Inter', sans-serif;
}
.nav-item svg { width: 22px; height: 22px; stroke-width: 1.7; transition: transform .2s; }
.nav-item.active { color: var(--purple-dark); font-weight: 700; }
.nav-item.active svg { stroke: var(--purple-mid); transform: scale(1.05); }
.nav-item.active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--gold-mid), var(--purple-mid));
}

/* ===== Drawer ===== */
.drawer-overlay { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer-overlay.open { visibility: visible; }
.drawer-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.drawer-overlay.open .drawer-bg { opacity: 1; }
.drawer-panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 290px; max-width: 86vw;
  background: #fff; box-shadow: 8px 0 32px rgba(0,0,0,.15);
  transform: translateX(-100%); transition: transform .28s var(--ease);
  display: flex; flex-direction: column;
}
.drawer-overlay.open .drawer-panel { transform: translateX(0); }
.drawer-head {
  background: linear-gradient(135deg, #E8D5B8, #D4C0E0);
  padding: 24px 18px; color: var(--purple-deep);
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-head span { font-weight: 700; font-size: 17px; }
.drawer-nav { padding: 14px; flex: 1; overflow-y: auto; }
.drawer-link {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-radius: var(--radius); color: var(--text); font-weight: 500; font-size: 14px;
  transition: background .15s, color .15s; margin-bottom: 2px;
}
.drawer-link svg { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.drawer-link:hover { background: var(--brand-bg); }
.drawer-link:hover svg { color: var(--purple-dark); }
.drawer-link.highlight { background: var(--brand-bg); color: var(--purple-dark); font-weight: 700; }
.drawer-link.highlight svg { color: var(--purple-dark); }
.drawer-divider { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* ===== Sections ===== */
.section { margin-bottom: 22px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-title {
  font-size: 17px; font-weight: 800; color: var(--purple-deep);
  letter-spacing: -.025em;
}
.section-title::before { display: none; }
.section-more {
  font-size: 12px; color: var(--purple-dark); font-weight: 600;
  display: flex; align-items: center; gap: 2px; transition: color .15s;
}
.section-more:hover { color: var(--purple-mid); }

/* ===== Trust Strip ===== */
.trust-strip {
  display: flex; align-items: stretch; gap: 4px;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 12px 8px; border: 1px solid var(--border);
  margin-bottom: 16px; overflow: visible; position: relative; z-index: 5;
}
.trust-item {
  flex: 1; min-width: 0; text-align: center; padding: 2px 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.trust-item .ti-icon {
  width: 32px; height: 32px; border-radius: 50%; margin: 0 auto 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-bg); color: var(--purple-dark); flex-shrink: 0;
}
.trust-item .ti-icon svg { width: 16px; height: 16px; }
.trust-item span {
  display: block; font-size: 9px; color: var(--text-secondary); font-weight: 600;
  line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.trust-lang { padding: 0 2px; overflow: visible; position: relative; z-index: 10; }

/* ===== Banner ===== */
.banner-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin: 0 -14px; padding: 0 14px 6px;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-wrap { position: relative; margin-bottom: 4px; }
.banner-hero { margin-bottom: 16px; }
.banner-hero .banner-track { margin: 0; padding: 0 0 6px; }
.banner-hero .banner-item { flex: 0 0 100%; aspect-ratio: 2.35/1; }
@media(min-width:768px) {
  .banner-hero .banner-item { aspect-ratio: 2.8/1; }
}
.banner-item {
  flex: 0 0 92%; scroll-snap-align: center;
  border-radius: var(--radius-xl); overflow: hidden; position: relative;
  aspect-ratio: 2.1/1; border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow-md);
}
.banner-dots {
  display: flex; justify-content: center; gap: 6px; margin-top: 12px;
}
.banner-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #D1D5DB; transition: all .25s;
}
.banner-dots span.on { width: 18px; border-radius: 3px; background: var(--purple-mid); }
@media(min-width:768px) {
  .banner-item { flex: 1; aspect-ratio: 2.6/1; }
  .banner-track { margin: 0; padding: 0; }
}
.banner-item img { width: 100%; height: 100%; object-fit: cover; }
.banner-caption {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.05) 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
}
.banner-caption h2 { color: #fff; font-size: 18px; font-weight: 700; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.banner-caption p { color: rgba(255,255,255,.85); font-size: 12px; margin-top: 4px; }

/* ===== Quick Menu ===== */
.quick-menu {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 18px 10px; border: 1px solid var(--border); margin-bottom: 14px;
}
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 8px 4px; border-radius: var(--radius); transition: background .15s;
}
.quick-item:active { background: var(--brand-bg); }
.qi-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.qi-icon svg { width: 22px; height: 22px; }
.qi-icon.red   { background: linear-gradient(135deg, var(--gold-light), #F5D8A8); color: var(--gold-deep); }
.qi-icon.orange{ background: linear-gradient(135deg, #FFF8E8, var(--gold-mid)); color: var(--gold-deep); }
.qi-icon.blue  { background: linear-gradient(135deg, var(--gold-light), #FFF5E0); color: var(--gold-dark); }
.qi-icon.green { background: linear-gradient(135deg, #FFFAF0, var(--gold-light)); color: var(--gold-deep); }
.quick-item span { font-size: 11px; color: var(--text-secondary); font-weight: 600; text-align: center; line-height: 1.2; }

/* ===== Categories ===== */
.cat-scroll {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
}
.cat-scroll::-webkit-scrollbar { display: none; }
@media(min-width:768px) { .cat-scroll { display: grid; grid-template-columns: repeat(4,1fr); overflow: visible; } }
.cat-item {
  flex: 0 0 auto; width: 76px; text-align: center;
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 8px; box-shadow: var(--shadow-xs);
  transition: transform .15s, box-shadow .15s;
}
@media(min-width:768px) { .cat-item { width: auto; } }
.cat-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.cat-item img {
  width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 8px; border: 2px solid #fff; box-shadow: var(--shadow-sm);
}
.cat-item span { font-size: 11px; font-weight: 600; color: var(--text); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
@media(min-width:768px) { .cat-grid { grid-template-columns: repeat(4,1fr); gap: 14px; } }
.cat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 24px 14px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card img { width: 68px; height: 68px; border-radius: 18px; object-fit: cover; margin: 0 auto 12px; box-shadow: var(--shadow-sm); }
.cat-card span { font-size: 13px; font-weight: 700; color: var(--text); }

/* ===== Product Grid & Card ===== */
.product-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
@media(min-width:768px) { .product-grid { grid-template-columns: repeat(4,1fr); gap: 14px; } }

.product-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  display: block;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.product-card:active { transform: scale(.98); }
.product-card .thumb { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .4s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.06); }
.tag-flash {
  position: absolute; top: 0; left: 0;
  background: linear-gradient(135deg, #D4B896, #B898C8);
  color: #fff; font-size: 10px; font-weight: 700; padding: 4px 10px;
  border-radius: 0 0 10px 0; letter-spacing: .02em;
}
.tag-hot {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,.6); backdrop-filter: blur(4px);
  color: var(--purple-mid); font-size: 9px; font-weight: 800; padding: 3px 7px; border-radius: 4px;
}
.product-body { padding: 12px 12px 14px; }
.product-name {
  font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.8em;
}
.product-price-row { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.price-now { font-size: 16px; font-weight: 800; color: var(--purple-dark); letter-spacing: -.02em; }
.price-was { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.product-meta { margin-top: 6px; display: flex; align-items: center; gap: 5px; font-size: 11px; }
.stars { color: var(--gold-dark); letter-spacing: -1px; font-size: 10px; }
.sold-count { color: var(--text-muted); }

/* ===== Flash Sale ===== */
.flash-section {
  background: linear-gradient(135deg, #FAF0E0 0%, #F0E8F5 55%, #EDE4F3 100%);
  border-radius: var(--radius-xl); padding: 16px; margin-bottom: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.flash-section::before {
  content: ''; position: absolute; top: -30%; right: -10%;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.08); pointer-events: none;
}
.flash-section .section-title { color: var(--purple-deep); }
.flash-section .section-title::before { background: var(--purple-mid); }
.flash-section .section-more { color: var(--text-secondary); }
.flash-section .product-card { border-radius: var(--radius-sm); }

/* ===== Merchant Banner ===== */
.merchant-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(100deg, #F5E6C8 0%, #EDE4F3 55%, #E8DCE8 100%);
  border-radius: var(--radius-xl); padding: 16px 18px; margin-bottom: 16px;
  color: var(--purple-deep); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.merchant-banner::after {
  content: ''; position: absolute; right: -20px; top: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.1); pointer-events: none;
}
.merchant-banner h3 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.merchant-banner p { font-size: 12px; opacity: .88; margin-top: 3px; }
.merchant-banner .cta-btn {
  background: #fff; color: var(--purple-dark); font-size: 12px; font-weight: 800;
  padding: 9px 18px; border-radius: 24px; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0,0,0,.12); flex-shrink: 0;
  transition: transform .15s;
}
.merchant-banner .cta-btn:active { transform: scale(.96); }

/* ===== Forms & Buttons ===== */
.card-box {
  background: var(--surface); border-radius: var(--radius-xl);
  border: 1px solid var(--border); padding: 28px 24px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-weight: 700; border-radius: var(--radius-pill);
  padding: 14px 28px; font-size: 14px; letter-spacing: -.01em;
  transition: transform .12s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn-brand {
  background: linear-gradient(135deg, #D4B896 0%, #B898C8 100%);
  color: #fff; width: 100%; box-shadow: var(--shadow-brand);
}
.btn-brand:hover { box-shadow: 0 6px 20px rgba(155, 123, 176, 0.28); }
.btn-outline {
  background: transparent; color: var(--purple-dark);
  border: 2px solid var(--purple-mid); width: 100%;
}
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 7px; }
.form-input {
  width: 100%; padding: 12px 15px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: #FAFAFA; font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-input:focus { border-color: var(--purple-mid); box-shadow: 0 0 0 3px var(--brand-glow); background: #fff; }
textarea.form-input { resize: vertical; min-height: 80px; }
.alert-error {
  background: #FFF0F0; color: #C62828; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 13px; text-align: center;
  margin-bottom: 18px; border: 1px solid #FFCDD2;
}
.alert-success {
  background: #E8F5E9; color: #2E7D32; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 13px; text-align: center;
  margin-bottom: 18px; border: 1px solid #C8E6C9;
}

/* ===== Profile / My ===== */
.profile-card {
  background: linear-gradient(135deg, #F5E6C8 0%, #EDE4F3 55%, #E8DCE8 100%);
  border-radius: var(--radius-xl); padding: 22px 20px; color: var(--purple-deep);
  margin-bottom: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; position: relative; overflow: hidden;
}
.profile-card::before {
  content: ''; position: absolute; right: -30px; bottom: -30px;
  width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.08);
}
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.2); border: 2.5px solid rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.profile-info { position: relative; }
.profile-info small { opacity: .75; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.profile-info h3 { font-size: 18px; font-weight: 800; margin-top: 2px; }
.profile-info p { font-size: 12px; opacity: .85; margin-top: 3px; }

.menu-card {
  background: var(--surface); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.menu-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px; border-bottom: 1px solid #F5F5F5;
  transition: background .12s;
}
.menu-row:last-child { border-bottom: none; }
.menu-row:active { background: #FAFAFA; }
.menu-left { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.menu-icon-wrap {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.menu-arrow { color: #D0D0D0; font-size: 20px; font-weight: 300; }
.badge-new { background: var(--purple-mid); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 12px; }

.lang-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 18px 18px; }
.lang-btn {
  text-align: center; padding: 11px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; border: 1.5px solid var(--border);
  color: var(--text-secondary); transition: all .15s;
}
.lang-btn:hover { border-color: var(--purple-mid); color: var(--purple-dark); background: var(--brand-bg); }

/* ===== Product Detail ===== */
.product-detail { display: grid; gap: 16px; }
@media(min-width:768px) { .product-detail { grid-template-columns: 1fr 1fr; gap: 32px; } }
.detail-gallery {
  background: #fff; border-radius: var(--radius-xl);
  overflow: hidden; border: 1px solid var(--border);
}
.detail-gallery img { width: 100%; aspect-ratio: 1; object-fit: contain; padding: 16px; }
.detail-info {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 24px; border: 1px solid var(--border);
}
.detail-title { font-size: 22px; font-weight: 800; line-height: 1.3; letter-spacing: -.025em; }
.detail-price { font-size: 32px; font-weight: 800; color: var(--purple-dark); margin: 14px 0; letter-spacing: -.03em; }
.detail-price del { font-size: 16px; color: var(--text-muted); font-weight: 400; margin-left: 10px; }
.detail-desc { color: var(--text-secondary); line-height: 1.75; margin: 16px 0; font-size: 14px; }
.detail-stock { font-size: 13px; color: var(--text-secondary); }
.detail-stock strong { color: var(--purple-mid); font-weight: 700; }
.detail-buy-desktop { display: none; gap: 10px; margin-top: 22px; align-items: center; }
@media(min-width:768px) { .detail-buy-desktop { display: flex; } }
.qty-input {
  width: 52px; text-align: center; padding: 10px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-weight: 600;
}
.buy-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 90;
  background: rgba(255,255,255,.97); backdrop-filter: blur(10px);
  border-top: 2px solid var(--purple-light);
  padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
@media(min-width:768px) { .buy-bar { display: none; } }
.has-tabbar .buy-bar { bottom: var(--tabbar-h); padding-bottom: 10px; }
.has-tabbar .product-detail { padding-bottom: 80px; }
.buy-bar-price { flex: 1; font-size: 20px; font-weight: 900; color: var(--purple-dark); }

/* ===== Cart ===== */
.cart-head { margin-bottom: 12px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: flex; gap: 12px; background: var(--surface);
  border-radius: var(--radius); padding: 12px;
  box-shadow: var(--shadow-xs); align-items: flex-start;
}
.cart-item img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
  font-size: 13px; font-weight: 500; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-item-price { color: var(--purple-dark); font-weight: 700; margin-top: 6px; font-size: 13px; }
.cart-item-right { display: flex; flex-direction: row; align-items: center; gap: 6px; flex-shrink: 0; }
.cart-item-total { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; }
.cart-remove {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 10px;
  background: #FEE2E2; color: #DC2626;
}
.cart-remove svg { width: 17px; height: 17px; }
.cart-remove:active { transform: scale(.92); background: #FECACA; }
.cart-footer {
  position: static; margin-top: 16px;
  background: var(--surface); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: var(--shadow-sm);
}
.cart-footer-sum { min-width: 0; flex: 1; }
.cart-checkout-btn { width: auto !important; padding: 10px 16px !important; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.cart-total-label { font-size: 12px; color: var(--text-muted); }
.cart-total-price { font-size: 20px; font-weight: 900; color: var(--purple-dark); line-height: 1.2; }
@media(min-width:768px) {
  .cart-item { align-items: center; padding: 14px; }
  .cart-item img { width: 82px; height: 82px; }
  .cart-item-right { flex-direction: column; align-items: flex-end; gap: 8px; }
  .cart-item-total { font-size: 14px; }
  .cart-total-price { font-size: 22px; }
  .cart-checkout-btn { padding: 10px 18px !important; }
}

/* ===== Orders ===== */
.order-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow-xs);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  transition: box-shadow .15s;
}
.order-card:hover { box-shadow: var(--shadow-sm); }
.order-card-main { flex: 1; min-width: 0; }
.order-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap;
}
.order-card-side { flex-shrink: 0; text-align: right; }
.order-no { font-weight: 700; font-size: 14px; }
.order-date { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.order-items-preview {
  font-size: 12px; color: var(--text-muted); margin-top: 8px;
  line-height: 1.5; overflow: hidden; text-overflow: ellipsis;
}
.order-status-hint {
  font-size: 12px; margin-top: 8px; padding: 6px 10px; border-radius: 8px;
  line-height: 1.4;
}
.order-hint-shipped { background: var(--brand-bg); color: var(--brand-dark); }
.order-hint-refunded { background: #FFEBEE; color: #B71C1C; }
.order-amount { font-size: 17px; font-weight: 800; color: var(--purple-dark); text-align: right; }
.order-pay-method { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-align: right; }
.status-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  padding: 3px 10px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0;
}
.status-pending   { background: #FFF3E0; color: #E65100; }
.status-paid      { background: var(--leaf-bg); color: var(--leaf); }
.status-shipped   { background: var(--brand-bg); color: var(--brand-dark); }
.status-completed { background: #F3E5F5; color: #7B1FA2; }
.status-cancelled { background: #FFEBEE; color: #C62828; }
.status-refunded  { background: #FFEBEE; color: #B71C1C; }

/* ===== Empty / 404 ===== */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .empty-icon { font-size: 52px; opacity: .25; margin-bottom: 14px; }
.empty-state p { color: var(--text-muted); margin-bottom: 20px; font-size: 14px; }
.page-404 { text-align: center; padding: 80px 24px; }
.page-404 h1 { font-size: 72px; font-weight: 900; color: var(--brand); opacity: .3; line-height: 1; }
.page-404 p { color: var(--text-muted); margin: 16px 0 24px; }

/* ===== Products Layout ===== */
.products-layout { display: grid; gap: 16px; }
@media(min-width:768px) { .products-layout { grid-template-columns: 220px 1fr; gap: 24px; } }
.products-sidebar { display: none; }
@media(min-width:768px) { .products-sidebar { display: block; } }
.sidebar-link {
  display: block; padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-secondary); margin-bottom: 2px;
  transition: background .12s, color .12s;
}
.sidebar-link:hover { background: var(--brand-bg); color: var(--purple-dark); }
.sidebar-link.active { background: var(--brand-bg); color: var(--purple-dark); font-weight: 700; }

.filter-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 14px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: 24px; font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--text-secondary);
  border: 1.5px solid var(--border); transition: all .15s;
}
.chip.active, .chip:hover { background: var(--purple-mid); color: #fff; border-color: var(--purple-mid); }

/* ===== Footer ===== */
.site-footer { display: none; background: linear-gradient(180deg, #EDE4F3, #E8DCE8); color: #6B5A78; margin-top: 48px; }
@media(min-width:768px) { .site-footer { display: block; } }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 44px 20px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand .logo-mark { width: 38px; height: 38px; }
.footer-brand span { color: var(--purple-deep); font-weight: 800; font-size: 17px; }
.footer-copy { text-align: center; padding: 18px; border-top: 1px solid #4A1942; font-size: 12px; }
.pay-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.pay-tag { background: #4A1942; padding: 5px 14px; border-radius: var(--radius-sm); font-size: 11px; color: #E9D5DF; }

/* ===== Utilities ===== */
.max-w-form { max-width: 440px; margin: 0 auto; }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.page-title { font-size: 22px; font-weight: 800; margin-bottom: 20px; letter-spacing: -.03em; }

/* ===== Promo pill (Grab-style) ===== */
.promo-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--leaf-bg); color: var(--leaf);
  font-size: 11px; font-weight: 700; padding: 5px 12px;
  border-radius: var(--radius-pill); margin-bottom: 12px;
}
.promo-pill svg { width: 14px; height: 14px; }

.logo-img { height: 36px; width: auto; max-width: 120px; object-fit: contain; border-radius: 8px; }
.logo-img-sm { height: 32px; width: auto; max-width: 100px; object-fit: contain; border-radius: 6px; }

.support-page { display: flex; flex-direction: column; min-height: calc(100vh - var(--tabbar-h) - 48px); max-width: 720px; margin: 0 auto; }
.support-page .page-head { padding: 8px 0 16px; }
.support-page .page-head h1 { font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.support-page .page-head p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ===== Meiqia-style chat (mobile fullscreen) ===== */
body.page-chat {
  overflow: hidden;
  background: #ededed;
}
body.page-chat.safe-bottom { padding-bottom: 0; }
body.page-chat .page {
  padding: 0; margin: 0; max-width: none;
  animation: none;
}
body.page-chat .site-header,
body.page-chat .site-footer,
body.page-chat .mobile-tab {
  display: none !important;
}

.mq-chat {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; z-index: 300;
  height: 100dvh; height: 100vh;
  max-width: none; margin: 0;
  background: #ededed;
  overflow: hidden;
}
.mq-chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  padding-top: max(10px, env(safe-area-inset-top, 0px));
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
  min-height: 52px;
}
.mq-back-btn {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #333; border-radius: 50%;
}
.mq-back-btn:active { background: #f0f0f0; }
.mq-back-btn svg { width: 22px; height: 22px; }
.mq-agent-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-light));
  color: #fff; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mq-agent-avatar svg { width: 20px; height: 20px; }
.mq-agent-info { flex: 1; min-width: 0; }
.mq-agent-name { font-size: 16px; font-weight: 600; color: #111; line-height: 1.3; }
.mq-agent-status { font-size: 12px; color: #888; margin-top: 2px; display: flex; align-items: center; gap: 5px; }
.mq-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }

.mq-chat-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 12px 10px 8px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mq-msg { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.mq-msg-user { flex-direction: row; justify-content: flex-end; }
.mq-msg-agent { flex-direction: row; justify-content: flex-start; }
.mq-avatar {
  width: 34px; height: 34px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.mq-avatar-agent { background: #fff; color: var(--brand); border: 1px solid #e5e5e5; }
.mq-avatar-user { background: var(--brand); color: #fff; }
.mq-bubble-wrap { max-width: min(72vw, 280px); display: flex; flex-direction: column; }
.mq-msg-user .mq-bubble-wrap { align-items: flex-end; }
.mq-msg-agent .mq-bubble-wrap { align-items: flex-start; }
.mq-bubble {
  padding: 9px 12px; border-radius: 4px;
  font-size: 15px; line-height: 1.5; word-break: break-word;
  position: relative;
}
.mq-bubble-agent { background: #fff; color: #111; }
.mq-bubble-user { background: #95ec69; color: #111; }
.mq-msg-img { max-width: min(65vw, 220px); max-height: 220px; border-radius: 4px; display: block; }
.mq-time { font-size: 11px; color: #999; margin-top: 4px; padding: 0 2px; }

.mq-chat-compose {
  flex-shrink: 0;
  background: #f7f7f7;
  border-top: 1px solid #ddd;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mq-chat-footer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 10px;
  background: transparent;
}
.mq-tool-btn {
  width: 36px; height: 36px; border: none; background: transparent;
  color: #666; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-bottom: 2px;
}
.mq-tool-btn svg { width: 24px; height: 24px; }
.mq-tool-btn:active { opacity: .6; }
.mq-input-wrap {
  flex: 1; background: #fff; border-radius: 6px;
  border: 1px solid #ddd;
  padding: 8px 12px; min-height: 36px; max-height: 100px;
  display: flex; align-items: center;
}
.mq-input-wrap textarea {
  width: 100%; border: none; background: transparent; resize: none;
  font-size: 16px; line-height: 1.4; max-height: 88px; outline: none;
  font-family: inherit; color: #111;
}
.mq-send-btn {
  border: none; background: var(--brand); color: #fff;
  border-radius: 6px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; margin-bottom: 2px;
}
.mq-send-btn svg { width: 18px; height: 18px; }
.mq-send-btn:disabled { opacity: .35; cursor: not-allowed; }
.mq-image-preview {
  position: relative; padding: 8px 10px 0;
  background: #f7f7f7;
}
.mq-image-preview.hidden { display: none; }
.mq-image-preview img { max-height: 72px; border-radius: 6px; border: 1px solid #ddd; }
.mq-preview-clear {
  position: absolute; top: 4px; left: 78px; width: 22px; height: 22px;
  border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.mq-user-avatar { font-size: 16px; font-weight: 700; }
.mq-avatar-admin { background: var(--brand-dark); }
.mq-user-id { color: #aaa; margin-left: 4px; }
.mq-user-ip { color: #888; margin-left: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (min-width: 768px) {
  body.page-chat {
    overflow: auto;
    background: var(--bg);
  }
  body.page-chat .site-header,
  body.page-chat .site-footer { display: block !important; }
  body.page-chat .mobile-tab { display: none !important; }
  body.page-chat .page { padding: 20px; max-width: var(--max-w); margin: 0 auto; }
  body.page-chat.safe-bottom { padding-bottom: 0; }

  .mq-chat {
    position: relative; inset: auto; z-index: 1;
    height: calc(100vh - 220px); min-height: 480px;
    max-width: 720px; margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
  }
  .mq-back-btn { display: none; }
  .mq-chat-header { padding-top: 14px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .mq-bubble-wrap { max-width: 320px; }
}

.chat-box {
  flex: 1; min-height: 360px; max-height: 58vh;
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 16px;
  overflow-y: auto; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.chat-row { display: flex; margin-bottom: 10px; }
.chat-me { justify-content: flex-end; }
.chat-other { justify-content: flex-start; }
.chat-bubble {
  max-width: 78%; padding: 10px 14px; border-radius: 16px;
  font-size: 14px; line-height: 1.55; word-break: break-word;
}
.chat-me .chat-bubble { background: linear-gradient(135deg, var(--brand-dark), var(--brand-light)); color: #fff; border-bottom-right-radius: 4px; }
.chat-other .chat-bubble { background: #f1f5f9; color: var(--text); border-bottom-left-radius: 4px; }
.chat-time { display: block; font-size: 10px; opacity: .65; margin-top: 4px; }
.chat-form {
  display: flex; gap: 8px; padding-bottom: 8px;
  position: sticky; bottom: 0; background: var(--bg);
}
.chat-form input {
  flex: 1; border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 12px 16px; font-size: 14px; background: #fff;
}
.chat-form button {
  background: var(--brand); color: #fff; border: none;
  border-radius: var(--radius-pill); padding: 0 18px; font-weight: 700; font-size: 14px;
}

/* ===== Wallet ===== */
.profile-usdt { margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--purple-dark); }
.wallet-balance-card {
  background: linear-gradient(135deg, #F5E6C8 0%, #EDE4F3 55%, #D4C0E0 100%);
  border-radius: var(--radius-xl); padding: 20px; color: var(--purple-deep); margin-bottom: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.wallet-label { font-size: 12px; opacity: .85; }
.wallet-amount { font-size: 32px; font-weight: 800; margin: 6px 0; }
.wallet-amount small { font-size: 16px; font-weight: 600; opacity: .9; }
.wallet-available { font-size: 12px; opacity: .88; }
.wallet-tabs {
  display: flex; gap: 6px; margin-bottom: 12px;
  background: var(--surface); padding: 4px; border-radius: var(--radius-pill);
}
.wallet-tab {
  flex: 1; border: none; background: transparent; padding: 10px 8px;
  border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--text-muted);
}
.wallet-tab.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.wallet-panel { display: none; }
.wallet-panel.on { display: block; }
.wallet-address-box {
  background: var(--surface); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 12px;
}
.wallet-tip { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.wallet-network { font-size: 11px; font-weight: 700; color: var(--leaf); margin: 8px 0; }
.wallet-address-row {
  display: flex; gap: 8px; align-items: center; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px;
}
.wallet-address-row code { flex: 1; font-size: 11px; word-break: break-all; }
.btn-copy {
  border: none; background: var(--brand-bg); color: var(--brand);
  font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px;
}
.wallet-form { margin-top: 0; }
.wallet-form label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.wallet-records { padding: 0; overflow: hidden; }
.wallet-record { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.wallet-record:last-child { border-bottom: none; }
.wallet-record-main { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.wallet-record-type { font-size: 13px; font-weight: 700; }
.wallet-type-deposit { color: var(--leaf); }
.wallet-type-withdraw { color: #E65100; }
.wallet-type-admin_adjust { color: var(--brand); }
.wallet-record-amount { font-size: 15px; font-weight: 800; color: var(--leaf); }
.wallet-record-amount.minus { color: #E65100; }
.wallet-record-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.wallet-status-pending { color: #F57C00; }
.wallet-status-completed { color: var(--leaf); }
.wallet-status-rejected { color: #D32F2F; }
.wallet-record-extra { font-size: 11px; color: var(--text-muted); margin-top: 4px; word-break: break-all; }
.wallet-alert { margin-bottom: 12px; }
.empty-text { text-align: center; color: var(--text-muted); padding: 24px; font-size: 13px; }

/* ===== Checkout ===== */
.checkout-summary { margin-bottom: 14px; }
.checkout-subtitle { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.checkout-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.checkout-total { display: flex; justify-content: space-between; padding-top: 12px; font-size: 15px; font-weight: 700; }
.checkout-wallet-tip { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.checkout-alert { margin-bottom: 14px; }
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--radius-lg); cursor: pointer; transition: border-color .2s; }
.pay-option:has(input:checked) { border-color: var(--brand); background: var(--brand-bg); }
.pay-option.disabled { opacity: .55; cursor: not-allowed; }
.pay-option input { margin-top: 3px; accent-color: var(--brand); }
.pay-option-body { display: flex; flex-direction: column; gap: 2px; }
.pay-option-body strong { font-size: 14px; }
.pay-option-body small { font-size: 11px; color: var(--text-muted); }
.order-pay-method { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }

/* ===== Shop storefront ===== */
.shop-hero {
  margin: 0 0 16px; padding: 20px 16px;
  background: linear-gradient(135deg, #F5E6C8 0%, #EDE4F3 60%, #D4C0E0 100%);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  color: var(--purple-deep); border-bottom: 1px solid var(--border);
}
.shop-hero-inner { display: flex; gap: 14px; align-items: flex-start; max-width: 960px; margin: 0 auto; }
.shop-avatar, .shop-card-avatar {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  background: rgba(255,255,255,.75); display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: var(--purple-dark); border: 2px solid rgba(184, 152, 200, .35);
}
.shop-title { font-size: 20px; font-weight: 800; margin: 0; }
.shop-desc { font-size: 13px; opacity: .9; margin: 6px 0 0; line-height: 1.5; }
.shop-meta { font-size: 12px; opacity: .75; margin-top: 8px; }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 12px 16px; }
.shop-grid-home { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) {
  .shop-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 0 24px; }
  .shop-grid-home { grid-template-columns: repeat(3, 1fr); }
}
.shop-card {
  display: flex; gap: 12px; align-items: center; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: box-shadow .15s, transform .12s;
}
.shop-card:active { transform: scale(.98); }
.shop-card .shop-card-avatar { width: 44px; height: 44px; font-size: 18px; background: var(--brand-bg); color: var(--purple-dark); border-color: var(--brand-glow); }
.shop-card-body { min-width: 0; }
.shop-card-body h3 { font-size: 14px; font-weight: 700; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-card-body p { font-size: 11px; color: var(--text-secondary); margin: 4px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card-meta { font-size: 11px; color: var(--purple-dark); font-weight: 600; }
.detail-shop-link {
  display: inline-block; margin-top: 8px; font-size: 13px; color: var(--purple-dark); font-weight: 600;
}
.empty-hint { text-align: center; color: var(--text-muted); padding: 32px 16px; font-size: 14px; }

/* ===== Admin support desk (left list + right chat) ===== */
.admin-support-desk {
  display: flex;
  height: calc(100vh - 88px);
  min-height: 520px;
  margin: -4px 0 0;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.admin-support-list {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  background: #fafafa;
}
.admin-support-list-head {
  padding: 16px;
  border-bottom: 1px solid #e5e5e5;
}
.admin-support-list-head h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #111;
}
.admin-support-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-support-item {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid #eee;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.admin-support-item:hover { background: #f0f0f0; }
.admin-support-item.is-active {
  background: #fff;
  box-shadow: inset 3px 0 0 var(--purple-mid);
}
.admin-support-item-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #D4B896, #B898C8);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0; font-size: 15px;
}
.admin-support-item-main { flex: 1; min-width: 0; }
.admin-support-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.admin-support-item-name {
  font-size: 14px; font-weight: 600; color: #111;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-support-item-time { font-size: 11px; color: #999; flex-shrink: 0; }
.admin-support-item-bottom { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.admin-support-item-preview {
  font-size: 12px; color: #888;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1;
}
.admin-support-item-ip { font-size: 11px; color: #aaa; font-family: ui-monospace, monospace; flex-shrink: 0; }
.admin-support-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #ededed;
}
.admin-support-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 15px;
}
.admin-support-empty { padding: 24px; text-align: center; color: #999; font-size: 13px; }
.mq-chat-admin {
  position: relative !important;
  inset: auto !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 1 !important;
}
@media (max-width: 900px) {
  .admin-support-desk { flex-direction: column; height: calc(100vh - 88px); }
  .admin-support-list { width: 100%; max-height: 38vh; border-right: none; border-bottom: 1px solid #e5e5e5; }
  .admin-support-panel { flex: 1; min-height: 0; }
}
