/* ProductFill — Wizard UI Styles */
:root {
  --primary: #5c6ac4;
  --primary-dark: #4959bd;
  --primary-light: #b3bcf5;
  --success: #50b83c;
  --error: #de3618;
  --warning: #f49342;
  --bg: #f6f6f7;
  --surface: #ffffff;
  --text: #202223;
  --text-sub: #6d7175;
  --border: #e1e3e5;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

/* Layout */
.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

.app-header {
  text-align: center;
  margin-bottom: 24px;
}

.app-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.app-header p {
  color: var(--text-sub);
  font-size: 14px;
  margin-top: 4px;
}

/* Progress bar */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 20px;
}

.progress-step {
  display: flex;
  align-items: center;
  flex: 1;
}

.progress-step:last-child { flex: 0; }

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-sub);
  flex-shrink: 0;
}

.step-circle.active {
  background: var(--primary);
  color: #fff;
}

.step-circle.done {
  background: var(--success);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
}

.step-line.done { background: var(--success); }

.step-label {
  font-size: 11px;
  color: var(--text-sub);
  position: absolute;
  margin-top: 40px;
  white-space: nowrap;
}

/* Cards / Panels */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p.subtitle {
  color: var(--text-sub);
  font-size: 14px;
  margin-bottom: 20px;
}

/* Steps */
.step { display: none; }
.step.active { display: block; }

/* Drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #f0f1ff;
}

.drop-zone .icon {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 12px;
}

.drop-zone p { color: var(--text-sub); font-size: 14px; }
.drop-zone .formats { font-size: 12px; color: var(--text-sub); margin-top: 8px; }

.file-input { display: none; }

/* Mode selector */
.mode-selector {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}

.mode-option {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.mode-option:hover { border-color: var(--primary-light); }
.mode-option.selected { border-color: var(--primary); background: #f8f8ff; }

.mode-option h3 { font-size: 15px; margin-bottom: 4px; }
.mode-option p { font-size: 13px; color: var(--text-sub); }

/* Parsed products table */
.parsed-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}

.parsed-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text-sub);
  font-size: 12px;
  text-transform: uppercase;
}

.parsed-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) { background: var(--border); }

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-sm { padding: 6px 12px; font-size: 13px; }

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

/* Scraping progress */
.scrape-progress {
  margin: 20px 0;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s;
}

.progress-text {
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.product-status-list {
  max-height: 300px;
  overflow-y: auto;
  margin-top: 16px;
}

.product-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--bg);
}

.status-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.status-icon.pending { color: var(--text-sub); }
.status-icon.scraping { color: var(--warning); }
.status-icon.done { color: var(--success); }
.status-icon.error { color: var(--error); }

/* Review table */
.review-product {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--surface);
  transition: background 0.2s;
}

.review-header:hover { background: var(--bg); }

.review-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--bg);
  flex-shrink: 0;
}

.review-info { flex: 1; }
.review-info .title { font-weight: 600; font-size: 14px; }
.review-info .meta { font-size: 12px; color: var(--text-sub); }

.review-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.review-body.open { display: block; }

/* Form fields */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Image gallery */
.image-gallery {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0;
}

.image-gallery img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.image-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.tag .remove {
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* Suggestions panel */
.suggestions-panel {
  background: #f8f8ff;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.suggestions-panel h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 12px;
}

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

.suggestion-section h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.collection-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.collection-item input[type="checkbox"] { flex-shrink: 0; }
.collection-item .name { font-size: 14px; }

/* Complete step */
.complete-card {
  text-align: center;
  padding: 48px 24px;
}

.complete-card .check {
  font-size: 48px;
  color: var(--success);
  margin-bottom: 16px;
}

.complete-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.complete-card p {
  color: var(--text-sub);
  margin-bottom: 24px;
}

/* Column mapping */
.mapping-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.mapping-row label {
  width: 100px;
  font-size: 13px;
  font-weight: 600;
}

.mapping-row select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Spinner */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Loading overlay */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.9);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.loading-overlay.visible {
  display: flex;
}

.loading-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 400px;
}

.loading-card .spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
  margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 640px) {
  .mode-selector { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
}
