/*
 Theme Name: fex (Storefront Child)
 Theme URI: https://fex.co.jp/
 Description: Storefront child theme for FIRST EXPERIENCE
 Author: nakabond
 Template: storefront
 Version: 1.0.0
*/

/* --- Archive grid layout --- */
.archive .site-main, .blog .site-main{
  /* grid はメディアクエリ内で適用 */
}
@media (min-width:1024px){
  .archive .site-main, .blog .site-main{
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px;
  }
}
@media (min-width:640px) and (max-width:1023.98px){
  .archive .site-main, .blog .site-main{
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px;
  }
}

/* Card */
.nb-archive-card{ background:#fff; border:1px solid #eee; border-radius:12px; overflow:hidden;
  box-shadow:0 1px 8px rgba(0,0,0,.04); transition:transform .2s ease, box-shadow .2s ease; }
.nb-archive-card:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.08); }

/* Thumb 16:9 */
.nb-archive-thumb{ display:block; aspect-ratio:16/9; overflow:hidden; background:#f5f5f5; }
.nb-archive-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.nb-thumb-placeholder{ width:100%; height:100%; background:linear-gradient(90deg,#f5f5f5,#eee,#f5f5f5); }

/* Text */
.nb-archive-header{ padding:14px 14px 4px; }
.nb-archive-title{ font-size:1.05rem; line-height:1.35; margin:0; }
.nb-archive-title a{ color:#222; text-decoration:none; }
.nb-archive-title a:hover{ text-decoration:underline; }
.nb-archive-meta{ font-size:.82rem; color:#777; margin-top:6px; }
.nb-archive-excerpt{ padding:0 14px 10px; color:#444; }
.nb-archive-footer{ padding:0 14px 16px; }
.nb-readmore{ font-size:.9rem; color:#0066cc; text-decoration:none; border-bottom:1px solid rgba(0,102,204,.4); }
.nb-readmore:hover{ border-bottom-color:transparent; }

/* Reset margins from core templates */
.nb-archive-card .entry-content{ margin:0; }

/* --- scope 調整：ホームの投稿一覧(.blog) と アーカイブ(.archive) のみでグリッド --- */
@media (min-width:1024px){
  .archive .site-main,
  body.blog .site-main{
    display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px;
  }
}
@media (min-width:640px) and (max-width:1023.98px){
  .archive .site-main,
  body.blog .site-main{
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px;
  }
}

/* ===== HOMEでヘッダーを常に最前面へ ===== */
body.home .site-header{ position: relative; z-index: 10010; }
body.home .wp-block-cover,
body.home .nb-hero,
body.home .hero{ position: relative; z-index: 1; }

/* メニュー色が戻ってしまう対策（必要に応じて色を変更） */
body.home .main-navigation a{ color:#111 !important; }
/* ヘッダー背景を透明にしたい場合は次を有効化
body.home .site-header{ background: transparent !important; }
*/
