/*
Theme Name: Navifans Theme
Author: Site Owner
Author URI: https://example.com
Description: 記事+商品表示型テーマ。NaviFans Product Engineの商品(nf_product)を新着作品・作品一覧として表示します。
Version: 1.0.11
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: navifans-theme
*/

/* Astro版 astro/src/styles/global.css を移植した配色変数(確認済み) */
:root {
  --bg-base: #0a0a0a;
  --bg-surface: #111111;
  --bg-surface-hover: #1a1a1a;
  --border: #2a2a2a;
  --accent: #d4a843;
  --accent-light: #f0c060;
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --danger: #e05252;
}

html {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Noto Sans JP', sans-serif;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100dvh;
  margin: 0;
}

a {
  color: inherit;
}

.snap-scroll::-webkit-scrollbar { display: none; }
.snap-scroll { scrollbar-width: none; }

/*
 * ==== 記事カード・パンくず・ページャー(共通) ====
 * 【今回(FANZAアフィリエイト審査用テーマ構築)】トップページ・カテゴリーアーカイブ・
 * 検索結果ページで共通して使う「記事カード」「パンくず」「ページャー」のスタイルを
 * 1箇所にまとめた。以前は各ページのinline <style>ブロックに同じクラス名
 * (.home-genres__*)を重複定義していたが、ここに集約することで重複をなくす。
 * 配色変数(--accent等)・既存のカードデザイン(商品カードの余白・角丸・border色)は
 * 変更せず、そのまま踏襲している。
 */
.breadcrumb { padding: 10px 16px; font-size: 12px; color: #555; max-width: 1024px; margin: 0 auto; }
.breadcrumb a { color: #555; text-decoration: none; }

.article-grid { display: flex; flex-direction: column; gap: 10px; }
.article-card {
  display: flex; align-items: center; gap: 12px;
  background: #111; border: 1px solid #2a2a2a; border-radius: 12px;
  padding: 12px; text-decoration: none; color: inherit;
}
.article-card__thumb {
  width: 96px; height: 72px; border-radius: 8px; overflow: hidden;
  flex-shrink: 0; background: #1a1a1a;
  display: flex; align-items: center; justify-content: center;
}
.article-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card__thumb-placeholder { color: #333; font-size: 11px; }
.article-card__body { flex: 1; min-width: 0; }
.article-card__title {
  font-size: 14px; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__excerpt {
  font-size: 12px; color: #888; line-height: 1.6; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11px; color: #666; flex-wrap: wrap; }
.article-card__cat { color: var(--accent); font-weight: 600; }

.pager { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 16px 0; }
.pager a, .pager span.pager__current {
  padding: 8px 16px; border: 1px solid #2a2a2a; border-radius: 8px;
  color: #888; text-decoration: none; font-size: 13px;
}
.pager span.pager__current { color: var(--accent); border-color: var(--accent); }

.home-genres__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .home-genres__grid { grid-template-columns: repeat(3, 1fr); } }
.home-genres__item {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: #111; border: 1px solid #2a2a2a; border-radius: 10px;
  padding: 16px 10px; color: #f0f0f0; text-decoration: none;
  font-size: 14px; font-weight: 600; line-height: 1.4;
  transition: border-color .15s ease;
}
.home-genres__item:hover { border-color: var(--accent); color: var(--accent); }

.page-content h2 { font-size: 17px; font-weight: 700; color: #f0f0f0; margin: 28px 0 12px; }
.page-content h3 { font-size: 15px; font-weight: 700; color: #f0f0f0; margin: 20px 0 8px; }
.page-content p { margin: 0 0 14px; }
.page-content ul, .page-content ol { margin: 0 0 14px; padding-left: 1.4em; }
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--accent); text-decoration: underline; }
.page-content img { max-width: 100%; height: auto; border-radius: 8px; }

/* ==== 商品カード(NaviFans Product Engine の nf_product 用) ==== */
.nf-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .nf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .nf-grid { grid-template-columns: repeat(3, 1fr); } }
.nf-card {
  display: flex; flex-direction: column; background: #111; border: 1px solid #2a2a2a; border-radius: 12px;
  overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s ease;
}
.nf-card:hover { border-color: var(--accent); }
.nf-card__thumb { aspect-ratio: 3 / 2; background: #1a1a1a; overflow: hidden; }
.nf-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nf-card__top { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #888; }
.nf-card__pr { border: 1px solid #444; border-radius: 4px; padding: 0 5px; font-size: 10px; color: #888; }
.nf-card__title {
  font-size: 14px; font-weight: 600; line-height: 1.5; color: #f0f0f0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.nf-card__line { font-size: 12px; color: #bbb; }
.nf-card__line--dim { color: #777; font-size: 11px; }
.nf-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.nf-card__tags span { font-size: 11px; color: var(--accent); border: 1px solid #3a3320; border-radius: 999px; padding: 1px 8px; }
.nf-card__cta { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.nf-credit { font-size: 11px; color: #666; margin: 14px 0 0; line-height: 1.7; }
.nf-credit a { color: #888; }

/* ==== 作品詳細 ==== */
.nf-hero { border-radius: 12px; overflow: hidden; background: #1a1a1a; margin-bottom: 10px; }
.nf-hero img { width: 100%; height: auto; display: block; }
.nf-cta {
  display: block; text-align: center; background: var(--accent); color: #000 !important; font-weight: 700;
  font-size: 15px; padding: 14px 16px; border-radius: 10px; text-decoration: none !important; margin: 4px 0 16px;
}
.nf-cta:hover { background: var(--accent-light); }
.nf-spec { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 13px; }
.nf-spec th { width: 96px; text-align: left; color: #888; font-weight: 500; padding: 9px 8px 9px 0; border-bottom: 1px solid #1f1f1f; vertical-align: top; }
.nf-spec td { padding: 9px 0; border-bottom: 1px solid #1f1f1f; color: #ddd; }

/* ==== 作品を探すナビ(ヘッダー下) ==== */
.nf-subnav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; background: #0d0d0d; border-bottom: 1px solid #1a1a1a; scrollbar-width: none; }
.nf-subnav::-webkit-scrollbar { display: none; }
.nf-subnav a { flex: 0 0 auto; padding: 6px 14px; border: 1px solid #2a2a2a; border-radius: 999px; color: #ccc; text-decoration: none; font-size: 12px; font-weight: 600; white-space: nowrap; }
.nf-subnav a:hover { border-color: var(--accent); color: var(--accent); }
.nf-card__tags a { font-size: 11px; color: var(--accent); border: 1px solid #3a3320; border-radius: 999px; padding: 1px 8px; text-decoration: none; }

/* ==== ジャケット画像 → サンプル動画 ==== */
button.nf-hero { display: block; position: relative; width: 100%; padding: 0; border: 0; cursor: pointer; color: #fff; }
.nf-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  pointer-events: none;
}
.nf-play__btn {
  width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.85); color: #fff; padding-left: 4px; box-sizing: border-box;
  transition: background .15s ease, transform .15s ease;
}
.nf-play__hint { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12.5px; color: #fff; letter-spacing: .5px; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.nf-cta--ghost { width: 100%; background: transparent; border: 1px solid var(--accent); color: var(--accent) !important; cursor: pointer; font-family: inherit; }

/* ジャケット→その場でサンプル動画 */
.nf-hero--player { position: relative; aspect-ratio: 3 / 2; }
.nf-hero__cover { display: block; position: relative; width: 100%; height: 100%; padding: 0; border: 0; background: #1a1a1a; cursor: pointer; color: #fff; }
.nf-hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-hero--player:hover .nf-play__btn, button.nf-hero--play:hover .nf-play__btn { background: rgba(0,0,0,.75); transform: scale(1.06); }
.nf-hero--player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
