.product-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 5px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #fff;
  width: 90%; /* 50%からgapを引いたサイズ感 */
  margin: 5px;
  box-sizing: border-box;
}

.product-card-content {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.product-image {
  width: 120px; /* 写真を固定幅に設定 */
  height: 120px; /* 写真を固定高さに設定 */
  object-fit: cover; /* 画像を枠にフィット */
  border-radius: 8px; /* 角を少し丸める */
  margin-right: 10px; /* 写真と右側コンテンツの余白 */
}

.product-details {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex-grow: 1; /* 残りのスペースを占有 */
}

.product-title {
  font-size: 12px; /* フォントサイズを少し小さく */
  margin: 5px 0;
  word-wrap: break-word;
  word-break: break-word; 
  white-space: normal;          /* ← 折り返しを許可 */
  overflow: hidden; /* はみ出した部分を隠す */
  text-overflow: ellipsis; /* 省略記号 (...) を表示 */
  width: 100%;                  /* カード内で最大限広がるように */
  max-width: 100%;
  text-align: left; /* 左寄せ */
  display: block;
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* 最大2行で省略 */
  -webkit-box-orient: vertical;
}

.price-rating-container {
  display: flex; /* 横並びに配置 */
  align-items: center; /* 縦方向の揃え方を中央に */
  justify-content: space-between; /* 子要素間のスペースを調整（必要に応じて変更） */
  gap: 10px; /* 価格と評価の間の隙間 */
}

.product-price {
  font-size: 14px; /* フォントサイズを少し小さく */
  font-weight: bold;
  margin: 2px;
}

.product-container {
  display: flex;
  flex-direction: column; /* 縦に並べる */
  max-height: 50vh; /* 商品カードエリアの高さをビューポートの50%に設定 */
  overflow-y: auto; /* 縦スクロールを有効化 */
  background-color: #eeeeee;
  width: 100%;
  padding-bottom: 100px;
}

.rating {
  display: flex; /* 星アイコンと評価値も横並びに */
  font-size: 10px;
  align-items: center;
  gap: 3px;
}

.rating-value {
  font-weight: bold;
  color: #ffb906; /* ゴールド */
}

.review-count {
  color: #666666; /* グレー寄り */
  font-size: 10px;
}
.star {
  font-size: 10px;
  color: #c4c4c4; /* デフォルトはグレー */
  margin-right: -2px; /* 星間をさらにコンパクトにする */
  letter-spacing: -1px; /* 星同士の間隔を詰める */
}

.star.full {
  color: #ffb906; /* 完全な★はゴールド */
}

.star.half {
  background: linear-gradient(to right, #ffb906 50%, #c4c4c4 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.star.empty {
  color: #c4c4c4; /* 空の★はグレー */
}

/*リンクアイコン*/
.product-links {
  display: flex;
  margin-right: 10px; /* 写真と右側コンテンツの余白 */
  margin-top: 5px;
}

.product-links a {
  text-decoration: none;
}

/*セリフボタン*/
.generate-recommendation {
  display: flex;
  align-items: center; /* アイコンとテキストを縦方向中央揃え */
  justify-content: center; /* 横方向も中央配置 */
  width: 100%;
  height: 30px;
  background-color: #BF0000; /* 背景色 */
  color: #FFF; /* 文字色 */
  border: none; /* デフォルトの枠線を削除 */
  border-radius: 8px; /* 角丸 */
  padding: 8px 12px; /* 上下・左右の余白 */
  font-size: 12px; /* 文字サイズ */
  cursor: pointer; /* マウスオーバー時にカーソル変更 */
  transition: background-color 0.3s ease; /* 背景色のスムーズな変化 */
  margin-top: 5px;
}

.generate-recommendation:hover {
  background-color: #8F0000; /* ホバー時に少し濃い色 */
}