/* ===== Product Form Section ===== */
.product-form-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.link-import-row {
  display: flex;
  gap: 10px;
}

.link-import-row .form-input {
  flex: 1;
}

.link-import-row .btn {
  flex-shrink: 0;
}

/* ===== Product Compare Table ===== */
.product-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.product-compare-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 13px;
  border-bottom: 2px solid var(--color-border);
  white-space: nowrap;
}

.product-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}

.product-compare-table tbody tr:nth-child(even) {
  background: var(--color-bg);
}

.product-compare-table tbody tr:active {
  background: var(--color-primary-light);
}

.product-compare-table .product-name-cell {
  font-weight: 600;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-name-link {
  color: inherit;
  text-decoration: none;
}

.product-name-link:hover {
  color: var(--color-primary);
}

.product-compare-table .product-brand-cell {
  font-size: 13px;
  color: var(--color-text-secondary);
}

.product-compare-table .product-price-cell {
  font-weight: 700;
  color: var(--color-danger);
  white-space: nowrap;
}

.product-compare-table .product-status-cell {
  text-align: center;
}

.product-compare-table .product-action-cell {
  text-align: right;
  white-space: nowrap;
}

.btn-xs {
  padding: 2px 8px;
  font-size: 12px;
  line-height: 1.8;
}

/* ===== Stats Bar ===== */
.product-list-stats {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.product-list-stats .stat-card {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  min-width: 0;
}

.product-list-stats .stat-value {
  font-size: 20px;
}

.product-list-stats .stat-label {
  font-size: 12px;
}

/* ===== Mobile Card Layout ===== */
@media (max-width: 767px) {
  .product-list-stats {
    gap: 6px;
  }

  .product-list-stats .stat-card {
    padding: 10px 8px;
  }

  .product-list-stats .stat-value {
    font-size: 16px;
  }

  .product-list-stats .stat-label {
    font-size: 11px;
  }

  .product-compare-table,
  .product-compare-table thead,
  .product-compare-table tbody,
  .product-compare-table tr,
  .product-compare-table th,
  .product-compare-table td {
    display: block;
  }

  .product-compare-table thead {
    display: none;
  }

  .product-compare-table tr {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    position: relative;
  }

  .product-compare-table tr:nth-child(even) {
    background: var(--color-surface);
  }

  .product-compare-table td {
    border: none;
    padding: 3px 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .product-compare-table td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-secondary);
    min-width: 44px;
    flex-shrink: 0;
  }

  .product-compare-table .product-name-cell {
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 15px;
    padding-top: 0;
    padding-bottom: 4px;
  }

  .product-compare-table .product-name-cell::before {
    display: none;
  }

  .product-compare-table .product-brand-cell {
    font-size: 13px;
  }

  .product-compare-table .product-price-cell {
    font-size: 16px;
  }

  .product-compare-table .product-status-cell {
    font-size: 13px;
  }

  .product-compare-table .product-status-cell .tag {
    display: inline-block;
  }

  .product-compare-table .product-action-cell {
    padding-top: 6px;
    padding-bottom: 0;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
    justify-content: flex-end;
  }

  .product-compare-table .product-action-cell::before {
    display: none;
  }

  .product-compare-table .product-action-cell .btn-xs {
    padding: 4px 12px;
    font-size: 13px;
  }
}

/* ===== Product Detail Section ===== */
.product-detail-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-detail-header {
  text-align: center;
  padding: 20px 0 12px;
}

.product-detail-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.2;
}

.product-detail-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-danger);
  margin-bottom: 8px;
}

.product-detail-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ===== Status Steps ===== */
.status-steps {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  position: relative;
}

.status-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--color-border);
  border-radius: 2px;
  z-index: 0;
}

.status-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  flex: 1;
}

.status-step .step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--color-border);
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.status-step .step-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.status-step .step-time {
  font-size: 11px;
  color: var(--color-text-secondary);
  opacity: 0.7;
  text-align: center;
  line-height: 1.2;
}

.status-step.completed .step-dot {
  background: var(--color-success);
  border-color: var(--color-success);
  color: #fff;
}

.status-step.completed .step-label {
  color: var(--color-success);
}

.status-step.active .step-dot {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.status-step.active .step-label {
  color: var(--color-primary);
  font-weight: 600;
}

.status-step.completed + .status-step::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  right: 50%;
  height: 3px;
  background: var(--color-success);
  z-index: -1;
}

/* ===== Info Grid ===== */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-grid .info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-grid .info-item.full-width {
  grid-column: 1 / -1;
}

.info-grid .info-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.info-grid .info-value {
  font-size: 15px;
  color: var(--color-text);
  word-break: break-word;
}

.info-grid .info-value.features-json {
  font-family: monospace;
  font-size: 13px;
  background: var(--color-bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
}

/* ===== Detail Actions ===== */
.detail-actions {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}

.detail-actions .btn {
  flex: 1;
}

/* ===== Section Divider ===== */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-divider-line {
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.section-divider-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
}