
  /* ============================================================
   XP系列 V2 动力系统 — 页面主体样式(静态代码,独立于源码)
   来源:https://www.madmotor.cn/?page_id=75637
   作用域:.xp-page 前缀隔离,避免污染宿主页面
   ============================================================ */

/* ---------- 基础 ---------- */
.xp-page {
  font-family: "Source Han Sans CN", "SourceHanSansCN-Regular", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
.xp-page img {
  display: block;
  max-width: 100%;
  border: 0;
}
.xp-page a {
  text-decoration: none;
  color: inherit;
}

/* ---------- 通用:全宽横幅图 ---------- */
.xp-hero__img,
.xp-banner__img,
.xp-feature__img,
.xp-feature-group__banner,
.xp-spec__img {
  width: 100%;
  height: auto;
}

/* ---------- 1. Hero ---------- */
.xp-hero {
  background: #fff;
}
.xp-hero__img {
  min-height: 540px;
  object-fit: cover;
  object-position: center;
}

/* ---------- 2. 产品轮播 ---------- */
.xp-products {
  background: #fff;
  padding: 0 10vw 5vh;
}
.xp-carousel {
  position: relative;
}
.xp-carousel__viewport {
  overflow: hidden;
}
.xp-carousel__track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s ease;
  will-change: transform;
}
.xp-card {
  flex: 0 0 25%;
  max-width: 25%;
  padding: 5px;
  box-sizing: border-box;
  text-align: center;
}
.xp-card__link {
  display: block;
  color: inherit;
}
.xp-card__media {
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.xp-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s ease;
}
.xp-card__link:hover .xp-card__media img {
  transform: scale(1.06);
}
.xp-card__title {
  margin: 0;
  padding: 0 40px 10px;
  font-size: 14px;
  font-weight: normal;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xp-card__price {
  padding: 10px 40px 0;
  font-size: 18px;
  font-weight: bold;
  color: #dd3333;
}
.xp-card__link:hover .xp-card__title {
  color: #333;
}
.xp-card__link:hover .xp-card__price {
  color: #dd3333;
}

/* 轮播箭头 */
.xp-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.25s ease, background 0.25s ease;
}
.xp-carousel__arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}
.xp-carousel__arrow:disabled {
  background: rgba(0, 0, 0, 0.16);
  opacity: 0.45;
  cursor: default;
}
.xp-carousel__arrow--prev {
  left: -76px;
}
.xp-carousel__arrow--next {
  right: -76px;
}

/* ---------- 3. 视频 ---------- */
.xp-video video {
  display: block;
  width: 100%;
  background: #000;
  object-fit: cover;
}
.xp-video--full video {
  display:block;
  margin:0 auto;
  width: 65%;
  height:40%;
}
.xp-video--half video {
  height: 400px;
}
/* ---------- 4/6/8. 大图区块 ---------- */
.xp-feature {
  line-height: 0;
}
.xp-feature--dark {
  background: #000;
}

/* ---------- 5/7. 组合区块:横幅 + 左右分栏 ---------- */
.xp-feature-group__banner {
  line-height: 0;
}
.xp-split {
  display: flex;
}
.xp-split__col {
  flex: 0 0 50%;
  max-width: 50%;
  line-height: 0;
}
.xp-split__img {
  width: 100%;
  height: auto;
}


/* ---------- 9. 规格区:产品对比 + 查看详情按钮 ---------- */
/* 按钮列中心必须与对比图内 4 个产品列中心重合:
   对比图列中心位于图宽的 32.422% / 44.141% / 55.859% / 67.578%(间距 11.719%),
   故容器取图宽的 46.875% 并居中(左边界 26.5625%),4 等分后中心恰好对齐。 */
.xp-spec__actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  justify-items: center;
  align-items: center;
  width: 46.875%;
  margin: 0 auto;
  padding: 0 0 6vh;
}
.xp-page .xp-btn {
  display: inline-block;
  padding: 8px 34px;
  border: 2px solid #555;
  border-radius: 999px;
  background: #555;
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.xp-page .xp-btn:hover {
  background: #464646;
  border-color: #464646;
}

/* ============================================================
   响应式
   ============================================================ */

/* ---------- 平板(<=992px):轮播 2 列,箭头靠内 ---------- */
@media (max-width: 992px) {
  .xp-card {
    flex-basis: 50%;
    max-width: 50%;
  }
  .xp-card__title,
  .xp-card__price {
    padding-left: 16px;
    padding-right: 16px;
  }
  .xp-carousel__arrow {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
  .xp-carousel__arrow--prev {
    left: 6px;
  }
  .xp-carousel__arrow--next {
    right: 6px;
  }
}

/* ---------- 移动端(<=768px):单列 + 箭头常显 ---------- */
@media (max-width: 768px) {
  .xp-products {
    padding: 0 15px 40px;
  }
  .xp-card {
    flex-basis: 100%;
    max-width: 100%;
  }
  .xp-card__title {
    font-size: 15px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .xp-card__price {
    padding-left: 16px;
    padding-right: 16px;
  }
  .xp-carousel__arrow {
    display: flex;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }
  .xp-carousel__arrow--prev {
    left: 8px;
  }
  .xp-carousel__arrow--next {
    right: 8px;
  }
  /* 对比图 4 列在手机端过窄,按钮改为 2×2 排列 */
  .xp-spec__actions {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 0;
    padding: 0 15px 24px;
    box-sizing: border-box;
  }
  .xp-page .xp-btn {
    padding: 8px 24px;
    font-size: 13px;
  }
}
