/* 覆盖样式：涨跌色块与分组表格的细节 */

.PriceChangeType {
  display: block;
  width: 86%; /* 缩小方块宽度 */
  margin: 0 auto; /* 居中显示 */
  box-sizing: border-box;
  padding: 0 6px; /* 缩小内边距 */
  border-radius: 0;
  line-height: 30px; /* 缩小高度 */
  font-size: 14px;
  text-align: center;
  color: #fff;
  font-weight: 500;
}

.PriceChangeType .ChangeTypeSign {
  margin-right: 4px;
}

.PriceChangeType.PriceUp {
  background-color: #1fa34a; /* 上涨：绿色（更贴近截图） */
}

.PriceChangeType.PriceDown {
  background-color: #d83a3a; /* 下跌：红色（更贴近截图） */
}

/* 表格间距与分组标题保持与现有风格一致 */
.WareTableGap {
  height: 14px; /* 间距略微缩小，更贴近截图 */
}

.WareTableSSE .WareTableHeaderColumn0,
.WareTableIntl .WareTableHeaderColumn0,
.WareTableForex .WareTableHeaderColumn0 {
  font-weight: 700;
  color: #fff;
  background-color: #0b5e92;
  border-right: 1px solid #084e78;
}

/* 让色块在单元格内垂直居中 */
.WareRowColumnBuyPrice .PriceChangeType,
.WareRowColumnSellPrice .PriceChangeType {
  display: inline-block; /* 避免占满高度，和文字居中对齐 */
}

/* 让上交所与国际行情的红/绿色块铺满单元格 */
.WareTableSSE .WareRowColumnBuyPrice,
.WareTableSSE .WareRowColumnSellPrice,
.WareTableIntl .WareRowColumnBuyPrice,
.WareTableIntl .WareRowColumnSellPrice {
  padding: 0;
  position: relative;
}
.WareTableSSE .WareRowColumnBuyPrice .PriceChangeType,
.WareTableSSE .WareRowColumnSellPrice .PriceChangeType,
.WareTableIntl .WareRowColumnBuyPrice .PriceChangeType,
.WareTableIntl .WareRowColumnSellPrice .PriceChangeType {
  position: absolute;
  inset: 2px; /* 四周留出 2px 边距，避免铺太满 */
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 2px;
  box-sizing: border-box;
  padding: 0 6px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  line-height: normal;
}

/* 左侧分组纵向标签（与原站一致） */
.WareRowColumnCategoryName {
  width: 28px !important; /* 更贴近红框的窄宽度 */
  min-width: 28px !important;
  writing-mode: vertical-rl;
  text-orientation: upright; /* 汉字直立显示 */
  letter-spacing: 2px;
  text-align: center;
  color: #ffd75e; /* 金黄色文字 */
  text-shadow: 0 1px 0 #083c5c, 0 -1px 0 #083c5c; /* 深色描边效果 */
  background-color: #0b5e92; /* 分组竖排背景色 */
  border-right: none !important; /* 去除右侧白色块 */
  padding: 0; /* 去除上下内边距，确保相对9行精准居中 */
  font-weight: 700;
  display: flex;            /* 垂直居中 */
  align-items: center;
  justify-content: center;
  line-height: 1; /* 消除额外行高影响 */
}

/* 表格外侧的竖排标签容器与定位（主表） */
.WareSection,
.WareSectionMain {
  position: relative;
  padding-left: 30px; /* 去除白块后仅为标签宽度预留空间 */
}
.WareSideLabel {
  position: absolute;
  left: 0;
  width: 28px;
  min-width: 28px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  letter-spacing: 2px;
  text-align: center;
  color: #ffd75e;
  text-shadow: 0 1px 0 #083c5c, 0 -1px 0 #083c5c;
  background-color: #0b5e92;
  border-right: none; /* 去除右侧白色块 */
  padding: 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.WareSideLabelMain {
  /* 相对于容器整体高度居中，统一与上交所行情 */
  top: calc(50% + 8px);
  transform: translateY(-50%);
}

/* 其他三个分组标签的纵向居中定位 */
.WareSideLabelSSE {
  /* 相对于右侧表格整体高度（含表头）垂直居中 */
  top: calc(50% + 8px);
  transform: translateY(-50%);
}
.WareSideLabelIntl {
  /* 相对于容器整体高度居中，统一与上交所行情 */
  top: calc(50% + 8px);
  transform: translateY(-50%);
}
.WareSideLabelForex {
  /* 相对于容器整体高度居中，统一与上交所行情 */
  top: calc(50% + 8px);
  transform: translateY(-50%);
}

/* 表格通用边框与行高微调 */
.WareTable {
  border-collapse: collapse;
}
.WareTable td,
.WareTable th {
  border: 1px solid #0f5b83; /* 边框更清晰 */
  vertical-align: middle; /* 文本垂直居中，减小视觉高度 */
}
/* 防止外部样式通过 ::before/::after 在单元格重复文本 */
.WareTable .WareTableHeaderRow td::before,
.WareTable .WareTableHeaderRow td::after,
.WareTable .WareRow .WareRowColumn::before,
.WareTable .WareRow .WareRowColumn::after {
  content: none !important;
}
.WareRow .WareRowColumn {
  padding: 1px 6px;
}

/* 进一步限制行高，统一视觉高度 */
.WareTable .WareRow {
  height: 30px; /* 与图片示例一致的紧凑高度 */
}

/* 顶部主表：在隐藏模式下隐藏“高/低”列 */
.WareTableMainHideHL .WareTableHeaderColumnMaxMinPrice,
.WareTableMainHideHL .WareRowColumnMaxMinPrice {
  display: none;
}

/* 顶部主表：隐藏模式下的三列宽度 */
.WareTableMainHideHL .WareRowColumnWareName {
  width: 240px;
}
.WareTableMainHideHL .WareRowColumnBuyPrice {
  width: 200px;
}
/* 主表隐藏模式：销售价列宽度 */
.WareTableMainHideHL .WareRowColumnSellPrice {
  width: 200px;
}

/* 表头高度与内边距略缩小 */
.WareTable .WareTableHeaderRow td {
  padding: 3px 6px;
  height: 30px;
  line-height: 30px;
}

/* 模板一通用列宽比例（商品/回购/销售/高低） */
.WareTableHeaderColumnWareName,
.WareRowColumnWareName { width: 30%; }
.WareTableHeaderColumnBuyPrice,
.WareRowColumnBuyPrice { width: 25%; }
.WareTableHeaderColumnSellPrice,
.WareRowColumnSellPrice { width: 25%; }
.WareTableHeaderColumnMaxMinPrice,
.WareRowColumnMaxMinPrice { width: 20%; }

/* 下方表格（上交所/国际）缩小“商品”列左右内边距，并把宽度让给右侧列 */
.WareTableSSE .WareRowColumnWareName,
.WareTableIntl .WareRowColumnWareName { padding-left: 4px; padding-right: 4px; }
.WareTableSSE .WareTableHeaderColumnWareName,
.WareTableSSE .WareRowColumnWareName,
.WareTableIntl .WareTableHeaderColumnWareName,
.WareTableIntl .WareRowColumnWareName { width: 30%; }
.WareTableSSE .WareTableHeaderColumnBuyPrice,
.WareTableSSE .WareRowColumnBuyPrice,
.WareTableIntl .WareTableHeaderColumnBuyPrice,
.WareTableIntl .WareRowColumnBuyPrice { width: 25%; }
.WareTableSSE .WareTableHeaderColumnSellPrice,
.WareTableSSE .WareRowColumnSellPrice,
.WareTableIntl .WareTableHeaderColumnSellPrice,
.WareTableIntl .WareRowColumnSellPrice { width: 25%; }
.WareTableSSE .WareTableHeaderColumnMaxMinPrice,
.WareTableSSE .WareRowColumnMaxMinPrice,
.WareTableIntl .WareTableHeaderColumnMaxMinPrice,
.WareTableIntl .WareRowColumnMaxMinPrice { width: 20%; }

/* 顶部主表买卖价仅文字着色（不使用方块） */
.WareTable:not(.WareTableSSE):not(.WareTableIntl) .WareRowColumnBuyPrice {
  color: #1fa34a;
  font-weight: 600;
}
.WareTable:not(.WareTableSSE):not(.WareTableIntl) .WareRowColumnSellPrice {
  color: #d83a3a;
  font-weight: 600;
}
.WareTable .WareTableHeaderRow td {
  padding: 3px 6px;
}
/* 头部与内容的字重与颜色微调 */
.WareTable .WareRow .WareRowColumnWareName {
  font-weight: 600;
}
.WareTable .WareRow .WareRowColumnMaxMinPrice {
  color: #666;
}

.WareTable .WareRowColumnBuyPrice,
.WareTable .WareRowColumnSellPrice { position: relative; white-space: nowrap; word-break: normal; }
.WareTable .WareRowColumnBuyPrice.PriceUp,
.WareTable .WareRowColumnSellPrice.PriceUp,
.WareTable .WareRowColumnBuyPrice.PriceDown,
.WareTable .WareRowColumnSellPrice.PriceDown { /* 保持原有文字颜色，避免白字导致空白 */ }
.WareTable .WareRowColumnBuyPrice.CellUp,
.WareTable .WareRowColumnSellPrice.CellUp { background: none; color: #ff3b30; font-weight: 600 !important; white-space: nowrap; }
.WareTable .WareRowColumnBuyPrice.CellDown,
.WareTable .WareRowColumnSellPrice.CellDown { background: none; color: #00c853; font-weight: 600 !important; white-space: nowrap; }

/* 底部信息块样式（美元汇率最下方） */
.FooterInfoContainer {
  background-color: var(--main-bg-color); /* 与“美元汇率”表头一致 */
  color: #fff;
  padding: 10px 16px;
  margin-top: 12px;
}
/* 删除了 FooterInfoNote 元素，相关样式不再需要 */
.FooterInfoItem { margin: 4px 0; line-height: 22px; }
.FooterInfoLabel {
  color: #ffd75e;
  font-weight: 700;
  margin-right: 6px;
}
.FooterInfoValue { color: #fff; }
.FooterInfoIcon { color: #ffd75e; margin-left: 8px; }
.FooterInfoBullet { color: #fff; margin: 2px 0 2px 22px; line-height: 20px; }
.FooterInfoLink { color: #66b3ff; text-decoration: none; }
.FooterInfoLink:hover { text-decoration: underline; }
/* 顶部滚动公告栏（右向左） */
.TopMarqueeContainer {
  background-color: var(--main-bg-color);
  color: var(--gold-color);
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  overflow: hidden;
}
.TopMarqueeInner {
  display: flex;
  align-items: center;
  height: 30px;
  line-height: 30px;
}
.TopMarqueeTrack {
  overflow: hidden;
  flex: 1;
}
.TopMarqueeIcon {
  color: var(--gold-color);
  margin: 0 10px 0 6px;
  font-size: 16px;
}
.TopMarqueeScroller {
  display: inline-block;
  white-space: nowrap;
  padding-left: 4px;
  animation: marquee-rtl 12s linear infinite;
}
@keyframes marquee-rtl {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
/* 头部与公告栏随滚动固定在顶部（优化抖动） */
.PageHeaderContainer {
  position: sticky;
  top: 0;
  z-index: 1000;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}
.QuotePageHeaderContainer {
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
}

/* 移动端优化：表格满屏显示、无需横向滑动 */
@media (max-width: 480px) {
  /* 表格固定布局并占满宽度 */
  .WareTable {
    width: 100%;
    table-layout: fixed;
  }

  /* 压缩内边距与字体，提升可视数量 */
  .WareTable .WareTableHeaderRow td,
  .WareTable .WareRow .WareRowColumn {
    padding: 4px 6px;
    font-size: 14px;
  }

  /* 四列百分比分配，包含“高/低”且避免横向滚动 */
  .WareTableHeaderColumnWareName,
  .WareRowColumnWareName { width: 30%; }
  .WareTableHeaderColumnBuyPrice,
  .WareRowColumnBuyPrice { width: 25%; }
  .WareTableHeaderColumnSellPrice,
  .WareRowColumnSellPrice { width: 25%; }
  .WareTableHeaderColumnMaxMinPrice,
  .WareRowColumnMaxMinPrice { width: 20%; }

  /* 买卖价在手机端禁止换行，避免“↑/↓”独自占一行 */
  .WareRowColumnBuyPrice,
  .WareRowColumnSellPrice {
    white-space: nowrap;
    word-break: normal;
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
  }
}

@media (orientation: portrait) and (min-height: 900px) {
  html, body { width: 100vw; height: 100vh; margin: 0; padding: 0; }
  .PageContainer, .QuotePage, .PageContentContainer, .PageContent { width: 100vw !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }
  .WareTable { width: 100%; table-layout: fixed; }
  .WareTableHeaderColumnWareName,
  .WareRowColumnWareName { width: 30%; }
  .WareTableHeaderColumnBuyPrice,
  .WareRowColumnBuyPrice { width: 25%; }
  .WareTableHeaderColumnSellPrice,
  .WareRowColumnSellPrice { width: 25%; }
  .WareTableHeaderColumnMaxMinPrice,
  .WareRowColumnMaxMinPrice { width: 20%; }

  .WareTable .WareTableHeaderRow td,
  .WareTable .WareRow .WareRowColumn { padding: 8px 10px; font-size: 18px; }
  .WareTable .WareRow { height: auto; }
  .WareRowColumnMaxMinPrice .WareRowColumnHighPrice,
  .WareRowColumnMaxMinPrice .WareRowColumnLowPrice { display: block; }
  .PageContainer { overflow-x: hidden; }
  .QuotePageHeaderContainer, .PageHeaderContainer { position: sticky; top: 0; width: 100vw; }
}

  /* 行高在手机端自适应，以容纳“高/低”两行 */
  .WareTable .WareRow { height: auto; }
  .WareRowColumnMaxMinPrice { font-size: 12px; line-height: 16px; padding-top: 2px; padding-bottom: 2px; }
  .WareRowColumnMaxMinPrice .WareRowColumnHighPrice,
  .WareRowColumnMaxMinPrice .WareRowColumnLowPrice { display: block; }

  /* 竖排分组标签缩窄与内边距缩短，让表格更靠左 */
  .WareSideLabel { width: 24px; min-width: 24px; font-size: 12px; letter-spacing: 1.5px; }
  .WareRowColumnCategoryName { width: 24px !important; min-width: 24px !important; }
  .WareSection,
  .WareSectionMain { padding-left: 26px; }

  /* 顶部主表隐藏模式（三列）使用百分比宽度覆盖像素宽度 */
  .WareTableMainHideHL .WareTableHeaderColumnWareName,
  .WareTableMainHideHL .WareRowColumnWareName { width: 40% !important; }
  .WareTableMainHideHL .WareTableHeaderColumnBuyPrice,
  .WareTableMainHideHL .WareRowColumnBuyPrice { width: 30% !important; }
  .WareTableMainHideHL .WareTableHeaderColumnSellPrice,
  .WareTableMainHideHL .WareRowColumnSellPrice { width: 30% !important; }

  /* 防止偶发横向滚动条出现 */
  .PageContainer { overflow-x: hidden; }
html, body { overflow-x: hidden; }
}

.ShopNameContainer { display: flex; align-items: center; gap: 8px; }
.ShopLogo { max-height: 32px; width: auto; display: block; object-fit: contain; }
@media (max-width: 480px) { .ShopLogo { max-height: 28px; } }
