/* ===== フード総合Index CSS ===== */
:root {
  --food-bg: #f5faf5;
  --food-card-bg: #ffffff;
  --food-text: #1a1a1a;
  --food-text-sub: #555555;
  --food-accent: #2e7d32;
  --food-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --food-shadow-hover: 0 6px 20px rgba(0,0,0,0.12);
  --food-radius: 12px;
  --food-radius-sm: 8px;

  /* カテゴリー別アクセントカラー */
  --color-vegetables: #2e7d32;
  --color-fruits: #e65100;
  --color-alcohol: #7b1fa2;
  --color-dairy: #0288d1;
  --color-drinks: #00838f;
  --color-mushrooms: #795548;
  --color-nuts: #f57f17;
  --color-snacks: #c2185b;
  --color-soy: #ef6c00;
  --color-sweets: #ad1457;
  --color-seafood: #1565c0;
  --color-seasoning: #827717;
  --color-grains: #d4a017;
  --color-ingredients: #00897b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background: var(--food-bg);
  color: var(--food-text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--food-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ===== スキップリンク ===== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  font-size: 14px;
}
.skip-link:focus { top: 0; }

/* ===== ヘッダー ===== */
.food-header {
  background: linear-gradient(135deg, #388e3c 0%, #43a047 40%, #66bb6a 100%);
  color: #fff;
  padding: 48px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.food-header::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.food-header__inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}
.food-header__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.15);
  letter-spacing: 0.03em;
}
.food-header__subtitle {
  font-size: clamp(0.85rem, 2vw, 1rem);
  opacity: 0.92;
  line-height: 1.7;
  max-width: 700px;
  margin: 0 auto;
}
.food-header__count {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 0.05em;
}

/* ===== コンテナ ===== */
.food-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ===== パンくず ===== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 16px 0;
  font-size: 13px;
  list-style: none;
}
.breadcrumb-link {
  color: var(--food-accent);
  text-decoration: none;
}
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-separator {
  color: #999;
  font-size: 12px;
}

/* ===== カテゴリークイックナビ ===== */
.category-quicknav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 14px 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 250, 245, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 24px;
}
.qnav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1.5px solid transparent;
}
.qnav-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.qnav-btn img {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ===== ローディング ===== */
.food-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--food-text-sub);
  font-size: 14px;
}
.food-loading__spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(46,125,50,0.2);
  border-top-color: var(--food-accent);
  border-radius: 50%;
  animation: food-spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes food-spin { to { transform: rotate(360deg); } }

/* ===== カテゴリーセクション ===== */
.food-section {
  margin-bottom: 32px;
  border-radius: var(--food-radius);
  overflow: hidden;
  box-shadow: var(--food-shadow);
  background: var(--food-card-bg);
}

.food-section__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #fff;
}
.food-section__header-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}
.food-section__header h2 {
  font-size: 1.1em;
  font-weight: 700;
  flex: 1;
  line-height: 1.3;
}
.food-section__count {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
  margin-left: 4px;
}
.food-section__more {
  color: #fff;
  opacity: 0.9;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 14px;
  transition: all 0.2s;
}
.food-section__more:hover {
  background: rgba(255,255,255,0.2);
  text-decoration: none;
  opacity: 1;
}

/* ===== 食材アイテムグリッド ===== */
.food-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 14px;
}

.food-item {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--food-radius-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fafafa;
  border: 1px solid rgba(0,0,0,0.04);
}
.food-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--food-shadow-hover);
  text-decoration: none;
}

.food-item__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f0f0f0;
}

.food-item__name {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--food-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== noscript ===== */
.noscript-links {
  padding: 24px;
  background: var(--food-card-bg);
  border-radius: var(--food-radius);
}
.noscript-links a {
  display: inline-block;
  margin: 4px 6px;
  padding: 8px 16px;
  background: rgba(46,125,50,0.1);
  color: var(--food-accent);
  font-weight: 600;
  border-radius: 6px;
}

/* ===== フッター ===== */
.food-footer {
  background: var(--food-card-bg);
  margin-top: 40px;
  padding: 24px 16px;
  font-size: 13px;
  color: var(--food-text-sub);
}
.food-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-nav a {
  font-size: 12px;
  color: var(--food-text-sub);
  text-decoration: none;
}
.footer-nav a:hover { color: var(--food-accent); }
.footer-copyright {
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ===== AdSense ===== */
.ad-slot {
  margin: 24px 0;
  text-align: center;
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .food-header { padding: 36px 16px 28px; }
  .food-header__title { font-size: 1.5rem; }

  .category-quicknav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    padding: 10px 8px;
  }
  .category-quicknav::-webkit-scrollbar { display: none; }
  .qnav-btn { font-size: 11px; padding: 6px 10px; }

  .food-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .food-container { padding: 0 8px; }

  .food-header { padding: 28px 12px 22px; }

  .food-items-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 8px;
  }
  .food-item__name {
    font-size: 11px;
    padding: 5px 6px;
  }
  .food-section__header {
    padding: 10px 12px;
  }
  .food-section__header h2 { font-size: 1em; }

  .footer-nav { gap: 12px; }
}

/* ===== モーション軽減 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== 印刷 ===== */
@media print {
  .food-header, .category-quicknav, .food-footer, .ad-slot { display: none; }
}
