/* --- ショップページ全体 --- */
#shop {
  width: 90%;
  max-width: 1000px; /* サイトの最大幅はお好みで調整してください */
  margin: 2rem auto; /* 上下の余白と、左右中央揃え */
  padding: 1rem;
}

#shop h2 {
  margin-bottom: 2rem;
  border-bottom: 2px solid #333; /* 見出しの下線 */
  padding-bottom: 0.5rem;
}

/* --- 商品グリッド --- */
.product-grid {
  display: grid;
  /* 画面幅に合わせて、1列の最小幅(280px)を保ちつつ、
    入るだけ自動で列を組むレスポンシブ対応の指定です。
  */
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; /* カード間の余白 */
}

/* --- 商品カード --- */
.product-card {
  border: 1px solid #eee; /* カードの枠線（控えめに） */
  border-radius: 8px; /* カードの角を丸くする */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* 控えめな影 */
  overflow: hidden; /* 画像が角丸からはみ出ないように */
  background-color: #ffffff; /* カードの背景色 */
  transition: box-shadow 0.3s ease, transform 0.2s ease; /* ホバー時のアニメーション */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.product-card:hover {
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); /* ホバーで影を少し濃く */
  transform: translateY(-2px);
}

/* --- 商品画像 --- */
.product-image {
  width: 100%;
  height: 220px; /* 高さを固定（画像の縦横比を揃えるため） */
  object-fit: cover; /* 画像の比率を保ったままエリアを埋める */
  display: block;
  border-radius: 6px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  color: #333;
  line-height: 1.5;
}

.product-price {
  font-size: 1rem;
  color: #555;
  margin: 0;
}

/* --- 購入ボタン --- */
.buy-button {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background-color: #333; /* サイトの基調色（黒） */
  color: #fff; /* 文字色（白） */
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s ease;
  margin-top: auto;
}

.buy-button:hover {
  background-color: #555; /* ホバーで少し明るい黒に */
}

/* --- 売り切れのスタイル --- */
.product-card.sold-out .product-image {
  opacity: 0.5; /* 画像を半透明に */
}

.sold-out-text {
  font-size: 1rem;
  font-weight: bold;
  color: #d9534f; /* 赤色で目立たせる */
  text-align: center;
  padding: 0.75rem;
  border: 2px solid #d9534f;
  border-radius: 5px;
  margin: 0;
}
