/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Product Center Top Banner ===== */
.products-page-banner .page-banner-overlay {
  /* 顶部 Banner 图片放这里：建议文件路径为 /assets/imgs/products/products-banner.jpg */
  background-image: url('/assets/imgs/products/products-banner.jpg');
  background-size: cover;
  background-position: center center;
}

.products-page-banner .page-banner-content {
  padding: 42px 0 38px;
}

.products-page-banner .breadcrumb {
  margin-bottom: 18px;
}

/* ===== Tabs ===== */
.tabs-wrapper {
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: var(--site-header-height);
  background: #fff;
  z-index: 90;
}

.tabs-wrapper .container {
  max-width: 1460px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabs-nav-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tabs-nav-btn:hover {
  background: #f5a623;
  border-color: #f5a623;
  color: #fff;
}

.tabs-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tabs-nav-btn:disabled:hover {
  background: #fff;
  border-color: #e0e0e0;
  color: #666;
}

.tabs {
  display: flex;
  gap: 0;
  overflow: hidden;
  flex: 1;
}

.tab {
  flex: 0 0 auto;
  min-width: 140px;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 600;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
  text-align: center;
}

.tab:hover {
  color: #333;
  border-bottom-color: #ddd;
}

.tab.active {
  color: #f5a623;
  border-bottom-color: #f5a623;
}

/* ===== Main Content ===== */
.container.main-content {
  max-width: 1460px;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ===== Product Section ===== */
.product-section {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 32px;
}

.section-inner {
  display: flex;
  gap: 36px;
}

.section-info {
  width: 230px;
  flex-shrink: 0;
}

.section-number {
  display: block;
  font-size: 32px;
  font-weight: 900;
  color: #f5a623;
  line-height: 1;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  color: #111;
  margin-top: 8px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 14px;
  color: #888;
  line-height: 1.8;
  margin-bottom: 20px;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #111;
  border: 1px solid #f5a623;
  border-radius: 20px;
  padding: 8px 16px;
  transition: all 0.2s;
}

.btn-view-all:hover {
  color: #f5a623;
  border-color: #f5a623;
}

.section-products {
  flex: 1;
  min-width: 0;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 0;
  row-gap: 16px;
}

.product-card:first-child,
.product-card:nth-child(5n + 1) {
  border-left-color: transparent;
}

.product-grid.row-extra {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.product-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 0 16px;
  border-left: 1px dashed #ececec;
  justify-content: space-between;
}

.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

.product-card:hover .product-name {
  color: #f5a623;
}

.product-card:hover .product-header svg {
  stroke: #f5a623;
}

.product-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 4px;
}

.product-header svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #999;
  transition: stroke 0.2s;
}

.product-name {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  transition: color 0.2s;
  line-height: 1.35;
}

.product-subs {
  margin-bottom: 8px;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.product-subs li {
  font-size: 14px;
  color: #888;
  line-height: 1.8;
  transition: color 0.22s ease, transform 0.28s ease;
}

.product-card:hover .product-subs {
  transform: translateY(-3px);
}

.product-card:hover .product-subs li {
  color: #666;
  transform: translateX(3px);
}

/* ===== Product Image Placeholder ===== */
.product-img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  max-width: 140px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  transition: transform 0.32s ease;
}

.product-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: filter 0.32s ease;
}

.product-card:hover .product-img-placeholder {
  transform: translateY(-8px);
}

.product-card:hover .product-img-placeholder img {
  filter: saturate(1.08) contrast(1.04);
}

.product-img-placeholder.large {
  max-width: 200px;
  aspect-ratio: 1.2;
}

.placeholder-icon {
  width: 40px;
  height: 40px;
  background: #e8e8e8;
  border-radius: 4px;
  position: relative;
}

.placeholder-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 16px;
  border: 2px solid #ccc;
  border-radius: 2px;
}

.placeholder-icon::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: #ccc;
  border-radius: 50%;
}

.product-img-link .placeholder-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

/* ===== Footer ===== */
/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .nav {
    display: none;
  }

  .section-inner {
    flex-direction: column;
  }

  .section-info {
    width: 100%;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-card:nth-child(5n + 1) {
    border-left-color: #ececec;
  }

  .product-card:nth-child(3n + 1) {
    border-left-color: transparent;
  }

  .footer-main {
    flex-direction: column;
  }

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .tabs-nav-btn {
    display: none;
  }
  
  .tabs-wrapper .container,
  .container.main-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tabs {
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
    min-width: 128px;
    padding: 13px 16px;
    font-size: 15px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-card {
    min-height: 170px;
    padding: 0 12px;
  }

  .product-card:nth-child(5n + 1),
  .product-card:nth-child(3n + 1) {
    border-left-color: #ececec;
  }

  .product-card:nth-child(odd) {
    border-left-color: transparent;
  }

  .product-name {
    font-size: 14px;
  }

  .page-title {
    font-size: 28px;
  }

  .product-section {
    padding: 20px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}
