/*
Theme Name:		Welcart Mode Child Theme
Template:		welcart_mode
Theme URI:		https://www.welcart.com/archives/12623.html
Author:			Welcart Inc.
Author URI:		https://www.welcart.com/
Description:	Mode Child is the Welcart Mode Child Theme.
Version:		1.0.0
License:		GNU General Public License v2 or later
License URI:	http://www.gnu.org/licenses/gpl-2.0.html
Tags:			responsive-layout, mode, one-columns, left-sidebar or right-sidebar
Requires at least: 5.6
Requires PHP: 7.4 - 8.1
*/


.home-slide-container .list {
    margin: 0 3px;
}

/* スタッフブログ個別のアイキャッチを中央寄せ＆トリミング */
body.single-staffblog #itemimg.eyecatch,
body.single-staffblog .eyecatch{
  position: relative !important;
  height: 500px !important;        /* 高さ */
  max-height: 500px !important;
  overflow: hidden !important;

  max-width: 1120px;               /* ← ページの本文幅に合わせて調整 */
  margin: 0 auto;                  /* 中央寄せ */
  border-radius: 6px;              /* 角丸など任意 */
}

body.single-staffblog #itemimg.eyecatch img,
body.single-staffblog .eyecatch img{
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}



/* 日付バッジ：画像の下辺中央に半分かぶせる */
body.single-staffblog .sb-date-badge{
  position: absolute;
  left: 50%;
  bottom: 10px;              /* バッジ高さの半分をマイナスにして“はみ出し” */
  transform: translateX(-50%);
  width: 100px;                /* バッジ直径 */
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #333; line-height: 1.05; z-index: 2;
}

/* 数字の書式（例画像風） */
body.single-staffblog .sb-date-badge .y{ font-size: 12px; opacity:.9; }
body.single-staffblog .sb-date-badge .m{ font-size: 16px; font-weight: 600; }
body.single-staffblog .sb-date-badge .d{ font-size: 20px; font-weight: 700; }

/* モバイルで少し小さく */
@media (max-width: 767px){
  body.single-staffblog #itemimg.eyecatch{ height: 360px; }   /* 高さを下げたい場合 */
  body.single-staffblog .sb-date-badge{
    width: 76px; height: 76px; bottom: 10px;
  }
  body.single-staffblog .sb-date-badge .y{ font-size: 11px; }
  body.single-staffblog .sb-date-badge .m{ font-size: 14px; }
  body.single-staffblog .sb-date-badge .d{ font-size: 18px; }
}





/* グリッド：子テーマで強制（親の指定に勝てるようにやや強め） */
.usces-grid-fallback{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:24px;
  margin: 16px 0;
}
@media(max-width:1024px){ .usces-grid-fallback{ grid-template-columns:repeat(3,1fr) } }
@media(max-width:768px){  .usces-grid-fallback{ grid-template-columns:repeat(2,1fr) } }
@media(max-width:480px){  .usces-grid-fallback{ grid-template-columns:1fr } }

/* カードの基本 */
.usces-grid-fallback .usces-card{
  display:flex; flex-direction:column; gap:10px;
  background:#fff; border:1px solid #eee; border-radius:8px; padding:12px;
  width:100% !important; margin:0 !important;
}

/* サムネ：正方形でトリミング */
.usces-grid-fallback .usces-card .thumb{ display:block; width:100%; aspect-ratio:1/1; overflow:hidden; border-radius:6px; background:#f7f7f7; }
.usces-grid-fallback .usces-card .thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.usces-grid-fallback .usces-card .noimg{
  width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  color:#999; font-size:12px;
}

/* タイトル＆価格 */
.usces-grid-fallback .usces-card .title{ font-size:14px; line-height:1.5; margin:0; }
.usces-grid-fallback .usces-card .title a{ text-decoration:none; color:inherit; }
.usces-grid-fallback .usces-card .price{ font-weight:700; color:#333; }

/* 親テーマの ul/li レイアウト破片対策（もし内側が li で出ていても潰す） */
.usces-grid-fallback li{ list-style:none !important; margin:0 !important; padding:0 !important; }
.usces-grid-fallback li > *{ width:100% !important; }





/* --- 特集（single-features）でもスタッフブログと同じヒーロー画像裁断を適用 --- */
body.single-features #itemimg.eyecatch,
body.single-features .eyecatch{
  position: relative !important;
  height: 500px !important;     /* ← スタッフブログと揃える高さに（お好みで / 例: 360 or 500） */
  max-height: 500px !important;
  overflow: hidden !important;
}
body.single-features #itemimg.eyecatch img,
body.single-features .eyecatch img{
  position: absolute !important;
  top: 0; left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* --- 日付の丸バッジ（スタッフブログと共通の .sb-date-badge を再利用） --- */
body.single-features .sb-date-badge{
  position: absolute;
  left: 16px;
  bottom: 16px;                 /* 画像の左下に配置（必要なら top: に変更） */
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-num, inherit); /* 数字フォントを使うなら 方法Aの --font-num を流用 */
  line-height: 1;
}
body.single-features .sb-date-badge .y{ font-size: 10px; opacity: .9; }
body.single-features .sb-date-badge .m{ font-size: 14px; font-weight: 700; margin-top: 2px; }
body.single-features .sb-date-badge .d{ font-size: 18px; font-weight: 700; margin-top: 2px; }

/* 分類ピル（.tag > span）は親テーマのスタイルが効きますが、必要なら微調整可 */


/* 特集の個別（single-features）のヒーロー画像を中央でトリミング */
body.single-features #itemimg.eyecatch,
body.single-features .eyecatch{
  position: relative;
  height: 500px;             /* お好みの高さに調整可（例: 360/420/500） */
  overflow: hidden;
  /* ページ中央にブロックごと寄せたい場合は次の2行をON */
  max-width: 1120px;         /* Modeのコンテンツ幅に合わせる例 */
  margin: 0 auto 24px;
}

body.single-features #itemimg.eyecatch img,
body.single-features .eyecatch img{
  position: absolute;
  inset: 0;                  /* top:0; right:0; bottom:0; left:0; と同義 */
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: 50% 50% !important; /* ← 中央でトリミング */
  display: block;
}

/* 念のため “alignleft/alignright” が付いても左寄りにならないよう無効化 */
body.single-features .eyecatch img.alignleft,
body.single-features .eyecatch img.alignright{
  float: none !important;
  margin: 0 !important;
}


/* スタッフブログ個別 */
body.single-staffblog #itemimg.eyecatch,
body.single-staffblog .eyecatch{
  border-radius: 20px !important; /* 角を丸く */
  overflow: hidden !important;    /* 角丸に合わせて中の画像もクリップ */
}

/* 特集個別 */
body.single-features #itemimg.eyecatch,
body.single-features .eyecatch{
  border-radius: 20px !important;
  overflow: hidden !important;
}

/* 念のため：画像側が自己主張しても角丸を維持 */
body.single-staffblog .eyecatch img,
body.single-features .eyecatch img{
  border-radius: inherit;
  display: block;
}



/* スタッフブログ個別ページの前後ナビを左右端に配置 */
body.single-staffblog nav.navigation.post-navigation .nav-links,
body.single-staffblog .post-navigation .nav-links,
body.single-staffblog .nav-links {
  display: flex;
  justify-content: space-between; /* 左右端に振り分け */
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* 左＝前、右＝次 */
body.single-staffblog .nav-previous { margin-right: auto; text-align: left; }
body.single-staffblog .nav-next     { margin-left:  auto; text-align: right; }

/* リンクの当たり判定を広げて揃える（任意） */
body.single-staffblog .nav-previous a,
body.single-staffblog .nav-next a {
  display: inline-flex;
  align-items: center;
  gap: .4em;   /* ▲◀ ▶ とテキストの間隔 */
  text-decoration: none;
}

/* 親テーマが float で崩す場合の打ち消し（保険） */
body.single-staffblog .nav-previous,
body.single-staffblog .nav-next { float: none !important; }




/* ツリー全体の余白 */
.wc-cat-tree .wc-cat-list{
  list-style:none; margin:0; padding:0;
}
.wc-cat-tree .wc-cat-list li{ margin:.35rem 0; }

/* 親カテゴリを強調 */
.wc-cat-tree .wc-cat-list > li > a{
  font-weight:700;
}

/* 子階層の字下げ＆ガイド線（お好みで） */
.wc-cat-tree .children{
  margin-left:1rem;           /* 字下げ */
  padding-left:.75rem;
  border-left:1px solid #eee; /* ガイド線を消したいときは削除 */
}

/* さらに下の階層をもう少し下げたいとき */
.wc-cat-tree .children .children{
  margin-left:1.25rem;
}



.wc-cat-tree{
  background:#fff7ef;
  border-radius:12px;
  padding:12px 14px;
}


/* スタッフブログ個別記事のアイキャッチにオーバーレイ */
body.single-staffblog #itemimg.eyecatch {
  position: relative; /* 擬似要素の基準にする */
}

body.single-staffblog #itemimg.eyecatch::before {
  content: "";
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 と同じ */
  background: rgba(0,0,0,0.3); /* 黒の50%透過 */
  z-index: 2; /* 画像より前面に配置 */
}

/* 画像はオーバーレイの下に */
body.single-staffblog #itemimg.eyecatch img {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

/* 日付バッジなどをオーバーレイより前に出す */
body.single-staffblog .sb-date-badge {
  position: absolute;
  z-index: 3; /* オーバーレイよりも手前 */
}


