.slick-slide img {
	display: block;
	margin: 0 auto;
}
.rank_img img {
	width: 100%;
	aspect-ratio: 815/390;
}

.filip-parts-9 {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start; /* 左寄せ */
  gap: 10px; /* 画像の間に余白 */
}

.filip-parts-9 .con-3 {
  width: calc(33.333% - 10px); /* 3列固定 */
  box-sizing: border-box;
}

/* スマホ（600px以下）では2列に */
@media (max-width: 600px) {
  .filip-parts-9 .con-3 {
    width: calc(50% - 10px); /* 2列固定 */
  }
}

.title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
  border-bottom: 2px solid #000;
  display: inline-block;
  padding-bottom: 4px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* &#128241;スマホでも2列固定 */
  gap: 16px 24px;
}

.category-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  border-bottom: 1px solid #eee;
  padding: 12px 0;
  color: #333;
  transition: background 0.2s ease;
}

.category-item:hover {
  background: #fafafa;
}

.category-img img {
  width: 60px;
  height: 60px;
  border-radius: 6px; /* ← やわらかい印象の角丸 */
  object-fit: cover;
  margin-right: 12px;
}

.category-text {
  flex-grow: 1;
}

.category-text .jp {
  font-size: 15px;
  font-weight: 600;
}

.category-text .en {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

.arrow {
  font-size: 20px;
  color: #ccc;
  margin-left: 8px;
}

/* &#128207; レスポンシブ調整（タブレット以上で横2列→3列などに） */
@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}


/* ==== ランキング丸数字バッジ設定 ==== */

/* liをバッジ配置の基準にする */
.item_rank li {
  position: relative;
}

/* 「RANKING」文字を削除（不要な装飾をリセット） */
.item_rank li::before {
  content: none !important;
  display: none !important;
}

/* 数字の丸バッジ */
.item_rank li::after {
  content: counter(rank);
  counter-increment: rank;
  position: absolute;
  top: -10px;
  left: 8px;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  text-align: center;
  font-size: 18px;
  z-index: 10;
  background-color: #d2b061; /* 1位：ゴールド */
}

/* カウンター初期化 */
.item_rank {
  counter-reset: rank;
}

/* 2位・3位以降のカラー変更 */
.item_rank li:nth-child(2)::after {
  background-color: #bfbfbf; /* シルバー */
}

.item_rank li:nth-child(3)::after {
  background-color: #c47a39; /* ブロンズ */
}

/* 4位・5位は白＋グレー縁＋数字もグレー */
.item_rank li:nth-child(4)::after,
.item_rank li:nth-child(5)::after {
  background-color: #fff;
  color: #888;
  border: 2px solid #ccc;
}

/* PCで5個横並び */
@media (min-width: 1025px) {
  .item_rank {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .item_rank li {
    width: calc(20% - 8px);
  }
}

/* ===== スマホ用スライダー設定 ===== */
@media (max-width: 768px) {
  .item_rank {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 10px;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .item_rank li {
    flex: 0 0 calc(33.333% - 10px); /* 3列分の幅 */
    scroll-snap-align: start;
    width: auto;
  }

  /* スクロールバー非表示（任意） */
  .item_rank::-webkit-scrollbar {
    display: none;
  }
}

/* ===============================
   ランキング用（PC：5列／SP：スライダー）
================================== */

.item_rank {
  counter-reset: rank;
  width: 100%;
  box-sizing: border-box;
}

/* 各アイテム共通 */
.item_rank li {
  list-style: none;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  text-align: center;
}

.item_rank li img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

/* 丸数字バッジ */
.item_rank li::before {
  counter-increment: rank;
  content: counter(rank);
  position: absolute;
  top: 6px;
  left: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

/* バッジ色 */
.item_rank li:nth-child(1)::before { background: gold; color: #fff; }
.item_rank li:nth-child(2)::before { background: silver; color: #fff; }
.item_rank li:nth-child(3)::before { background: #cd7f32; color: #fff; }
.item_rank li:nth-child(4)::before,
.item_rank li:nth-child(5)::before {
  background: #fff;
  border: 2px solid #ccc;
  color: #888;
}

/* PC：5列固定 */
@media (min-width: 769px) {
  .item_rank {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .item_rank li {
    width: calc(20% - 8px) !important;
  }
}

/* SP：slickスライダー対応 */
@media (max-width: 768px) {
  .item_rank {
    display: block !important;
  }

  .item_rank li {
    width: 100%;
  }

  .item_rank .slick-slide {
    padding: 0 5px;
  }

  .item_rank .slick-list {
    margin: 0 -5px;
  }
}

/* === PCのランキング画像比率修正 === */
.item_rank li img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* PCで縦横比を一定に保つ */
@media (min-width: 769px) {
  .item_rank li {
    aspect-ratio: 1 / 1.1; /* 正方形に近い縦横比（お好みで調整可） */
    overflow: hidden;
  }
}

/* === スマホで丸数字が切れないように調整 === */
@media (max-width: 768px) {
  .item_rank li {
    padding-top: 5px; /* 上に余白追加 */
  }

  .item_rank li::after {
    top: 0;   /* 位置リセット */
    left: 6px;
    transform: translateY(0);
  }

  /* スライダー内の画像も余白確保 */
  .item_rank .slick-slide {
    padding-top: 10px;
  }
}

/* --- 丸数字の位置をさらに上へ（上端に近づける） --- */
.item_rank li::after {
  top: -8px !important; /* ←ここで微調整。もっと上げたければ -10px でもOK */
  left: 6px !important;
  z-index: 5;
}

/* --- テキスト（商品名・価格）をしっかり表示 --- */
.item_rank li {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible !important; /* ←隠れていたテキストを表示 */
}

.item_rank li img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 6px;
}

/* 商品名（長いテキスト対応） */
.item_rank li p,
.item_rank li h3 {
  display: block !important;
  text-align: center;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 4px 4px;
  white-space: normal; /* ←折り返しOK */
  overflow: visible;
}

/* 価格部分 */
.item_rank li h4 {
  font-weight: bold;
  font-size: 15px;
  color: #000;
  margin-top: 2px;
  display: block !important;
  text-align: center;
}

