/* Product Detail Page - 语义化样式 */

/* 页面容器 */
.product-detail-page {
  background-color: #f9fafb;
}

/* 主内容区域 */
.product-detail-main {
  padding-bottom: 5rem;
  background-color: #f9fafb;
  min-height: 100vh;
}

/* 面包屑和标题区域 */
.product-header-section {
  border-bottom: 1px solid #e5e7eb;
  background-color: white;
}

.product-header-container {
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

@media (min-width: 640px) {
  .product-header-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .product-header-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1280px) {
  .product-header-container {
    max-width: 1280px;
  }
}

.product-header-top {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .product-header-top {
    flex-direction: row;
    align-items: center;
  }
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #4b5563;
}

.breadcrumb-link {
  color: #4b5563;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: #1d4ed8;
}

.breadcrumb-separator {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
}

.breadcrumb-current {
  color: #111827;
}

/* 搜索框 */
.product-search-wrapper {
  width: 100%;
}

@media (min-width: 768px) {
  .product-search-wrapper {
    width: 16rem;
  }
}

.product-search-container {
  position: relative;
}

.product-search-input {
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 9999px;
  outline: none;
}

.product-search-input:focus {
  ring: 2px;
  ring-color: #1d4ed8;
}

.product-search-button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}

.product-search-button:hover {
  color: #1d4ed8;
}

/* 分类标题和描述 */
.product-category-header {
  margin-top: 1.5rem;
}

.product-category-title {
  font-size: 1.875rem;
  color: #111827;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.product-category-description {
  color: #6b7280;
  margin-top: 0.5rem;
}

/* 标签页内容区域 */
.product-content-section {
  margin: 0 auto;
  margin-top: 2rem;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .product-content-section {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .product-content-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 1280px) {
  .product-content-section {
    max-width: 1280px;
  }
}

.product-tabs-container {
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  /* 允许筛选弹层超出容器显示 */
  overflow: visible;
}

/* 标签页导航 */
.product-tabs-nav {
  border-bottom: 1px solid #e5e7eb;
}

.product-tabs-list {
  display: flex;
  padding: 0 1.5rem;
  margin-bottom: -1px;
}

.product-tab-button {
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: #4b5563;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  transition: all 0.2s;
}

.product-tab-button:hover {
  color: #111827;
  border-bottom-color: #d1d5db;
}

.product-tab-button.active {
  border-bottom-color: #1d4ed8;
  color: #1d4ed8;
}

/* 标签页面板 */
.product-tab-panels {
  /* 面板容器 */
}

.product-tab-panel {
  padding: 1.5rem;
  display: none;
}

.product-tab-panel.active {
  display: block;
}

.product-tab-panel-title {
  font-size: 1.125rem;
  color: #111827;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* 产品表格 */
.product-table-wrapper {
  overflow-x: auto;
  position: relative;
}

.product-table {
  min-width: 100%;
  font-size: 0.75rem;
  border: 1px solid #e5e7eb;
  border-collapse: collapse;
}

.product-table thead {
  background-color: #f9fafb;
  position: relative;
  z-index: 5;
}

.product-table th {
  padding: 0;
  text-align: center;
  color: #374151;
  font-weight: 600;
  border-bottom: 1px solid #e5e7eb;
}

.product-table th.text-center {
  text-align: center;
}

.product-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* 表头内部结构：标题 + 排序/筛选图标 */
.product-th {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-right: 1px solid #e5e7eb;
}

th:last-child .product-th {
  border-right: none;
}

.product-th-center {
  align-items: center;
}

.product-th-label {
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.product-th-actions {
  height: 50px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 0.15rem;
  
}

.product-th-center .product-th-actions {
  align-items: center;
}

.product-th-action {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  cursor: pointer;
  transition: color 0.2s;
  border-right: 1px solid #e5e7eb;
  height: 100%;
}
.product-th-action:last-child {
  border-right: none;
}

.product-th-action-icon {
  font-size: 0.625rem;
}

.product-th-action:hover {
  color: #1d4ed8;
}

.product-th-action-text {
  white-space: nowrap;
  font-weight: 400;
  font-size: 12px;
  color: #999999;
}

.product-table tbody tr:hover {
  background-color: #f9fafb;
}

.product-table tbody tr:last-child td {
  border-bottom: none;
}

/* 筛选面板 */
.product-filter-panel {
  position: absolute;
  min-width: 260px;
  max-width: 320px;
  max-height: 280px;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border-radius: 0.25rem;
  overflow: hidden;
  display: none;
  z-index: 20;
}

.product-filter-panel.active {
  display: block;
}

.product-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.product-filter-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.product-filter-title-prefix {
  color: #dc2626;
  font-weight: 600;
}

.product-filter-title-name {
  color: #374151;
}

.product-filter-clear {
  border: none;
  background: none;
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
}

.product-filter-clear:hover {
  color: #111827;
}

.product-filter-body {
  max-height: 230px;
  overflow-y: auto;
  padding: 0.5rem 0.75rem;
}

.product-filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.product-filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #111827;
}

.product-filter-checkbox {
  width: 0.9rem;
  height: 0.9rem;
}

.product-filter-text {
  white-space: nowrap;
}

/* 产品信息单元格 */
.product-info-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-image-cell {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border: 1px solid #e5e7eb;
  background-color: white;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
}

.product-image-cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-code {
  display: flex;
  flex-direction: column;
}

.product-code-text {
  font-weight: 700;
  color: #1f2937;
  font-family: monospace;
}

.product-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background-color: #dc2626;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  border-radius: 0.25rem;
  margin-top: 0.25rem;
  width: max-content;
}

.product-link {
  color: #dc2626;
  transition: color 0.2s;
  font-size: 1.25rem;
}

.product-link:hover {
  color: #b91c1c;
}

.product-link-disabled {
  color: #d1d5db;
}

/* 查看全部按钮 */
.view-all-button {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.view-all-button button {
  font-size: 1rem;
  color: #374151;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-all-button button:hover {
  color: #1d4ed8;
}

/* 文档卡片 */
.document-section {
  margin-bottom: 3rem;
}

.document-section-title {
  font-size: 1.125rem;
  color: #111827;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.document-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .document-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .document-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.document-card {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  background-color: white;
  cursor: pointer;
  transition: box-shadow 0.3s;
  overflow: hidden;
}

.document-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.document-image-wrapper {
  background-color: #f3f4f6;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}

.document-image {
  padding: 1rem;
  height: 100%;
  width: 100%;
  transition: transform 0.3s;
  object-fit: contain;
}

.document-card:hover .document-image {
  transform: scale(1.05);
}

.document-info {
  padding: 1rem;
}

.document-title {
  font-size: 0.875rem;
  color: #111827;
  font-weight: 500;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.document-card:hover .document-title {
  color: #1d4ed8;
}

.document-link-icon {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.5rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

/* 联系区域 */
.contact-section {
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
  border: 1px solid #f3f4f6;
  border-radius: 0.5rem;
  background-color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.contact-title {
  font-size: 1.25rem;
  color: #1f2937;
  font-weight: 500;
  margin-bottom: 2rem;
}

.contact-options {
  margin: 0 auto;
  margin-bottom: 2rem;
  gap: 1rem 2rem;
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  max-width: 36rem;
}

.contact-option {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.contact-icon-wrapper {
  padding: 0.375rem;
  border-radius: 0.375rem;
  /* background-color: #f9fafb; */
}

.contact-icon {
  font-size: 1.125rem;
  color: #4b5563;
}

.contact-label {
  font-size: 1rem;
  color: #4b5563;
  width: 4rem;
  text-align: left;
}

.contact-button {
  padding: 0.75rem 2rem;
  font-size: 1rem;
  font-weight: 500;
  background-color: #1d4ed8;
  color: white;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.contact-button:hover {
  background-color: #1e40af;
}

