/* 一覧（Gamma風） */
.gamma-wrap{max-width:980px;margin:70px auto;padding:0 18px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.gamma-title{font-size:42px;font-weight:700;text-align:center;margin:0 0 42px;}
.gamma-card{border-radius:22px;background:#fff;box-shadow:0 20px 40px rgba(0,0,0,.06);margin:0 0 18px;overflow:hidden;}
.gamma-link{display:grid;grid-template-columns:280px 1fr;gap:22px;color:inherit;text-decoration:none;}
.gamma-media{background:#f3f4f6;}
.gamma-media img{width:100%;height:240px;object-fit:cover;display:block;}
.gamma-ph{height:240px;background:linear-gradient(135deg,#f3f4f6,#e5e7eb);}
.gamma-body{padding:18px 18px 20px;}
.gamma-badges{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
.gamma-badge{font-size:12px;font-weight:700;background:#111827;color:#fff;border-radius:999px;padding:6px 10px;}
.gamma-badge.sub{background:#e5e7eb;color:#111827;}
.gamma-h2{font-size:22px;line-height:1.2;margin:0 0 10px;}
.gamma-specs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px;font-size:14px;opacity:.92;margin:0 0 12px;}
.gamma-ex{margin:0 0 14px;font-size:15px;line-height:1.7;opacity:.88;}
.gamma-btn{display:inline-block;background:#2c88f7;color:#fff;border-radius:12px;padding:10px 14px;font-weight:800;font-size:14px;}
@media(max-width:760px){
  .gamma-link{grid-template-columns:1fr;}
  .gamma-media img,.gamma-ph{height:200px;}
  .gamma-specs{grid-template-columns:1fr;}
}

/* 詳細ページ（スクショ寄せ） */
.ft-wrap{max-width:1100px;margin:40px auto;padding:0 18px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
.ft-title h1{font-size:26px;margin:0 0 10px;}
.ft-price{font-size:54px;font-weight:900;line-height:1;margin:0 0 8px;}
.ft-price span{color:#ff3b30;}
.ft-sub{font-size:12px;opacity:.7;margin-bottom:18px;}
.ft-grid{display:grid;grid-template-columns:360px 1fr;gap:26px;align-items:start;}
.ft-specbox{background:#f3f4f6;border-radius:14px;padding:16px;}
.ft-spechead{font-weight:800;margin-bottom:6px;}
.ft-specval{font-size:14px;opacity:.9;margin-bottom:12px;}
.ft-block{margin-top:14px;}
.ft-bh{font-weight:900;margin:0 0 8px;}
.ft-spec ul{margin:0;padding-left:18px;}
.ft-spec li{margin:6px 0;font-size:13px;opacity:.92;}
.ft-note{font-size:12px;line-height:1.7;opacity:.75;margin:0;}
.ft-gallery h2{margin:0 0 10px;font-size:16px;font-weight:900;}
.ft-ggrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;}
.ft-gcap{font-size:11px;opacity:.65;margin-top:10px;text-align:center;}
/* ギャラリー：リンク装飾 */
.ft-glink{display:block; text-decoration:none; color:inherit;}
.ft-glink:hover{opacity:.92;}
.ft-list-wrap{max-width:1100px;margin:40px auto;padding:0 18px;}
.ft-list-title{font-size:42px;font-weight:800;text-align:center;margin:0 0 34px;}

.ft-block-item{
  background:#fff;
  border-radius:22px;
  box-shadow:0 20px 40px rgba(0,0,0,.06);
  padding:26px;
  margin:0 0 26px;
}

.ft-title h2{font-size:26px;margin:0 0 10px;}
.ft-gallery h3{margin:0 0 10px;font-size:16px;font-weight:900;}
/* 画像枠：PCは 4:3 */
.ft-gitem{
  margin:0;
  border-radius:10px;
  overflow:hidden;
  background:#e5e7eb;
}
.ft-gitem img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  aspect-ratio: 4 / 3;  /* PCは4:3 */
}

/* モバイルは 16:9（幅900px以下） */
@media (max-width:900px){
    .ft-ggrid{grid-template-columns:1fr;} /* 既存のままでOK */
      .ft-gitem img{
        aspect-ratio: 16 / 9; /* モバイルは16:9 */
      }
  .ft-grid{grid-template-columns:1fr;}
  .ft-ggrid{grid-template-columns:1fr;}
}

/* ===== 追従型お問い合わせバー（kc版） ===== */
/* .kc-sticky-bar{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: #ffffff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  z-index: 99999;
  padding-bottom: env(safe-area-inset-bottom);
}

/* 各ボタン */
/* .kc-btn{
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
} */

/* .kc-ico{
  display: block;
  font-size: 22px;
  line-height: 1;
}
.kc-ico img{ width: 22px; height: 22px; display:block; }
.kc-txt{ line-height: 1; } */

/* 色分け */
/* .kc-btn.kc-tel{color:#e11d48;}
.kc-btn.kc-line{color:#22c55e;}
.kc-btn.kc-form{color:#2563eb;} */

/* PCでは少し控えめに */
/* @media (min-width: 1024px){
  .kc-sticky-bar{ height: 56px; }
} */

/* 追従バー分、下に余白を確保（安全域込み） */
/* body{
  padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
} */

/* foodtruckページ：フッター内のリンクだけをテーマ既定に戻す */
.single-foodtruck footer.wp-block-template-part a:where(:not(.wp-element-button)),
.post-type-archive-foodtruck footer.wp-block-template-part a:where(:not(.wp-element-button)){
  color: inherit;
  text-decoration: none;
}

/* ===== 在庫一覧 ===== */
.ft-archive{
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 16px;
}

.ft-card{
  margin-bottom: 32px;
}

.ft-card-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

.ft-card-img{
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
}

@media (max-width: 768px){
  .ft-card-img{
    aspect-ratio: 16 / 9;
  }
}

.ft-card-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ft-card-body{
  padding-top: 12px;
}

.ft-card-title{
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.ft-card-price{
  font-size: 22px;
  font-weight: 800;
}

.ft-card-price span{
    font-size: 33px;
    color:#ff3b30;
}

.ft-card-fuel{
  font-size: 13px;
  color: #555;
}

.ft-card-st{
  font-size: 13px;
  color: #555;
}

.ft-card-mile{
  font-size: 13px;
  color: #555;
}

/* 燃料・状況・走行距離 横並び */
.ft-card-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap; /* スマホで折り返す */
  margin: 6px 0 10px;
  font-size: 13px;
  color: #444;
}

/* 各項目をチップ風に */
.ft-card-meta > div {
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* スマホは少しコンパクトに */
@media (max-width: 768px) {
  .ft-card-meta {
    gap: 8px;
    font-size: 12px;
  }
}

/* ヘッダーのナビは theme の指定を優先 */
header.wp-block-template-part .wp-block-navigation a{
  color: var(--wp--preset--color--contrast) !important;
  text-decoration: none;
}

/* --- ヘッダーのブロックレイアウトを壊さない（foodtruck用CSSの副作用を打ち消す） --- */
header.wp-block-template-part :where(.is-layout-flex){
  gap: revert !important;
}

header.wp-block-template-part :where(.wp-block-navigation__container){
  gap: revert !important;
}

/* 念のため：ナビが詰まるときの保険 */
header.wp-block-template-part .wp-block-navigation{
  flex-wrap: wrap;
}

/* foodtruckページでもヘッダーはテーマ標準のgapを維持 */
body.single-foodtruck header.wp-block-template-part :where(.is-layout-flex),
body.post-type-archive-foodtruck header.wp-block-template-part :where(.is-layout-flex){
  gap: var(--wp--style--block-gap, 24px) !important;
}

/* ナビのコンテナ間隔も保険で維持 */
body.single-foodtruck header.wp-block-template-part .wp-block-navigation__container,
body.post-type-archive-foodtruck header.wp-block-template-part .wp-block-navigation__container{
  gap: 12px !important;
}

/* ===== foodtruckページ：ヘッダーのロゴとナビの間隔を強制修復 ===== */
body.single-foodtruck header.wp-block-template-part .wp-block-group.is-layout-flex,
body.post-type-archive-foodtruck header.wp-block-template-part .wp-block-group.is-layout-flex{
  display: flex !important;
  width: 100% !important;                /* これが無いと space-between が見えないことがある */
  justify-content: space-between !important;
  align-items: center !important;
  gap: 24px !important;                  /* blockGap相当の保険 */
}

/* ナビを必ず右へ（space-between が死んでても効く） */
body.single-foodtruck header.wp-block-template-part nav.wp-block-navigation,
body.post-type-archive-foodtruck header.wp-block-template-part nav.wp-block-navigation{
  margin-left: auto !important;
}

/* ロゴは縮まない */
body.single-foodtruck header.wp-block-template-part .wp-block-site-logo,
body.post-type-archive-foodtruck header.wp-block-template-part .wp-block-site-logo{
  flex: 0 0 auto !important;
}

/* =========================================
   PC：右側に縦固定 + ホバー
========================================= */
@media (min-width: 1024px){

  /* 右側・縦並びに固定 */
  .kc-sticky-bar{
    position: fixed !important;
    left: auto !important;
    right: 24px !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;

    width: 86px !important;
    height: auto !important;

    display: flex !important;
    flex-direction: column !important;  /* ★縦 */
    align-items: stretch !important;
    justify-content: center !important;

    padding: 28px 10px !important;      /* 縦長 */
    gap: 18px !important;

    border-radius: 18px !important;
    background: rgba(255,255,255,.95) !important;
    box-shadow: 0 12px 34px rgba(0,0,0,.18) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* ボタン（縦バー内） */
  .kc-sticky-bar .kc-btn{
    flex: none !important;
    height: 58px !important;
    border-radius: 14px !important;
    text-decoration: none !important;

    display:flex !important;
    flex-direction: column !important;
    align-items:center !important;
    justify-content:center !important;
    gap: 6px !important;

    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
  }

  /* ホバー */
  .kc-sticky-bar .kc-btn:hover{
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,.12);
    background: rgba(0,0,0,.04);
  }

  /* アイコン少し大きめ */
  .kc-sticky-bar .kc-ico img{
    width: 24px !important;
    height: 24px !important;
  }

  /* PCは下余白いらない（下固定バーではないため） */
  body{
    padding-bottom: 0 !important;
  }
}

/* ===================================
   一覧に戻る（ダークガラス）
=================================== */

.ft-back-btn-wrap{
  display:flex;
  justify-content:flex-end;
  margin-top:40px;
}

.ft-back-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:14px;

  padding:16px 42px;
  border-radius:999px;

  font-weight:700;
  font-size:14px;
  letter-spacing:.05em;

  text-decoration:none;
  color:#fff;

  /* ダークガラス */
  background:rgba(13,39,67,.55);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);

  border:1px solid rgba(255,255,255,.25);

  box-shadow:
    0 10px 30px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.15);

  transition:all .3s ease;
}

/* 外側グロー（うっすらネイビー） */
.ft-back-btn::before{
  content:"";
  position:absolute;
  inset:-3px;
  border-radius:999px;
  background:rgba(13,39,67,.5);
  z-index:-1;
  filter:blur(12px);
  opacity:.7;
}

/* 矢印 */
.ft-back-arrow{
  width:10px;
  height:10px;
  border-left:2px solid #fff;
  border-bottom:2px solid #fff;
  transform:rotate(45deg);
  transition:.3s ease;
}

/* ホバー */
.ft-back-btn:hover{
  transform:translateY(-4px);
  box-shadow:
    0 18px 40px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.25);
}

.ft-back-btn:hover .ft-back-arrow{
  transform:translateX(-6px) rotate(45deg);
}

.ft-back-btn:active{
  transform:translateY(-2px);
}

.wp-block-navigation-item {
  position: relative;
}

.wp-block-navigation-item__label {
  display: inline-block;
}

.wp-block-navigation-item::after {
  content: '';
  position: absolute;
  bottom: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: #003868;
  opacity: 0;
  transition: width 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.wp-block-navigation-item:hover::after {
  width: 100%;
  opacity: 1;
}

/* ========== Header fixed ========== */
header.wp-block-template-part {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

body {
  padding-top: 100px;
}

/* Header font size (mobile) */
@media screen and (max-width: 768px) {
  header.wp-block-template-part {
    font-size: 14px !important;
  }
  header.wp-block-template-part nav,
  header.wp-block-template-part nav a {
    font-size: 14px !important;
  }
}

/* Hamburger icon (mobile) */
@media screen and (max-width: 768px) {
  .wp-block-navigation__responsive-container-open svg {
    width: 30px !important;
    height: 30px !important;
  }
  .wp-block-navigation__responsive-container-open {
    width: 40px;
    height: 40px;
  }
}

/* PC: normal nav / Mobile: hamburger */
@media (min-width: 1026px) {
  .wp-block-navigation__container {
    display: flex !important;
  }
  .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
}

@media (max-width: 1025px) {
  .wp-block-navigation__container {
    display: none;
  }
  .wp-block-navigation__responsive-container-open {
    display: block !important;
  }

  .wp-block-navigation__responsive-container {
    width: 40vw;
    right: 0;
    left: auto;
    background-color: #d5e9f5;
  }

  .wp-block-navigation__responsive-container .wp-block-navigation-item__label {
    font-size: 110%;
  }

  .wp-block-navigation-item {
    text-align: right;
    display: flex;
    justify-content: flex-end;
    line-height: 1;
    margin-bottom: 0;
    padding-bottom: 0.25em;
    position: relative;
  }

  .wp-block-navigation-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 2px;
    background-color: #003868;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
    pointer-events: none;
  }

  .wp-block-navigation-item:hover::after {
    transform: translateX(-50%) scaleX(1.3);
    opacity: 1;
  }
}

.wp-block-navigation__responsive-container.has-modal-open {
  background-color: #8ec7ed !important;
}
