/* ============================================
   article.css - Switch版 記事ページ用CSS（白基調）
   ============================================ */

:root {
  --article-max-width: 1200px;
  --article-bg:        #f4f4f6;
  --article-surface:   #ffffff;
  --article-border:    #e8e8ec;
  --article-accent:    #e60012;
  --article-text:      #333;
  --article-muted:     #888;
  --article-link:      #e60012;
  --article-badge-sale:   #e60012;
  --article-badge-genre:  #5c6bc0;
  --article-badge-price:  #00897b;
  --article-badge-manual: #43a047;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

body.article-body {
  background: var(--article-bg);
  color: var(--article-text);
  font-family: 'DM Sans', 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  line-height: 1.8;
  margin: 0;
  padding: 0;
}

/* ---------- ヘッダー ---------- */
.site-header {
  background: var(--article-surface);
  border-bottom: 1px solid var(--article-border);
  position: static;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo img { height: 36px; display: block; }
.header-nav { display: flex; gap: 24px; }
.header-nav a {
  color: var(--article-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}
.header-nav a:hover,
.header-nav a.active { color: var(--article-accent); }

/* ---------- 記事一覧：ヒーロー ---------- */
.articles-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.articles-hero h1 {
  font-size: clamp(24px, 4vw, 36px);
  margin: 0 0 10px;
  color: var(--article-text);
  font-weight: 900;
}
.articles-hero p {
  color: var(--article-muted);
  margin: 0;
  font-size: 15px;
}

/* ---------- フィルターバー ---------- */
.articles-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 0 20px 32px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--article-border);
  background: var(--article-surface);
  color: var(--article-muted);
  text-decoration: none;
  font-size: 13px;
  transition: all .2s;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--article-accent);
  border-color: var(--article-accent);
  color: #fff;
}

/* ---------- 記事グリッド ---------- */
.articles-main { min-height: calc(100vh - 60px); }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}
.article-card {
  background: var(--article-surface);
  border: 1px solid var(--article-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.article-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230,0,18,0.3);
  box-shadow: 0 8px 24px rgba(230,0,18,0.08);
}
.article-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: #e8e8ec;
  overflow: hidden;
}
.article-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px; font-size: 32px;
}
.article-card-thumb-placeholder span {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; opacity: .8;
}
.placeholder-sale_picks    { background: linear-gradient(135deg, #e91e63 0%, #ff5252 100%); color: #fff; }
.placeholder-genre_summary { background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%); color: #fff; }
.placeholder-price_report  { background: linear-gradient(135deg, #00897b 0%, #4db6ac 100%); color: #fff; }
.placeholder-manual        { background: linear-gradient(135deg, #546e7a 0%, #90a4ae 100%); color: #fff; }
.article-card-body {
  padding: 16px; flex: 1;
  display: flex; flex-direction: column; gap: 8px;
}
.article-card-title {
  font-size: 16px; font-weight: 700; margin: 0; line-height: 1.5;
  color: var(--article-text);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card-desc {
  font-size: 13px; color: var(--article-muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1;
}
.article-card-date { font-size: 12px; color: var(--article-muted); margin-top: auto; }

/* ---------- 記事タイプバッジ ---------- */
.article-type-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 700;
  background: var(--article-badge-sale); color: #fff; z-index: 1;
}
.article-header .article-type-badge {
  position: static; display: inline-block; margin-bottom: 12px;
}

/* ---------- 空状態 ---------- */
.articles-empty { text-align: center; padding: 80px 20px; color: var(--article-muted); }
.articles-empty p { margin-bottom: 24px; }
.btn-primary {
  display: inline-block; padding: 12px 28px;
  background: var(--article-accent); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 700;
}

/* ---------- ページング ---------- */
.articles-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; padding: 0 20px 60px;
}
.pager-btn {
  padding: 10px 24px; background: var(--article-surface);
  border: 1px solid var(--article-border); border-radius: var(--radius-sm);
  color: var(--article-text); text-decoration: none; transition: border-color .2s;
}
.pager-btn:hover { border-color: var(--article-accent); color: var(--article-accent); }
.pager-info { color: var(--article-muted); font-size: 14px; }

/* ============================================
   記事個別ページ
   ============================================ */
.article-main { min-height: calc(100vh - 60px); padding: 40px 20px 80px; }
.article-container { max-width: var(--article-max-width); margin: 0 auto; }

.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 13px; color: var(--article-muted); margin-bottom: 32px;
}
.breadcrumb a { color: var(--article-link); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--article-muted); }

.article-header { margin-bottom: 32px; }
.article-title {
  font-size: clamp(22px, 4vw, 32px); font-weight: 900;
  line-height: 1.4; color: var(--article-text); margin: 0 0 16px;
}
.article-meta {
  display: flex; gap: 16px; font-size: 13px;
  color: var(--article-muted); margin-bottom: 16px;
}
.article-lead {
  font-size: 16px; color: var(--article-muted);
  border-left: 3px solid var(--article-accent);
  padding-left: 16px; margin: 0;
}

.article-thumbnail { margin-bottom: 40px; border-radius: var(--radius-md); overflow: hidden; }
.article-thumbnail img { width: 100%; display: block; }

/* 本文 */
.article-body-content { font-size: 16px; line-height: 1.9; color: var(--article-text); }
.article-body-content h2 {
  font-size: 22px; font-weight: 800; color: var(--article-text);
  border-bottom: 2px solid var(--article-accent); padding-bottom: 8px; margin: 48px 0 20px;
}
.article-body-content h3 { font-size: 18px; font-weight: 700; color: #444; margin: 36px 0 16px; }
.article-body-content p { margin: 0 0 20px; }
.article-body-content a { color: var(--article-link); }
.article-body-content ul, .article-body-content ol { padding-left: 24px; margin: 0 0 20px; }
.article-body-content li { margin-bottom: 8px; }
.article-body-content table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 14px; }
.article-body-content th, .article-body-content td { border: 1px solid var(--article-border); padding: 10px 14px; text-align: left; }
.article-body-content th { background: var(--article-bg); color: var(--article-text); font-weight: 700; }
.article-body-content tr:nth-child(even) td { background: rgba(0,0,0,0.015); }

/* ゲームカード（記事内埋め込み用） */
.game-card-inline {
  display: flex; gap: 16px; background: var(--article-surface);
  border: 1px solid var(--article-border); border-radius: var(--radius-md);
  padding: 16px; margin: 16px 0; text-decoration: none; color: inherit;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.game-card-inline:hover {
  border-color: rgba(230,0,18,0.3); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,0,18,0.08);
}
.game-card-inline img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.game-card-inline-info { flex: 1; min-width: 0; }
.game-card-inline-title { font-size: 15px; font-weight: 700; color: var(--article-text); margin-bottom: 8px; }
.game-card-inline-info h4 { margin: 0 0 6px; color: var(--article-text); font-size: 15px; }
.game-card-inline-price { color: var(--article-accent); font-weight: 700; font-size: 16px; }
.game-card-inline-sale { color: #e65100; font-size: 12px; margin-left: 8px; }
.game-card-inline-meta { color: var(--article-muted); font-size: 13px; margin-top: 4px; }
.game-card-inline-sub { color: var(--article-muted); font-size: 12px; }

/* シェアボタン */
.article-share {
  margin: 48px 0 32px; padding: 24px;
  background: var(--article-surface); border-radius: var(--radius-md);
  border: 1px solid var(--article-border); text-align: center;
}
.share-label { font-size: 14px; color: var(--article-muted); margin: 0 0 14px; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.share-btn {
  padding: 10px 20px; border-radius: var(--radius-sm); text-decoration: none;
  font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: opacity .2s;
}
.share-btn:hover { opacity: .85; }
.share-x { background: #000; color: #fff; }
.share-line { background: #06c755; color: #fff; }
.share-fb { background: #1877f2; color: #fff; }
.share-hatena { background: #00A4DE; color: #fff; }
.share-copy { background: #e0e0e0; color: #555; }

/* CTA */
.article-cta { margin: 0 0 40px; text-align: center; }
.cta-btn {
  display: inline-block; padding: 16px 36px;
  background: var(--article-accent); color: #fff;
  border-radius: var(--radius-md); text-decoration: none;
  font-size: 16px; font-weight: 700; transition: opacity .2s;
}
.cta-btn:hover { opacity: .85; }

.article-back { padding-top: 20px; border-top: 1px solid var(--article-border); }
.article-back a { color: var(--article-link); text-decoration: none; font-size: 14px; }
.article-back a:hover { text-decoration: underline; }

/* ---------- フッター ---------- */
.site-footer {
  background: var(--article-surface); border-top: 1px solid var(--article-border);
  padding: 24px 20px; text-align: center; font-size: 13px; color: var(--article-muted);
}
.footer-inner nav { margin-top: 10px; display: flex; gap: 20px; justify-content: center; }
.footer-inner nav a { color: var(--article-muted); text-decoration: none; }
.footer-inner nav a:hover { color: var(--article-text); }

/* ジャンル絞り込み */
.articles-genre-filter { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 0 20px 20px; }
.genre-filter-label { font-size: 13px; color: var(--article-muted); white-space: nowrap; }
.genre-filter-select {
  padding: 6px 12px; border-radius: 6px; border: 1px solid var(--article-border);
  background: var(--article-surface); color: var(--article-text); font-size: 13px; cursor: pointer; min-width: 160px;
}
.genre-filter-select:focus { outline: none; border-color: var(--article-accent); }

/* おすすめアクセサリー カルーセル */
.related-accessories {
  background: var(--article-surface); border: 1px solid var(--article-border);
  border-radius: var(--radius-md); padding: 24px; margin: 40px 0 32px; overflow: hidden;
}
.related-accessories h2 { font-size: 16px; color: var(--article-text); margin: 0 0 16px 0; }
.acc-carousel { position: relative; }
.acc-scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(230,0,18,0.85); color: #fff; font-size: 18px;
  cursor: pointer; z-index: 2; transition: background 0.15s, transform 0.15s;
}
.acc-scroll-btn:hover { background: rgba(230,0,18,1); transform: translateY(-50%) scale(1.1); }
.acc-scroll-left { left: -16px; }
.acc-scroll-right { right: -16px; }
.acc-grid {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding: 0 28px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.acc-grid::-webkit-scrollbar { height: 6px; }
.acc-grid::-webkit-scrollbar-track { background: transparent; }
.acc-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
.acc-card {
  flex: 0 0 160px; display: flex; flex-direction: column;
  background: var(--article-bg); border-radius: var(--radius-sm); padding: 10px;
  text-decoration: none; color: inherit; transition: background 0.15s, transform 0.15s;
  border: 1px solid var(--article-border); scroll-snap-align: start;
}
.acc-card:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.acc-img-wrap { width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #e8e8ec; margin-bottom: 8px; }
.acc-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.acc-name { font-size: 11px; color: #666; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; flex: 1; }
.acc-price { font-size: 14px; font-weight: 700; color: var(--article-accent); font-family: 'DM Sans', sans-serif; }

@media (max-width: 600px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-meta { flex-direction: column; gap: 4px; }
  .share-buttons { flex-direction: column; }
  .share-btn { width: 100%; text-align: center; }
  .acc-card { flex: 0 0 140px; }
  .related-accessories { padding: 16px; }
  .acc-scroll-btn { width: 34px; height: 34px; font-size: 16px; }
  .acc-scroll-left { left: -8px; }
  .acc-scroll-right { right: -8px; }
  .acc-grid { padding: 0 20px 8px; }
}
