/* product-detail.css - Auto-split from styles.css */

/* 商品详情页面 */
.product-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
}

/* 商品详情加载状态 */
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 400px;
  font-size: 18px;
  color: #666;
}


.detail-header {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-button:hover {
  opacity: 0.7;
}

.back-icon {
  width: 20px;
  height: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 560px 1fr;
  gap: 80px;
  margin-bottom: 40px;
  position: relative;
}

.detail-content::before {
  content: '';
  position: absolute;
  left: 600px;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: #ebebeb;
  z-index: 1;
}

/* 左侧图片区域 */
.detail-left {
  position: sticky;
  top: 20px;
  height: fit-content;
}

.image-gallery {
  background: #f4f4f4;
  border-radius: 10px;
  overflow: hidden;
}

.main-image-container {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
}

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

.image-thumbnails {
  display: flex;
  gap: 8px;
  padding: 16px;
  overflow-x: auto;
}

.thumbnail {
  width: 60px;
  height: 60px;
}

.thumbnail {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: #222;
}

/* 图片加载状态 */
.image-loader,
.thumbnail-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  border-radius: 8px;
  min-height: 100px;
}

.thumbnail-loader {
  min-height: 60px;
  border-radius: 6px;
}

.image-error {
  color: #999;
  font-size: 12px;
  text-align: center;
}

.thumbnail-container {
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  transition: border-color 0.2s;
}

.thumbnail-container:hover,
.thumbnail-container.active {
  border-color: #222;
}

/* 右侧信息区域 */
.detail-right {
  padding-top: 0;
  padding-left: 0;
}

.detail-right .product-info {
  padding: 0;
  margin: 0;
}

.product-title {
  font-size: 18px;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.product-subtitle {
  font-size: 14px;
  color: var(--sub);
  margin: 0 0 8px 0;
  font-weight: 400;
  transition: color 0.2s ease;
}

.product-subtitle:hover {
  color: #3366cc;
  text-decoration: underline;
}

.product-dewu-title {
  margin: 0 0 8px 0;
}

/* 货号、30日得物销量：标签药丸形背景 */
.dewu-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 0;
}
.dewu-meta-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--chip-bg, #f4f4f4);
  color: var(--chip-text, #222);
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
}

/* 商品详情页：副标题与分类同一行 */
.subtitle-with-category {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px 0;
}
.product-category-row {
  display: none;
}
.product-category-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 9999px;
  background: var(--chip-bg, #f4f4f4);
  color: var(--chip-text, #222);
  font-size: 13px;
  font-weight: 500;
}

.rating-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating-number {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.star-icon {
  width: 16px;
  height: 16px;
}

.review-count {
  font-size: 13px;
  color: var(--sub);
}

.wish-count {
  font-size: 13px;
  color: var(--sub);
}

.transaction-count {
  font-size: 13px;
  color: var(--sub);
}

.price-section {
  margin-bottom: 16px;
}

.current-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-size: 14px;
  color: var(--sub);
}

.price-amount {
  font-size: 27px;
  font-weight: 700;
  color: var(--text);
}

.product-details-table {
  margin-bottom: 12px;
  margin-left: 0;
  padding-left: 0;
}

/* 商品详情容器 */
.product-details {
  margin-bottom: 12px;
}

/* 🆕 尺码价格显示区域 */
.size-prices-section {
  margin-top: 30px;
  margin-bottom: 20px;
}

.size-prices-section .section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #333;
}

.size-prices-body {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.size-price-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s;
}

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

.size-price-row:hover {
  background-color: #fafafa;
}

.size-price-cell {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.size-price-cell.size-cell {
  font-weight: 600;
  color: #222;
  min-width: 60px;
  flex: 0 0 60px; /* 固定宽度 */
}

.size-price-cell.price-cell {
  justify-content: flex-start;
  flex: 1; /* 价格单元格平均分配剩余空间 */
}

.size-price-cell .price-label {
  font-size: 13px;
  color: #777;
  min-width: 50px;
  white-space: nowrap;
}

.size-price-cell .price-value {
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.sales-header {
  display: table;
  width: 100%;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.sales-header .sales-cell {
  display: table-cell;
  width: 20%;
  padding: 10px 8px;
  font-weight: 600;
  font-size: 14px;
  color: #333;
  text-align: center;
  border-right: 1px solid #e0e0e0;
  vertical-align: middle;
  box-sizing: border-box;
  min-height: 40px;
  line-height: 1.4;
}

.sales-header .sales-cell:last-child {
  border-right: none;
}

.sales-body {
  max-height: 300px;
  overflow-y: auto;
  display: table;
  width: 100%;
}

.sales-row {
  display: table-row;
  border-bottom: 1px solid #f0f0f0;
}

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

.sales-row:hover {
  background: #f8f9fa;
}

.sales-row .sales-cell {
  display: table-cell;
  width: 20%;
  padding: 10px 8px;
  font-size: 14px;
  color: #333;
  text-align: center;
  border-right: 1px solid #f0f0f0;
  vertical-align: middle;
  box-sizing: border-box;
  word-break: break-word;
  overflow: hidden;
  min-height: 48px;
  line-height: 1.4;
}

.sales-row .sales-cell:last-child {
  border-right: none;
}

.sales-row .sales-cell:first-child {
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}

.sales-row .sales-cell:first-child .eu-size {
  color: #666;
  font-size: 11px;
  font-weight: 400;
}

/* 商品详情行样式 */
.detail-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 4px;
}

.detail-row .detail-label {
  min-width: 60px;
  flex-shrink: 0;
}

.detail-row .detail-value {
  flex: 1;
}

.details-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin: 0;
  padding: 0;
  cursor: pointer;
}

.details-content {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.detail-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 0;
  height: auto;
  flex: none;
}

.detail-item:not(:first-child)::before {
  content: '|';
  color: #d3d3d3;
  margin: 0 10px;
  font-size: 12px;
}

.detail-label {
  font-size: 12px;
  color: #999;
  letter-spacing: -0.33px;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.detail-value {
  font-size: 12px;
  color: #222;
  margin: 0;
  padding: 0;
  line-height: 1.4;
  max-width: 16ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 🆕 货号点击复制样式（支持手机和电脑） */
.detail-value.copy-article-number {
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 4px;
  padding: 2px 6px;
  margin: -2px -6px;
}

.detail-value.copy-article-number:hover {
  color: #2196F3;
  background-color: rgba(33, 150, 243, 0.08);
}

.detail-value.copy-article-number:active {
  color: #1976D2;
  background-color: rgba(33, 150, 243, 0.15);
}

/* 货号需要完整显示 */
#modelNumber {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

/* 商品详情展开按钮 */
.details-expand-btn {
  margin-left: 10px;
  display: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: color 0.2s;
  padding: 0 4px;
  flex-shrink: 0;
  z-index: 2;
}

.details-expand-btn:hover {
  color: #222;
}

/* 商品详情模态框 */
.product-details-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-details-modal-content {
  background: var(--bg);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-details-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #ebebeb;
}

.product-details-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.product-details-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.product-details-modal-close:hover {
  background: #f4f4f4;
  color: #222;
}

.product-details-modal-body {
  padding: 24px;
}

.modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f4f4f4;
}

.modal-detail-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.modal-detail-label {
  font-size: 12px;
  color: #999;
  font-weight: 500;
}

.modal-detail-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  word-wrap: break-word;
}

/* 发售价单行显示 */
#releasePrice {
  line-height: 1.4;
  white-space: nowrap;
}

/* 最近成交价字体大小 */
#recentPrice {
  font-size: 14px;
}

/* 价格历史区域 */
.price-history-section {
  margin-top: 15px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px 0;
}

.price-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid #ebebeb;
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  font-size: 14px;
  color: var(--sub);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-button.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.tab-button:hover {
  color: var(--text);
}

.price-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebebeb;
}

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

.price-table th {
  background: #f8f8f8;
  padding: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  border-bottom: 1px solid #ebebeb;
}

.price-table th.align-right {
  text-align: right;
}

.price-table td {
  padding: 16px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
}

/* 尺码信息区域样式 */
.size-info-section {
  margin-top: 24px;
  border-top: 1px solid #ebebeb;
  padding-top: 20px;
}

.size-info-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 12px;
}

/* 尺码信息表格样式 */
.size-table-container {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  margin-top: 0;
}

.size-table-wrapper {
  overflow-x: auto;
  position: relative;
}

.size-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
}

.size-table th {
  background: #f8f8f8;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  border-bottom: 1px solid #ebebeb;
  border-right: 1px solid #f0f0f0;
  white-space: nowrap;
  min-width: 40px;
  vertical-align: middle;
}

.size-table th.pin {
  background: #f5f5f5;
  font-weight: 700;
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 60px;
  color: #333;
}

.size-table th.column_header {
  background: #f8f8f8;
  font-size: 12px;
  padding: 8px 4px;
}

.size-table td {
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid #f5f5f5;
  border-right: 1px solid #f5f5f5;
  text-align: center;
  white-space: nowrap;
  min-width: 40px;
  vertical-align: middle;
}

.size-table th.row_header {
  background: #f0f0f0;
  font-weight: 600;
  font-size: 13px;
  padding: 12px 8px;
  text-align: center;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 60px;
  vertical-align: middle;
}

.size-table th.row_header,
.size-table td {
  border-right: 1px solid #f0f0f0;
}

.size-table th.row_header:last-child,
.size-table td:last-child {
  border-right: none;
}

.size-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* EU行高亮显示 */
.size-table tbody tr.highlight-eu {
  background-color: #f5f5f5;
  font-weight: 600;
}

.size-table tbody tr.highlight-eu:hover {
  background-color: #eeeeee;
}


.price-table td.align-right {
  text-align: right;
}

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