/* ===== product.html 页面专属样式 ===== */

.page-banner {
  position: relative;
  height: 300px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26,35,50,0.85) 0%, rgba(0,100,165,0.7) 100%);
}

.page-banner-content h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.filter-section {
  padding: 40px 0 0;
  background: var(--bg-white);
}

.filter-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 0;
  border-bottom: 2px solid var(--border-color);
  /* 分类单行横向滑动：不换行，超出时左右滑动 */
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

/* 分类标签栏容器（含左右箭头） */
.filter-section .tabs-bar {
  margin-bottom: 40px;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
}

.filter-tab:hover {
  color: var(--theme-color);
}

.filter-tab.active {
  color: var(--theme-color);
  border-bottom-color: var(--theme-color);
  font-weight: 600;
}

.products-section {
  padding: 0 0 70px;
  background: var(--bg-white);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,137,207,0.12);
  border-color: rgba(0,137,207,0.2);
}

.product-card-img-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.product-card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card-body {
  padding: 16px 18px;
  text-align: center;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.5;
}

.product-card:hover .product-card-title {
  color: var(--theme-color);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 50px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
}

.pagination a:hover {
  color: var(--theme-color);
  border-color: var(--theme-color);
  background: var(--theme-color-light);
}

.pagination .prev, .pagination .next {
  font-size: 16px;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .products-section {
    padding: 50px 0;
  }
}

@media (max-width: 768px) {
  .top-bar {
    display: none;
  }
  .nav-inner {
    height: 60px;
    padding: 0 16px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 70px 0 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 100;
    overflow-y: auto;
  }
  .nav-menu.open {
    right: 0;
  }
  .nav-menu > li > a {
    padding: 12px 24px;
    line-height: normal;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }
  .nav-menu > li .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 20px;
  }
  .nav-search {
    margin: 12px 24px;
  }
  .mobile-toggle {
    display: flex;
  }
  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  .mobile-overlay.visible {
    opacity: 1;
    visibility: visible;
  }
  .page-banner {
    height: 220px;
  }
  .page-banner-content h1 {
    font-size: 26px;
  }
  .page-banner-content .subtitle {
    font-size: 13px;
  }
  .filter-tabs {
    gap: 0;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-tabs::-webkit-scrollbar {
    display: none;
  }
  .filter-tab {
    padding: 10px 16px;
    font-size: 13px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .product-card-img-wrapper, .product-card-img {
    height: 160px;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 16px;
  }
  .products-section {
    padding: 40px 0;
  }
  .back-to-top {
    bottom: 80px;
    right: 16px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .page-banner {
    height: 180px;
  }
  .page-banner-content h1 {
    font-size: 22px;
  }
  .pagination a, .pagination span {
    min-width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .products-section {
    padding: 30px 0;
  }
}

/* ===== 产品详情页 ===== */
.product-detail-section {
  padding: 50px 0;
}

.product-detail {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 56px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.product-detail-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.5;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-light);
  font-size: 14px;
}

.product-detail-meta .cat {
  background: rgba(0, 137, 207, 0.08);
  color: var(--theme-color);
  padding: 4px 14px;
  border-radius: 20px;
  font-weight: 500;
}

.product-detail-summary {
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
  background: #f7fafc;
  border-left: 3px solid var(--theme-color);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 24px;
}

.product-detail-body {
  font-size: 16px;
  line-height: 2.1;
  color: var(--text-secondary);
}

.product-detail-body p {
  margin-bottom: 18px;
}

.product-detail-body p:last-child {
  margin-bottom: 0;
}

.product-detail-body img {
  max-width: 100%;
  height: auto;
}

.product-detail-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-color);
}

.product-detail-back, .product-detail-consult {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
}

.product-detail-back {
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.product-detail-back:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
}

.product-detail-consult {
  background: var(--theme-color);
  color: #fff;
}

.product-detail-consult:hover {
  background: var(--theme-color-dark);
  color: #fff;
}

@media (max-width: 768px) {
  .product-detail-section {
    padding: 30px 0;
  }
  .product-detail {
    padding: 28px 20px;
  }
  .product-detail-title {
    font-size: 22px;
  }
  .product-detail-meta {
    flex-wrap: wrap;
    gap: 10px;
  }
  .product-detail-actions {
    flex-direction: column;
    gap: 14px;
  }
  .product-detail-back, .product-detail-consult {
    width: 100%;
    justify-content: center;
  }
}
