/* ==========================
   内页共用样式（分类页 / 详情页）
   ========================== */

/* ---------- 顶部导航 ---------- */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: #333333;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  color: #cfcfcf;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.page-brand {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #f5f5f5;
  flex: 1;
}

.page-links {
  display: flex;
  gap: 4px;
}

.page-links a {
  padding: 6px 14px;
  border-radius: 16px;
  color: #b5b5b5;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.page-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.page-links a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--wood-1), var(--wood-2));
}

.header-spacer {
  flex: 1;
}

.cat-tabs {
  display: flex;
  gap: 6px;
}

.cat-tabs .tab {
  padding: 6px 18px;
  border-radius: 16px;
  color: #b5b5b5;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.cat-tabs .tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.cat-tabs .tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--wood-1), var(--wood-2));
}

/* ---------- 主体 ---------- */
.page-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

.page-intro {
  margin-bottom: 28px;
}

.page-intro h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #f5f5f5;
}

.page-intro p {
  margin-top: 8px;
  color: #9a9a9a;
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---------- 产品网格 ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.product-card {
  display: block;
  background: #2f2f2f;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #262626;
}

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

.card-info {
  padding: 14px 16px 16px;
}

.card-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-tags {
  margin-top: 6px;
  font-size: 12px;
  color: #9a9a9a;
}

/* 加载失败/空态 */
.load-error {
  grid-column: 1 / -1;
  padding: 60px 0;
  text-align: center;
  color: #8a8a8a;
  font-size: 14px;
}

/* ---------- 详情页 ---------- */
.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.detail-media {
  border-radius: 16px;
  overflow: hidden;
  background: #262626;
  aspect-ratio: 1 / 1;
}

.detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-info h1 {
  font-size: 26px;
  font-weight: 600;
  color: #f5f5f5;
  letter-spacing: 1px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-tags span {
  padding: 5px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #cfcfcf;
  font-size: 12px;
}

.detail-desc {
  margin-top: 18px;
  color: #b5b5b5;
  font-size: 14px;
  line-height: 1.8;
}

.detail-params {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  font-size: 13px;
}

.detail-params td {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.detail-params td:first-child {
  width: 84px;
  color: #8a8a8a;
}

.detail-params td:last-child {
  color: #e0e0e0;
}

.detail-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.btn-consult {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--wood-1), var(--wood-2));
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
  font-family: inherit;
}

.btn-consult:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cfcfcf;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.btn-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* ---------- 相关推荐 ---------- */
.recommend {
  margin-top: 56px;
}

.recommend h2 {
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
  margin-bottom: 18px;
  letter-spacing: 1px;
}

.recommend h2 span {
  color: #d8b48c;
}

.recommend .product-grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  padding: 24px 16px 32px;
  color: #7a7a7a;
  font-size: 12px;
  letter-spacing: 1px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .page-header {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
  }

  .page-main {
    padding: 24px 16px 44px;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cat-tabs .tab {
    padding: 6px 14px;
  }
}
