.wrap {
  max-width: 750px;
  margin: 0 auto;
}

.title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    /* padding: 1.5rem 2rem; */
    /* border: 1px solid #333; */
    
}

.title-text {
    margin-bottom: 3rem;
    text-align: center;
    line-height :2rem;

}


/* 目次 */
.toc {
    margin-bottom: 7rem;
    border: 2px solid #333;
    border-radius: 3px;
}

.toc div {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 10px 0;
    background-color: #333;
    color: #fff;
    font-weight: 600;
    font-size: 1.1em;
}

.toc div::before {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 5px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 4H21V6H8V4ZM3 3.5H6V6.5H3V3.5ZM3 10.5H6V13.5H3V10.5ZM3 17.5H6V20.5H3V17.5ZM8 11H21V13H8V11ZM8 18H21V20H8V18Z' fill='%23fff'%3E%3C/path%3E%3C/svg%3E");
    content: '';
}

.toc ol {
    list-style-type: decimal;
    margin: 0;
    overflow: hidden;
}

.toc > ol {
    padding: 1em 1em 1em 3em;
}

.toc ol ol {
    margin-top: 5px;
    padding-left: 1.1em;
}

.toc li {
    padding: 5px 0;
    font-weight: 600;
}

.toc ol ol li {
    font-weight: 500;
    font-size: .9em;
}

.toc a {
    color: #333;
    text-decoration: none;
}
.toc a :hover {
    color: #aaa;
    text-decoration: none;
}




/* 商品 */
.item {
  margin-bottom: 7rem;
}

.item_title {
  display: flex;
  flex-direction: column; /* ← 常に縦並び */
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 1.5rem;
  font-weight: 600;
  padding: 1rem 2rem;
  border-top: 3px double #333;
  border-bottom: 3px double #333;
  background-color: #f5f5f5;
  margin-bottom: 2rem;
  text-align: center;
}

.item_title span {
  border-radius: 10px;
  background: #333;
  color: #fff;
  font-size: 1.2rem;
  padding: 0.3rem 1.2rem;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.item_title p {
  color: #fff;
  padding: 0.2rem;
  width: 200px;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  background-color: #333;
}

a.item_links {
  background-color: #333;
  text-align: center;
  /* border: 0.14rem solid #333; */
  border-radius: 9999px;
  margin-top: 1.5rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  display: inline-block; /* PCでの表示方法 */
  padding: 1em 7em; /* PCでの余白設定 */
  line-height: 2;
}

a.item_links:hover {
  text-align: center;
  opacity: 0.6;
}

/* PC用（デフォルト） */
.item_wrap {
  display: flex;
  align-items: flex-start; /* 縦位置も安定 */
  justify-content: center; /* 中央寄せ */
  gap: 2rem; /* 画像と説明文の間隔 */
}

/* スライダーエリア */
.item_slider {
  flex-shrink: 0;
  width: 350px;
  margin: 0 auto;
}
/* .item_slider {
  flex-shrink: 0;
  width: 350px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
} */

/* slick本体 (メイン画像コンテナ) */
.slick {
  width: 350px;
  aspect-ratio: 1 / 1; /* ✅ 正方形のコンテナに統一 */
  margin: 0 auto 1rem auto;
  overflow: hidden;
}

.slick div img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ どんな画像でも全体を表示 */
  border-radius: 5px;
  background-color: #fff;
}

/* サムネ：必ず正方形。長辺フィット・短辺は縮小（非トリミング） */
:root { --thumb: 70px; }                /* サムネ1辺のサイズ。必要なら数値だけ変更 */

.thumbnail{
  width: 350px;                         /* PC幅。スマホは既存の @media で 100% にしてOK */
  margin: 0 auto;
}

/* slick が入れるリスト・トラックの高さを正方形に固定し、折り返し禁止 */
.thumbnail .slick-list,
.thumbnail .slick-track{
  height: var(--thumb) !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  margin: 0 !important;
  overflow: hidden;
}

/* 各スライド枠を正方形に固定。中央配置 */
.thumbnail .slick-slide{
  width: var(--thumb) !important;
  height: var(--thumb) !important;
  float: none !important;
  display: grid !important;
  place-items: center;
  margin: 0 !important;
  overflow: hidden;
  background: #fff;                     /* 余白が出たときの背景色（任意） */
  border-radius: 5px;
}

/* slick のスライド中の div にも正方形を継承（環境差での高さズレ防止） */
.thumbnail .slick-slide > div{
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

/* 画像は“長辺”を合わせ、短辺は縮小。トリミングしない（contain） */
.thumbnail .slick-slide img{
  width: auto;                          /* 伸ばさない */
  height: auto;
  max-width: 100%;                      /* 枠を超えない */
  max-height: 100%;
  object-fit: contain;                  /* ← 非トリミングで収める */
  display: block;
}

/* （任意）アクティブ状態の見た目を変えたい場合はここで */
.thumbnail .swiper-slide-thumb-active { opacity: 1; }

.item_detail-name {
margin: 0 0 1rem 0;
font-size: 1.5rem;
font-weight: 600;
line-height: normal;
}

.swiper-wrapper {
  height: auto;
}




@media screen and (max-width: 640px) {
.wrap {
    max-width: 100%;
    padding: 0 1rem;
  }

  .item_wrap {
    flex-direction: column; /* 画像とテキストを縦並びに */
  }

  /* 商品ページボタン */
  a.item_links {
    display: block;
    padding: 1em 1em;
  }

  .contents_page-img {
    width: 100%;
    height: auto;
  }

.item_title {
  font-size: 1.5rem;
  font-weight: 600;
}

  .item_detail-name {
font-size: 1.5rem;
font-weight: 600;
line-height: normal;
}

  .thumbnail{ width: 100% !important; }
  /* サムネを少し小さくしたいときは下の行のコメントを外して調整 */
  /* :root{ --thumb: 64px; } */

}