/* ================================
   Matoi Page Custom Styles (with Responsive)
   ================================ */

/* ページ全体 */
.matoi-page {
  line-height: 1.8;
}
.matoi-page section {
  margin: 0;
  padding: 0;
}

/* --- メインビジュアル --- */
.matoi-hero {
  position: relative;
  width: 100%;
  height: 60vh;
  text-align: center;
  margin-bottom: 60px;
  padding: 0;
  overflow: hidden;
}

/* 背景画像 */
.matoi-hero-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* 高さを合わせつつトリミング */
}

/* 黒の半透明オーバレイ */
.matoi-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* 半透明の黒 */
  z-index: 1;
  pointer-events: none; /* クリックなどを透過 */
}

/* テキストエリア */
.matoi-hero-text {
  position: absolute;
  bottom: 60px;
  right: 60px;
  color: #fff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  line-height: 1;
  z-index: 2; /* オーバレイの上に表示 */
}

/* 見出し */
.matoi-hero-text h1 {
  font-size: 14rem;
  margin-bottom: 10px;
  font-weight: 700;
}

/* サブテキスト */
.matoi-hero-text p {
  font-size: 4.8rem;
}

/* --- 全体コンテナ（横並び対応） --- */
.matoi-container {
  margin-top: 60px !important;
  margin-bottom: 60px !important;
}

.matoi-container .inner {
  max-width: 1025px; /* 全体の最大幅を広げて横並びを確保 */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  padding: 0 20px;
}

/* 画像エリア（左側） */
.matoi-gallery {
  flex: 1 1 50%; /* 左側を半分の幅に */
  margin-bottom: 0; /* コンテナ内でマージンを調整 */
}

.matoi-gallery .gallery-wrap {
  display: grid; /* Gridレイアウトに変更 */
  grid-template-columns: repeat(2, 1fr); /* 2列 */
  grid-template-rows: repeat(2, 1fr); /* 2行 */
  gap: 20px;
  padding: 0;
}

/* .matoi-gallery .gallery-item {
  flexの設定を削除し、Gridに適合
} */

.matoi-gallery .gallery-item img {
  width: 100%;
  height: 100%; /* グリッドセルにフィットさせるために追加 */
  object-fit: cover; /* 画像が歪まないように */
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* テキストエリア（右側） */
.matoi-text-area {
  flex: 1 1 50%; /* 右側を半分の幅に */
  display: flex;
  justify-content: right;
  /* flex-direction: column; */
  gap: 30px;
}

/* --- リード文（縦書き対応） --- */
.matoi-lead .inner {
  max-width: none; /* コンテナ内で幅を調整 */
  margin: 0;
  text-align: left;
  font-size: 2.375rem;
  font-weight: 600;
  line-height: 2;
  padding: 0;
  writing-mode: vertical-rl; /* 縦書き（右から左） */
  text-orientation: upright; /* 文字を正立させる */
  height: auto; /* 縦書きの高さを確保 */
}

/* --- サブリード（追加分、縦書き対応） --- */
.matoi-sub-lead .inner {
  max-width: none; /* コンテナ内で幅を調整 */
  margin: 0;
  text-align: left;
  font-size: 1.75rem;
  padding: 0;
  line-height: 2;
  writing-mode: vertical-rl; /* 縦書き（右から左） */
  text-orientation: upright; /* 文字を正立させる */
  height: auto; /* 縦書きの高さを確保 */
}

/* --- 特徴リスト --- */
.matoi-features {
  margin: 0 60px !important;
}
.matoi-features .features-grid {
  display: grid;
  grid-template-columns: repeat(
    4,
    minmax(0, 1fr)
  ); /* PC: 1行4列（増加時は次段へ） */
  gap: 30px;
  margin-bottom: 60px;
  /* padding: 0 20px; */
}

.matoi-features .feature-item {
  width: 100%;
  text-align: center;
  padding: 20px;
  background: #fff; /* 背景色は保持 */
  border-radius: 10px;
}

.matoi-features .feature-item img {
  max-width: 50px;
  margin-bottom: 15px;
}

/* 1.6rem = 16px 基準で見直し */
.matoi-features .feature-item h3 {
  font-size: 1.8rem; /* 18px 相当 */
  margin-bottom: 8px;
  font-weight: 700;
}

.matoi-features .feature-item p {
  font-size: 1.6rem; /* 16px 相当 */
  line-height: 1.8;
}

/* --- 文章ブロック --- */
.matoi-content .inner {
  max-width: 1025px;
  margin: 0 auto 60px;
  font-size: 1.8rem;
  line-height: 1.8;
  padding: 0 20px;
}
.matoi-content .inner h3 {
  font-size: 2rem;
}
/* ===========================
   商品情報リスト 用 CSS
   レイアウト方針：
   - PC: 3カラム（不足時は自動で段落ち）
   - タブレット: 2カラム（<=1024px）
   - SP: 1カラム（<=768px）
   - テキストサイズは 1.6rem=16px を基準に調整
   =========================== */

.matoi-products {
  padding: 0 50px 60px !important;
}
.matoi-products .heading-wrap {
  text-align: center; /* 中央寄せ */
}
.matoi-products h2 {
  font-size: 3.2rem;
  font-weight: 700;
  display: inline-block; /* 文字サイズに合わせた長方形にする */
  padding: 20px 96px; /* 内側の余白 */
  border: 1px solid #010000; /* 枠線の色と太さ */
  margin-bottom: 40px;
}
.matoi-products article {
  min-height: auto;
}
.matoi-products .products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  margin: 0;
  padding: 0 24px; /* 内側左右に余白（他セクションに合わせて可変） */
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* 薄い影 */
}

.product-media img {
  width: 50%;
  height: auto;
  display: block;
  aspect-ratio: 9 / 16; /* 9:16 の縦長比率 */
  object-fit: cover;
  margin: 0 auto;
}

/* 本文エリア */
.product-body {
  padding: 16px;
}

.product-name {
  font-size: 2rem;
  text-align: center;
  font-weight: 700;
  margin: 0 0 8px;
  padding-top: 12px;
  border-top: 1px dashed #d6cda4;
}

.product-prices {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.price .label {
  font-size: 1.2rem; /* 12px 相当：補助ラベル */
  color: #555;
  margin-right: 4px;
}

.price .value {
  font-size: 1.6rem; /* 16px 相当：基準 */
  font-weight: 600;
}
.price-exc .value {
  font-size: 1.6rem;
  font-weight: 400;
}
/* 仕様リスト */
.product-specs-wrap {
  display: flex;
  justify-content: center;
}
.product-spec {
  margin: 0;
}

.product-spec .spec-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  font-size: 1.4rem; /* 14px 相当：本文よりやや小さめ */
  line-height: 1.8;
  padding-top: 6px;
}

.product-spec dt {
  color: #333;
}

.product-spec dd {
  margin: 0;
}

.button001 {
  text-align: center;
  margin: 0 0 60px;
}
.button001 a {
  background: #010000;
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 0 auto;
  max-width: 320px;
  padding: 15px 25px;
  color: #fff;
  border: 1px solid #010000;
  transition: 0.3s ease-in-out;
  font-weight: 500;
}
.button001 a:hover {
  color: #010000;
  border: 1px solid #010000;
  background: #fff;
}
.button001 a::after {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
  transform: rotate(45deg) translateY(-50%);
  position: absolute;
  top: 50%;
  right: 20px;
  border-radius: 1px;
  transition: 0.3s ease-in-out;
}
.button001 a:hover::after {
  border-color: #010000;
}
/* ================================
   レスポンシブ対応
   ================================ */

/* タブレット（1024px以下） */
@media (max-width: 1024px) {
  .matoi-hero-text {
    left: 50%;
    bottom: 24px;
    right: 0;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .matoi-container .inner {
    max-width: 840px;
  }
  .matoi-hero-text h1 {
    font-size: 5.4rem;
    padding-right: 18px;
  }
  .matoi-hero-text p {
    font-size: 2.6rem;
  }
  .matoi-features .features-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1列 */
    width: 100%;
    justify-content: stretch; /* 念のため中央寄せを無効化 */
  }

  /* 以前の max-width: 280px を打ち消して広げる */
  .matoi-features .feature-item {
    width: 100%;
    max-width: none;
  }
  .matoi-content .inner {
    max-width: 80%;
    margin: 0 auto 40px;
  }
  .matoi-products h2 {
    font-size: 2.1rem;
    font-weight: 600;
    padding: 20px;
    margin-bottom: 30px;
  }
  .matoi-products .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}
/* レスポンシブ対応（768px以下） */
@media (max-width: 768px) {
  .matoi-container .inner {
    flex-direction: column; /* 縦並びに切り替え */
    align-items: center; /* 中央寄せ（必要に応じて調整） */
    gap: 30px;
  }

  .matoi-gallery {
    flex: 1 1 100%; /* フル幅に */
    order: 2; /* モバイルで画像を下に移動 */
  }

  .matoi-text-area {
    flex: 1 1 100%; /* フル幅に */
    order: 1; /* モバイルでテキストを上に移動 */
    justify-content: center; /* モバイル時のテキスト位置調整 */
    flex-direction: column;
    margin-bottom: 20px;
  }

  .matoi-gallery .gallery-wrap {
    grid-template-columns: repeat(1, 1fr); /* モバイルで1列に変更 */
    grid-template-rows: auto; /* 行を自動調整 */
  }

  /* 縦書きを解除（横書きに戻す） */
  .matoi-lead .inner,
  .matoi-sub-lead .inner {
    writing-mode: horizontal-tb; /* 横書きに戻す */
    text-orientation: mixed; /* デフォルトに戻す（必要に応じて） */
    height: auto; /* コンテンツの高さに合わせる */
    line-height: 1.8;
  }
  .matoi-text-area .matoi-lead {
    order: 1; /* リードを上（先頭）に */
  }

  .matoi-text-area .matoi-sub-lead {
    order: 2; /* サブリードを下（後尾）に */
  }
  /* .matoi-features .features-grid {
    display: grid;
    grid-template-columns: 1fr; 
    width: 100%;
    justify-content: stretch; 
  }

  .matoi-features .feature-item {
    width: 100%;
    max-width: none;
  } */
  .matoi-content .inner h3 {
    font-size: 1.6rem;
  }
  .matoi-content .inner {
    font-size: 1.4rem;
  }
  .matoi-content br {
    display: none;
  }
  .matoi-products {
    padding: 0 20px 60px !important;
  }
  .matoi-products .products-grid {
    grid-template-columns: 1fr; /* SPは1列 */
    padding-left: 16px;
    padding-right: 16px;
  }
  .product-name {
    font-size: 1.7rem;
  }
  .price .value {
    font-size: 1.5rem;
  }
}

/* 小型スマホ（480px以下） */
@media (max-width: 480px) {
  .matoi-hero-text h1 {
    font-size: 3.6rem;
  }
  .matoi-hero-text p {
    font-size: 1.6rem;
  }
}
