/* SEO最適化CSS - sanriku.love */

/* Critical CSS - Above the fold content */
:root {
  --primary-color: #0066cc;
  --secondary-color: #004499;
  --accent-color: #ff6600;
  --text-color: #333333;
  --bg-color: #ffffff;
  --gray-light: #f8f9fa;
  --gray-medium: #6c757d;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 基本設定 */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* ヘッダー最適化 */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

/* パンくずナビゲーション */
.breadcrumb {
  list-style: none;
  padding: 0.5rem 1rem;
  margin: 0;
  background-color: var(--gray-light);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin: 0 0.5rem;
  color: var(--gray-medium);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.breadcrumb a:hover {
  background-color: var(--primary-color);
  color: white;
}

/* 見出し最適化 */
h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  line-height: 1.3;
  margin: 1.5rem 0 0.5rem 0;
}

h1 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  color: var(--secondary-color);
}

/* 画像最適化 */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

/* レスポンシブ画像 */
.product-images img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

/* コンテンツエリア */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* 商品詳細レイアウト */
.product-details {
  background-color: var(--gray-light);
  padding: 2rem;
  border-radius: 12px;
  margin: 2rem 0;
}

.product-specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 1rem 0;
}

.product-specs dt {
  font-weight: bold;
  color: var(--secondary-color);
}

.product-specs dd {
  margin: 0;
}

/* アフィリエイトボタン */
.affiliate-link {
  text-align: center;
  margin: 2rem 0;
}

.amazon-button {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.amazon-button:hover {
  background-color: #e55a00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* レビュー・評価 */
.reviews {
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.rating-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
}

.rating-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent-color);
}

.rating-count {
  color: var(--gray-medium);
}

/* 関連商品グリッド */
.related-products {
  margin: 3rem 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.product-card {
  background-color: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* フッター */
footer {
  background-color: var(--text-color);
  color: white;
  padding: 3rem 1rem 1rem;
  margin-top: 4rem;
}

/* アクセシビリティ対応 */
.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;
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --secondary-color: #000040;
    --text-color: #000000;
    --bg-color: #ffffff;
  }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #4da6ff;
    --secondary-color: #66b3ff;
    --text-color: #f0f0f0;
    --bg-color: #1a1a1a;
    --gray-light: #2a2a2a;
    --gray-medium: #999999;
  }
}

/* モバイルファースト レスポンシブデザイン */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.75rem;
  }
  
  .breadcrumb {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
  
  main {
    padding: 1rem 0.5rem;
  }
  
  .product-details {
    padding: 1rem;
  }
  
  .product-specs {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  
  .product-specs dt {
    font-weight: bold;
    margin-top: 0.5rem;
  }
  
  .amazon-button {
    width: 100%;
    padding: 1rem;
  }
}

@media (min-width: 769px) {
  .product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}

/* パフォーマンス最適化 */
.lazy-load {
  opacity: 0;
  transition: opacity 0.3s;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Core Web Vitals 最適化 */
.hero-section {
  contain: layout style;
}

.product-card {
  contain: layout style paint;
}

/* プリロード用スタイル */
.preload {
  font-display: swap;
}
