/* 购物车选购页 UI（全屏适配，不改动商品数据） */
.tf-cart-shop {
  background: #f5f6f8;
  padding: 12px 0 24px;
  width: 100%;
  box-sizing: border-box;
}

.tf-cart-shop .pep-product-polymerize-card {
  background: transparent;
  width: 100%;
}

.tf-cart-shop .pep-product-polymerize-card .por-section {
  padding-top: 0;
  padding-bottom: 0;
  width: 100%;
}

/* 覆盖全局 .por-container 1280 限制，铺满视口 */
.tf-cart-shop .por-container,
.tf-cart-shop .pep-product-polymerize-card .por-container {
  max-width: 100% !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box;
}

/* 分类/面包屑：思源黑体，字号放大 */
.tf-cart-shop .tf-cart-crumb,
.tf-cart-shop .search-pc .calculator-side-menu {
  font-family: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.tf-cart-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 16px;
  color: #555;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.tf-cart-crumb .tf-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #222;
  text-decoration: none;
  margin-right: 6px;
  font-size: 16px;
  font-weight: 500;
}

.tf-cart-crumb .tf-back:hover {
  color: #0052d9;
}

.tf-cart-crumb .tf-sep {
  color: #bbb;
}

.tf-cart-crumb .tf-current {
  color: #0052d9;
  font-weight: 700;
  font-size: 17px;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  padding: 0;
  align-items: stretch;
  width: 100%;
  min-height: calc(100vh - 160px);
}

/* 一级 + 二级 双栏导航 */
.tf-cart-shop .tf-nav-split {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  align-self: flex-start;
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 80px);
  z-index: 20;
  background: #f7f8fa;
  border-right: 1px solid #eee;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc {
  width: 248px;
  flex: 0 0 248px;
  margin-right: 0;
  border-right: 1px solid #e8ebf0;
  box-shadow: none;
  background: transparent;
  padding: 12px 0 16px;
  position: relative;
  top: auto;
  align-self: stretch;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  z-index: 1;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-input-dropdown {
  width: auto;
  height: 38px;
  line-height: 38px;
  margin: 0 12px 10px;
  background: #fff;
  border: 1px solid #dce0e6;
  border-radius: 8px;
  border-bottom: 1px solid #dce0e6;
  position: relative;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-input-dropdown:focus-within {
  border-color: #0052d9;
  box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.12);
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-input-dropdown input {
  width: calc(100% - 36px);
  height: 36px;
  padding: 0 8px 0 12px;
  font-size: 13px;
  color: #1f2329;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-input-dropdown .por-icon-search {
  right: 10px;
  top: 11px;
  color: #8a919f;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-section-body {
  max-height: calc(100vh - 160px);
  margin-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* —— 一级列表 —— */
.tf-cart-shop .tf-cat-menu {
  padding: 0 0 8px;
  background: transparent;
}

.tf-cart-shop .tf-cat-menu:after {
  display: none !important;
}

.tf-cart-shop .tf-cat-item {
  position: relative;
  margin: 2px 8px;
  border-radius: 8px;
}

.tf-cart-shop .tf-cat-title {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 11px 12px !important;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tf-cart-shop .tf-cat-title:hover {
  background: #f0f1f3 !important;
}

.tf-cart-shop .tf-cat-item.is-active-parent > .tf-cat-title,
.tf-cart-shop .tf-cat-item.is-preview > .tf-cat-title {
  background: #f0f1f3 !important;
  box-shadow: inset 3px 0 0 #1f2329;
}

.tf-cart-shop .tf-cat-item.is-active-parent > .tf-cat-title .ivu-menu-submenu-title_info,
.tf-cart-shop .tf-cat-item.is-preview > .tf-cat-title .ivu-menu-submenu-title_info {
  color: #1f2329 !important;
}

.tf-cart-shop .calculator-side-menu.ivu-menu-vertical .ivu-menu-submenu-title_info {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  color: #1f2329;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-cart-shop .tf-cat-count {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e8eaed !important;
  color: #6b7280 !important;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.tf-cart-shop .tf-cat-item.is-active-parent .tf-cat-count,
.tf-cart-shop .tf-cat-item.is-preview .tf-cat-count {
  background: #dde1e6 !important;
  color: #4b5563 !important;
}

.tf-cart-shop .tf-cat-arrow {
  flex: 0 0 auto;
  margin: 0 !important;
  color: #8a919f !important;
  transform: rotate(-90deg);
}

.tf-cart-shop .tf-cat-item.is-active-parent .tf-cat-arrow,
.tf-cart-shop .tf-cat-item.is-preview .tf-cat-arrow {
  color: #4b5563 !important;
}

/* —— 右侧二级固定面板（始终可见） —— */
.tf-cart-shop .tf-cat-dock {
  width: 220px;
  flex: 0 0 220px;
  background: #fff;
  padding: 12px 10px 14px;
  overflow-y: auto;
  max-height: calc(100vh - 80px);
  box-sizing: border-box;
}

.tf-cart-shop .tf-cat-dock-pane {
  display: none;
}

.tf-cart-shop .tf-cat-dock-pane.is-active {
  display: block;
}

.tf-cart-shop .tf-cat-panel-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 4px 8px;
  border-bottom: 1px solid #eef0f4;
}

.tf-cart-shop .tf-cat-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.35;
}

.tf-cart-shop .tf-cat-panel-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: #8a919f;
  white-space: nowrap;
}

.tf-cart-shop .tf-cat-list {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  background: transparent !important;
}

.tf-cart-shop .tf-cat-child {
  position: relative;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: #f3f5f8;
  list-style: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.tf-cart-shop .tf-cat-child a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 12px !important;
  color: #2b2f36 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: left;
  text-decoration: none;
  line-height: 1.3;
}

.tf-cart-shop .tf-cat-short {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.tf-cart-shop .tf-cat-child:hover {
  background: #e8eaed !important;
}

.tf-cart-shop .tf-cat-child.active {
  background: #1f2329 !important;
  box-shadow: none;
}

.tf-cart-shop .tf-cat-child.active a {
  color: #fff !important;
}

.tf-cart-shop .tf-cat-child .por-label-error {
  position: absolute;
  top: 3px;
  right: 3px;
  margin: 0;
  font-size: 10px;
  padding: 0 4px;
  line-height: 16px;
}

.tf-cart-shop .pep-product-polymerize-card .por-wrapper .classify-list-container {
  padding: 16px 20px 24px;
  background: #fff;
}

.tf-cart-login-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e8f3ff;
  border: 1px solid #c6e2ff;
  color: #3a7bd5;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.tf-cart-login-tip a {
  color: #0052d9;
  font-weight: 600;
  text-decoration: none;
}

.tf-cart-shop .classify-item .first-title {
  display: none !important;
}

.tf-cart-shop .card-list-container .por-row {
  display: grid !important;
  /* 卡片更大：最少约 300px，列数随屏宽减少 */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin: 0;
  width: 100%;
}

.tf-cart-shop .card-list-container .card-item.por-col-8 {
  flex: none !important;
  max-width: none !important;
  width: auto !important;
  padding: 0 !important;
  float: none !important;
}

.tf-cart-shop .card-item-wrap.por-card,
.tf-cart-shop .card-item-wrap.por-card-m {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  padding: 18px 18px 14px;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 4px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.tf-cart-shop .card-item-wrap:hover,
.tf-cart-shop .card-item-wrap.is-active {
  border-color: #0052d9;
  box-shadow: 0 0 0 1px #0052d9 inset;
}

.tf-cart-shop .card-item .card-title {
  margin-bottom: 12px;
}

.tf-cart-shop .card-item .card-title .card-title-text {
  font-size: 16px;
  font-weight: 700;
  color: #1d2129;
  line-height: 1.4;
  -webkit-line-clamp: 2;
}

.tf-cart-shop .card-item .card-desc {
  flex: 1 1 auto;
  margin: 0 0 14px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.65;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
}

.tf-cart-shop .card-item .card-desc,
.tf-cart-shop .card-item .card-desc * {
  overflow: visible !important;
  max-height: none !important;
}

.tf-cart-shop .card-item .card-desc > p {
  margin: 0;
}

/* 压制商品描述里过大的内联字号，不改描述内容本身 */
.tf-cart-shop .card-item .card-desc [style*="font-size: 1.05em"],
.tf-cart-shop .card-item .card-desc [style*="font-size:1.05em"] {
  font-size: 12px !important;
  font-weight: 600 !important;
}

.tf-cart-shop .card-item .card-desc i.fas,
.tf-cart-shop .card-item .card-desc i.fa {
  font-size: 12px !important;
}

.tf-cart-shop .card-price {
  margin-top: auto;
  margin-bottom: 12px;
  color: #e34d59;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.tf-cart-shop .card-price .unit {
  font-size: 12px;
  font-weight: 400;
  margin-left: 2px;
}

.tf-cart-shop .card-price .origin {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
}

.tf-cart-shop .card-price .trial {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  color: #e34d59;
}

.tf-cart-shop a.tf-buy-btn,
.tf-cart-shop span.tf-buy-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #0052d9;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 11px 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  margin-top: 0;
}

.tf-cart-shop a.tf-buy-btn:hover {
  background: #0041ad;
  color: #fff !important;
}

.tf-cart-shop span.tf-buy-btn.is-soldout {
  background: #c9cdd4;
  cursor: not-allowed;
}

.tf-cart-shop .gm {
  display: none !important;
}

.tf-cart-shop .kc {
  float: none;
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  z-index: 1;
}

.tf-cart-shop .card-item-wrap {
  position: relative;
}

.tf-cart-shop .jgao {
  margin-top: 20px;
  padding: 12px 14px;
  background: #fff7e8;
  border: 1px solid #ffe4ba;
  border-radius: 4px;
  font-size: 13px;
  color: #664d03;
}

@media (min-width: 1920px) {
  .tf-cart-shop .card-list-container .por-row {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 900px) {
  .tf-cart-shop .pep-product-polymerize-card .por-wrapper {
    flex-direction: column;
    min-height: 0;
  }

  .tf-cart-shop .tf-nav-split {
    flex-direction: column;
    width: 100%;
    position: static;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid #eee;
  }

  .tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc {
    width: 100%;
    flex: none;
    position: static;
    max-height: none;
    overflow: visible;
    border-right: 0;
    z-index: 1;
  }

  .tf-cart-shop .pep-product-polymerize-card .por-wrapper .search-pc .por-section-body {
    max-height: 280px;
    overflow-y: auto;
  }

  .tf-cart-shop .tf-cat-dock {
    width: 100%;
    flex: none;
    max-height: 260px;
    border-top: 1px solid #eef0f4;
    background: #fff;
  }

  .tf-cart-shop .tf-cat-arrow {
    transform: none;
  }

  .tf-cart-shop .card-list-container .por-row {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 560px) {
  .tf-cart-shop .por-container,
  .tf-cart-shop .pep-product-polymerize-card .por-container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .tf-cart-shop .card-list-container .por-row {
    grid-template-columns: 1fr;
  }
}

/* 商品说明里重复的行内样式，缩短 HTML */
.tf-s1 { color: #0056ff; margin-right: 8px; width: 16px; text-align: center; }
.tf-s2 { color: #333; }
.tf-s3 { color: #000; font-weight: bold; font-size: 1.05em; }
.tf-s4 { display: flex; align-items: center; gap: 10px; }
.tf-s5 { display: flex; align-items: center; min-width: 70px; }
.tf-s6 { color: #999; font-weight: normal; margin-left: 6px; }
.tf-s7 { display: flex; align-items: center; }
.tf-s8 { display: flex; flex-direction: column; gap: 5px; margin-bottom: 15px; }
.tf-s9 { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.tf-s10 { display: inline-block; background-color: #e8f4ff; color: #0056ff; padding: 2px 6px; border-radius: 10px; font-size: 0.85em; font-weight: 500; border: 1px solid #c2e0ff; white-space: nowrap; }
.tf-s11 { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
