/* =========================================
   PCParts Shop WordPress Theme - Main CSS
   Version: 1.0.0
   ========================================= */

:root {
  --primary: #0071e3;
  --primary-dark: #0058b0;
  --primary-light: #e8f2ff;
  --secondary: #1d1d1f;
  --accent: #ff6b35;
  --accent-green: #34c759;
  --accent-red: #ff3b30;
  --accent-yellow: #ff9f0a;
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-dark: #1c1c1e;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-light: #aeaeb2;
  --border: #d2d2d7;
  --border-light: #e5e5ea;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
  --header-height: 64px;
}

/* =========================================
   リセット & ベース
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-height);
}
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

/* =========================================
   ユーティリティ
   ========================================= */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: .03em;
}
.badge-blue   { background: var(--primary-light); color: var(--primary); }
.badge-green  { background: #d1f8dc; color: #1a7f37; }
.badge-red    { background: #ffe3e0; color: #c0392b; }
.badge-gray   { background: #f0f0f5; color: var(--text-secondary); }
.badge-orange { background: #fff3e0; color: #e65100; }

/* =========================================
   ボタン
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600;
  border: none; transition: all .2s ease;
  white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #333; transform: translateY(-1px); color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-outline-white { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); border-color: var(--text-secondary); }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: #c0392b; transform: translateY(-1px); color: #fff; }
.btn-success { background: var(--accent-green); color: #fff; }
.btn-success:hover { background: #28a745; transform: translateY(-1px); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* =========================================
   ヘッダー
   ========================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.03em;
}
.site-logo i { color: var(--primary); font-size: 1.3rem; }
.site-logo span { color: var(--primary); }
.site-logo:hover { color: var(--text); }
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 44px; width: auto; }

.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-item, .menu-item a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; color: var(--text);
  transition: all .2s;
}
.nav-item:hover, .nav-item.active,
.menu-item a:hover, .current-menu-item > a, .current_page_item > a {
  background: var(--primary-light); color: var(--primary);
}
.menu-item { list-style: none; }

/* ─── ドロップダウンナビ ─── */
.nav-menu { display: flex; align-items: center; gap: 2px; list-style: none; padding: 0; margin: 0; }
.nav-has-dropdown { position: relative; }
.nav-has-dropdown > a { display: flex; align-items: center; gap: 6px; }
.nav-arrow { font-size: .65rem; transition: transform .2s; margin-left: 2px; }
.nav-has-dropdown:hover .nav-arrow { transform: rotate(180deg); }

/* ドロップダウンパネル */
.nav-dropdown {
  display: block;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  /* 上に隙間を作らず、擬似要素でカーソルの橋渡しエリアを確保 */
  top: 100%; left: 0;
  min-width: 220px; background: #fff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 6px 0; z-index: 2000;
  list-style: none; margin: 0;
  /* 表示・非表示をopacity+visibilityで制御し、遅延で消える */
  transition: opacity .15s ease, visibility .15s ease;
  transition-delay: 0s; /* 表示はすぐ */
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 親liの上部に不可視の橋渡し領域を追加（隙間でhoverが切れるのを防ぐ） */
.nav-has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%; left: 0;
  width: 100%; height: 12px; /* ドロップダウンまでの架け橋 */
  background: transparent;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown,
.nav-has-dropdown.pinned .nav-dropdown {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  animation: dropIn .15s ease;
}
/* カーソルが外れてから少し待ってから消す（消えにくくする） */
.nav-has-dropdown:not(:hover):not(:focus-within):not(.pinned) .nav-dropdown {
  transition-delay: .3s; /* 0.3秒後に消える */
}
.nav-dropdown li a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; font-size: .85rem; font-weight: 500;
  color: var(--text); transition: background .15s, color .15s;
  text-decoration: none; white-space: nowrap;
}
.nav-dropdown li a:hover { background: var(--primary-light); color: var(--primary); }
.nav-dropdown li a i { width: 16px; text-align: center; font-size: .8rem; color: var(--primary); flex-shrink: 0; }
.nav-dropdown-sep { height: 1px; background: var(--border-light); margin: 4px 0; }

/* モバイル時はドロップダウンを縦積みに */
@media (max-width: 768px) {
  .nav-has-dropdown { width: 100%; }
  .nav-dropdown {
    position: static; box-shadow: none; border: none;
    padding: 0 0 0 16px; background: transparent; animation: none;
    display: none;
  }
  .nav-has-dropdown.open .nav-dropdown { display: block; }
  .nav-has-dropdown.open .nav-arrow { transform: rotate(180deg); }
  .nav-dropdown li a { padding: 6px 12px; font-size: .82rem; }
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: var(--primary);
  color: #fff; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600;
  border: none; transition: all .2s; text-decoration: none;
}
.cart-btn:hover { background: var(--primary-dark); transform: translateY(-1px); color: #fff; }
.cart-count {
  position: absolute; top: -6px; right: -6px;
  min-width: 20px; height: 20px;
  background: var(--accent); color: #fff;
  border-radius: 10px; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px; border: 2px solid #fff;
}
.cart-count.hidden { display: none; }

.hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: pointer; border: none; background: transparent;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; transition: all .3s;
}

/* =========================================
   アフィリエイト注記
   ========================================= */
.affiliate-notice {
  background: #fffbf0; border-bottom: 1px solid #ffe082;
  padding: 10px 0; font-size: 0.82rem; color: #7a5c00;
}
.affiliate-notice-inner { display: flex; align-items: center; gap: 8px; }
.affiliate-notice i { color: #f59e0b; flex-shrink: 0; }

/* =========================================
   セクション共通
   ========================================= */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 12px;
}
.section-header.text-center { justify-content: center; flex-direction: column; }
.section-title {
  font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
}
.section-title i { color: var(--primary); }
.section-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.88rem; font-weight: 600; color: var(--primary);
}
.section-link:hover { text-decoration: underline; }

/* =========================================
   ヒーローセクション
   ========================================= */
.hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b40 50%, #0a2060 100%);
  color: #fff; padding: 80px 0 100px; overflow: hidden; position: relative;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%230071e3' fill-opacity='0.07'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; background: rgba(0,113,227,0.3);
  border: 1px solid rgba(0,113,227,0.5);
  border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  color: #8ab4f8; margin-bottom: 16px;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 800;
  line-height: 1.2; letter-spacing: -0.04em; margin-bottom: 16px; color: #fff;
}
.hero-title span { color: #4da8ff; }
.hero-sub {
  font-size: 1rem; color: rgba(255,255,255,0.7); line-height: 1.7;
  margin-bottom: 32px; max-width: 480px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 32px; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 1.8rem; font-weight: 800; color: #4da8ff; line-height: 1; }
.hero-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hero-categories {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.cat-panel {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  color: rgba(255,255,255,0.8); font-size: 0.78rem; font-weight: 600;
  transition: all .2s; text-align: center;
}
.cat-panel i { font-size: 1.4rem; color: #4da8ff; }
.cat-panel:hover { background: rgba(0,113,227,.3); border-color: rgba(0,113,227,.5); color: #fff; transform: translateY(-2px); }

/* =========================================
   おすすめパーツ
   ========================================= */
.featured-products { padding: 60px 0; }
.products-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 20px;
}

/* =========================================
   製品カード
   ========================================= */
.product-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex; flex-direction: column;
  transition: transform .3s, box-shadow .3s, border-color .3s;
  overflow: hidden; position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.product-image-wrap {
  aspect-ratio: 1/1; padding: 20px;
  display: flex; align-items: center; justify-content: center;
  background: #fafafa; overflow: hidden;
}
.product-image-wrap img { object-fit: contain; max-height: 100%; transition: transform .3s; }
.product-card:hover .product-image-wrap img { transform: scale(1.06); }
.product-image-placeholder {
  width: 80px; height: 80px; background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 2rem;
}
.product-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-meta-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.product-category-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; background: var(--primary-light);
  color: var(--primary); border-radius: 20px;
  font-size: 0.7rem; font-weight: 700;
}
.product-maker-tag { font-size: 0.72rem; color: var(--text-secondary); }
.product-name {
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  margin-bottom: 6px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-spec {
  font-size: 0.75rem; color: var(--text-secondary); line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* 参考価格 */
.card-ref-price {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 10px; padding: 6px 8px;
  background: #f9f9fc; border-radius: var(--radius-sm);
}
.card-ref-label {
  font-size: 0.68rem; font-weight: 700; color: #fff;
  background: #888; padding: 2px 6px; border-radius: 4px;
}
.card-ref-value { font-size: 1rem; font-weight: 800; color: var(--text); }
.card-ref-date { font-size: 0.68rem; color: var(--text-secondary); }

/* 購入ボタンエリア */
.card-buy-area { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.buy-btn-wrap { display: flex; flex-direction: column; gap: 4px; }
.buy-btn-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.buy-price { font-size: 0.88rem; font-weight: 700; color: var(--text); min-width: 80px; }
.buy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 700;
  border: none; cursor: pointer; transition: all .2s; text-decoration: none;
  white-space: nowrap;
  min-height: 40px; /* スマホタップ最小サイズ */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.buy-btn-amazon { background: #ff9900; color: #111; }
.buy-btn-amazon:hover { background: #e68a00; transform: translateY(-1px); box-shadow: var(--shadow-sm); color: #111; }
.buy-btn-rakuten { background: #bf0000; color: #fff; }
.buy-btn-rakuten:hover { background: #990000; transform: translateY(-1px); box-shadow: var(--shadow-sm); color: #fff; }
.buy-datetime { font-size: 0.65rem; color: var(--text-secondary); }
.buy-no-info { font-size: 0.75rem; color: var(--text-secondary); padding: 4px 0; }

/* アクションボタン */
.product-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.product-actions .btn { flex: 1; }
.btn-add-estimate {
  flex: 1; padding: 9px 12px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 700;
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
}
.btn-add-estimate:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-add-estimate.added { background: var(--accent-green); }
.btn-add-estimate.added:hover { background: var(--accent-red); }
.btn-detail {
  padding: 9px 12px;
  background: var(--bg-card); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 600;
  transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
}
.btn-detail:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }

/* =========================================
   PCパーツ選びのコツセクション
   ========================================= */
.tips-section { padding: 60px 0; }
.tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tips-card {
  background: var(--bg-card); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.tips-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.tips-thumb {
  display: block; aspect-ratio: 16/9; overflow: hidden;
}
.tips-thumb-img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.tips-card:hover .tips-thumb-img { transform: scale(1.05); }
.tips-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; min-height: 140px;
  background: var(--primary-light); color: var(--primary); font-size: 2.5rem;
}
.tips-body { padding: 20px; }
.tips-meta { margin-bottom: 8px; }
.tips-date { font-size: 0.78rem; color: var(--text-secondary); }
.tips-title { font-size: 1rem; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.tips-title a { color: var(--text); }
.tips-title a:hover { color: var(--primary); }
.tips-excerpt { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.tips-read-more { font-size: 0.82rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 4px; }
.tips-read-more:hover { text-decoration: underline; }
.tips-empty { text-align: center; padding: 48px 20px; color: var(--text-secondary); }

/* カスタマイザー設定コツカード */
.tips-static-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tips-static-card {
  background: var(--bg-card); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); overflow: hidden;
  transition: transform .3s, box-shadow .3s;
  text-decoration: none; color: var(--text); display: block;
}
.tips-static-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: var(--text); }
.tips-static-thumb {
  aspect-ratio: 16/9; overflow: hidden;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}
.tips-static-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tips-static-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  background: var(--primary-light); color: var(--primary); font-size: 2.5rem;
}
.tips-static-body { padding: 16px; }
.tips-static-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; line-height: 1.4; }
.tips-static-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; }

/* =========================================
   使い方ガイド
   ========================================= */
.how-section { padding: 60px 0; background: var(--bg-card); }
.how-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; margin-top: 8px; }
.how-steps::before {
  content: ''; position: absolute; top: 30px; left: 12.5%; right: 12.5%;
  height: 2px; background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 0;
}
.how-step { text-align: center; position: relative; z-index: 1; }
.how-step-num {
  width: 60px; height: 60px; margin: 0 auto 16px;
  background: var(--primary); color: #fff;
  border-radius: 50%; font-size: 1.4rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,113,227,.4);
}
.how-step-icon { font-size: 1.4rem; color: var(--primary); margin-bottom: 10px; }
.how-step-title { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.how-step-desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* =========================================
   CTAセクション
   ========================================= */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b40 100%);
  color: #fff;
}
.cta-title { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.cta-sub { font-size: 1rem; color: rgba(255,255,255,.7); margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* =========================================
   パーツ一覧ページ
   ========================================= */
.parts-page-layout {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px;
  padding: 32px 0 60px;
}
.sidebar {
  position: sticky; top: calc(var(--header-height) + 16px);
  height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto; scrollbar-width: thin;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-widget {
  background: var(--bg-card); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px;
}
.sidebar-widget-title {
  font-size: 0.9rem; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 7px; color: var(--text);
}
.sidebar-widget-title i { color: var(--primary); }
.filter-group { margin-bottom: 16px; }
.filter-group-title { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; }
.filter-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background .15s; font-size: 0.85rem;
}
.filter-item:hover { background: var(--primary-light); }
.filter-item input[type=radio], .filter-item input[type=checkbox] { accent-color: var(--primary); }
.filter-count { margin-left: auto; font-size: 0.72rem; color: var(--text-secondary); }

/* =========================================
   見積もりページ
   ========================================= */
.estimate-page { padding: 40px 0 60px; }
.estimate-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.estimate-card {
  background: var(--bg-card); border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); overflow: hidden;
}
.estimate-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: space-between;
}
.estimate-card-title { font-size: 1rem; font-weight: 700; }
.estimate-item {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border-light);
}
.estimate-item-img {
  width: 60px; height: 60px; object-fit: contain; flex-shrink: 0;
  background: var(--bg); border-radius: var(--radius-sm); padding: 4px;
}
.estimate-item-body { flex: 1; min-width: 0; }
.estimate-item-category { font-size: 0.72rem; color: var(--primary); font-weight: 700; margin-bottom: 2px; }
.estimate-item-name { font-size: 0.88rem; font-weight: 600; }
.estimate-item-price { font-size: 0.95rem; font-weight: 800; color: var(--primary); white-space: nowrap; }
.estimate-summary { padding: 20px; }
.estimate-total { display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; font-weight: 800; }

/* =========================================
   詳細モーダル
   ========================================= */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 2000; display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.open,
.modal-overlay.show { display: flex; }
.modal {
  background: var(--bg-card); border-radius: var(--radius-lg);
  width: 100%; max-width: 760px; max-height: 90vh;
  overflow-y: auto; position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border-light);
  position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); transition: background .2s;
}
.modal-close:hover { background: var(--border-light); }
.modal-body { padding: 24px; }

.detail-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; }
.detail-img-wrap {
  background: #fafafa; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1/1; overflow: hidden; padding: 12px;
}
.detail-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-img-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 2.5rem; width: 80px; height: 80px;
}
.detail-body { display: flex; flex-direction: column; gap: 12px; }
.detail-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.detail-cat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: var(--primary-light);
  color: var(--primary); border-radius: 20px;
  font-size: 0.72rem; font-weight: 700;
}
.detail-maker { font-size: 0.78rem; color: var(--text-secondary); }
.detail-name { font-size: 1.2rem; font-weight: 800; line-height: 1.3; }

.detail-ref-price-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: #f9f9fc; border-radius: var(--radius-sm);
}
.detail-ref-label {
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: #888; padding: 2px 8px; border-radius: 4px;
}
.detail-ref-value { font-size: 1.2rem; font-weight: 800; color: var(--text); }
.detail-ref-date { font-size: 0.72rem; color: var(--text-secondary); }

.detail-buy-section {
  margin-top: 4px; padding: 14px 16px;
  background: #f8faff; border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
}
.detail-buy-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
  font-weight: 700; font-size: 0.9rem;
}
.detail-buy-note { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 10px; }
.detail-buy-rows { display: flex; flex-direction: column; gap: 8px; }
.detail-buy-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-buy-price { font-size: 1rem; font-weight: 800; color: var(--text); min-width: 90px; }
.detail-buy-datetime { font-size: 0.68rem; color: var(--text-secondary); }

.detail-spec-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.detail-spec-table th, .detail-spec-table td { padding: 6px 10px; border: 1px solid var(--border-light); }
.detail-spec-table th { background: var(--bg); font-weight: 600; width: 120px; color: var(--text-secondary); }

.detail-desc { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.7; }

.detail-estimate-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 20px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; cursor: pointer; transition: all .2s;
  width: 100%; justify-content: center;
}
.detail-estimate-btn:hover { background: var(--primary-dark); }
.detail-estimate-btn.added { background: var(--accent-green); }
.detail-estimate-btn.added:hover { background: var(--accent-red); }

/* =========================================
   記事詳細ページ (single.php)
   ========================================= */
.single-layout { display: grid; grid-template-columns: 1fr 300px; gap: 40px; align-items: start; }
.breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--border); font-size: 0.7rem; }
.single-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.single-cat-badge {
  padding: 3px 12px; background: var(--primary-light);
  color: var(--primary); border-radius: 20px;
  font-size: 0.75rem; font-weight: 700;
}
.single-title {
  font-size: 1.8rem; font-weight: 800; line-height: 1.35;
  letter-spacing: -0.02em; margin-bottom: 16px;
}
.single-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-light);
}
.single-meta i { margin-right: 4px; }
.single-thumb { border-radius: var(--radius-md); overflow: hidden; margin-bottom: 28px; }
.single-thumb-img { width: 100%; height: auto; }
.single-content { font-size: 1rem; line-height: 1.85; color: var(--text); }
.single-content h2 {
  font-size: 1.4rem; font-weight: 800; margin: 32px 0 14px;
  padding-left: 14px; border-left: 4px solid var(--primary);
}
.single-content h3 { font-size: 1.1rem; font-weight: 700; margin: 24px 0 10px; }
.single-content p { margin-bottom: 16px; }
.single-content ul, .single-content ol { padding-left: 1.5em; margin-bottom: 16px; }
.single-content li { margin-bottom: 6px; }
.single-content img { border-radius: var(--radius-sm); margin: 20px auto; }
.single-content blockquote {
  margin: 20px 0; padding: 16px 20px;
  background: var(--primary-light); border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic; color: var(--text-secondary);
}
.single-content a { text-decoration: underline; }
.single-content table { border-collapse: collapse; width: 100%; margin-bottom: 16px; }
.single-content th, .single-content td { border: 1px solid var(--border); padding: 8px 12px; }
.single-content th { background: var(--bg); font-weight: 700; }
.single-content pre { background: #1c1c1e; color: #f5f5f7; padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin-bottom: 16px; font-size: 0.875rem; }
.single-content code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.875em; }
.single-tags {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border-light);
}
.single-tag { padding: 4px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; font-size: 0.78rem; color: var(--text-secondary); }
.single-tag:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.single-nav {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-light);
}
.single-nav-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px; border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md); color: var(--text); max-width: 48%;
  transition: border-color .2s, box-shadow .2s;
}
.single-nav-link:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); color: var(--text); }
.single-nav-next { text-align: right; }
.single-nav-dir { font-size: 0.75rem; color: var(--primary); font-weight: 600; }
.single-nav-title { font-size: 0.85rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sidebar-cat-list li { border-bottom: 1px solid var(--border-light); }
.sidebar-cat-list li:last-child { border-bottom: none; }
.sidebar-cat-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 4px; font-size: 0.85rem; color: var(--text); transition: color .2s;
}
.sidebar-cat-list a:hover { color: var(--primary); }
.sidebar-cat-count {
  font-size: 0.72rem; background: var(--bg); color: var(--text-secondary);
  padding: 2px 8px; border-radius: 20px; border: 1px solid var(--border-light);
}
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-link { display: flex; gap: 10px; color: var(--text); transition: color .2s; }
.related-link:hover { color: var(--primary); }
.related-thumb {
  width: 68px; height: 52px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-light); font-size: 1.2rem; width: 100%; height: 100%;
}
.related-body { flex: 1; min-width: 0; }
.related-title { font-size: 0.82rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-date { font-size: 0.72rem; color: var(--text-secondary); margin-top: 3px; }

/* =========================================
   フッター（プレミアムダークテーマ）
   ========================================= */
.site-footer {
  background: linear-gradient(180deg, #0d0f14 0%, #0a0c10 100%);
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,.06);
  position: relative;
  overflow: hidden;
}
/* 背景グロー装飾 */
.site-footer::before {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(0,112,243,.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.site-footer::after {
  content: '';
  position: absolute;
  bottom: 60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(120,50,200,.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ─── 4列グリッド（デスクトップ固定） ─── */
/* ※ display:grid と grid-template-columns を !important で強制適用 */
.footer-grid {
  display: grid !important;
  grid-template-columns: 2fr 1.6fr 1fr 1.1fr !important;
  gap: 36px 28px;
  margin-bottom: 44px;
  position: relative;
  z-index: 1;
  align-items: start;
}
.footer-col { min-width: 0; overflow: hidden; }

/* ロゴ */
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.15rem; font-weight: 900; color: #fff; margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(0,112,243,.4);
}
.footer-logo i { color: var(--primary); filter: drop-shadow(0 0 6px rgba(0,112,243,.6)); }
.footer-tagline { font-size: 0.84rem; line-height: 1.75; color: rgba(255,255,255,.55); margin-bottom: 16px; }
.footer-affiliate-note { font-size: 0.72rem; color: rgba(255,255,255,.3); line-height: 1.65; }

/* カラム見出し */
.footer-col-title {
  font-size: 0.72rem; font-weight: 800; color: rgba(255,255,255,.9);
  text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.footer-col-title::after {
  content: ''; flex: 1; height: 1px; min-width: 10px;
  background: linear-gradient(90deg, rgba(0,112,243,.5), transparent);
}

/* ─── ナビリンク共通 ─── */
/* カテゴリー列は2列グリッド、それ以外は縦並び */
.footer-col--categories .footer-nav {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 3px 4px;
}
.footer-col--sitemap .footer-nav,
.footer-col--about .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
/* 共通リンクスタイル */
.footer-nav a {
  font-size: 0.81rem;
  color: rgba(255,255,255,.55);
  transition: all .22s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 6px;
  border-left: 2.5px solid transparent;
  text-decoration: none;
  position: relative;
  min-width: 0;
}
.footer-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
  border-left-color: var(--primary);
  transform: translateX(3px);
  box-shadow: 0 1px 8px rgba(0,112,243,.18);
}
.footer-nav a i {
  width: 14px; text-align: center; flex-shrink: 0; font-size: .78rem;
}

/* ─── バッジ共通スタイル ─── */
.footer-nav a::after {
  font-size: .55rem; font-weight: 700;
  color: #fff; padding: 1px 5px; border-radius: 3px;
  margin-left: auto; flex-shrink: 0; letter-spacing: .02em;
  line-height: 1.6;
}

/* ─── カテゴリー別カラーライン & バッジ ─── */

/* CPU → 青 + 人気バッジ */
.footer-nav a[data-cat="CPU"] {
  border-left-color: #2563eb;
}
.footer-nav a[data-cat="CPU"]:hover {
  border-left-color: #60a5fa;
  box-shadow: 0 1px 10px rgba(37,99,235,.3);
}
.footer-nav a[data-cat="CPU"]::after {
  content: '人気';
  background: linear-gradient(135deg, #2563eb, #60a5fa);
}

/* VGA → 赤 + おすすめバッジ */
.footer-nav a[data-cat="VGA"] {
  border-left-color: #dc2626;
}
.footer-nav a[data-cat="VGA"]:hover {
  border-left-color: #f87171;
  box-shadow: 0 1px 10px rgba(220,38,38,.3);
}
.footer-nav a[data-cat="VGA"]::after {
  content: 'おすすめ';
  background: linear-gradient(135deg, #dc2626, #f87171);
}

/* メモリ → 緑 */
.footer-nav a[data-cat="メモリ"] {
  border-left-color: #16a34a;
}
.footer-nav a[data-cat="メモリ"]:hover {
  border-left-color: #4ade80;
  box-shadow: 0 1px 10px rgba(22,163,74,.25);
}

/* SSD → シアン */
.footer-nav a[data-cat="SSD"] {
  border-left-color: #0891b2;
}
.footer-nav a[data-cat="SSD"]:hover {
  border-left-color: #22d3ee;
  box-shadow: 0 1px 10px rgba(8,145,178,.25);
}

/* マザーボード → 紫 */
.footer-nav a[data-cat="MB"] {
  border-left-color: #7c3aed;
}
.footer-nav a[data-cat="MB"]:hover {
  border-left-color: #a78bfa;
  box-shadow: 0 1px 10px rgba(124,58,237,.25);
}

/* 電源 → オレンジ */
.footer-nav a[data-cat="電源"] {
  border-left-color: #ea580c;
}
.footer-nav a[data-cat="電源"]:hover {
  border-left-color: #fb923c;
  box-shadow: 0 1px 10px rgba(234,88,12,.25);
}

/* PCケース → グレー */
.footer-nav a[data-cat="PCケース"] {
  border-left-color: #64748b;
}
.footer-nav a[data-cat="PCケース"]:hover {
  border-left-color: #94a3b8;
  box-shadow: 0 1px 10px rgba(100,116,139,.2);
}

/* ケースファン → ライトブルー */
.footer-nav a[data-cat="ケースファン"] {
  border-left-color: #0ea5e9;
}
.footer-nav a[data-cat="ケースファン"]:hover {
  border-left-color: #38bdf8;
  box-shadow: 0 1px 10px rgba(14,165,233,.25);
}

/* HDD → インジゴ */
.footer-nav a[data-cat="HDD"] {
  border-left-color: #6366f1;
}
.footer-nav a[data-cat="HDD"]:hover {
  border-left-color: #a5b4fc;
  box-shadow: 0 1px 10px rgba(99,102,241,.25);
}

/* モニター → ピンク */
.footer-nav a[data-cat="モニター"] {
  border-left-color: #db2777;
}
.footer-nav a[data-cat="モニター"]:hover {
  border-left-color: #f472b6;
  box-shadow: 0 1px 10px rgba(219,39,119,.25);
}

/* CPUクーラー → 水色 */
.footer-nav a[data-cat="CPUクーラー"] {
  border-left-color: #06b6d4;
}
.footer-nav a[data-cat="CPUクーラー"]:hover {
  border-left-color: #67e8f9;
  box-shadow: 0 1px 10px rgba(6,182,212,.25);
}

/* OS → グリーン */
.footer-nav a[data-cat="OS"] {
  border-left-color: #10b981;
}
.footer-nav a[data-cat="OS"]:hover {
  border-left-color: #6ee7b7;
  box-shadow: 0 1px 10px rgba(16,185,129,.25);
}

/* 周辺機器 → 薄紫 */
.footer-nav a[data-cat="周辺機器"] {
  border-left-color: #8b5cf6;
}
.footer-nav a[data-cat="周辺機器"]:hover {
  border-left-color: #c4b5fd;
  box-shadow: 0 1px 10px rgba(139,92,246,.25);
}

/* ─── サイトマップ列カラーライン ─── */

/* トップ → ゴールド */
.footer-nav a[data-type="home"] {
  border-left-color: #f59e0b;
}
.footer-nav a[data-type="home"]:hover {
  border-left-color: #fcd34d;
  box-shadow: 0 1px 10px rgba(245,158,11,.3);
  color: #fcd34d;
}

/* パーツ一覧 → プライマリブルー */
.footer-nav a[data-type="parts"] {
  border-left-color: #0071e3;
}
.footer-nav a[data-type="parts"]:hover {
  border-left-color: #60a5fa;
  box-shadow: 0 1px 10px rgba(0,113,227,.3);
  color: #60a5fa;
}
.footer-nav a[data-type="parts"]::after {
  content: 'NEW';
  background: linear-gradient(135deg, #0071e3, #60a5fa);
  font-size: .52rem; font-weight: 800;
  color: #fff; padding: 1px 5px; border-radius: 3px;
  margin-left: auto; flex-shrink: 0; letter-spacing: .04em; line-height: 1.6;
}

/* 見積もり → ティール */
.footer-nav a[data-type="estimate"] {
  border-left-color: #0d9488;
}
.footer-nav a[data-type="estimate"]:hover {
  border-left-color: #2dd4bf;
  box-shadow: 0 1px 10px rgba(13,148,136,.3);
  color: #2dd4bf;
}

/* みんなのPC構成 → バイオレット */
.footer-nav a[data-type="builds"] {
  border-left-color: #7c3aed;
}
.footer-nav a[data-type="builds"]:hover {
  border-left-color: #c4b5fd;
  box-shadow: 0 1px 10px rgba(124,58,237,.3);
  color: #c4b5fd;
}

/* ─── サイト情報列カラーライン & バッジ ─── */

/* このサイトについて → スカイブルー */
.footer-nav a[data-type="about"] {
  border-left-color: #38bdf8;
}
.footer-nav a[data-type="about"]:hover {
  border-left-color: #7dd3fc;
  box-shadow: 0 1px 10px rgba(56,189,248,.25);
  color: #7dd3fc;
}

/* プライバシーポリシー → グリーン + バッジ */
.footer-nav a[data-type="privacy"] {
  border-left-color: #22c55e;
}
.footer-nav a[data-type="privacy"]:hover {
  border-left-color: #86efac;
  box-shadow: 0 1px 10px rgba(34,197,94,.25);
  color: #86efac;
}
.footer-nav a[data-type="privacy"]::after {
  content: '重要';
  background: linear-gradient(135deg, #16a34a, #22c55e);
  font-size: .52rem; font-weight: 800;
  color: #fff; padding: 1px 5px; border-radius: 3px;
  margin-left: auto; flex-shrink: 0; letter-spacing: .04em; line-height: 1.6;
}

/* お問い合わせ → シアン */
.footer-nav a[data-type="contact"] {
  border-left-color: #06b6d4;
}
.footer-nav a[data-type="contact"]:hover {
  border-left-color: #67e8f9;
  box-shadow: 0 1px 10px rgba(6,182,212,.25);
  color: #67e8f9;
}

/* 免責事項 → アンバー */
.footer-nav a[data-type="disclaimer"] {
  border-left-color: #f59e0b;
}
.footer-nav a[data-type="disclaimer"]:hover {
  border-left-color: #fcd34d;
  box-shadow: 0 1px 10px rgba(245,158,11,.25);
  color: #fcd34d;
}

/* アフィリエイト開示 → オレンジ + バッジ */
.footer-nav a[data-type="affiliate"] {
  border-left-color: #f97316;
}
.footer-nav a[data-type="affiliate"]:hover {
  border-left-color: #fdba74;
  box-shadow: 0 1px 10px rgba(249,115,22,.25);
  color: #fdba74;
}
.footer-nav a[data-type="affiliate"]::after {
  content: 'PR';
  background: linear-gradient(135deg, #ea580c, #f97316);
  font-size: .52rem; font-weight: 800;
  color: #fff; padding: 1px 5px; border-radius: 3px;
  margin-left: auto; flex-shrink: 0; letter-spacing: .04em; line-height: 1.6;
}

/* ─── フッターボトム ─── */
.footer-bottom-bar,
.footer-bottom {
  position: relative; z-index: 1;
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 18px 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.76rem; color: rgba(255,255,255,.35);
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { color: rgba(255,255,255,.35); transition: color .2s; }
.footer-bottom-links a:hover { color: #fff; }

/* =========================================
   ローディング・トースト
   ========================================= */
.loading-spinner { display: flex; align-items: center; justify-content: center; padding: 40px; width: 100%; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border-light);
  border-top-color: var(--primary); animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: var(--radius-md);
  background: var(--bg-dark); color: #fff;
  box-shadow: var(--shadow-lg); font-size: 0.88rem; font-weight: 500;
  animation: toastIn .3s ease; min-width: 240px; max-width: 360px;
}
.toast.success, .toast.toast-success { background: #1a7f37; }
.toast.error,   .toast.toast-error   { background: #c0392b; }
.toast.warning, .toast.toast-warning { background: #b45309; }
.toast.info,    .toast.toast-info    { background: var(--primary); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* =========================================
   レスポンシブ
   ========================================= */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-categories { grid-template-columns: repeat(4, 1fr); }
  .parts-page-layout { grid-template-columns: 220px 1fr; }
  .tips-grid { grid-template-columns: repeat(2, 1fr); }
  .tips-static-grid { grid-template-columns: repeat(2, 1fr); }
  .how-steps { grid-template-columns: repeat(2, 1fr); }
  .how-steps::before { display: none; }
  /* .single-layout はsingle.php内のインラインCSSで制御（サイドバー幅最適化）*/
  /* フッター：1024px以下は「ブランド列+カテゴリー列」「サイトマップ+サイトについて」の2行2列 */
  .footer-grid { grid-template-columns: 1.5fr 1.5fr 1fr 1fr !important; gap: 24px 20px; }
}

@media (max-width: 768px) {
  .main-nav, #primaryNav { display: none; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: #fff; padding: 12px 20px; border-bottom: 1px solid var(--border-light); box-shadow: var(--shadow-md); }
  .main-nav.open, #primaryNav.open { display: flex; }
  .hamburger { display: flex; }
  .hero { padding: 60px 0 80px; }
  .hero-categories { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .parts-page-layout { grid-template-columns: 1fr; }
  .estimate-layout { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .tips-static-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .single-nav { flex-direction: column; }
  .single-nav-link { max-width: 100%; }
  /* フッター：768px以下は2列（ブランドフル幅→2列の横並び） */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 20px 16px; }
  .footer-col--brand { grid-column: 1 / -1; }
  .footer-col--categories .footer-nav { grid-template-columns: repeat(2, 1fr); }
  /* バッジは狭い画面では非表示 */
  .footer-nav a[data-cat="CPU"]::after,
  .footer-nav a[data-cat="VGA"]::after { display: none; }
  .modal { margin: 0 8px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-categories { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { gap: 20px; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .single-title { font-size: 1.4rem; }
}

/* =========================================
   追加スタイル（front-page / page-parts対応）
   ========================================= */

/* page-parts.php 製品詳細モーダル内補完 */
.detail-image-wrap {
  background: #fafafa; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1/1; overflow: hidden; padding: 12px;
}
.detail-image-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-info { display: flex; flex-direction: column; gap: 12px; }
.detail-price-big { font-size: 1.4rem; font-weight: 900; color: var(--primary); }

/* アフィリエイトボタン（詳細モーダル内）*/
.affiliate-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn-amazon, .btn-rakuten {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 0.85rem; font-weight: 700; border: none; cursor: pointer;
  text-decoration: none; transition: opacity .2s, transform .15s;
}
.btn-amazon  { background: #ff9900; color: #111; }
.btn-amazon:hover  { background: #e68a00; transform: translateY(-1px); color: #111; }
.btn-rakuten { background: #bf0000; color: #fff; }
.btn-rakuten:hover { background: #990000; transform: translateY(-1px); color: #fff; }

/* 比較フロートバー の show クラスはpage-parts.phpインラインCSSで管理 */

/* トーストのshow/hideクラス対応 - line 779で.toast.success/.toast.toast-success等を統合済み */

/* accent クラス（ヒーロータイトル内の青文字） */
.accent { color: #4da8ff; }
.hero-title span { color: #4da8ff; }

/* section-label / section-sub */
.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px;
}
.section-sub { font-size: 0.88rem; color: var(--text-secondary); margin-top: 6px; }

/* カテゴリーカード（TOPページ専用） */
.category-section { padding: 60px 0; background: #fff; }
.category-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  margin-top: 28px;
}
.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px 10px; border-radius: var(--radius-md);
  text-decoration: none; transition: all .2s;
  background: var(--bg-card); border: 1.5px solid var(--border-light);
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-icon { font-size: 1.8rem; }
.category-label { font-size: 0.75rem; font-weight: 700; color: var(--text); text-align: center; line-height: 1.3; }

/* ヒーロー追加スタイル */
.btn-hero-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700;
  text-decoration: none; transition: all .2s;
}
.btn-hero-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }
.btn-hero-outline {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.5); border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 700; text-decoration: none; transition: all .2s;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; color: #fff; }
.hero-stat-value { display: block; font-size: 1.8rem; font-weight: 800; color: #4da8ff; line-height: 1; }
.hero-stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.6); margin-top: 4px; }
.hero-subtitle { font-size: 1rem; color: rgba(255,255,255,0.7); line-height: 1.7; margin-bottom: 32px; }

/* みんなのPC構成セクション（TOP専用） */
.builds-widget { padding: 70px 0; background: var(--bg); }
.builds-widget-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.builds-widget-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }

/* ヒーローカード */
.hero-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: 20px; padding: 24px; backdrop-filter: blur(12px);
}
.hero-card-title { font-size: .88rem; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 16px; }
.hero-part-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.hero-part-item:last-of-type { border-bottom: none; }
.hero-part-icon { width: 40px; height: 40px; border-radius: 10px; background: rgba(0,113,227,.3); display: flex; align-items: center; justify-content: center; color: #4da8ff; font-size: 1.1rem; flex-shrink: 0; }
.hero-part-info { flex: 1; min-width: 0; }
.hero-part-name { font-size: .85rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-part-spec { font-size: .72rem; color: rgba(255,255,255,.5); margin-top: 2px; }
.hero-part-price { font-size: .9rem; font-weight: 800; color: #4da8ff; white-space: nowrap; }
.hero-total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); }
.hero-total-label { font-size: .82rem; color: rgba(255,255,255,.6); }
.hero-total-price { font-size: 1.2rem; font-weight: 800; color: #fff; }

@media(max-width:900px){
  .category-grid { grid-template-columns: repeat(4,1fr); }
  .builds-widget-grid { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:540px){
  .category-grid { grid-template-columns: repeat(3,1fr); }
  .builds-widget-grid { grid-template-columns: 1fr; }
  .hero-card { display: none; }
}

/* =========================================
   Cookie同意ポップアップ（中央表示・スマホ対応）
   ========================================= */

/* ── オーバーレイ背景 ── */
#cookieOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99997;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}
#cookieOverlay.is-visible {
  opacity: 1;
}

/* ── ポップアップ本体 ── */
#cookieConsent {
  display: none; /* 初期非表示 */
  position: fixed;
  inset: 0;
  z-index: 99998;
  align-items: center;      /* flexbox: 縦中央 */
  justify-content: center;  /* flexbox: 横中央 */
  padding: 16px;
}

/* アニメーション前（透明・縮小） */
#cookieConsent.is-animating .cookie-popup-inner {
  opacity: 0;
  transform: scale(.94) translateY(12px);
}
/* 表示完了 */
#cookieConsent.is-visible .cookie-popup-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
  transition:
    transform .35s cubic-bezier(.16,1,.3,1),
    opacity .25s ease;
}
/* 非表示アニメーション */
#cookieConsent.is-hiding .cookie-popup-inner {
  opacity: 0;
  transform: scale(.94) translateY(12px);
  transition:
    transform .25s ease-in,
    opacity .2s ease-in;
}

/* ── ポップアップカード ── */
.cookie-popup-inner {
  background: #141620;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  width: 100%;
  max-width: 440px;
  padding: 28px 24px 24px;
  position: relative;
  /* transition はis-visibleで付与するのでここでは不要 */
}

/* ── ヘッダー行（アイコン＋タイトル＋閉じる） ── */
.cookie-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.cookie-popup-icon {
  width: 40px; height: 40px;
  background: rgba(0,113,227,.18);
  border: 1px solid rgba(0,113,227,.3);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #60a5fa;
  flex-shrink: 0;
}
.cookie-popup-title {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

/* ── 説明文 ── */
.cookie-popup-body {
  margin-bottom: 20px;
}
.cookie-popup-body p {
  font-size: 0.8rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
  margin: 0;
}
.cookie-popup-body a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-popup-body a:hover { color: #93c5fd; }

/* ── ボタン群 ── */
.cookie-popup-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* 同意ボタン（最も目立つ） */
.cookie-btn-accept {
  width: 100%;
  padding: 13px 20px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .15s;
  font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  -webkit-tap-highlight-color: transparent;
}
.cookie-btn-accept:hover { background: var(--primary-dark); }
.cookie-btn-accept:active { transform: scale(.98); }

/* 必要なものだけ・詳細設定を横並び */
.cookie-popup-actions .cookie-btn-secondary-row {
  display: flex;
  gap: 8px;
}
.cookie-btn-reject,
.cookie-btn-settings {
  flex: 1;
  padding: 11px 12px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: 10px;
  color: rgba(255,255,255,.7);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, color .2s;
  font-family: var(--font);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.cookie-btn-reject:hover,
.cookie-btn-settings:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.cookie-btn-reject:active,
.cookie-btn-settings:active { transform: scale(.98); }

/* 閉じるボタン */
.cookie-btn-close {
  width: 30px; height: 30px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color .2s, background .2s;
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.cookie-btn-close:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

/* ──── 詳細設定モーダル ──── */
#cookieModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
#cookieModal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal-box {
  background: #141620;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 28px 40px;
  transform: translateY(40px);
  transition: transform .35s cubic-bezier(.16,1,.3,1);
}
#cookieModal.is-open .cookie-modal-box {
  transform: translateY(0);
}
.cookie-modal-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.cookie-modal-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,.5);
  margin-bottom: 28px;
  line-height: 1.6;
}
.cookie-modal-sub a { color: #60a5fa; }

/* カテゴリーカード */
.cookie-category {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cookie-category-label {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cookie-category-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.cookie-category-icon.necessary { background: rgba(34,197,94,.15); color: #4ade80; }
.cookie-category-icon.analytics  { background: rgba(0,113,227,.15); color: #60a5fa; }
.cookie-category-icon.marketing  { background: rgba(249,115,22,.15); color: #fb923c; }
.cookie-category-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}
.cookie-category-desc {
  font-size: 0.78rem;
  color: rgba(255,255,255,.45);
  line-height: 1.55;
  padding-left: 42px;
  margin: 0;
}

/* トグルスイッチ */
.cookie-toggle {
  position: relative;
  width: 44px; height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0; width: 0; height: 0; position: absolute;
}
.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  border-radius: 12px;
  cursor: pointer;
  transition: background .25s;
}
.cookie-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: var(--primary);
}
.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(20px);
}
.cookie-toggle input:disabled + .cookie-toggle-track {
  opacity: .5; cursor: not-allowed;
}

/* モーダルボタン */
.cookie-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.cookie-modal-btn-all {
  flex: 1;
  padding: 12px;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
}
.cookie-modal-btn-all:hover { background: var(--primary-dark); }
.cookie-modal-btn-save {
  flex: 1;
  padding: 12px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
  font-family: var(--font);
}
.cookie-modal-btn-save:hover { background: rgba(255,255,255,.14); }

/* ── Cookie ポップアップ スマホ調整（新ポップアップ用） ── */
@media (max-width: 480px) {
  .cookie-popup-inner {
    border-radius: 16px;
    padding: 22px 18px 20px;
    max-width: calc(100% - 24px);
  }
  /* ボタン群: 縦並び */
  .cookie-popup-actions {
    gap: 8px;
  }
  .cookie-btn-accept {
    font-size: .85rem;
    padding: 12px;
  }
  .cookie-btn-reject,
  .cookie-btn-settings {
    font-size: .78rem;
    padding: 10px 10px;
  }
  /* 詳細モーダル */
  .cookie-modal-box {
    padding: 24px 18px 32px;
    border-radius: 20px 20px 0 0;
  }
}

/* ──────────────────────────────────────────
   旧 Cookie バナー互換スタイル
   （footer.php 更新前のHTMLに対応）
   ────────────────────────────────────────── */
/* 旧バナー全体: 中央配置ポップアップとして再スタイリング */
#cookieConsent .cookie-inner {
  background: #141620;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  width: 100%;
  max-width: 440px;
  padding: 20px 20px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .35s cubic-bezier(.16,1,.3,1), opacity .25s ease;
}
/* バナーが表示されたときの内部カード表示 */
#cookieConsent.is-visible .cookie-inner {
  opacity: 1;
  transform: scale(1) translateY(0);
}
/* 旧アイコン行 */
.cookie-inner .cookie-icon {
  font-size: 1.5rem;
  color: #60a5fa;
}
/* 旧テキスト */
.cookie-inner .cookie-text {
  font-size: 0.85rem;
  color: rgba(255,255,255,.85);
  line-height: 1.6;
}
.cookie-inner .cookie-text strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.cookie-inner .cookie-text a {
  color: #60a5fa;
}
/* 旧ボタン行 */
.cookie-inner .cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
/* 旧閉じるボタン */
.cookie-inner .cookie-btn-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px; height: 28px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.35);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  transition: color .2s;
}
.cookie-inner .cookie-btn-close:hover { color: #fff; }