/* ===============================
   共通
================================ */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* ===============================
   商品詳細ページ
================================ */
.product-detail {
  padding: 80px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* パンくず */
.breadcrumb {
  font-size: 14px;
  margin-bottom: 20px;
}

.breadcrumb a {
  text-decoration: none;
  color: #666;
}

/* タイトル */
.product-title {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ddd;
}

/* 2カラム */
.product-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* 左画像 */
.product-images {
  flex: 1;
}

.product-images img {
  width: 100%;
  margin-bottom: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 右情報 */
.product-info {
  flex: 1;
}

/* 概要 */
.product-description {
  margin-bottom: 30px;
}

/* 表 */
.product-spec {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 30px;
  background: #fff;
}

.product-spec th {
  background: #f5f5f5;
  padding: 12px;
  width: 35%;
  text-align: left;
}

.product-spec td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

/* 戻るボタン */
.back-btn {
  text-align: center;
}

.back-btn a {
  display: inline-block;
  padding: 10px 20px;
  border: 1px solid #333;
  text-decoration: none;
  color: #333;
  transition: 0.3s;
}

.back-btn a:hover {
  background: #333;
  color: #fff;
}

/* ===============================
   スマホ
================================ */
@media (max-width: 768px) {

  .product-wrapper {
    flex-direction: column;
  }

  .product-title {
    font-size: 22px;
  }

}

/* ===============================
   関連商品
================================ */
.related-products {
  padding: 80px 0;
  background: #f7f7f7;
}

.related-title {
  text-align: center;
  margin-bottom: 40px;
  font-size: 24px;
  position: relative;
}

.related-title:after {
  content: "";
  display: block;
  width: 60px;
  height: 2px;
  background: #333;
  margin: 10px auto 0;
}

/* ★ここをflex → gridに変更 */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* カード */
.related-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: 0.3s;
}

.related-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.related-card p {
  padding: 15px;
  text-align: center;
  font-weight: bold;
}

.related-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

/* ===============================
   タブレット（2列）
================================ */
@media (max-width: 992px) {
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===============================
   スマホ（1列）
================================ */
@media (max-width: 576px) {
  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-card img {
    height: 220px;
  }
}