@charset "utf-8";
/* RANKINGセクション 全体スタイル */
.ranking-section {
  padding: 40px 0;
  text-align: center;
  background-color: #f5f5f5;
}

/* タイトル */
.ranking-title {
  font-size: 1.8em;
  margin-bottom: 30px;
  letter-spacing: 0.05em;
}

/* ランキング全体を囲むエリア */
.ranking-wrapper {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden; /* スマホ時のズレ防止 */
}

/* ===== PC（5列グリッド） ===== */
@media (min-width: 769px) {
  .ranking-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    justify-items: center;
  }

  .ranking-item {
    width: 200px;
    text-align: center;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 0;
    padding: 10px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
  }

  .ranking-item:hover {
    transform: none; /* hoverしても動かない */
  }

  .ranking-item img {
    width: 100%;
    height: auto;
    display: block;
  }

  .rank-num {
    font-size: 1.5em;
    color: #a5937b;
    font-weight: bold;
    margin-bottom: 6px;
  }

  .copy {
    font-size: 0.9em;
    color: #333;
    margin-top: 8px;
  }

  .price {
    color: #000;
    margin-top: 4px;
  }
}

/* ===== スマホ（カルーセル風） ===== */
@media (max-width: 768px) {
  .ranking-grid {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    transition: transform 0.4s ease-in-out;
    will-change: transform;
  }

  .ranking-item {
    flex: 0 0 300px; /* ← ここを300pxに変更 */
    width: 300px;    /* ← 明示的に幅を指定 */
    box-sizing: border-box;
    text-align: center;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 0;
    padding: 10px;
    height: 300px;   /* ← ボックスの高さも指定 */
  }

  .ranking-item img {
    width: auto;
    height: 75%;
    display: block;
    margin: 0 auto;
  }

  .rank-num {
    font-size: 1.4em;
    color: #a5937b;
    font-weight: bold;
    margin-bottom: 6px;
  }

  .copy {
    font-size: 0.9em;
    color: #333;
    margin-top: 8px;
  }

  .price {
    color: #000;
    margin-top: 4px;
  }
}
