.l-product_list-categories .c-accordion > a {
  font-size: clamp(12px, 1.2vw, 18px); /* ←最小12px、通常vw基準、最大18px */
  color: gray;
  background-color: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;

  height: 60px;
  box-sizing: border-box;

  white-space: normal;   /* 折り返し許可 */
  word-break: break-word; /* 単語途中でも折る */
}

/* スマホ画面幅のときに大きめに上書き */
@media screen and (max-width: 767px) {
  .l-product_list-categories .c-accordion > a {
    font-size: clamp(14px, 3.5vw, 20px); 
    /* 最小14px, ビューポート基準で可変, 最大20px */
  }
}

.l-product_list-categories .c-accordion > a::before {
  border-radius: 4px;
}
.c-message1 {
  margin: 0px;
}

/* 読み込み時に開ける */
*:not(.c-drawer) .l-product_list-categories .c-accordion {
  display: flex; /* block->flex */
  flex-wrap: wrap;
  gap: 6px; /* ← column-gap:5px から gap:6px に修正 */
}

@media screen and (max-width:767px) {
  *:not(.c-drawer) .c-accordion > a {
    width: calc((100% - 6px) / 2);   /* ← 小数が出ない式に修正 */
    flex: 0 0 calc((100% - 6px) / 2);/* 旧flex指定の影響を消す */
    margin: 0;
  }
}

/* パンくずをタイトルに */
.c-breadcrumb2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
}

.c-breadcrumb2 > * {
  position: relative;
  font-size: clamp(18px, 3vw, 24px); /* 通常はh2相当、狭いときだけ縮小 */
  font-weight: bold;
  line-height: 1.4;
  padding-top: 1.5em;
  color: #003366;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90vw;
  display: inline-block;
  text-align: center;
}

.c-breadcrumb2 > *:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%) rotate(135deg);
  width: 6px;
  height: 6px;
  border-top: 2px solid #003366;
  border-right: 2px solid #003366;
}
/* ==== 小カテゴリー/小グループ：ズレ完全排除（見た目は触らない） ==== */
@supports (display: grid) {
  /* コンテナは Grid に強制。gap だけ定義（偶数pxで端数ゼロ） */
  .l-product_list-categories .c-accordion{
    display: grid !important;
    gap: 6px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* SP: 2列 */
  }
  @media (min-width:768px){
    .l-product_list-categories .c-accordion{
      grid-template-columns: repeat(3, minmax(0, 1fr)); /* TB: 3列 */
    }
  }
  @media (min-width:1200px){
    .l-product_list-categories .c-accordion{
      grid-template-columns: repeat(4, minmax(0, 1fr)); /* PC: 4列 */
    }
  }

  /* 各項目の旧flex残骸を無効化（見た目は触らない） */
  .l-product_list-categories .c-accordion > a{
    width: auto !important;
    margin: 0 !important;
    flex: initial !important;
    min-width: 0 !important;   /* テキスト長でのはみ出し防止 */
    box-sizing: border-box !important;
  }

  /* 旧テーマが nth-child で左右マージン付与している場合の潰し（保険） */
  .l-product_list-categories .c-accordion > a:nth-child(n){
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* 1) ブロック間の外側マージンを詰める */
.l-content.isPage .c-message1{ margin-bottom: 8px !important; }
.l-content.isPage .c-message1 + .c-breadcrumb2{ margin-top: 0 !important; }

/* 2) パンくずの“上余白”を少し減らす（見た目のスキマ解消） */
.l-content.isPage .c-message1 + .c-breadcrumb2 > *{
  padding-top: .8em !important;   /* ← 1.5em → 0.8em に */
}

/* 矢印マークの位置も合わせて微調整 */
.l-content.isPage .c-message1 + .c-breadcrumb2 > *:not(:first-child)::before{
  top: 2px !important;            /* ← 5px → 2px に */
}