/* ==========================================================================
   路面养护产品 — 列表 & 详情（淘宝式，无价格）
   ========================================================================== */

body.pf-product-page-active .pf-product-page-main,
body.pf-product-page-active .pf-products-archive-page {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}

body.pf-product-page-active {
  overflow-x: hidden;
}

body.pf-product-page-active .pf-tb-product {
  --pf-tb-accent: #1a3a5c;
  --pf-tb-gold: #e8a800;
  --pf-tb-bg: #f5f5f5;
  --pf-tb-card: #ffffff;
  --pf-tb-border: #e8e8e8;
  --pf-tb-text: #333;
  --pf-tb-muted: #999;
  --pf-tb-viewport: 420px;
  --pf-tb-thumb: 62px;
  overflow-x: hidden;
}

/* ---------- 列表页 ---------- */
.pf-archive-hero.pf-page-hero {
  padding: 36px 20px 32px;
  background: linear-gradient(135deg, var(--pf-tb-accent) 0%, #2a5080 100%);
}

.pf-products-archive-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  background: var(--pf-tb-bg);
}

.pf-archive-intro {
  margin-bottom: 20px;
  padding: 14px 18px;
  background: var(--pf-tb-card);
  border-radius: 8px;
  border: 1px solid var(--pf-tb-border);
  font-size: 14px;
  line-height: 1.7;
  color: #666;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pf-product-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-product-card {
  margin: 0;
}

.pf-product-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--pf-tb-card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pf-tb-border);
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s;
}

.pf-product-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  border-color: #d0d0d0;
}

.pf-product-card-image {
  position: relative;
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}

.pf-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  box-sizing: border-box;
  transition: transform 0.35s ease;
}

.pf-product-card-link:hover .pf-product-card-image img {
  transform: scale(1.05);
}

.pf-card-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #bbb;
  font-size: 13px;
}

.pf-product-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 16px;
}

.pf-card-model {
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: var(--pf-tb-gold);
  background: #fff8e6;
  border: 1px solid #ffe4a0;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

.pf-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-tb-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card-excerpt {
  flex: 1;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--pf-tb-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-tb-accent);
}

.pf-archive-pagination {
  margin-top: 32px;
}

.pf-archive-pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pf-archive-pagination a,
.pf-archive-pagination span {
  min-width: 36px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--pf-tb-border);
  background: var(--pf-tb-card);
  text-decoration: none;
  font-size: 14px;
  color: var(--pf-tb-text);
  text-align: center;
}

.pf-archive-pagination .current {
  background: var(--pf-tb-accent);
  color: #fff;
  border-color: var(--pf-tb-accent);
}

.pf-archive-empty {
  text-align: center;
  padding: 80px 20px;
  background: var(--pf-tb-card);
  border-radius: 12px;
  color: #666;
}

/* ---------- 详情页（淘宝式） ---------- */
.pf-tb-product {
  background: var(--pf-tb-bg);
  padding-bottom: 48px;
}

.pf-tb-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 16px 0;
  box-sizing: border-box;
}

.pf-tb-breadcrumb {
  font-size: 12px;
  color: var(--pf-tb-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.pf-tb-breadcrumb a {
  color: var(--pf-tb-muted);
  text-decoration: none;
}

.pf-tb-breadcrumb a:hover {
  color: var(--pf-tb-accent);
}

.pf-tb-bc-sep {
  margin: 0 6px;
  color: #ccc;
}

.pf-tb-bc-current {
  color: var(--pf-tb-text);
}

/* 主卡片：左图右文 */
.pf-tb-main-card {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  background: var(--pf-tb-card);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* 覆盖主题全局 img 规则，防止主图撑破布局 */
.pf-tb-product img {
  max-width: 100%;
  height: auto;
}

.pf-tb-product .pf-tb-slide-inner img,
.pf-tb-product .pf-gallery-img {
  max-height: calc(var(--pf-tb-viewport) - 32px);
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* 画廊：左缩略图 + 固定主图区 */
.pf-tb-gallery-inner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pf-tb-thumbs {
  flex-shrink: 0;
  width: var(--pf-tb-thumb);
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: var(--pf-tb-viewport);
  overflow-y: auto;
  scrollbar-width: thin;
}

.pf-tb-thumb {
  width: var(--pf-tb-thumb);
  height: var(--pf-tb-thumb);
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.2s;
}

.pf-tb-thumb.is-active,
.pf-tb-thumb:hover {
  border-color: var(--pf-tb-gold);
}

.pf-tb-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pf-tb-gallery-wrap {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.pf-tb-viewport {
  position: relative;
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: calc(var(--pf-tb-viewport) - var(--pf-tb-thumb) - 12px);
  height: var(--pf-tb-viewport);
  background: #fafafa;
  border: 1px solid var(--pf-tb-border);
  border-radius: 8px;
  overflow: hidden;
  isolation: isolate;
}

.pf-tb-viewport--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 14px;
  max-width: var(--pf-tb-viewport);
}

.pf-product-gallery-swiper {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.pf-product-gallery-swiper .swiper-wrapper {
  height: 100%;
  max-width: 100%;
}

.pf-product-gallery-swiper .swiper-slide {
  height: var(--pf-tb-viewport);
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 禁用 Swiper 默认大箭头（仅用缩略图切换） */
.pf-tb-viewport .swiper-button-prev,
.pf-tb-viewport .swiper-button-next,
.pf-tb-product .swiper-button-prev,
.pf-tb-product .swiper-button-next {
  display: none !important;
}

.pf-tb-slide-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.pf-tb-slide-inner .pf-gallery-img,
.pf-tb-slide-inner img {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
}

.pf-tb-img-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
  pointer-events: none;
}

/* 右侧信息区 */
.pf-tb-info {
  padding: 4px 0 0 8px;
  min-width: 0;
}

.pf-tb-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--pf-tb-text);
}

.pf-tb-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--pf-tb-border);
}

.pf-tb-tag {
  font-size: 12px;
  color: #fff;
  background: var(--pf-tb-accent);
  padding: 2px 8px;
  border-radius: 3px;
}

.pf-tb-model {
  font-size: 15px;
  font-weight: 600;
  color: var(--pf-tb-text);
}

.pf-tb-subtitle {
  font-size: 14px;
  line-height: 1.75;
  color: #666;
  margin-bottom: 20px;
  padding: 12px 14px;
  background: #fafafa;
  border-radius: 6px;
}

.pf-tb-quick-specs {
  margin-bottom: 24px;
}

.pf-tb-quick-specs-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-tb-muted);
  margin-bottom: 10px;
}

.pf-tb-spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pf-tb-spec-list li {
  display: flex;
  font-size: 13px;
  line-height: 1.8;
  padding: 4px 0;
}

.pf-tb-spec-k {
  flex-shrink: 0;
  width: 88px;
  color: var(--pf-tb-muted);
}

.pf-tb-spec-v {
  color: var(--pf-tb-text);
  flex: 1;
}

.pf-tb-spec-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--pf-tb-accent);
  text-decoration: none;
}

.pf-tb-spec-more:hover {
  text-decoration: underline;
}

/* 操作按钮（类似淘宝，无价格） */
.pf-tb-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.pf-tb-btn {
  flex: 1;
  max-width: 200px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.pf-tb-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.pf-tb-btn--primary {
  background: linear-gradient(90deg, #ff6a00 0%, #ff8c33 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.35);
}

.pf-tb-btn--secondary {
  background: #fff5e6;
  color: #ff6a00;
  border: 1px solid #ffc899;
  max-width: 160px;
}

.pf-tb-services {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin: 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--pf-tb-border);
  font-size: 13px;
  color: #666;
}

.pf-tb-services li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pf-tb-services .fa-check {
  color: #52c41a;
  font-size: 12px;
}

/* 下方详情区：左导航 + 右内容 */
.pf-tb-detail-wrap {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: start;
}

.pf-tb-detail-sidebar {
  position: sticky;
  top: 24px;
}

.pf-tb-detail-nav {
  background: var(--pf-tb-card);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--pf-tb-border);
}

.pf-tb-tab {
  display: block;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pf-tb-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.pf-tb-tab:hover {
  background: #fafafa;
  color: var(--pf-tb-accent);
}

.pf-tb-tab.is-active {
  background: #fff8f0;
  border-left-color: #ff6a00;
  color: #ff6a00;
  font-weight: 600;
}

.pf-tb-detail-content {
  background: var(--pf-tb-card);
  border-radius: 12px;
  border: 1px solid var(--pf-tb-border);
  overflow: hidden;
}

.pf-tb-panel {
  padding: 28px 32px 36px;
  border-bottom: 1px solid var(--pf-tb-border);
}

.pf-tb-panel:last-child {
  border-bottom: 0;
}

.pf-tb-panel-title {
  margin: 0 0 24px;
  padding-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  color: var(--pf-tb-text);
  border-bottom: 2px solid #ff6a00;
  display: inline-block;
}

.pf-tb-rich-content {
  font-size: 15px;
  line-height: 1.85;
  color: #444;
}

.pf-tb-rich-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 4px;
}

.pf-tb-spec-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pf-tb-spec-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 14px;
}

.pf-tb-spec-table th,
.pf-tb-spec-table td {
  padding: 14px 18px;
  border: 1px solid var(--pf-tb-border);
  text-align: left;
  vertical-align: middle;
}

.pf-tb-spec-table tbody th {
  width: 22%;
  min-width: 120px;
  background: #fafafa;
  font-weight: 500;
  color: var(--pf-tb-muted);
}

.pf-tb-spec-table--multi thead th {
  background: #f0f4f8;
  font-weight: 600;
  color: var(--pf-tb-text, #1a1a1a);
  text-align: center;
}

.pf-tb-spec-table--multi .pf-tb-spec-corner {
  width: 22%;
  min-width: 120px;
  background: #fafafa;
}

.pf-tb-spec-table--multi .pf-tb-spec-model-head {
  text-align: center;
  white-space: nowrap;
}

.pf-tb-spec-table--multi tbody td {
  text-align: center;
}

.pf-tb-spec-table tr:nth-child(even) td {
  background: #fcfcfc;
}

/* 上下产品 */
.pf-tb-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.pf-tb-pager-item {
  display: block;
  padding: 16px 20px;
  background: var(--pf-tb-card);
  border-radius: 8px;
  border: 1px solid var(--pf-tb-border);
  text-decoration: none;
  transition: box-shadow 0.2s;
}

.pf-tb-pager-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pf-tb-pager-next {
  text-align: right;
}

.pf-tb-pager-label {
  display: block;
  font-size: 12px;
  color: var(--pf-tb-muted);
  margin-bottom: 4px;
}

.pf-tb-pager-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--pf-tb-accent);
}

.pf-tb-pager-empty {
  visibility: hidden;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .pf-tb-product {
    --pf-tb-viewport: 380px;
  }
  .pf-tb-main-card {
    grid-template-columns: 420px 1fr;
  }
  .pf-tb-viewport {
    max-width: calc(380px - var(--pf-tb-thumb) - 12px);
    height: 380px;
  }
  .pf-product-gallery-swiper .swiper-slide {
    height: 380px;
  }
}

@media (max-width: 991px) {
  .pf-tb-product {
    --pf-tb-viewport: 360px;
  }
  .pf-product-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pf-tb-main-card {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .pf-tb-gallery-wrap {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  .pf-tb-viewport {
    max-width: 100%;
    width: 100%;
    height: 360px;
  }
  .pf-product-gallery-swiper .swiper-slide {
    height: 360px;
  }
  .pf-tb-info {
    padding: 0;
  }
  .pf-tb-detail-wrap {
    grid-template-columns: 1fr;
  }
  .pf-tb-detail-sidebar {
    position: static;
  }
  .pf-tb-detail-nav {
    display: flex;
    border-radius: 8px;
  }
  .pf-tb-tab {
    flex: 1;
    text-align: center;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  .pf-tb-tab.is-active {
    border-left: none;
    border-bottom-color: #ff6a00;
  }
}

@media (max-width: 767px) {
  .pf-tb-product {
    --pf-tb-viewport: min(72vw, 320px);
  }
  .pf-tb-container {
    padding: 12px;
  }
  .pf-tb-main-card {
    padding: 16px;
  }
  .pf-product-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .pf-tb-thumbs {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-height: none;
    order: 2;
    margin-top: 10px;
  }
  .pf-tb-gallery-inner {
    flex-direction: column;
    width: 100%;
  }
  .pf-tb-gallery-wrap {
    max-width: 100%;
    width: 100%;
  }
  .pf-tb-viewport {
    order: 1;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 220px;
    max-height: min(72vw, 340px);
  }
  .pf-product-gallery-swiper,
  .pf-product-gallery-swiper .swiper-slide {
    height: 100%;
    min-height: 220px;
    max-height: min(72vw, 340px);
  }
  .pf-tb-product .pf-tb-slide-inner img,
  .pf-tb-product .pf-gallery-img {
    max-height: min(68vw, 300px);
  }
  .pf-tb-thumb {
    width: 56px;
    height: 56px;
  }
  .pf-tb-actions {
    flex-direction: column;
  }
  .pf-tb-btn {
    max-width: none;
  }
  .pf-tb-pager {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .pf-product-card-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .pf-card-title {
    font-size: 13px;
  }
}
