/* SHBSC 用户商城 — 设计令牌（PC 为主，手机自适应） */
:root {
  --color-primary: #e62e04;
  --color-primary-hover: #c92603;
  --color-bg: #f5f6f8;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --header-h: 64px;
  --bottom-nav-h: 56px;
  --container-max: 1280px;
  --font: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  min-height: 100vh;
}

html.store-i18n-pending body {
  visibility: hidden;
}

html.store-i18n-ready:not(.store-splash-hold):not(.uc-boot-pending) body {
  visibility: visible;
}

/* 用户中心：等内容渲染完再显示，避免刷新白屏闪烁 */
html.uc-boot-pending body.store-page--user-center {
  visibility: hidden !important;
}

/* 全站：不展示「加载中」占位（数据由 JS 静默拉取，失败再提示） */
.policy-page__loading,
.mall-page-loading,
.mall-cat-page__loading {
  display: none !important;
}

/* 商品详情：等内容就绪后再显示，避免顶栏插入造成闪烁 */
html.store-splash-hold body {
  visibility: hidden;
}

html.store-splash-done body {
  visibility: visible;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .mall-search__input,
html[dir="rtl"] .mall-field,
html[dir="rtl"] input,
html[dir="rtl"] textarea {
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--color-primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn--block {
  width: 100%;
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
