/* =====================================
 * 全局样式重置（统一各浏览器默认样式）
 * 参考淘宝 H5 基础规范
 * ===================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* 清除点击高亮 */
}

html {
  /* 基础字体设置（淘宝常用） */
    font-weight: normal;
    font-variation-settings: "opsz" auto;
  font-family: Source Han Sans CN;

  font-size: 16px; /* 根字体，方便 rem 使用 */
  line-height: 1.7;
  /* 禁止字体自动调整 */
  -webkit-text-size-adjust: 100%;
  /* 平滑滚动 */
  scroll-behavior: smooth;
}

body {
  background-color: #fff; /* 淘宝页面背景灰 */
  color: #333; /* 主文字色 */
  overflow-x: hidden;
  min-height: 100vh;
}

p {
  /* 首行缩进 2 个汉字 */
  text-indent: 2em;
  /* 段落两端对齐 */
  text-align: justify;
  line-height: 2;
  margin-bottom: 0.5em;
}

/* 图片默认样式 */
img {
  border: none;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
}

/* 列表重置 */
ul, ol {
  list-style: none;
}

/* 链接重置 */
a {
  text-decoration: none;
  color: #333;
  outline: none;
}
a:active {
  color: #666;
}

/* 按钮、输入框统一样式 */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
}
button {
  cursor: pointer;
}

/* 清除输入框内阴影 */
input::-webkit-input-placeholder {
  color: #999;
}
input {
  -webkit-appearance: none;
  border-radius: 0;
}

/* =====================================
 * 淘宝常用工具类
 * ===================================== */

/* 文本溢出省略 */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* 两行文本溢出省略 */
.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 清除浮动 */
.clearfix::after {
  content: "";
  display: block;
  clear: both;
  height: 0;
  visibility: hidden;
}

/* 布局居中 */
.container {
  width: 100%;
  padding: 0 12px; /* 淘宝常用左右边距 */
  margin: 0 auto;
}

/* 弹性布局 */
.flex {
  display: flex;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* =====================================
 * 全局滚动条美化（移动端）
 * ===================================== */
::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

/* =====================================
 * 禁止用户选择文字
 * ===================================== */
.no-select {
  user-select: none;
  -webkit-user-select: none;
}