.section {
  width: 100%;
  text-align: center;
  margin-top: 50px;
}

.section h2 {
  font-size: 1.8em;
  color: #eb5a17;
  margin-top: 50px;
  margin-bottom: 10px;
  position: relative;
  padding-bottom: 10px;
  display: inline-block; /* 中央に表示 */
}

.section h2::before,
.section h2::after {
  content: "";
  position: absolute;
  top: 40%;
  width: 30%;
  height: 2px;
  background-color: #e70f0f;
}

.section h2::before {
  left: -35%; /* h2の左側にラインを引く */
}

.section h2::after {
  right: -35%; /* h2の右側にラインを引く */
}

@media (max-width: 580px) {
  .section h2::before,
  .section h2::after {
    display: none;
  }
}

.section p {
  display: block;  /* デフォルトのブロック表示に戻す */
  border-bottom: 1px solid #f56500;
  margin: 0 auto;  /* 余白の調整 */
  width: fit-content; /* 必要な幅だけにアンダーラインを引く */
  padding-bottom: 20px;
  max-width: 90%;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  /* カードが4つある場合は均等配置、少ない場合は左寄せ */
  gap: 20px;
  padding: 20px 10px;
  width: 1187px;
  max-width: 100%;
  margin-top: 50px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.product-card {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  /*枠の丸み*/
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
  /* カードを相対位置に設定 */
  overflow: visible;
  /* カードから飛び出す部分を表示 */
  margin: 28px 0 28px 0;
  /* マージンを設定 */
}

a.product-card,
a.product-card:link,
a.product-card:visited,
a.product-card:hover,
a.product-card:active,
a.product-card:focus,
a.product-card:focus-visible {
  text-decoration: none;
  text-decoration-line: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

a.product-card:hover {
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

a.product-card:focus-visible {
  outline: 2px solid #eb6100;
  outline-offset: 3px;
}

a.product-card h3,
a.product-card p,
a.product-card .price-footer {
  text-decoration: none;
}

.product-card img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid #ddd;
  border-radius: 8px 8px 0 0;
}

.product-card h3 {
  text-align: center;
  font-size: 1.2em;
  margin: 15px;
}

.product-card p {
  font-size: 0.9em;
  margin: 0 15px 15px;
  flex: 1;
  padding: 0px;
  border: none;
}


.btn--orange,
a.btn--orange {
  color: #fff;
  background-color: #eb6100;
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
}

.btn--orange:hover,
a.btn--orange:hover {
  background-color: #f56500;
  transform: translateY(-2px);
  /* ボタンが少し浮くアニメーション */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn--orange:active,
a.btn--orange:active {
  background-color: #d35400;
  transform: translateY(0);
  /* 押されたときは元の位置に戻る */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-footer {
  background-color: #eb6100;
  color: #fff;
  font-size: 1.1em;
  font-weight: bold;
  padding: 10px;
  text-align: center;
  border-radius: 0 0 8px 8px;
  margin-top: auto;
  /* フッターとして下部に配置 */
}

/* カード上部デザイン*/
.index-corner {
  position: absolute;
  top: 10px;
  /* カードの内側に収まるように調整 */
  left: 10px;
  /* 左端に少し余裕を持たせる */
  background-color: #9b59b6;
  color: #fff;
  font-size: 0.8em;
  padding: 5px 10px;
  border-radius: 5px;
  text-transform: uppercase;
  font-weight: bold;
  transform: rotate(-45deg) translate(-50%, -50%);
  /* 45度回転しつつ、少し内側に移動 */
  transform-origin: 30px -10px;
  /* 左上を基準に回転 */
  white-space: nowrap;
}


.index-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.index-badge {
  background-color: #e74c3c;
  color: #fff;
  font-size: 0.8em;
  padding: 5px 15px;
  border-radius: 20px;
  text-transform: uppercase;
  font-weight: bold;
  display: inline-block;
  position: relative;
}

.index-badge::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -10px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 10px solid #e74c3c;
  transform: translateY(-50%);
}

.index-tags {
  display: flex;
  gap: 1px;
  /* タグ間の隙間を設定 */
  position: absolute;
  /* カード内で絶対位置に設定 */
  top: -15px;
  /* カードの上から少し出るように設定 */
  left: 15px;
  /* 左からの距離 */
  width: calc(100% - 20px);
  /* 左右の余白を含む幅の設定 */
  z-index: -1;
  /* タグをカードの後ろに配置 */
}

.index-tag {
  background-color: #e74c3c;
  color: #fff;
  font-size: 0.9em;
  padding: 5px 12px;
  border-top: 2px solid #e74c3c;
  /* 上部のボーダーを設定 */
  border-radius: 10px 10px 0 0;
  /* 上部の左右の角を丸く */
  text-transform: uppercase;
  position: relative;
  transform: translateY(-50%);
  /* タグがカードから飛び出るように調整 */
  display: inline-block;
}

.index-tag2 {
  background-color: #8b4513;
  border-top: #8b4513;
  /* 上部のボーダーを設定 */
}

.index-tag3 {
  background-color: #800000;
  border-top: #800000;
  /* 上部のボーダーを設定 */
}

.index-tag-l {
  background-color: #3366ff;
  border-top: #3366ff;
  /* 上部のボーダーを設定 */
}
