/* 去掉百度 MIP 组件后，补齐原 mip.css 提供的基础能力
   只做“还原”，不改 style.css 里的任何视觉定义 */

img {
  max-width: 100%;
  height: auto;
}

/* 顶部条：原 mip-semi-fixed 的吸顶效果 */
.semifixed {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
}
/* MIP 页里为了兼容非 MIP 环境多写了一份同样的 header，去掉重复 */
.semifixed + header {
  display: none;
}
.semifixed .absoluteStyle {
  position: static;
}

/* 折叠菜单（原 mip-toggle） */
.mip-toggle[hidden] {
  display: none !important;
}

/* 展开全文（原 mip-showmore） */
.mip-showmore {
  overflow: hidden;
  position: relative;
  transition: max-height .3s ease;
}

/* 折叠时底部渐隐，遮住被切开的半行 */
.mip-showmore:not(.mip-showmore-open)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.4em;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 78%);
  pointer-events: none;
}

/* 回到顶部（原 mip-fixed > mip-gototop） */
.demip-gotop {
  position: fixed;
  right: 12px;
  bottom: 64px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(142, 198, 29, .95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: pointer;
}
.demip-gotop.is-on {
  display: flex;
}
.demip-gotop .upArrow {
  width: 10px;
  height: 10px;
  border-left: 2px solid #fff;
  border-top: 2px solid #fff;
  transform: rotate(45deg);
  margin-top: 4px;
}

/* 轮播（原 mip-carousel，仅首页使用） */
.demip-carousel {
  position: relative;
  overflow: hidden;
  background: #000;
}
.demip-carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.demip-carousel-track::-webkit-scrollbar {
  display: none;
}
.demip-carousel-item {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  display: block;
}
.demip-carousel-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}
.demip-carousel-item .mip-carousle-subtitle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 12px 10px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .65));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.demip-carousel-dots {
  position: absolute;
  right: 12px;
  bottom: 10px;
  display: flex;
  gap: 5px;
  z-index: 2;
}
.demip-carousel-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
}
.demip-carousel-dots i.on {
  background: #fff;
}

/* 统计像素 */
.mip-pix {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}