@import url('global.css');

/* ===== 移动端统一页眉（极简风） ===== */
.m-hd {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 6px rgba(24, 24, 27, 0.04);
}
.m-hd__inner {
  display: flex;
  align-items: center;
  height: calc(48px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 12px 0;
  max-width: 640px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* 首页：logo + 搜索 + AI */
.m-hd__logo {
  flex-shrink: 0;
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}
.m-hd__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.m-hd__search {
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: #f3f4f6;
  border-radius: 17px;
  color: #9ca3af;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.m-hd__ai {
  flex-shrink: 0;
  height: 30px;
  padding: 0 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #18181B, #2563EB);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

/* 子页：返回 + 标题 + 购物车 */
.m-hd__back {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-left: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.m-hd__back svg { display: block; }
.m-hd__title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: #18181b;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-hd__cart {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #18181b;
}
.m-hd__cart-icon { font-size: 21px; line-height: 1; }
.m-hd__spacer { flex-shrink: 0; width: 32px; height: 32px; }
