/**
 * price-detail.css - 价格详情页样式
 * 说明：套餐价格、购买按钮样式
 * 适用：price-detail.html（价格详情页）
 * 依赖：base.css, layout.css, common.css
 */

/* ========== 内容容器 ========== */
.content-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  font-size: 14px;
  color: #64748b;
}

.breadcrumb-left {
  display: flex;
  align-items: center;
}

.breadcrumb-right {
  display: flex;
  align-items: center;
}

.breadcrumb a {
  color: #64748b;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb .separator {
  margin: 0 8px;
  color: #cbd5e1;
}

.breadcrumb .current {
  color: var(--text-primary);
}

/* ========== 通栏布局 ========== */
.detail-main {
  /* 单栏通栏布局 */
  overflow: visible;
}

/* ========== 标签页导航（爱企查风格） ========== */
.page-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 4px;
  padding: 0 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #ebeef5;
}

.page-tabs-left {
  display: flex;
  align-items: center;
}

.page-tabs-right {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-left: 20px;
  border-left: 1px solid #ebeef5;
}

.view-count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #606266;
}

.view-count svg {
  flex-shrink: 0;
}

.update-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #606266;
}

.update-time svg {
  flex-shrink: 0;
}

.page-tab-item {
  padding: 16px 24px;
  font-size: 15px;
  color: #606266;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.page-tab-item:hover {
  color: #409eff;
}

.page-tab-item.active {
  color: #409eff;
  font-weight: 600;
}

.page-tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 2px;
  background: #409eff;
  border-radius: 1px;
}

/* ========== 卡片模块样式（爱企查风格） ========== */
.detail-card {
  background: white;
  border-radius: 4px;
  margin-bottom: 16px;
  border: 1px solid #ebeef5;
  overflow: visible;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #ebeef5;
  background: #fafafa;
  overflow: visible;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  color: #303133;
  margin: 0;
}

.card-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: #409eff;
  border-radius: 2px;
}

.card-title .title-count {
  font-size: 14px;
  font-weight: normal;
  color: #909399;
  margin-left: 4px;
}

.card-title .help-icon {
  margin-left: 4px;
}

.card-title .help-icon::after {
  left: -20px;
  right: auto;
  width: 240px;
  font-size: 12px;
  font-weight: normal;
  color: #303133;
  line-height: 1.5;
  text-align: left;
}

.card-title .title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.card-title .help-icon::before {
  left: 24px;
  right: auto;
}

.card-title .price-disclaimer {
  font-size: 12px;
  color: #909399;
  font-weight: normal;
  flex-shrink: 0;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ========== 产品头部信息卡片 ========== */
.product-header-card {
  padding: 24px 20px;
  overflow: visible;
}

.product-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.product-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
}

.product-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.product-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.product-tags .tag {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 2px;
  background: #f4f4f5;
  color: #909399;
}

.product-tags .tag.brand {
  background: #ecf5ff;
  color: #409eff;
}

.product-tags .tag.hot {
  background: #fdf6ec;
  color: #e6a23c;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.price-left {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-action {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.price-note {
  font-size: 12px;
  color: #909399;
}

.price-link {
  font-size: 12px;
  color: #409eff;
  text-decoration: none;
}

.price-link:hover {
  text-decoration: underline;
}

.price-label {
  font-size: 14px;
  color: #909399;
}

.price-value {
  font-size: 28px;
  font-weight: 700;
  color: #f56c6c;
}

.price-value::before {
  content: '¥';
  font-size: 16px;
}

.price-value.green {
  color: #67c23a;
}

.price-range {
  font-size: 13px;
  color: #909399;
  padding: 4px 10px;
  background: #f4f4f5;
  border-radius: 4px;
}

.price-disclaimer {
  font-size: 12px;
  color: #909399;
  text-align: right;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.help-icon {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

.help-icon svg {
  transition: transform 0.2s;
}

.help-icon:hover svg {
  transform: scale(1.1);
}

.help-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 10px 12px;
  background: #ffffff;
  color: #303133;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  border: 1px solid #ebeef5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 9999;
  pointer-events: none;
  text-align: left;
}

.help-icon::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  right: 8px;
  border: 6px solid transparent;
  border-top-color: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 9999;
}

.help-icon:hover::after,
.help-icon:hover::before {
  opacity: 1;
  visibility: visible;
}

/* H5端移动统计样式 */
.mobile-stats {
  display: none;
}

/* ========== 表单式信息展示（爱企查工商信息风格） ========== */
.info-grid-form {
  padding: 0;
  background: #fff;
}

.info-form-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #ebeef5;
}

.info-form-row:last-child {
  border-bottom: none;
}

.info-form-label {
  flex-shrink: 0;
  width: 160px;
  padding: 14px 16px;
  font-size: 14px;
  color: #606266;
  background: #f5f7fa;
  border-right: 1px solid #ebeef5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.info-form-value {
  flex: 1;
  padding: 14px 20px;
  font-size: 14px;
  color: #303133;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  word-break: break-all;
  line-height: 1.6;
}

.info-form-value .map-link {
  color: #409eff;
  text-decoration: none;
  margin-left: 12px;
}

.info-form-value .map-link:hover {
  text-decoration: underline;
}

/* ========== 双列信息表格（爱企查风格） ========== */
.info-grid {
  padding: 16px 24px;
  background: #fff;
}

.info-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #f5f5f5;
}

.info-row:last-child {
  border-bottom: none;
}

.info-cell {
  display: flex;
  align-items: flex-start;
  padding: 10px 16px;
  min-height: 44px;
}

.info-cell:not(:last-child) {
  border-right: 1px solid #f5f5f5;
}

.info-label {
  flex-shrink: 0;
  width: 120px;
  font-size: 13px;
  color: #909399;
  line-height: 1.8;
}

.info-value {
  flex: 1;
  font-size: 14px;
  color: #303133;
  line-height: 1.8;
  word-break: break-all;
}

.info-value.price {
  color: #ef4444;
  font-weight: 600;
}

.info-value.green {
  color: #059669;
  font-weight: 600;
}

.info-value a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-value a:hover {
  text-decoration: underline;
}

/* 徽章样式 */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge-brand {
  background: #ecf5ff;
  color: #409eff;
  border: 1px solid #d9ecff;
}

.badge-vip {
  background: #fdf6ec;
  color: #e6a23c;
  border: 1px solid #faecd8;
}

.badge-auth {
  background: #f0f9eb;
  color: #67c23a;
  border: 1px solid #e1f3d8;
}

.badge-tip {
  background: #f3f4f6;
  color: var(--text-secondary);
}

/* ========== 价格走势图 ========== */
.chart-wrapper {
  padding: 20px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #374151;
}

.chart-title .help-icon {
  width: 16px;
  height: 16px;
  color: var(--text-light);
  cursor: help;
}

.chart-periods {
  display: flex;
  gap: 4px;
}

.chart-period {
  padding: 6px 12px;
  font-size: 13px;
  color: #606266;
  background: #f4f4f5;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.chart-period:hover {
  background: #e9e9eb;
}

.chart-period.active {
  background: #409eff;
  color: white;
}

.chart-container {
  position: relative;
  height: 200px;
  background: linear-gradient(180deg, #f8fafc 0%, white 100%);
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  padding: 20px;
  margin-bottom: 16px;
}

.chart-y-axis {
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
}

.chart-body {
  margin-left: 50px;
  height: 100%;
}

.chart-body svg {
  width: 100%;
  height: calc(100% - 30px);
}

.chart-x-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-light);
  margin-top: 8px;
}

.chart-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.stat-item {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-value.high {
  color: #ef4444;
}

.stat-value.low {
  color: var(--primary-color);
}

.stat-value.current {
  color: var(--primary-color);
}

/* ========== 供应商报价表格 ========== */
.supplier-table {
  overflow-x: auto;
}

.supplier-table table {
  width: 100%;
  border-collapse: collapse;
}

.supplier-table thead {
  background: #fafafa;
}

.supplier-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: #909399;
  white-space: nowrap;
  border-bottom: 1px solid #ebeef5;
}

.supplier-table td {
  padding: 14px 16px;
  font-size: 14px;
  color: #303133;
  border-bottom: 1px solid #ebeef5;
}

.supplier-table tbody tr:hover {
  background: #f5f7fa;
}

.supplier-table .region-tag {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  font-size: 12px;
  color: white;
  background: #3b82f6;
  border-radius: 3px;
  margin-right: 6px;
}

.supplier-table .supplier-name {
  font-weight: 500;
}

.supplier-table .price-col {
  color: #f56c6c;
  font-weight: 600;
}

.supplier-table .phone-col {
  color: #409eff;
}

/* ========== 相关推荐模块 ========== */
.recommend-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.recommend-card {
  background: white;
  border-radius: 4px;
  border: 1px solid #ebeef5;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.recommend-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.recommend-card .card-title {
  font-size: 15px;
}

.recommend-card .view-more-link {
  font-size: 13px;
  color: #909399;
  text-decoration: none;
  transition: color 0.2s;
}

.recommend-card .view-more-link:hover {
  color: var(--primary-color);
}

.related-products-list,
.recommend-list {
  padding: 12px 16px;
}

.recommend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #ebeef5;
  text-decoration: none;
  transition: background 0.2s;
}

.recommend-item:last-child {
  border-bottom: none;
}

.recommend-item:hover {
  background: #f5f7fa;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.recommend-img {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f7fa;
}

.recommend-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommend-info {
  flex: 1;
  min-width: 0;
}

.recommend-name {
  font-size: 14px;
  color: #303133;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommend-price {
  font-size: 13px;
  color: #f56c6c;
  font-weight: 500;
}

.view-more-link {
  font-size: 13px;
  color: #409eff;
  text-decoration: none;
}

.view-more-link:hover {
  color: var(--primary-color);
}

/* ========== 快速操作区 ========== */
.quick-actions-row {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #f0f0f0;
}

.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-btn.primary {
  background: #409eff;
  color: white;
  border: none;
}

.quick-btn.primary:hover {
  background: #66b1ff;
}

.quick-btn.secondary {
  background: white;
  color: #606266;
  border: 1px solid #dcdfe6;
}

.quick-btn.secondary:hover {
  border-color: #409eff;
  color: #409eff;
}

.quick-btn svg {
  width: 16px;
  height: 16px;
}

/* ========== 底部相关企业模块 ========== */
.bottom-section {
  background: white;
  border-radius: 4px;
  border: 1px solid #ebeef5;
  margin-top: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.bottom-section .section-title {
  font-size: 15px;
  font-weight: 600;
  color: #303133;
  padding: 16px 20px;
  border-bottom: 1px solid #ebeef5;
  margin: 0;
}

.bottom-links {
  padding: 12px 20px;
}

.bottom-link {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  color: #909399;
  text-decoration: none;
}

.bottom-link:hover {
  color: #409eff;
}

/* ========== 隐藏原有标签页内容 ========== */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.detail-tabs {
  display: none;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .info-row {
    grid-template-columns: 1fr;
  }
  
  .info-cell {
    border-right: none !important;
    padding-left: 0 !important;
  }
  
  .info-cell:not(:last-child) {
    border-bottom: 1px dashed #f0f0f0;
  }
  
  .product-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .product-tags {
    justify-content: center;
  }
  
	  .product-price-row {
	    flex-direction: column;
	    align-items: center;
	    gap: 8px;
	  }

	  .price-left {
	    flex-direction: row;
	    flex-wrap: wrap;
	    justify-content: center;
	    gap: 12px;
	  }

	  .price-action {
	    display: flex !important;
	    flex-direction: column;
	    align-items: center;
	    gap: 4px;
	    width: 100%;
	    margin-top: 8px;
	  }

	  .price-action .price-note,
	  .price-action .price-link {
	    text-align: center;
	  }

	  .price-disclaimer {
	    flex-direction: row;
	    justify-content: center;
	    text-align: center;
	    width: 100%;
	    margin-top: 4px;
	  }
  
  .page-tabs-right {
    display: none;
  }
  
  .mobile-stats {
    display: flex;
    align-items: center;
    gap: 16px;
  }
  
  .chart-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .recommend-section {
    grid-template-columns: 1fr;
  }
  
  .page-tabs {
    overflow-x: auto;
    padding: 0 12px;
  }
  
  .page-tab-item {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .supplier-table {
    font-size: 12px;
  }
  
  .supplier-table th,
  .supplier-table td {
    padding: 10px 8px;
  }
  
  /* H5端收藏/报价/分享按钮：图标在文字上方 */
  .quick-actions-row {
    justify-content: center;
  }

  .quick-btn {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
  }

  .quick-btn svg {
    width: 20px;
    height: 20px;
  }

  /* H5供应商信息表单自适应 */
  .info-form-label {
    width: 100px;
    padding: 12px;
    font-size: 13px;
  }
  
  .info-form-value {
    padding: 12px;
    font-size: 13px;
  }
}

/* ========== 相关产品关系图谱 ========== */
.related-products-graph {
  position: relative;
  width: 100%;
  height: 280px;
  padding: 20px;
  overflow: hidden;
}

.graph-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.graph-line {
  stroke: #d1d5db;
  stroke-width: 1.5;
  fill: none;
  stroke-dasharray: 5, 3;
  opacity: 0.6;
}

.graph-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 20px;
  background: linear-gradient(135deg, #3b82f6 0%, var(--primary-hover) 100%);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: 25px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  z-index: 10;
  white-space: nowrap;
}

.graph-node {
  position: absolute;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  z-index: 5;
  cursor: pointer;
  background: transparent;
}

.graph-node:hover {
  text-decoration: underline;
  transform: scale(1.05);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .related-products-graph {
    height: 320px;
  }
  
  .graph-center {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .graph-node {
    font-size: 13px;
  }
}

/* ========== 价格走势图（图片） ========== */
.chart-image-container {
  padding: 0;
  text-align: center;
}

.chart-image {
  width: 100%;
  max-width: none;
  height: auto;
  border-radius: 0 0 8px 8px;
  border: none;
  display: block;
}

/* ========== 价格走势图登录遮罩 ========== */
.chart-image-container {
  position: relative;
}

.chart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* ★ 清晰度调节：rgba 第四个值越小越清晰，越大越模糊 (0~1) */
  background: rgba(255, 255, 255, 0.3);
  /* ★ 模糊度调节：值越小越清晰，越大越模糊 (0~10px) */
  backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 8px 8px;
}

.chart-overlay-content {
  text-align: center;
  background: linear-gradient(135deg, #e0f0ff, #f0f7ff);
  border-radius: 12px;
  padding: 32px 48px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.chart-overlay-title {
  font-size: 18px;
  font-weight: 600;
  color: #1e3a5f;
  margin: 0 0 8px 0;
}

.chart-overlay-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 0 0 20px 0;
}

.chart-overlay-btn {
  display: inline-block;
  background: var(--primary-color);
  color: #fff;
  padding: 10px 36px;
  border-radius: 20px;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s;
}

.chart-overlay-btn:hover {
  background: var(--primary-hover);
}

.chart-overlay-btn-register {
  background: #fff;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  margin-left: 12px;
}

.chart-overlay-btn-register:hover {
  background: #eff6ff;
}

.chart-overlay-sample {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 16px 0 0 0;
}

@media (max-width: 768px) {
  .chart-overlay-content {
    padding: 24px 32px;
  }

  .chart-overlay-title {
    font-size: 15px;
  }

  .chart-overlay-btn {
    padding: 8px 28px;
    font-size: 14px;
  }
}