/* つくり手のストーリー詳細ページのスタイル */

/* 戻るボタン */
.back-button {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px 6px 12px;
  background-color: #F7F4EF;
  border: 1px solid #EDE6E0;
  border-radius: 2px;
  color: #6E767D;
  font-size: 12px;
  text-decoration: none;
  width: fit-content;
  margin-top: 16px;
  margin-bottom: 16px;
}

.back-icon {
  width: 16px;
  height: 16px;
}

/* ストーリー詳細 */
.story-detail {
  max-width: 800px;
  margin: 32px auto 0;
  padding: 0 80px;
}

/* ヒーローセクション */
.hero-section {
  background-color: #FFFFFF;
  border: 1px solid #EDE6E0;
  padding: 32px;
  margin-bottom: 2px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-text {
  flex: 1;
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 500;
  color: #6E767D;
  margin: 0 0 4px 0;
  line-height: 1.5;
}

.hero-title {
  font-size: 26px;
  font-weight: 700;
  color: #6E767D;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.hero-company {
  font-size: 16px;
  font-weight: 400;
  color: #6E767D;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  font-size: 12px;
  color: #6E767D;
  background-color: #FFFFFF;
  border: 1px solid #EDE6E0;
  border-radius: 2px;
  padding: 4px 12px;
}

/* 写真を元の比率のまま表示する（見切れ防止） */
.hero-image {
  display: block;
  flex: none;
  width: 100%;
  height: auto;
}

/* ストーリーセクション */
.story-section {
  background-color: #FFFFFF;
  border: 1px solid #EDE6E0;
  padding: 32px;
  margin-bottom: 32px;
}

.story-text {
  font-size: 14px;
  line-height: 1.5;
  color: #6E767D;
  margin-bottom: 24px;
}

/* 動的コンテンツのスタイル */
.story-section p {
  font-size: 14px;
  line-height: 1.5;
  color: #6E767D;
  margin-bottom: 24px;
}

.story-section h2 {
  font-size: 20px;
  font-weight: 500;
  color: #6E767D;
  margin: 0 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #6E767D;
  line-height: 1.5;
}

.story-section img {
  width: 100%;
  height: auto;
  margin-bottom: 24px;
  border-radius: 5px;
  margin-top: 16px;
}

.story-section video {
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-bottom: 24px;
  border-radius: 5px;
}

.story-section span[style*="font-weight: 400"] {
  font-weight: 400;
}

.story-section span[style*="font-weight: 700"],
.story-section b,
.story-section strong {
  font-weight: 700;
}

.story-image {
  width: 100%;
  height: 400px;
  margin-bottom: 24px;
  background-size: cover;
  background-position: center;
  border-radius: 5px;
}

.story-image-1 {
  background-image: url('/img/recommend_sample_img.jpg');
}

.story-image-2 {
  background-image: url('/img/recommend_sample_img2.jpg');
}

.story-image-3 {
  background-image: url('/img/recommend_sample_img3.jpg');
}

.story-image-4 {
  background-image: url('/img/recommend_sample_img.jpg');
}

.story-image-5 {
  background-image: url('/img/recommend_sample_img2.jpg');
}

.story-subtitle {
  font-size: 20px;
  font-weight: 500;
  color: #6E767D;
  margin: 0 0 20px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #6E767D;
  line-height: 1.5;
}

.story-video {
  width: 100%;
  height: 400px;
  background-color: #000;
  background-image: url('/img/recommend_result_bg.png');
  background-size: cover;
  background-position: center;
}

/* 商品ラインナップ */
.product-lineup {
  background-color: #FFFFFF;
  border: 1px solid #EDE6E0;
  padding: 16px;
}

.product-lineup.last {
  padding: 32px;
  margin-bottom: 32px;
}

.lineup-title {
  font-size: 24px;
  font-weight: 400;
  color: #6E767D;
  text-align: center;
  margin: 0;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 16px;
}

.product-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.product-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.12);
}

.product-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
  transform: scale(1.05);
}

.product-image-1 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-2 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-3 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-4 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-5 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-6 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-image-7 {
  background-image: url('/img/product_sample_img.jpg');
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-name {
  font-size: 16px;
  font-weight: 500;
  color: #6E767D;
  margin: 0;
  line-height: 1.5;
}

.product-price {
  font-size: 14px;
  font-weight: 500;
  color: #6E767D;
  margin: 0;
  line-height: 1.5;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {

  .back-button-container,
  .story-detail {
    padding: 0 16px;
  }

  .hero-section,
  .story-section {
    padding: 16px;
  }

  .product-lineup.last {
    padding: 0px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .story-image,
  .story-video {
    height: 250px;
  }
}

@media (max-width: 576px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* スクロール追従ボタン */
.floating-button {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 100;
}

.view-products-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #D5C1B8;
  color: #FFFFFF;
  border: none;
  border-radius: 2px;
  padding: 12px 24px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.714em;
  letter-spacing: 1.4%;
  cursor: pointer;
  box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.14),
    0px 5px 8px 0px rgba(0, 0, 0, 0.06),
    0px 2px 4px 0px rgba(0, 0, 0, 0.04);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.view-products-button:hover {
  background-color: #C6B0A6;
  transform: translateY(-2px);
}

.view-products-button svg {
  flex-shrink: 0;
}
