.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* デフォルトは3列 */
    gap: 16px;  /* アイテム間のスペース */
}

/* 各アイテム */
.news-item {
    text-align: center;
}

/* アイキャッチ画像の設定 */
.news-item img {
    width: 100%;      /* 横幅を100%に設定 */
    height: auto;     /* 高さは自動で調整 */
    max-width: 100%;  /* 親要素の幅に合わせて最大サイズを制限 */
    object-fit: cover; /* 画像の縦横比を保ちながら調整 */
    border-radius: 8px; /* 画像に角丸をつける（任意） */
}

/* 商品一覧の画像 */
.p-ranking-list__img {
    width: 100%;
    height: 0;
    padding-bottom: 66.66%; /* 3:2のアスペクト比 */
    background-color: #fff; /* 背景を白に */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 画像がはみ出さないように */
    position: relative; /* 子要素を中央に配置するために必要 */
}

/* 商品画像 */
.p-ranking-list__img img {
    width: auto; /* 横幅を自動調整 */
    height: 100%; /* 高さを親要素に合わせる */
    max-height: 100%; /* 最大高さを親要素に合わせる */
    object-fit: contain; /* 縦横比を保ちつつ画像を親要素に収める */
    object-position: center; /* 画像を中央に配置 */
    position: absolute; /* 画像を中央に絶対配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 画像を中央に持ってくる */
    border-radius: 0; /* 画像の角を四角にする */
}

/* タイトルの設定 */
.news-item h3 {
    font-size: 1.2em;
    margin-top: 8px;
}

/* スマホ表示（画面幅が600px以下の場合、1列に変更） */
@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;  /* 1列表示 */
    }

    .news-item h3 {
        font-size: 1em;  /* スマホではフォントサイズを少し小さく */
    }
}

/* 画像の最大幅設定 */
.news-item img {
    width: 100%; /* 横幅100% */
    height: auto; /* 高さは自動調整 */
    max-width: 100%; /* 最大幅は親要素に合わせる */
}

/* 基本スタイル */
.p-ranking {
    margin: 0 auto;
    padding: 0px 0;
}

.p-ranking .c-ttl-main {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.p-ranking .c-ttl-main__ja {
    font-size: 16px;
    display: block;
    margin-top: 5px;
    color: #777;
}

/* ランキングリストのスタイル */
.p-ranking-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);  /* パソコンでは4列 */
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.p-ranking-list__item {
    background-color: transparent;  /* 背景なし */
    border: none;  /* ボーダーなし */
    border-radius: 5px;
    text-align: center;
    /* ホバー時の動きや影を削除 */
    transition: none;
  margin-bottom: 8px;
}

/* 画像の角を四角に */
.p-ranking-list__txt {
    text-align: left;
}

.p-ranking-list__num {
    display: none;  /* ランキング番号を非表示 */
}

.p-ranking-list__ttl {
    font-size: 12px;
    font-weight: 600;
    color: #464e54;
    margin-bottom: 10px;
    line-height: 1;
  padding-top: 16px;
}

.p-ranking-list__price {
    font-size: 14px;
    color: #888;
    margin-top: 10px;
}

.p-ranking-list__price.is-discount {
    color: #e74c3c;
}

.p-ranking-list__price.is-soldout {
    color: #888;
    font-size: 14px;
}

/* レスポンシブ対応（スマホ） */
@media (max-width: 767px) {
    .p-ranking-list {
        grid-template-columns: repeat(2, 1fr);  /* スマホでは2列表示 */
    }

    .p-ranking-list__img img {
        width: 100%;  /* スマホでは画像を親要素の幅に合わせる */
    }

    .p-ranking-list__num {
        font-size: 16px;
    }

    .p-ranking-list__ttl {
        font-size: 12px;
    }

    .p-ranking-list__price {
        font-size: 14px;
    }
}

/* 基本のレイアウト（PC用） */
.container2 {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px;
}

/* 画像カラムのスタイル */
.image-column2 {
  width: 45%;  /* PC用に45%幅 */
  padding: 30px;
  box-sizing: border-box;
  text-align: center;
}

/* 画像のサイズ調整 */
.image-column2 img {
  width: 100%;
  height: auto;
}


/* レスポンシブ対応：スマホ表示 */
@media screen and (max-width: 767px) {
  .container2 {
    flex-direction: column; /* カラムを縦並びに変更 */
    gap: 10px; /* 画像の間隔を少し狭く */
  }

  .image-column2 {
    width: 100%; /* スマホ用に幅を100%に設定 */
    padding: 10px; /* スマホ用にパディングを少し小さく */
  }
}




/* 基本のレイアウト（PC用） */
.container3 {
  display: flex;
  justify-content: space-between; /* カラム間の間隔を均等に */
  gap: 20px;
 }

/* 画像カラムのスタイル */
.image-column3 {
  width: 33.3%;  /* PC用に30%幅に設定して3カラム表示 */
  padding: 10px;
  box-sizing: border-box;
  text-align: center;
}

/* 画像のサイズ調整 */
.image-column3 img {
  width: 100%;
  height: auto;
}

/* レスポンシブ対応：スマホ表示 */
@media screen and (max-width: 767px) {
  .container3 {
    flex-direction: column; /* カラムを縦並びに変更 */
    gap: 10px; /* カラム間の間隔を少し狭く */
  }

  .image-column3 {
    width: 100%; /* スマホ用に幅を100%に設定 */
    padding: 10px; /* スマホ用にパディングを少し小さく */
  }
}


/* おすすめ商品画像の調整 */
.recommend-image {
    width: 100%;
    height: 0;
    padding-bottom: 66.66%; /* 3:2のアスペクト比 */
    background-color: #fff; /* 背景を白に */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* 画像がはみ出さないように */
    position: relative; /* 子要素を中央に配置するために必要 */
}

/* 商品画像 */
.recommend-image img {
    width: auto; /* 横幅を自動調整 */
    height: 100%; /* 高さを親要素に合わせる */
    max-height: 100%; /* 最大高さを親要素に合わせる */
    object-fit: contain; /* 縦横比を保ちつつ画像を親要素に収める */
    object-position: center; /* 画像を中央に配置 */
    position: absolute; /* 画像を中央に絶対配置 */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* 画像を中央に持ってくる */
    border-radius: 0; /* 画像の角を四角にする */
}

/* 以下、他の既存のCSSコードはそのまま使ってください */


/* 映像・画像を16:9で表示 */
#wrapperwbase {
    position: relative;
    width: 100%;
}
#wrapperwbase:before {
    content:"";
    display: block;
    padding-top: 56.25%; /* 高さと幅の比を16:9に固定。9/16*100=56.25 */
}
#contentwbase {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

