/* =========================================================
   ぬかオジレシピ 共通スタイル
   既存の css/style.css の変数(--color-* / --font-*)を前提にしています。
   必ず style.css の後に読み込んでください。
   ========================================================= */

/* ===== パンくずリスト ===== */
.recipe-breadcrumb {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-text-soft);
}

.recipe-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.recipe-breadcrumb li::after {
  content: "›";
  margin-left: 6px;
  color: var(--color-line-light);
}

.recipe-breadcrumb li:last-child::after { content: ""; }

.recipe-breadcrumb a {
  color: var(--color-text-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.recipe-breadcrumb a:hover { border-bottom-color: var(--color-line-light); }

/* ===== 一覧ページのリード文 ===== */
.recipe-lead {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  text-align: center;
}

.recipe-lead p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2.2;
  color: var(--color-text-soft);
}

/* ===== レシピカード一覧 =====
   新しいレシピを足すときは <article class="recipe-card"> を1つ複製するだけ。
   1件でも複数件でも崩れないよう auto-fit で組んでいます。 */
.recipe-list {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
  display: grid;
  /* 1列あたり最大320pxに抑え、件数が少ないときは中央に寄せる。
     レシピが増えれば自動で2列・3列に並びます。 */
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: center;
  gap: 24px;
  align-items: start;
}

.recipe-card {
  background: #fff;
  border: 1px solid var(--color-line-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px var(--color-shadow);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.recipe-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px var(--color-shadow);
}

.recipe-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 画像が未配置でもカードの高さが崩れないよう、比率で場所を確保しておく。
   正方形にしているのは、スマホで撮った縦長写真でも上下が切れすぎないため。 */
.recipe-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--color-bg-alt);
}

.recipe-card-body { padding: 18px 20px 22px; }

.recipe-card-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--color-text);
}

.recipe-card-note {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
  color: var(--color-text-soft);
}

/* ===== レシピ本文 ===== */
.recipe-body {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-pad);
}

.recipe-body h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.7;
  margin: 56px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-line-light);
  color: var(--color-text);
}

.recipe-body h2:first-child { margin-top: 0; }

.recipe-body p {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2.1;
  margin: 0 0 20px;
  color: var(--color-text);
}

.recipe-body ul { margin: 0 0 20px; padding-left: 1.3em; }

.recipe-body ul li {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2.1;
  margin-bottom: 6px;
}

/* 手順(番号つき) */
.recipe-steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.recipe-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 18px;
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 2.1;
}

.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 材料 */
.recipe-ingredients {
  background: var(--color-bg-alt);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 0 0 24px;
}

.recipe-ingredients p {
  margin: 0;
  font-size: 15px;
  line-height: 2;
}

/* 補足の注意書き */
.recipe-note {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.9;
  color: var(--color-text-soft);
  border-left: 3px solid var(--color-line-light);
  padding: 4px 0 4px 14px;
  margin: 0 0 24px;
}

/* ===== 漬け時間の表 ===== */
.recipe-table-wrap { overflow-x: auto; margin: 0 0 24px; }

.recipe-table {
  width: 100%;
  min-width: 300px;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 14px;
}

.recipe-table th,
.recipe-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-line-light);
  text-align: left;
}

.recipe-table thead th {
  background: var(--color-bg-alt);
  font-weight: 500;
  color: var(--color-text);
}

.recipe-table tbody th { font-weight: 400; color: var(--color-text); }
.recipe-table td { color: var(--color-text-soft); }

/* ===== 写真 ===== */
.recipe-figure { margin: 0 0 28px; }

/* 画像が未配置でも枠の高さが確保され、レイアウトが崩れないようにしている */
.recipe-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  background: var(--color-bg-alt);
  display: block;
}

/* 正方形の写真用。figure に recipe-figure--square を足すと、
   切り取らずに正方形のまま程よい大きさで表示します。 */
.recipe-figure--square img {
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
}

/* スマホで撮った縦長写真用。 */
.recipe-figure--portrait img {
  aspect-ratio: 3 / 4;
  max-width: 420px;
  margin: 0 auto;
}

.recipe-figure figcaption {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-text-soft);
  margin-top: 10px;
  text-align: center;
}

/* ===== 「巡」への導線 ===== */
.recipe-cta {
  max-width: var(--content-max);
  margin: 64px auto 0;
  padding: 0 var(--content-pad);
}

/* はじめての方向けの静かなリンク */
.recipe-cta-guide {
  display: block;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text-soft);
  text-decoration: none;
  padding: 16px 20px;
  border-top: 1px solid var(--color-line-light);
  border-bottom: 1px solid var(--color-line-light);
  transition: color 0.3s var(--ease-out);
}

.recipe-cta-guide:hover { color: var(--color-text); }

/* 商品ブロック(価格は表示しない) */
.recipe-product {
  margin-top: 36px;
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 28px 24px 30px;
  text-align: center;
}

.recipe-product h2 {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text-soft);
  margin: 0 0 14px;
  border: none;
  padding: 0;
}

.recipe-product-name {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
}

.recipe-product-desc {
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 2;
  color: var(--color-text-soft);
  margin: 0 0 22px;
}

/* ===== スマホ幅(〜480px) ===== */
@media (max-width: 480px) {
  .recipe-list { grid-template-columns: 1fr; gap: 20px; }
  .recipe-body h2 { font-size: 18px; margin-top: 44px; }
  .recipe-body p,
  .recipe-body ul li,
  .recipe-steps li { font-size: 14.5px; line-height: 2; }
  .recipe-steps li { padding-left: 38px; }
  .recipe-steps li::before { width: 24px; height: 24px; font-size: 12px; }
  .recipe-ingredients { padding: 16px 18px; }
  .recipe-product { padding: 24px 18px 26px; }
  .recipe-product-name { font-size: 21px; }
}

/* ===== 動きを控えめにする設定を尊重 ===== */
@media (prefers-reduced-motion: reduce) {
  .recipe-card,
  .recipe-cta-guide { transition: none; }
  .recipe-card:hover { transform: none; }
}
