/* HANASABI 販売促進侍 — 共通スタイル */
:root {
  --c-primary:   #c0392b;   /* 侍レッド */
  --c-accent:    #e74c3c;
  --c-gold:      #f39c12;
  --c-dark:      #1a1a2e;
  --c-surface:   #ffffff;
  --c-surface2:  #f8f9fa;
  --c-border:    #e0e0e0;
  --c-text:      #2c2c2c;
  --c-muted:     #6c757d;
  --c-success:   #27ae60;
  --c-claude:    #d4a373;   /* Claude = 温かみのある金 */
  --c-gpt:       #10a37f;   /* GPT = グリーン */
  --c-gemini:    #4285f4;   /* Gemini = ブルー */
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:   0 4px 20px rgba(0,0,0,.12);
}

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

body {
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  background: var(--c-surface2);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ── ヘッダー ── */
.site-header {
  background: var(--c-dark);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.site-header .logo { font-size: 18px; font-weight: 700; letter-spacing: .05em; }
.site-header .logo span { color: var(--c-gold); }
.site-header nav { margin-left: auto; display: flex; gap: 4px; }
.site-header nav a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  transition: all .15s;
}
.site-header nav a:hover,
.site-header nav a.active { color: #fff; background: rgba(255,255,255,.12); }

/* ── レイアウト ── */
.container { max-width: 1200px; margin: 0 auto; padding: 24px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.page-title small { font-size: 14px; color: var(--c-muted); font-weight: 400; }

/* ── カード ── */
.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--c-border); }

/* ── グリッド ── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ── ボタン ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-accent); }
.btn-gold { background: var(--c-gold); color: #fff; }
.btn-gold:hover { opacity: .9; }
.btn-outline { background: transparent; color: var(--c-text); border: 1px solid var(--c-border); }
.btn-outline:hover { background: var(--c-surface2); }
.btn-success { background: var(--c-success); color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── フォーム ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  transition: border-color .15s;
  background: var(--c-surface);
}
.form-control:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }

/* ── バッジ ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-claude  { background: #fef3e2; color: #92600a; }
.badge-gpt     { background: #e8f8f2; color: #0a6640; }
.badge-gemini  { background: #e8f0fe; color: #1a56b0; }
.badge-success { background: #e8f8f2; color: var(--c-success); }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-error   { background: #fde8e8; color: var(--c-primary); }

/* ── AIカード（3列） ── */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 800px) { .ai-grid { grid-template-columns: 1fr; } }

.ai-card { border-radius: var(--radius-lg); padding: 16px; border: 2px solid transparent; transition: all .2s; cursor: pointer; }
.ai-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ai-card.selected { border-color: var(--c-primary); }
.ai-card-claude { background: #fef9f0; border-color: #f0d9b0; }
.ai-card-gpt    { background: #f0faf5; border-color: #a3e0c5; }
.ai-card-gemini { background: #f0f4ff; border-color: #a8c4f8; }

.ai-catchcopy { font-size: 16px; font-weight: 700; margin: 8px 0; }
.ai-maintext  { font-size: 13px; color: var(--c-muted); line-height: 1.7; }
.ai-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.ai-tag { font-size: 11px; color: var(--c-primary); }

/* ── 商品カード ── */
.product-card {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  background: var(--c-surface);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.product-card.selected { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(192,57,43,.2); }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-card-body { padding: 10px; }
.product-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; line-height: 1.4; }
.product-price { color: var(--c-primary); font-weight: 700; font-size: 15px; }
.product-check {
  position: absolute; top: 8px; right: 8px;
  width: 24px; height: 24px;
  background: var(--c-primary); color: #fff;
  border-radius: 50%; display: none;
  align-items: center; justify-content: center; font-size: 14px;
}
.product-card.selected .product-check { display: flex; }

/* ── ローディング ── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  color: var(--c-muted);
  gap: 12px;
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── トースト通知 ── */
#toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--c-dark); color: #fff;
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 13px; z-index: 9999;
  transform: translateY(100px); opacity: 0;
  transition: all .3s;
  max-width: 320px;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-left: 4px solid var(--c-success); }
#toast.error   { border-left: 4px solid var(--c-primary); }

/* ── ステップインジケーター ── */
.steps { display: flex; align-items: center; gap: 0; margin-bottom: 28px; }
.step { display: flex; align-items: center; gap: 8px; flex: 1; }
.step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-border); color: var(--c-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.step.active .step-num { background: var(--c-primary); color: #fff; }
.step.done .step-num { background: var(--c-success); color: #fff; }
.step-label { font-size: 12px; color: var(--c-muted); }
.step.active .step-label { color: var(--c-text); font-weight: 600; }
.step-line { flex: 1; height: 1px; background: var(--c-border); margin: 0 8px; }
