body {
  padding: 0;
  margin: 0;
}

/* ヘッダー */
.header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  max-width: 263px;
  width: 100%;
  margin: 0;
}

/* 表示項目切り替えボタン */
.database-change p {
  display: flex;
  -moz-column-gap: 6px;
  column-gap: 6px;
}

.database-change p button {
  height: 57px;
  padding-inline: 16px 24px;
  display: flex;
  align-items: center;
  -moz-column-gap: 6px;
  column-gap: 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 30px;
  cursor: pointer;
}

/* 表示項目切り替えボタンのアイコン */
.database-change p button::before {
  content: '';
  display: inline-block;
  width: 38px;
  height: 38px;
}

/* 加工食品検索ボタン */
#fooddb-buttun {
  background: #4D8017;
  /* 緑 */
}

/* 料理レシピ検索ボタン */
#recipedb-buttun {
  background: #F89A18;
  /* オレンジ */
}

/* 加工食品検索ボタンのアイコン */
#fooddb-buttun::before {
  background: url('../../common/img/icon-food.svg') no-repeat center/contain;
}

/* 料理レシピ検索ボタンのアイコン */
#recipedb-buttun::before {
  background: url('../../common/img/icon-recipe.svg') no-repeat center/contain;
}

.content-container {
  padding: 60px 0;
}

/* タイトルのスタイル */
#product-title {
  margin: 0 auto 42px;
  text-align: center;
  font-size: 40px;
}

/* テーブルのスタイル */
table {
  /* width: 800px; */
  border-collapse: collapse;
  margin-bottom: 20px;
}

table,
th,
td {
  border: 2px solid #fff;
}

th,
td {
  padding: 8px;
  font-size: 13px;
  text-align: left;
  /* width: 230px;
  各項目幅をテーブルの半分に指定 */
}

th {
  background-color: #DBD7BE;
  text-align: center;
  padding: 12px 16px;
}

td {
  padding: 8px 16px;
  font-weight: 700;
}

tr:nth-child(odd) {
  background-color: #F6F6F6;
}

tr:nth-child(even) {
  background-color: #F0F0F0;
}

tr:hover {
  background-color: #fff;
}

/* 画像コンテナのスタイルを追加 */
.image-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 42px;
}

.product-image {
  /* width: 380px; */
  /* 固定幅に設定 */
  height: auto;
  display: block;
}

/* テーブルを横並びにするスタイル */
.yokoretsu-container,
.gaiyo-container,
.recipe-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* テーブル③のスタイル */
.syokuhin-table {
  /* width: 1700px; */
  margin: 20px auto;
  /* 中央に配置 */
}

/* テーブル4のスタイル */
.recipe-table th:nth-child(1) {
  width: 400px;
}

.recipe-table th:nth-child(2) {
  width: 1265px;
}

/* PC用のスタイル */
@media screen and (min-width: 1101px) {
  .table-container {
    justify-content: center;
    /* 中央に寄せる */
  }
  .product-image {
    width: 350px;
  }

  th,
  td {
    width: 230px;
    /* 各項目幅をテーブルの半分に指定 */
  }
  .syokuhin-table,
  .recipe-table {
    width: 1080px;
    margin: 20px auto;
    /* 中央に配置 */
  }
}

/* タブレット用のスタイル */
@media screen and (min-width: 801px) and (max-width: 1100.5px) {
  .table-container {
    justify-content: center;
    /* 中央に寄せる */
  }
  .product-image {
    width: 260px;
  }

  th,
  td {
    width: 365px;
    /* 各項目幅をテーブルの半分に指定 */
  }

  /* テーブル③のスタイル */
  .syokuhin-table,
  .recipe-table {
    width: 800px;
    margin: 20px auto;
    /* 中央に配置 */
  }
}

/* スマホ用のスタイル */
@media screen and (max-width: 800px) {
  .table-container {
    flex-direction: column;
    align-items: center;
  }

  table {
    width: 100%;
  }

  th,
  td {
    width: auto;
  }

  .product-image {
    max-width: 30%;
    height: auto;
    display: block;
    margin: 5px;
  }
  .syokuhin-table,
  .recipe-table {
    width: 100%;
    margin: 20px auto;
    /* 中央に配置 */
  }
}

/* 印刷用のスタイル */
@media print {

  /* 用紙サイズを横1700pxに設定 */
  @page {
    size: 1700px auto;
    margin: 10mm 20mm;
  }

  /* 本文の左右余白を追加 */
  body {
    margin-left: 20mm;
    margin-right: 20mm;
  }

  .header {
    display: none;
  }

  /* 改ページ用のスタイル */
  .page-break {
    page-break-before: always;
  }

  /* テーブルをページ中央に配置 */
  /* table {
          max-width: 90%;
          margin-left: auto;
          margin-right: auto;
      } */

  /* コンテナ内の余白を設定 */
  .table-container {
    padding-left: 20mm;
    padding-right: 20mm;
  }

  #product-title {
    font-size: 28px;
    margin-bottom: 0;
  }

  .product-image {
    width: 380px;
  }

  th,
  td {
    width: 400px;
    /* 各項目幅をテーブルの半分に指定 */
  }
  .syokuhin-table {
    width: 1700px;
    margin: 20px auto;
    /* 中央に配置 */
  }

  th {
    background-color: #DBD7BE !important;
    /* 背景色を指定 */
    color: black !important;
    /* テキストカラーを黒に */
    font-weight: bold;
    text-align: center;
    padding: 20px 16px;
    -webkit-print-color-adjust: exact;
    /* 背景色を強制適用 */
    print-color-adjust: exact;
    /* 他のブラウザ向け */
  }

  tr:nth-child(odd) {
    background-color: #F6F6F6 !important;
  }

  tr:nth-child(even) {
    background-color: #F0F0F0 !important;
  }

  td {
    width: 50%;
    /* 印刷時、横幅がバラつかないように固定 */
  }

  th,
  td {
    font-size: 12px;
  }

  .table-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .page {
    display: inline-block;
    /* 横並びにするために追加 */
    width: 48%;
    /* 2つのページが横並びになるように幅を調整 */
    vertical-align: top;
    /* 上揃えにするために追加 */
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  table {
    /* width: 80%; テーブルの幅をページの幅に合わせる */
    border-collapse: collapse;
    /* margin: 0 auto 20px auto; */
    /* テーブルを中央に寄せる */
  }

  table,
  th,
  td {
    border: 2px solid #fff;
  }

  th,
  td {
    padding: 8px;
  }

  body {
    margin: 0;
    font-size: 33%;
  }

  /* テーブルを横並びにするスタイル */
  .yokoretsu-container,
  .gaiyo-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
  }

  /* テーブル③のスタイル */
  .syokuhin-table,
  .recipe-container {
    margin: 0;
    /* 中央に配置 */
    margin: 20px auto;
    /* 中央に配置 */
    -moz-column-break-inside: avoid;
    break-inside: avoid;
  }

  .content-container {
    box-sizing: border-box;
    width: 1000px;
    height: auto;
    margin: 0;
    padding-bottom: 30px;
    break-inside: avoid-page;
  }

  .image-container {
    margin-bottom: 0;
  }

  .product-image {
    width: 23%;
    height: auto;
    display: block;
    margin: 10px;
  }

  /* レシピテーブルがページをまたぐ場合に改ページを行う */
  .recipe-container {
    -moz-column-break-inside: avoid;
    break-inside: avoid;
  }
}

/* フッターのスタイル */
footer {
  padding-block: 20px;
}

footer p {
  font-size: 12px;
  text-align: center;
}
