@charset "UTF-8";

/*!
Theme Name: MATOW
Theme URI: https://www.matow.jp/
Description: MATOW 公式ストア（WordPress 側：NEWS・PRESS・STYLING・STORE など）用の独自テーマ。親テーマなしで動く。
Author: Beyond Cool Co., Ltd.
Version: 1.1.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: matow
*/

/************************************
** サイト固有のスタイル
**
** 読み込み順（functions.php の matow_enqueue_assets）：
**   1. assets/css/base.css   … レイアウト・記事カード・本文などの土台
**   2. assets/css/icons.css  … アイコンフォント
**   3. itembox の style_202305.css / common_202305.css（futureshop と共通のヘッダー・フッターなど）
**   4. このファイル
** あとから読むものが優先される。見た目の調整は基本的にこのファイルに書く。
**
** 画面の幅の区切りは futureshop 側と同じ（1025px 以上＝PC、768〜1024px＝タブレット、767px 以下＝スマートフォン）。
**
** 目次
**   1. 全体（文字・ヘッダー・フッター・本文エリアの余白）
**   2. 記事の本文（ギャラリー・動画）
**   3. 関連商品
**   4. 取扱店一覧（/storelocator/）
**   5. スタイリング（個別ページ・一覧）
**   6. 画面の幅ごとの調整
************************************/


/* ------------------------------------------------------------
 * 1. 全体
 * ------------------------------------------------------------ */
html {
  font-size: 62.5%;
}

body {
  font-family: p22-underground, a-otf-gothic-bbb-pr6n, sans-serif;
  font-style: normal;
  font-weight: 500 !important;
  background: #fbfbf6;
  font-size: 14px !important;
  letter-spacing: 0.1em;
  font-smoothing: auto;
  color: #4d4d4d;
  line-height: 2;
  position: relative;
  overflow-x: hidden;
}

/* サイトのヘッダー（お知らせ帯の下に置く） */
.header {
  height: auto;
  top: 4rem !important;
  justify-content: space-between;
}

footer .wrap {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

/* 本文エリア：上はヘッダーのぶんを空ける。左右は futureshop 側と同じ 80px */
#content {
  margin: 0 auto;
  padding: 160px 80px 10vw;
}

/* itembox の CSS はサイトのヘッダー用に「header」「main section」へ指定を入れている。
   記事の中の <header>・<section> には効かないように戻す */
main header {
  position: static;
  padding: 0;
  min-width: 100% !important;
  display: block;
  mix-blend-mode: unset;
}

main section.related_products_wrap,
main section.storelocator {
  margin-left: 0;
  margin-right: 0;
}


/* ------------------------------------------------------------
 * 2. 記事の本文（ギャラリー・動画）
 * ------------------------------------------------------------ */
.gallery {
  display: grid;
  grid-gap: 1rem;
}

.gallery-columns-2 {
  grid-template-columns: 1fr 1fr;
}

.gallery-columns-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.gallery-columns-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.gallery br {
  display: none !important;
}

.gallery .gallery-item {
  float: none !important;
  margin: 0 !important;
  text-align: center !important;
  width: 100% !important;
}

.gallery img {
  border: 0 !important;
}

/* 動画 */
.video-container {
  max-width: 100%;
}

.video-container .video {
  position: unset;
  padding-bottom: 0;
  margin-top: 0;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
}

.video iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  position: unset;
}


/* ------------------------------------------------------------
 * 3. 関連商品（編集画面の「関連商品 1〜10」）
 * ------------------------------------------------------------ */
main section.related_products_wrap {
  margin-bottom: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--matow-line-color);
}

main section .related_products_title {
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
  text-align: left;
  margin: 0 0 30px;
}

.related_products_box {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--matow-card-gap);
}

.related_product a {
  display: block;
  transition: opacity 0.5s ease;
}

.related_product a:hover {
  opacity: 0.7;
}

.related_products_img {
  width: 100%;
  margin-bottom: 10px;
}

.related_products_name {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  margin: 0 0 4px;
}

.related_products_price {
  font-family: var(--matow-latin-font);
  font-size: 12px;
}

.related_products_price::before {
  content: "￥";
}

.related_products_price::after {
  content: "［税込］";
  font-size: 0.75em;
}

.related_products_attention {
  margin-top: 30px;
  font-size: 11px;
  color: var(--matow-pale-text-color);
}


/* ------------------------------------------------------------
 * 4. 取扱店一覧（/storelocator/）
 *    futureshop のご利用ガイドの表と同じ形：左に都道府県、右に店舗。罫線で区切る
 * ------------------------------------------------------------ */
.no-sidebar.page-template-page-stores .main {
  max-width: 940px;
}

main section.storelocator {
  margin-bottom: 0;
}

.storelocator .page_title {
  padding: 0;
}

.storelocator .page_title h2 {
  margin-bottom: 0;
}

/* 店舗数（見出しのすぐ下） */
.storelocator .store_number {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.15em;
  margin-bottom: 4vw;
}

.storelocator .store_number .js-numberresults {
  font-family: var(--matow-latin-font);
  font-size: 18px;
  margin-right: 0.2em;
}

/* 都道府県ごとのまとまり */
.storelocator .map {
  display: grid;
  grid-template-columns: 28% 72%;
  padding-top: 30px;
  border-top: 1px solid var(--matow-line-color);
}

.storelocator .map:last-child {
  border-bottom: 1px solid var(--matow-line-color);
}

.storelocator .map h4 {
  font-size: 16px;
  font-weight: 700;
  line-height: 2;
}

.storelocator .map ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.storelocator .map > ul > li {
  padding: 0 0 30px 30px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--matow-line-color);
}

.storelocator .map > ul > li:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.storelocator .shop-name {
  font-weight: 700;
}

.storelocator .shop-address {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 1.5em;
}

/* 地図へのリンク（文字は CSS で出している） */
.storelocator a.shop-map {
  font-family: var(--matow-latin-font);
  font-size: 12px;
  line-height: 1.8;
  white-space: nowrap;
  border-bottom: 1px solid #4d4d4d;
  transition: opacity 0.5s ease;
}

.storelocator a.shop-map:hover {
  opacity: 0.7;
}

.storelocator a.shop-map::before {
  font-family: "FontAwesome";
  content: "\f041";
  display: inline-block;
  margin-right: 0.5em;
}

.storelocator a.shop-map::after {
  content: "MAP";
}

.storelocator .shop-tel a {
  font-family: var(--matow-latin-font);
  letter-spacing: 0.15em;
}

.storelocator .shop-tel a:not(:empty)::before {
  content: "TEL：";
  letter-spacing: 0.1em;
}


/* ------------------------------------------------------------
 * 5. スタイリング（カスタム投稿 styling）
 *    サイドバーは出さない（functions.php の matow_has_sidebar）。画像は縦長 4:5
 * ------------------------------------------------------------ */
.e-card.type-styling {
  --matow-card-ratio: 4 / 5;
}

/* --- 個別ページ：左に写真、右に関連商品・本文・タグ --- */
.single-styling .entry-title,
.single-styling .entry-meta,
.single-styling .related_products_title,
.single-styling .related-entry-card-content {
  display: none !important;
}

.single-styling [id^="post-"] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 3rem;
}

.single-styling .article-header {
  order: 1;
  grid-row: 1 / 4;
}

.single-styling section.related_products_wrap {
  order: 2;
  margin: 0;
  padding: 0;
  border: 0;
}

.single-styling .entry-content {
  order: 3;
}

.single-styling .article-footer {
  order: 4;
  align-content: end;
}

.single-styling .related_products_box {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.single-styling .eye-catch-wrap,
.single-styling .entry-content {
  margin: 0;
}

.single-styling .eye-catch img {
  aspect-ratio: 4 / 5;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

/* その他の STYLING（写真だけを 6 列で並べる） */
.single-styling .related-list {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.single-styling .related-entry-card-thumb {
  margin: 0;
}

/* --- 一覧ページ：写真だけを並べる --- */
.post-type-archive-styling .entry-card-content {
  display: none !important;
}

.post-type-archive-styling .list {
  gap: 10px;
}

.post-type-archive-styling .entry-card-thumb {
  margin: 0;
}


/* ------------------------------------------------------------
 * 6. 画面の幅ごとの調整
 * ------------------------------------------------------------ */

/* 1024px 以下（タブレット） */
@media screen and (max-width: 1024px) {
  #content {
    padding: 140px 5vw 12vw;
  }

  .single-styling [id^="post-"] {
    grid-template-columns: 1.5fr 1fr;
  }

  .single-styling .related_products_box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 767px 以下（スマートフォン） */
@media screen and (max-width: 767px) {
  body {
    letter-spacing: 0.075em;
  }

  #content {
    padding: 120px 24px 80px;
  }

  /* 関連商品 */
  main section.related_products_wrap {
    margin-bottom: 60px;
    padding-top: 30px;
  }

  main section .related_products_title {
    margin-bottom: 20px;
  }

  .related_products_box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 取扱店一覧：都道府県を上、店舗を下に積む */
  .storelocator .store_number {
    margin-bottom: 30px;
  }

  .storelocator .map {
    display: block;
    padding-top: 15px;
  }

  .storelocator .map h4 {
    margin-bottom: 10px;
  }

  .storelocator .map > ul > li {
    padding: 0 0 15px 15px;
    margin-bottom: 15px;
  }

  /* スタイリング */
  .single-styling [id^="post-"] {
    grid-template-columns: 1fr;
    grid-gap: 2rem;
  }

  .single-styling .related_products_box {
    grid-gap: 2rem;
  }

  .single-styling .related-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
