/* /m/ 适老化：偏大字号、宽松行距、清晰中文字体 */

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

body.m-page {
  margin: 0;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  -webkit-tap-highlight-color: transparent;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", "Source Han Sans SC", sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #222;
  letter-spacing: 0.02em;
}

.m-page--detail {
  padding-top: 56px;
}

/* Bootstrap 默认偏小的辅助字号抬高一档 */
.m-page .small,
.m-page small {
  font-size: 0.95rem !important;
  line-height: 1.6;
}

.m-page .form-control,
.m-page .form-select,
.m-page .input-group-text,
.m-page .btn {
  font-size: 1.05rem;
  min-height: 2.75rem;
}

.m-page .btn-sm {
  font-size: 1rem;
  min-height: 2.4rem;
  padding-left: 0.9rem;
  padding-right: 0.9rem;
}

.m-page .card-header,
.m-page .list-group-item,
.m-page .alert {
  font-size: 1.05rem;
}

.m-page .badge {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35em 0.65em;
}

/* 底栏：字大一点、更好点按（4 项略收字号） */
.m-tabbar a {
  font-size: 0.85rem;
  line-height: 1.25;
  padding-left: 2px;
  padding-right: 2px;
}

.m-tabbar .bi {
  font-size: 1.35rem !important;
}

.m-tabbar small {
  font-size: 0.8rem !important;
  white-space: nowrap;
}

/* 圆形返回钮稍大 */
a.m-back {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 10px;
  z-index: 1030;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* 库内 HTML 正文 */
.m-article {
  word-break: break-word;
  overflow-x: auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #222;
}

.m-article img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.6rem auto;
}

.m-article table {
  width: 100% !important;
  max-width: 100%;
  font-size: 1rem;
}

.m-article p {
  margin: 0 0 0.6em;
}

.m-article br + br {
  display: none;
}

/* Layui 表格在手机端略放大 */
.m-page .layui-table {
  font-size: 16px !important;
}

.m-page .layui-table td,
.m-page .layui-table th {
  padding: 10px 8px !important;
  line-height: 1.55;
}

.m-page .layui-colla-title,
.m-page .layui-btn,
.m-page .layui-input,
.m-page .layui-form-label {
  font-size: 16px !important;
}

/* 材料检索列表：牌号加粗 */
.m-paihao {
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* 供应商卡片排版 */
.m-supplier-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.m-supplier-name {
  color: #0a4a8c;
  font-size: 1.2rem;
  font-weight: 800 !important;
  line-height: 1.45;
}

.m-contact-block {
  margin-bottom: 0.85rem;
}

.m-contact-label {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.m-contact-value {
  color: #222;
  line-height: 1.5;
}

.m-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed #e9ecef;
}

.m-contact-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.m-contact-row .m-tel-link {
  flex: 1;
  min-width: 0;
}

a.m-tel-link {
  color: #0d6efd;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

a.m-tel-link:active {
  color: #0a58ca;
}

.m-copy-btn {
  flex: 0 0 auto;
  font-size: 0.9rem !important;
  min-height: 2rem !important;
  min-width: 3.2rem;
  padding: 0.2rem 0.65rem !important;
  line-height: 1.2;
  white-space: nowrap;
}

.m-supplier-desc {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e9ecef;
  color: #6c757d;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Bootstrap 4 无 gap 工具类，采购/供货按钮间距 */
.m-action-btns > .btn + .btn {
  margin-left: 12px;
}

/* 展会列表：logo 略靠左，与文字留间隙 */
.m-show-item {
  padding-left: 8px !important;
  padding-right: 8px !important;
}

.m-show-logo {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: #f0f0f0;
  margin-right: 12px;
}

.m-show-body {
  padding-right: 4px;
}

/* 品牌厂商格子：logo 无链接 */
.m-factory-cell {
  padding: 0 2px;
}

.m-factory-logo {
  width: 72px;
  height: 72px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.m-factory-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.m-factory-logo--empty {
  background: #f8f9fa;
  font-size: 1.6rem;
}

.m-factory-name {
  font-size: 0.9rem;
  line-height: 1.35;
  color: #333;
  word-break: break-all;
}
