/*
Theme Name: BestPick
Description: BestPickガジェットブログ 自作テーマ
Version: 0.1
*/

/* ===== RESET & ROOT ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d1b2a;
  --surface:  #1a2a3a;
  --card:     #1e3048;
  --accent:   #2e86c1;
  --text:     #e8e8e8;
  --text-sub: #a0b0c0;
  --border:   #2a3f54;
  --good:     #27ae60;
  --bad:      #e74c3c;
  --btn-amz:  #e47911;
  --btn-rkt:  #bf0000;
  --btn-yah:  #ff0033;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ロゴ */
.logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.02em;
  margin-left: -24px;
  line-height: 1;
}

.logo-text .best { color: #2e86c1; }
.logo-text .pick { color: #e8e8e8; }

/* 検索ボックス */
.header-search {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 6px 16px;
  gap: 8px;
  width: 240px;
}

.header-search input[type="search"] {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
  font-family: inherit;
}

.header-search input[type="search"]::placeholder { color: var(--text-sub); }
.header-search button {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

/* ===== LAYOUT ===== */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-sub); }
.breadcrumb span { margin: 0 6px; }

/* ===== ARTICLE HEADER ===== */
.article-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

h1.article-title {
  font-size: 28px;
  font-weight: 900;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.article-meta {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 28px;
  display: flex;
  gap: 16px;
}

/* ===== EYECATCH ===== */
.eyecatch {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 36px;
  display: block;
}

/* ===== RATING BOX ===== */
.rating-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 36px;
}
.rating-box .product-name { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.stars { font-size: 22px; color: #f1c40f; margin-bottom: 4px; }
.score { font-size: 13px; color: var(--text-sub); margin-bottom: 20px; }

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.pros, .cons { background: var(--surface); border-radius: 6px; padding: 14px; }
.pros h4 { color: var(--good); font-size: 13px; margin-bottom: 8px; }
.cons h4 { color: var(--bad); font-size: 13px; margin-bottom: 8px; }
.pros li, .cons li { font-size: 13px; margin-left: 16px; margin-bottom: 4px; }

.buy-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn:hover { opacity: 0.88; text-decoration: none; }
.btn-amazon  { background: var(--btn-amz); }
.btn-rakuten { background: var(--btn-rkt); }
.btn-yahoo   { background: var(--btn-yah); }

/* ===== TOC ===== */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 36px;
}
.toc h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text-sub); }
.toc ol { margin-left: 18px; }
.toc li { font-size: 14px; margin-bottom: 6px; }
.toc a { color: var(--accent); }

/* ===== ARTICLE BODY ===== */
.article-body h2 {
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  letter-spacing: 0.02em;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.article-body p { margin-bottom: 20px; }

.inline-buy {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.inline-buy .product-label { font-size: 14px; font-weight: 700; }

/* ===== RELATED ===== */
.related { margin-top: 56px; }
.related h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: var(--text-sub); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.related-card:hover { border-color: var(--accent); text-decoration: none; }
.related-card .thumb {
  height: 100px;
  background: linear-gradient(135deg, var(--surface), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  overflow: hidden;
}
.related-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card .info { padding: 10px 12px; font-size: 13px; font-weight: 500; line-height: 1.4; }

/* ===== PREV/NEXT ===== */
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.prev-next a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s;
  display: block;
  text-decoration: none;
}
.prev-next a:hover { border-color: var(--accent); }
.prev-next .label { font-size: 11px; color: var(--text-sub); margin-bottom: 4px; }

/* ===== TAGS ===== */
.tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
  display: inline-block;
  margin-bottom: 4px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-sub);
  margin-top: 80px;
}
.site-footer .footer-logo { font-size: 15px; color: var(--text); font-weight: 900; font-style: italic; margin-bottom: 8px; }
.site-footer .footer-logo .best { color: #2e86c1; }
.site-footer a { color: var(--text-sub); margin: 0 8px; }

/* ===== ARTICLE IMAGE ===== */
.article-image { margin: 32px 0; }
.article-image img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  display: block;
}
.image-caption { font-size: 13px; color: var(--text-sub); text-align: center; margin-top: 8px; }

/* ===== INDEX PAGE ===== */
.index-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.index-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.index-header h2 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 2px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: var(--text);
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }

.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, var(--surface), var(--bg));
}

.card-thumb-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--surface), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--border);
}

.card-body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }

.card-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-stars { color: #f1c40f; font-size: 11px; }

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current { border-color: var(--accent); color: var(--accent); }

/* ===== AFFILIATE DISCLOSURE ===== */
.article-body p:first-child {
  font-size: 10px;
  color: var(--text-sub);
  opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .header-search { display: none; }
  .pros-cons { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .prev-next { grid-template-columns: 1fr; }
  h1.article-title { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}
