/* ========================================
   product.css - 产品中心 / 产品详情页样式
   对应页面：/product、/product/*、产品搜索页
   ======================================== */

/* =============================================
   模块1：Hub 分类卡片（2列）
   对应 product_hub.html 的产品中心首页
   两个大卡片（产品系列、产品应用）2列并排
   ============================================= */
.hub-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:28px;
  max-width:1400px; margin:0 auto; padding:0 20px;
}
.hub-card {
  position:relative;
  background:var(--bg-white); border:1px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
  transition:all var(--transition);
  text-decoration:none; display:block; color:inherit;
}
.hub-card:hover { transform:translateY(-6px); box-shadow:var(--shadow-xl); border-color:var(--primary); }
.hub-card-cover {
  width:100%; height:220px; overflow:hidden; background:var(--bg-alt);
}
.hub-card-cover img {
  width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.hub-card:hover .hub-card-cover img { transform:scale(1.06); }
.hub-card-body { padding:28px; }
.hub-card-body h3 {
  font-size:1.15rem; font-weight:700; color:var(--text);
  margin-bottom:8px;
}
.hub-card-body .hub-desc {
  font-size:.9rem; color:var(--text-muted); line-height:1.7;
  margin-bottom:16px;
}
.hub-card-body .hub-count {
  font-size:.82rem; color:var(--text-light);
  display:inline-flex; align-items:center; gap:6px;
}
.hub-card-arrow {
  position:absolute; top:28px; right:28px;
  width:40px; height:40px;
  border-radius:50%; background:var(--primary);
  color:#fff; display:flex; align-items:center; justify-content:center;
  transition:all var(--transition); opacity:0; transform:translateX(-10px);
}
.hub-card:hover .hub-card-arrow { opacity:1; transform:translateX(0); }

/* =============================================
   模块2：产品卡片（列表页通用）
   2列产品卡片，上图下文
   ============================================= */
.product-card {
  background:var(--bg-white); border:1px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
  transition:all var(--transition);
}
.product-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-xl); }
.product-card-img {
  width:100%; height:220px; overflow:hidden;
  background:var(--bg-alt);
}
.product-card-img img {
  width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.product-card:hover .product-card-img img { transform:scale(1.05); }
.product-card-body { padding:28px; }
.product-card-body h3 {
  font-size:1.15rem; font-weight:700; color:var(--text);
  margin-bottom:10px;
}
.product-card-body p {
  font-size:.9rem; color:var(--text-muted); line-height:1.7;
  margin-bottom:20px;
}
.product-card-body .btn-sm {
  display:inline-flex; align-items:center; gap:6px;
  padding:10px 22px; font-size:.88rem; font-weight:600;
  color:#fff; background:var(--primary);
  border-radius:6px; transition:all var(--transition);
}
.product-card-body .btn-sm:hover { color:#fff; background:var(--primary-dark); transform:translateY(-1px); }
.product-footnote {
  text-align:center; margin-top:32px;
  font-size:.85rem; color:var(--text-light);
}

/* =============================================
   模块3：Hub 特色大卡片（1列全宽）
   product_hub.html 下方的大卡片，图文左右布局
   ============================================= */
.hub-featured {
  max-width:1200px; margin:60px auto; padding:0 20px;
}
.hub-featured-card {
  display:grid; grid-template-columns:1fr 1fr;
  background:var(--bg-white); border:1px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
  transition:all var(--transition); text-decoration:none; color:inherit;
}
.hub-featured-card:hover { box-shadow:var(--shadow-xl); transform:translateY(-4px); }
.hub-featured-card .featured-img { height:100%; min-height:340px; background:var(--bg-alt); }
.hub-featured-card .featured-img img { width:100%; height:100%; object-fit:cover; }
.hub-featured-card .featured-body { padding:40px; display:flex; flex-direction:column; justify-content:center; }
.hub-featured-card .featured-tag {
  display:inline-block; align-self:flex-start;
  padding:4px 12px; font-size:.75rem; font-weight:600;
  background:var(--primary-light); color:var(--primary);
  border-radius:50px; margin-bottom:12px;
}
.hub-featured-card .featured-body h3 { font-size:1.4rem; font-weight:700; margin-bottom:10px; }
.hub-featured-card .featured-body p { font-size:.92rem; color:var(--text-muted); line-height:1.7; margin-bottom:16px; }
.hub-featured-card .featured-meta { font-size:.82rem; color:var(--text-light); display:flex; gap:16px; }

/* =============================================
   模块4：产品详情页（product_detail.html）
   左侧图库（放大镜）+ 右侧信息区
   ============================================= */
.product-detail-section { padding-top:20px; }
.product-detail-layout {
  display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:flex-start;
}

/* 左侧图库（等分 + 高度自适应） */
.product-gallery-col {
  position:sticky; top:100px;
  display:flex; flex-direction:row; gap:12px; align-items:flex-start;
}
.gallery-main-area { flex:1; min-width:0; position:relative; }
.product-main-image {
  position:relative; width:100%;
  /* 高度 ≈ 视口高度减去 header/间距 自适应为正方形比例 */
  height:0; padding-bottom:100%; overflow:hidden;
  border-radius:var(--radius-lg); border:1px solid var(--border);
  background:#f8f9fa; cursor:crosshair;
}
.product-main-image img {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:contain; display:block;
}

/* 放大镜 */
.zoom-lens {
  display:none; position:absolute; width:180px; height:180px;
  border:2px solid var(--primary); background:rgba(37,99,235,.1);
  pointer-events:none; z-index:2;
}
.zoom-result {
  display:none; position:absolute; left:calc(100% + 20px); top:0;
  width:480px; height:480px; overflow:hidden; z-index:10;
  border:2px solid var(--border); border-radius:var(--radius-lg);
  background:#fff; box-shadow:var(--shadow-xl);
}
.zoom-result img { position:absolute; max-width:none; max-height:none; }

/* 右侧缩略图（与主图等高，超出滚动） */
.thumbnails-wrapper {
  position:relative; flex-shrink:0; width:80px;
  display:flex; flex-direction:column; align-items:center;
  align-self:stretch;
}
.thumb-scroll-btn {
  flex-shrink:0; width:80px; height:28px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius:6px;
  background:var(--bg-white); color:var(--text-muted); cursor:pointer;
  transition:all .2s; z-index:2;
}
.thumb-scroll-btn:hover { background:var(--bg-alt); color:var(--text); border-color:var(--primary-light); }
.product-thumbnails {
  flex:1; overflow:hidden; position:relative;
  width:100%; min-height:0;
}
.thumb-scroll-inner {
  display:flex; flex-direction:column; gap:8px;
  position:absolute; inset:0;
  overflow-y:auto; scrollbar-width:none;
  padding:4px 0;
}
.thumb-scroll-inner::-webkit-scrollbar { display:none; }
.thumb-item {
  flex-shrink:0; width:72px; height:72px; border-radius:8px; overflow:hidden;
  border:2px solid var(--border); cursor:pointer; transition:all .2s;
  background:#f8f9fa; margin:0 auto;
}
.thumb-item:hover { border-color:var(--primary-light); }
.thumb-item.active { border-color:var(--primary); box-shadow:0 0 0 2px rgba(37,99,235,.2); }
.thumb-item img { width:100%; height:100%; object-fit:cover; display:block; }

/* 右侧信息 */
.product-info-col { min-width:0; }
.product-detail-title { font-size:1.8rem; font-weight:800; line-height:1.3; margin-bottom:8px; color:var(--text); }
.product-detail-subtitle { font-size:1.05rem; color:var(--text-muted); margin-bottom:14px; line-height:1.6; }

/* 产品标签（按钮形式） */
.product-tags { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.product-tag {
  display:inline-block; padding:5px 14px; font-size:.82rem; font-weight:600;
  background:var(--primary); color:#fff;
  border-radius:50px; transition:all .2s;
}
.product-tag:hover { background:var(--primary-dark); }

.product-price-row { display:flex; align-items:baseline; gap:8px; margin-bottom:16px; }
.price-label { font-size:.95rem; color:var(--text-muted); }
.price-value { font-size:1.5rem; font-weight:800; color:#e53e3e; }
.product-summary { margin-bottom:20px; padding:16px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); }
.product-summary p { font-size:.95rem; line-height:1.8; color:var(--text-muted); margin:0; }

/* 参数表 */
.product-specs { margin-bottom:20px; }
.specs-table { width:100%; border-collapse:collapse; }
.specs-table tr { border-bottom:1px solid var(--border); }
.specs-table tr:last-child { border-bottom:none; }
.specs-table td { padding:10px 8px; font-size:.9rem; line-height:1.6; }
.spec-key { color:var(--text-muted); font-weight:500; width:50px; background:var(--bg-gray); border-radius:4px 0 0 4px; }
.spec-value { color:var(--text); }

/* 操作按钮 */
.product-actions { display:flex; gap:14px; margin-bottom:16px; }
.btn-action {
  display:inline-flex; align-items:center; gap:8px;
  padding:14px 28px; border-radius:var(--radius); font-size:1rem; font-weight:600;
  border:none; cursor:pointer; text-decoration:none;
  transition:all .25s ease;
}
.btn-wechat { background:#07c160; color:#fff; }
.btn-wechat:hover { background:#06ad56; transform:translateY(-1px); box-shadow:0 4px 14px rgba(7,193,96,.35); }
.btn-phone { background:var(--primary); color:#fff; }
.btn-phone:hover { background:var(--primary-dark); color:#fff; transform:translateY(-1px); box-shadow:0 4px 14px rgba(37,99,235,.35); }

/* 元信息 */
.product-meta-info { display:flex; gap:20px; flex-wrap:wrap; padding:12px 0; font-size:.85rem; color:var(--text-muted); }
.meta-item strong { color:var(--text); }

/* CTA 底部按钮 */
.cta-buttons { display:flex; gap:16px; justify-content:center; flex-wrap:wrap; }
.btn-white-outline {
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 32px; border-radius:var(--radius); font-size:1rem; font-weight:600;
  border:2px solid rgba(255,255,255,.6); color:#fff; background:transparent; cursor:pointer;
  text-decoration:none; transition:all .25s ease;
}
.btn-white-outline:hover { border-color:#fff; background:rgba(255,255,255,.1); transform:translateY(-2px); }

/* 微信弹窗 */
.wechat-modal-overlay {
  display:none; position:fixed; inset:0; z-index:9999;
  background:rgba(0,0,0,.5); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px);
  align-items:center; justify-content:center;
}
.wechat-modal-overlay.active { display:flex; }
.wechat-modal-content {
  background:#fff; border-radius:20px; padding:40px; width:360px; max-width:90vw;
  text-align:center; position:relative; animation:modalIn .3s ease;
}
@keyframes modalIn {
  from { opacity:0; transform:scale(.9) translateY(20px); }
  to { opacity:1; transform:scale(1) translateY(0); }
}
.modal-close {
  position:absolute; top:12px; right:16px; font-size:28px; border:none;
  background:transparent; cursor:pointer; color:var(--text-muted); line-height:1;
}
.modal-close:hover { color:var(--text); }
.modal-icon { margin-bottom:12px; }
.wechat-modal-content h3 { font-size:1.3rem; font-weight:700; margin-bottom:6px; color:var(--text); }
.wechat-modal-content p { color:var(--text-muted); font-size:.9rem; margin-bottom:20px; }
.wechat-qr-placeholder { margin:0 auto 16px; width:200px; height:200px; display:flex; align-items:center; justify-content:center; }
.wechat-qr-placeholder img { width:200px; height:200px; object-fit:contain; }
.qr-fallback { color:var(--text-muted); font-size:.9rem; }
.qr-fallback p { margin-bottom:4px; }
.wechat-id { font-size:.95rem; }
.wechat-id strong { color:var(--primary); }

/* -- 上一页/下一页 -- */
.product-prev-next {
  display:flex; justify-content:space-between; align-items:center; gap:24px;
}
.pn-link {
  display:inline-flex; align-items:center; gap:8px;
  text-decoration:none; color:var(--text); font-size:.95rem; font-weight:500;
  max-width:45%; transition:all .2s; line-height:1.4;
}
.pn-link svg { flex-shrink:0; color:var(--primary); }
.pn-link:hover { color:var(--primary); }
.pn-link span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pn-prev { text-align:left; }
.pn-next { text-align:right; flex-direction:row-reverse; }

/* 第一个编辑器区域与上方间距压缩 */
.product-detail-section + .section .section-header { padding-top:0; }

/* =============================================
   模块5：面包屑导航
   所有产品相关页面通用
   ============================================= */
.breadcrumb-bar {
  background:var(--bg-alt); border-bottom:1px solid var(--border);
  padding:12px 0;
}
.breadcrumb-inner {
  display:flex; align-items:center; flex-wrap:wrap; gap:4px;
  font-size:.85rem; color:var(--text-muted);
}
.breadcrumb-inner a {
  display:inline-flex; align-items:center; gap:4px;
  color:var(--text-muted); text-decoration:none;
  padding:2px 8px; border-radius:6px; transition:all .2s;
}
.breadcrumb-inner a:hover { color:var(--primary); background:var(--bg-white); }
.breadcrumb-sep { color:var(--text-light); display:inline-flex; align-items:center; }
.breadcrumb-current {
  color:var(--text); font-weight:600;
  padding:2px 8px; background:var(--bg-white); border-radius:6px;
}

/* 响应式 - Hub 页面 */
@media(max-width:1024px) {
  .hub-grid { grid-template-columns:1fr; }
  .hub-featured-card { grid-template-columns:1fr; }
  .hub-featured-card .featured-img { min-height:240px; }
}
@media(max-width:768px) {
  .hub-card-cover { height:180px; }
  .hub-card-body { padding:20px; }
  .hub-featured-card .featured-body { padding:24px; }
}
@media(max-width:480px) {
  .hub-card-cover { height:160px; }
}

/* 响应式 - 产品详情页 */
@media (max-width: 992px) {
  .product-detail-layout { grid-template-columns:1fr; gap:32px; }
  .product-gallery-col { position:static; flex-direction:column; align-self:stretch; }
  .product-main-image { height:0; padding-bottom:100%; }
  .thumbnails-wrapper { width:100%; flex-direction:row; align-self:auto; align-items:center; gap:8px; }
  .thumb-scroll-btn { width:28px; height:72px; flex-shrink:0; }
  .thumb-scroll-btn svg { transform:rotate(-90deg); }
  .product-thumbnails { flex:none; width:auto; overflow-x:auto; overflow-y:hidden; }
  .thumb-scroll-inner { flex-direction:row; align-items:center; gap:8px; position:relative; }
  .thumb-item { width:60px; height:60px; }
  .gallery-main-area { width:100%; }
  .zoom-result { display:none !important; }
  .zoom-lens { display:none !important; }
  .product-detail-title { font-size:1.4rem; }
  .product-actions { flex-direction:column; }
  .btn-action { justify-content:center; }
}
@media (max-width: 768px) {
  .product-main-image { height:0; padding-bottom:100%; }
  .product-detail-title { font-size:1.2rem; }
  .price-value { font-size:1.2rem; }
  .thumb-item { width:52px; height:52px; }
  .thumb-scroll-btn { height:52px; width:24px; }
  .thumb-scroll-btn svg { width:14px; height:14px; }
  .wechat-modal-content { padding:28px 24px; width:320px; }
}

/* =============================================
   模块6：相关文章 / 相关产品
   产品详情页底部
   ============================================= */
.related-articles-list { display:flex; flex-direction:column; gap:16px; }

/* 相关产品 4列网格 */
.related-products-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
.related-products-grid .product-card {
  display:flex; flex-direction:column;
}
.related-products-grid .product-card-img {
  width:100%; height:0; padding-bottom:100%; overflow:hidden;
  background:var(--bg-alt); position:relative; flex-shrink:0;
}
.related-products-grid .product-card-img img {
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.related-products-grid .product-card:hover .product-card-img img { transform:scale(1.05); }
.related-products-grid .product-card-body {
  flex:1; display:flex; flex-direction:column; padding:16px;
  justify-content:space-between;
}
.related-products-grid .product-card-body h3 {
  font-size:1rem; font-weight:700; color:var(--text);
  margin-bottom:6px;
}
.related-products-grid .product-card-body p {
  font-size:.85rem; color:var(--text-muted); line-height:1.6;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
  overflow:hidden; margin-bottom:0;
  padding-bottom:13px;
}
.related-products-grid .product-card-body .btn-sm {
  align-self:flex-start;
  padding:8px 18px; font-size:.82rem; font-weight:600;
  color:#fff; background:var(--primary); border-radius:6px; border:none;
  transition:all var(--transition);
}
.related-products-grid .product-card-body .btn-sm:hover { color:#fff; background:var(--primary-dark); transform:translateY(-1px); }
@media(max-width:992px) {
  .related-products-grid { grid-template-columns:repeat(2,1fr); }
}
@media(max-width:480px) {
  .related-products-grid { grid-template-columns:1fr; }
}

/* 相关文章卡片 */
.related-article-item {
  display:block; text-decoration:none; color:inherit;
  background:var(--bg-white); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:24px 28px;
  transition:all var(--transition);
}
.related-article-item:hover { border-color:var(--primary); box-shadow:var(--shadow-md); transform:translateY(-2px); }
.related-article-title { font-size:1.1rem; font-weight:700; color:var(--text); margin-bottom:6px; }
.related-article-summary { font-size:.9rem; color:var(--text-muted); line-height:1.7; margin-bottom:10px; }
.related-article-meta { display:flex; align-items:center; gap:16px; font-size:.85rem; }
.related-article-date { color:var(--text-light); }
.related-article-link { color:var(--primary); font-weight:600; transition:all .2s; }
.related-article-item:hover .related-article-link { color:var(--primary-dark); }
@media(max-width:768px) {
  .related-article-item { padding:18px 20px; }
  .related-article-title { font-size:1rem; }
}

/* =============================================
   模块7：简化版产品详情（product_detail_simple.html）
   轻量电商风格详情页
   ============================================= */
.simple-detail-layout { display:grid; grid-template-columns:1fr 1fr; gap:48px; align-items:flex-start; }
.simple-gallery { position:sticky; top:100px; }
.simple-main-img { width:100%; border-radius:12px; overflow:hidden; border:1px solid var(--border); background:#f8f9fa; }
.simple-main-img img { width:100%; display:block; }
.simple-thumbs { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.simple-thumb { width:64px; height:64px; border-radius:8px; overflow:hidden; border:2px solid var(--border); cursor:pointer; transition:all .2s; }
.simple-thumb:hover { border-color:var(--primary-light); }
.simple-thumb.active { border-color:var(--primary); }
.simple-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.simple-title { font-size:1.6rem; font-weight:800; margin-bottom:8px; }
.simple-subtitle { font-size:1rem; color:var(--text-muted); margin-bottom:12px; }
.simple-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:16px; }
.tag-item { display:inline-block; padding:4px 14px; font-size:.8rem; font-weight:600; background:var(--primary); color:#fff; border-radius:50px; }
.simple-price { margin-bottom:14px; }
.simple-price .price-label { font-size:.9rem; color:var(--text-muted); }
.simple-price .price-value { font-size:1.4rem; font-weight:800; color:#e53e3e; }
.simple-specs { margin-bottom:16px; }
.simple-specs table { width:100%; border-collapse:collapse; }
.simple-specs tr { border-bottom:1px solid var(--border); }
.simple-specs td { padding:8px 10px; font-size:.88rem; }
.simple-specs .sk { color:var(--text-muted); font-weight:500; width:70px; background:var(--bg-gray); border-radius:4px 0 0 4px; padding:8px 12px; }
.simple-specs .sv { color:var(--text); }
.simple-summary { margin:16px 0; padding:16px 0; border-top:1px solid var(--border); border-bottom:1px solid var(--border); font-size:.95rem; line-height:1.8; color:var(--text-muted); }
.simple-actions { display:flex; gap:12px; }
.simple-actions .btn-wechat,.simple-actions .btn-phone { display:inline-flex; align-items:center; gap:8px; padding:12px 24px; border-radius:8px; font-size:.95rem; font-weight:600; border:none; cursor:pointer; text-decoration:none; transition:all .25s ease; color:#fff; }
.simple-actions .btn-wechat { background:#07c160; }
.simple-actions .btn-wechat:hover { background:#06ad56; transform:translateY(-1px); }
.simple-actions .btn-phone { background:var(--primary); }
.simple-actions .btn-phone:hover { background:var(--primary-dark); transform:translateY(-1px); }
.simple-content { font-size:.95rem; line-height:1.9; color:var(--text); }
.simple-content img { max-width:100%; height:auto; border-radius:8px; margin:12px 0; }
@media(max-width:992px) { .simple-detail-layout { grid-template-columns:1fr; gap:32px; } }
@media(max-width:768px) { .simple-title { font-size:1.3rem; } }

/* =============================================
   模块8：产品分类页 - 左树右列布局
   对应 product_class.html
   左侧树形分类导航 + 右侧产品列表网格
   ============================================= */
.product-class-section {
  padding: 40px 0 60px;
  background: var(--bg-white);
}
.product-class-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

/* 左侧边栏 */
.class-sidebar {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 100px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.tree-nav {
  padding: 8px 0;
}
.tree-list, .tree-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tree-node {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.tree-trigger {
  width: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  transition: transform .2s, color .2s;
  user-select: none;
}
.tree-trigger:hover { color: var(--primary); }
.tree-trigger svg { transition: transform .2s; }
.tree-trigger.open svg { transform: rotate(90deg); }
.tree-trigger-empty { cursor: default; opacity: .3; }
.tree-link {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px 9px 0;
  text-decoration: none;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 500;
  transition: background .15s, color .15s;
  min-width: 0;
}
.tree-link:hover { color: var(--primary); background: rgba(37,99,235,.04); }
.tree-node.active > .tree-link,
.tree-link.active { color: var(--primary); font-weight: 600; }
.tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tree-badge {
  flex-shrink: 0;
  font-size: .7rem;
  padding: 1px 7px;
  border-radius: 50px;
  background: var(--primary);
  color: #fff;
  margin-left: auto;
}
.tree-sublist { width: 100%; display: none; }
.tree-sublist.is-open { display: block; }
.tree-sublist .tree-link { padding-left: 16px; font-size: 1rem; }
.level-2 .tree-link { padding-left: 28px; font-size: 1rem; }
.level-3 .tree-link { padding-left: 44px; font-size: .9375rem; }
.level-4 .tree-link { padding-left: 60px; }
.level-2 .tree-trigger { width: 28px; }
.level-3 .tree-trigger { width: 28px; }
.level-4 .tree-trigger { width: 28px; }

/* 侧边栏搜索框 */
.sidebar-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-search form {
  display: flex;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .2s;
}
.sidebar-search form:focus-within {
  border-color: var(--primary);
}
.sidebar-search .search-icon {
  flex-shrink: 0;
  margin-left: 10px;
  color: var(--text-muted);
}
.sidebar-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 8px;
  font-size: .85rem;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.sidebar-search input::placeholder { color: var(--text-muted); }
.sidebar-search button {
  flex-shrink: 0;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: background .2s;
}
.sidebar-search button:hover { background: var(--primary-dark); }

/* 侧边栏相关文章列表 */
.sidebar-articles {
  padding: 16px 16px 12px;
  border-top: 1px solid var(--border);
}
.articles-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.articles-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.articles-list li {
  position: relative;
  padding: 6px 0 6px 14px;
  line-height: 1.5;
}
.articles-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .6;
}
.articles-list li a {
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.articles-list li a:hover { color: var(--primary); }

/* 右侧主区域 */
.class-main {
  min-width: 0;
}
.class-result-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.result-count {
  font-size: .88rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.result-count strong { color: var(--primary); font-weight: 700; }
.result-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

/* 产品网格卡片 */
.class-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.class-product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.class-product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.class-product-img {
  width: 100%;
  flex-shrink: 0;
  background: var(--bg-alt);
  overflow: hidden;
  text-decoration: none;
  position: relative;
}
.class-product-img::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}
.class-product-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.class-product-card:hover .class-product-img img { transform: scale(1.06); }
.img-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.class-product-info {
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.class-product-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.4;
}
.class-product-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.class-product-title a:hover { color: var(--primary); }
.class-product-subtitle {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}
.class-product-summary {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.class-product-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  /* 允许网格项收缩到内容宽度以下 */
  min-width: 0;
}
.class-product-price {
  font-size: 1rem;
  font-weight: 700;
  color: #e53e3e;
  margin-bottom: 8px;
}

/* 全局按钮基础样式（搜索页等共用） */
.btn-detail,
.btn-consult {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: .85rem;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: all .25s;
  white-space: nowrap;
}
.btn-detail {
  color: #fff;
  background: var(--primary);
  border: none;
}
.btn-detail:hover {
  color: #fff;
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,.3);
}
.btn-consult {
  color: #fff;
  background: #07c160;
  border: none;
}
.btn-consult:hover {
  background: #06ad56;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7,193,96,.35);
}

/* 分类页按钮 - 网格内自适应，避免缩放溢出 */
.class-product-actions .btn-detail,
.class-product-actions .btn-consult {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.class-product-actions .btn-detail svg,
.class-product-actions .btn-consult svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

/* 分页 */
.class-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pgn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: all .2s;
  user-select: none;
}
.pgn-btn:hover { border-color: var(--primary); color: var(--primary); }
.pgn-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pgn-btn.disabled { opacity: .4; cursor: default; pointer-events: none; }
.pgn-ellipsis { padding: 0 4px; color: var(--text-light); font-size: .9rem; }
.pgn-info { margin-left: 8px; font-size: .82rem; color: var(--text-muted); }

/* =============================================
   模块9：二级分类导航图标网格
   对应 product_class_new.html 的产品分类导航
   圆图标 + 名称，自动填充列数
   ============================================= */
.class-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 0;
}
.class-nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  transition: all .25s;
}
.class-nav-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.class-nav-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.class-nav-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.class-nav-char {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.class-nav-label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  transition: color .2s;
}
.class-nav-card:hover .class-nav-label { color: var(--primary); }

/* =============================================
   模块10：产品介绍 Tab 切换
   对应 product_class_new.html
   6个横向 Tab 按钮 + 下方切换正文
   使用独立类名 prod-intro-*，不与任何全局CSS冲突
   ============================================= */
.prod-intro-modules { margin-top:0; margin-bottom:50px; }

/* Tab 导航栏 */
.prod-intro-tabs {
  display:flex; flex-wrap:wrap; gap:8px;
  margin-bottom:12px;
}
.prod-intro-tab {
  display:inline-flex; align-items:center; gap:5px;
  padding:10px 20px; border-radius:8px;
  font-size:1rem; font-weight:600;
  color:var(--text-muted); background:var(--bg-gray);
  border:1px solid transparent;
  cursor:pointer; user-select:none;
  transition:all .25s ease;
}
.prod-intro-tab svg {
  width:16px; height:16px; flex-shrink:0;
  display:inline-block; vertical-align:middle;
}
.prod-intro-tab:hover {
  color:var(--text); border-color:var(--border);
}
.prod-intro-tab.active {
  color:#fff; background:var(--primary); border-color:var(--primary);
}
.prod-intro-tab.active svg { stroke:#fff; }

/* Tab 正文内容 */
.prod-intro-content {
  font-size:.875rem; color:#000; line-height:1.8;
  animation:prodTabFade .3s ease;
}
@keyframes prodTabFade {
  from { opacity:0; transform:translateY(6px); }
  to   { opacity:1; transform:translateY(0); }
}
.prod-intro-body { display:none; }

/* =============================================
   模块11：新模板（product_class_new.html）
   面包屑后间距缩紧 + 4列产品网格
   ============================================= */

/* 面包屑后 section 间距紧 */
.breadcrumb-bar + .class-new-section { padding-top: 20px; }

/* 上图下文产品网格 4列 */
.prod-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.prod-card-v {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.prod-card-v:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.prod-card-v-img {
  display: block;
  width: 100%;
  background: var(--bg-alt);
  overflow: hidden;
  text-decoration: none;
  position: relative;
}
.prod-card-v-img::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}
.prod-card-v-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.prod-card-v:hover .prod-card-v-img img { transform: scale(1.06); }
.prod-card-v-body {
  padding: 14px 12px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.prod-card-v-title {
  font-size: .92rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.4;
}
.prod-card-v-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.prod-card-v-title a:hover { color: var(--primary); }
.prod-card-v-sub {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.5;
}
.prod-card-v-act {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.prod-card-v-act .btn-consult,
.prod-card-v-act .btn-detail {
  font-size: .8rem;
  padding: 8px 6px;
  justify-content: center;
}

/* 空状态 */
.list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-light);
}
.list-empty .empty-icon { margin-bottom: 16px; opacity: .5; }
.list-empty p { font-size: 1rem; margin: 0; }

/* 响应式 - 4列产品网格 */
@media(max-width:992px) {
  .prod-grid-4col { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:480px) {
  .prod-grid-4col { grid-template-columns: repeat(1, 1fr); }
}

/* ===== 栏目页交替图文布局 ===== */
.alt-row {
  padding: 80px 0;
}
.alt-row-white {
  background: #fff;
}
.alt-row-gray {
  background: #f8fafc;
}
.alt-row-inner {
  display: flex;
  align-items: center;
  gap: 60px;
}
.alt-row-reverse {
  flex-direction: row-reverse;
}
.alt-col-img {
  flex: 0 0 480px;
  max-width: 480px;
}
.alt-img-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-alt);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alt-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.alt-img-wrap:hover img {
  transform: scale(1.06);
}
.alt-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bg-alt);
}
.alt-col-text {
  flex: 1;
  min-width: 0;
}
.alt-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  line-height: 1.3;
}
.alt-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #000000;
  margin: 0 0 20px;
}
.alt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.alt-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(37,99,235,.08);
  border-radius: 50px;
  text-decoration: none;
  transition: all .2s;
}
.alt-tag:hover {
  background: var(--primary);
  color: #fff;
}
.alt-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.alt-actions .btn-detail,
.alt-actions .btn-consult {
  padding: 12px 24px;
  font-size: .9rem;
}

@media(max-width:992px) {
  .alt-row-inner {
    flex-direction: column !important;
    gap: 32px;
  }
  .alt-col-img {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .alt-row { padding: 50px 0; }
  .alt-title { font-size: 1.3rem; }
}
@media(max-width:480px) {
  .alt-row { padding: 36px 0; }
  .alt-actions { flex-direction: column; align-items: stretch; }
  .alt-actions .btn-detail,
  .alt-actions .btn-consult { justify-content: center; }
}

/* 响应式 - 分类页 */
@media(max-width:1200px) {
  .class-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:992px) {
  .product-class-layout { grid-template-columns: 1fr; }
  .class-sidebar { position: static; }
  .class-product-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:600px) {
  .class-product-grid { grid-template-columns: 1fr; }
}
@media(max-width:480px) {
  .class-product-actions { grid-template-columns: 1fr; }
}
@media(max-width:768px) {
  .class-pagination { flex-wrap: wrap; gap: 4px; }
  .pgn-btn { min-width: 32px; height: 32px; font-size: .82rem; padding: 0 8px; }
}

/* =============================================
   模块12：子分类卡片网格
   product_class.html 的子分类图标导航
   4列圆图 + 名称
   ============================================= */
.sub-class-header { margin-bottom: 24px; }
.sub-class-title { font-size: 1.3rem; font-weight: 800; color: var(--text); margin: 0; }
.sub-class-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.sub-class-card {
  display: block;
  text-decoration: none;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
  text-align: center;
}
.sub-class-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.sub-class-img {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-class-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s;
}
.sub-class-card:hover .sub-class-img img {
  transform: scale(1.08);
}
.sub-class-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.sub-class-name {
  padding: 12px 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}

@media(max-width:992px) {
  .sub-class-grid { grid-template-columns: repeat(3, 1fr); }
}
@media(max-width:600px) {
  .sub-class-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   模块13：产品搜索页（product_search.html）
   蓝色搜索横幅 + 搜索结果列表
   ============================================= */
.search-hero {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  padding: 36px 0;
}
.search-hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
}
.search-hero-inner svg { flex-shrink: 0; opacity: .7; }
.search-hero-form {
  display: flex;
  flex: 1;
  max-width: 500px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
.search-hero-form input {
  flex: 1;
  border: none;
  padding: 12px 16px;
  font-size: .95rem;
  outline: none;
  color: #333;
}
.search-hero-form button {
  border: none;
  background: #07c160;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  padding: 12px 24px;
  cursor: pointer;
  transition: background .2s;
}
.search-hero-form button:hover { background: #06ad56; }
.search-result-section {
  padding: 40px 0 60px;
  background: var(--bg-white);
}
.search-result-header { margin-bottom: 28px; }
.result-count { font-size: 1rem; color: var(--text-muted); }
.result-count strong { color: var(--text); font-weight: 700; }
.search-tip { margin-top: 12px; font-size: .95rem; color: var(--text-light); }
.search-product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.search-product-card {
  display: flex;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.search-product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.search-product-img {
  width: 160px;
  flex-shrink: 0;
  background: var(--bg-alt);
  overflow: hidden;
  text-decoration: none;
  position: relative;
}
.search-product-img::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}
.search-product-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.search-product-card:hover .search-product-img img { transform: scale(1.06); }
.search-product-info {
  flex: 1;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.search-product-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.4;
}
.search-product-title a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.search-product-title a:hover { color: var(--primary); }
.search-product-subtitle {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  line-height: 1.5;
}
.search-product-summary {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.search-product-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
@media(max-width:768px) {
  .search-product-grid { grid-template-columns: 1fr; }
  .search-product-img { width: 120px; }
  .search-hero-form { max-width: 100%; }
}
@media(max-width:480px) {
  .search-product-card { flex-direction: column; }
  .search-product-img { width: 100%; }
  .search-product-actions { flex-direction: column; align-items: stretch; }
  .search-product-actions .btn-detail,
  .search-product-actions .btn-consult { justify-content: center; }
}
