/* vipkei.com 手机产品列表页
 * source: templets/default/list_image_m.htm
 * version: 20260614-mobile-product-list-v2
 */

.m-product-list-template,
.m-product-list-template .mian {
  background: #F4F7F9;
}

.m-product-list-template *,
.m-product-list-template *::before,
.m-product-list-template *::after {
  box-sizing: border-box;
}

.m-product-list-template .m-product-list-page {
  width: 100%;
  margin: 0;
  padding: 0 6px 18px;
}

.m-product-list-template .m-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 面包屑 */
.m-product-list-template .m-product-breadcrumb {
  width: 100%;
  margin: 8px 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  border: 1px solid #E1E8EC;
  border-radius: 5px;
  background: #F9FBFC;
  color: #74818A;
  font-size: 13px;
  line-height: 1.5;
}

.m-product-list-template .m-product-breadcrumb a {
  color: #416273;
  text-decoration: none;
}

.m-product-list-template .m-product-breadcrumb span {
  margin: 0 5px;
  color: #9AA5AB;
}

.m-product-list-template .m-product-breadcrumb__product-current {
  display: none;
  margin-left: 0;
}

html.m-is-product-home .m-product-list-template .m-product-breadcrumb__product-link {
  display: none;
}

html.m-is-product-home .m-product-list-template .m-product-breadcrumb__product-current {
  display: inline;
}

html.m-is-product-home .m-product-list-template .m-product-breadcrumb__category-separator,
html.m-is-product-home .m-product-list-template .m-product-breadcrumb__category-current {
  display: none;
}

/* 栏目标题 */
.m-product-list-template .m-category-head {
  width: 100%;
  margin: 0 0 10px;
  padding: 14px 13px 13px;
  border: 1px solid #DFE7EB;
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(20, 48, 74, .035);
}

.m-product-list-template .m-category-head h1 {
  margin: 0;
  padding: 0;
  color: #173E55;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.m-product-list-template .m-category-head p {
  margin: 8px 0 0;
  padding: 0;
  color: #65737C;
  font-size: 14px;
  line-height: 1.72;
  text-align: left;
  overflow-wrap: anywhere;
}

.m-product-list-template .m-category-head p:empty {
  display: none;
}

/* 分类切换：独立白色卡片，避免旧 .cateList 蓝色背景污染整个模块 */
.m-product-list-template .m-product-switcher {
  width: 100%;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #D7E4E9;
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(20, 48, 74, .03);
}

.m-product-list-template .m-category-bar {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  width: 100%;
  min-height: 48px;
  overflow: hidden;
  background: #20B4E2;
}

.m-product-list-template .m-category-back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 48px;
  border-right: 1px solid rgba(255, 255, 255, .3);
  color: #FFFFFF;
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
  touch-action: manipulation;
}

.m-product-list-template .m-category-back__icon {
  display: block;
  margin-top: -3px;
  font-family: Arial, sans-serif;
  font-weight: 300;
}

.m-product-list-template .m-category-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 8px 44px 8px 10px;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
  appearance: none;
  -webkit-appearance: none;
}

.m-product-list-template .m-category-toggle__icon {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 10px;
  height: 10px;
  margin-top: -7px;
  border-right: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: rotate(45deg);
  transition: transform .2s ease, margin-top .2s ease;
}

.m-product-list-template .m-category-toggle[aria-expanded="true"] .m-category-toggle__icon {
  margin-top: -1px;
  transform: rotate(225deg);
}

.m-product-list-template .m-product-category-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 9px;
  overflow: visible;
  border: 0;
  background: #F6FAFC;
}

html.m-js:not(.m-is-product-home) .m-product-list-template .m-product-category-box:not(.is-open) {
  display: none;
}

.m-product-list-template .m-product-category-box a {
  float: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 42px;
  height: auto;
  margin: 0;
  padding: 7px 6px;
  overflow: hidden;
  border: 1px solid #D8E2E7;
  border-radius: 4px;
  background: #FFFFFF;
  color: #354A56;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}

.m-product-list-template .m-product-category-box a.is-current,
.m-product-list-template .m-product-category-box a[aria-current="page"] {
  border-color: #20B4E2;
  background: #EAF8FD;
  color: #087DA3;
  font-weight: 700;
}

html.m-is-product-home .m-product-list-template .m-category-bar {
  grid-template-columns: minmax(0, 1fr);
}

html.m-is-product-home .m-product-list-template .m-category-back {
  display: none;
}

/* 产品卡片 */
.m-product-list-template .cpBox {
  width: 100%;
  margin: 0;
  padding: 0;
}

.m-product-list-template .cpCont {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  list-style: none;
}

.m-product-list-template .cpCont > li {
  float: none;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #DEE7EB;
  border-radius: 6px;
  background: #FFFFFF;
  box-shadow: 0 2px 8px rgba(20, 48, 74, .035);
}

.m-product-list-template .m-product-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 6px;
  overflow: hidden;
  border-bottom: 1px solid #EDF1F3;
  background: #FFFFFF;
}

.m-product-list-template .cpBox .m-product-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  border: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
}

.m-product-list-template .cpBox .m-product-card-image img.is-fallback {
  padding: 18%;
  object-fit: contain;
  background: #F5F7F8;
}

.m-product-list-template .m-product-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 78px;
  margin: 0;
  padding: 9px 8px 10px;
  color: #273F4C;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

.m-product-list-template .m-product-card-title a {
  display: -webkit-box;
  width: 100%;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.m-product-list-template .m-product-card-image:focus-visible,
.m-product-list-template .m-product-card-title a:focus-visible,
.m-product-list-template .m-product-category-box a:focus-visible,
.m-product-list-template .m-category-back:focus-visible,
.m-product-list-template .m-category-toggle:focus-visible {
  outline: 2px solid #0B4B68;
  outline-offset: 2px;
}

.m-product-list-template .m-product-empty[hidden] {
  display: none !important;
}

.m-product-list-template .m-product-empty {
  margin: 0;
  padding: 24px 12px;
  border: 1px solid #DEE7EB;
  border-radius: 6px;
  background: #FFFFFF;
  color: #66747D;
  line-height: 1.7;
  text-align: center;
}

/* 分页 */
.m-product-list-template .m-pager-clean {
  width: 100%;
  margin: 0;
  padding: 14px 0 4px;
  overflow: visible;
}

.m-product-list-template .m-pager-clean > ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.m-product-list-template .m-pager-clean li {
  float: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid #D7E1E6;
  border-radius: 5px;
  background: #FFFFFF;
  color: #52616A;
  font-size: 14px;
  line-height: 1.2;
  list-style: none;
}

.m-product-list-template .m-pager-clean li a {
  float: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1.2;
  text-decoration: none;
}

.m-product-list-template .m-pager-clean li.thisclass {
  float: none !important;
  min-width: 38px !important;
  min-height: 38px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 10px !important;
  border: 1px solid #20B4E2 !important;
  border-radius: 5px !important;
  background: #20B4E2 !important;
  color: #FFFFFF !important;
  line-height: 1.2 !important;
}

@media (max-width: 380px) {
  .m-product-list-template .cpCont {
    gap: 8px;
  }

  .m-product-list-template .m-product-card-image {
    padding: 4px;
  }

  .m-product-list-template .m-product-card-title {
    min-height: 74px;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 14px;
  }

  .m-product-list-template .m-product-category-box {
    gap: 6px;
    padding: 7px;
  }

  .m-product-list-template .m-product-category-box a {
    font-size: 13px;
  }
}

@media (min-width: 700px) {
  .m-product-list-template .cpCont,
  .m-product-list-template .m-product-category-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-product-list-template .m-category-toggle__icon {
    transition: none;
  }
}
