@charset "UTF-8";

/* コーヒー商品セクションのcss設定 */
.product_section {
  width: 100%;
  background-color: var(--bg-beige);
  padding-bottom: 100px;
}
@media screen and (max-width: 768px) {
  .product_section {
    padding-bottom: 0px;
  }
}

/* コーヒー商品セクションの内側設定 */
.pt_inner {
  max-width: min(80.55vw, 1160px);
  margin-inline: auto;
  padding-top: min(6.94vw, 100px);
}
@media screen and (max-width: 768px) {
  .pt_inner {
    max-width: 100%;
    padding-top: min(12.7vw, 100px);
    padding-inline: min(5.2vw, 40px);
    margin-inline: unset;
  }
  @media screen and (max-width: 430px) {
    .pt_inner {
      padding-top: min(23.2vw, 100px);
      padding-inline: min(6.97vw, 30px);
    }
  }
}

/*　商品紹介のタイトル*/
.pt_title_wrapper {
  margin-bottom: min(4.16vw, 60px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 0;
}

.pt_subtitle {
  grid-column: 1;
  grid-row: 1;
}

.pt_title {
  grid-column: 1;
  grid-row: 2;
}

.all_btn {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
}

.pt_subtitle {
  font-size: min(1.38vw, 20px);
  font-weight: 500;
  color: var(--gold--);
}
@media screen and (max-width: 768px) {
  .pt_subtitle {
    font-size: min(2.54vw, 20px);
  }
  @media screen and (max-width: 430px) {
    .pt_subtitle {
      font-size: min(3.48vw, 15px);
    }
  }
}

.pt_title {
  position: relative;
  font-size: min(3.47vw, 50px);
  font-weight: 700;
  color: var(--text-color);
}
.pt_title::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 60px;
  height: 4px;
  margin-left: min(1.39vw, 20px);
  background-color: var(--text-color);
}
@media screen and (max-width: 768px) {
  .pt_title {
    font-size: min(3.9vw, 30px);
  }
  @media screen and (max-width: 430px) {
    .pt_title {
      font-size: min(4.65vw, 20px);
    }
  }
}

/*商品一覧ページへのリンク*/
.all_btn {
  display: inline-block;
  font-size: min(1.38vw, 20px);
  font-weight: 500;
  color: var(--text-color);
  margin-top: min(1.38vw, 20px);
  padding: min(0.83vw, 12px) min(1.66vw, 24px);
  border: 2px solid var(--text-color);
  border-radius: min(0.35vw, 5px);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
@media screen and (max-width: 768px) {
  .all_btn {
    font-size: min(1.95vw, 15px);
  }
  @media screen and (max-width: 430px) {
    .all_btn {
      font-size: min(2.32vw, 10px);
    }
  }
}

.all_btn::after {
  content: "→";
  margin-left: min(0.69vw, 10px);
  transition: transform 0.3s ease;
  display: inline-block;
}

/* ホバー可能なデバイスのみ（タッチパネル除外） */
@media (hover: hover) and (pointer: fine) {
  .all_btn:hover::after {
    transform: translateX(5px);
    color: var(--text-color);
  }
}

/* 商品紹介のアニメーションとボタン共通*/
.product_carousel_container {
  position: relative;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden; /* はみ出た部分を隠す */
}
@media screen and (max-width: 768px) {
  .product_carousel_container {
    max-width: 100%;
    padding-inline: min(5.2vw, 40px);
    margin-inline: unset;
  }
  @media screen and (max-width: 430px) {
    .product_carousel_container {
      padding-inline: min(6.97vw, 30px);
    }
  }
}

/* ボタンのラッパー */
.carousel_control_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: min(1.38vw, 20px);
  margin-top: min(2.77vw, 40px);
}

/* 前へ・次へボタン */
.carousel_btn {
  width: min(3.47vw, 50px);
  height: min(3.47vw, 50px);
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(1.38vw, 20px);
  transition: background-color 0.3s ease;
  touch-action: manipulation; /* ダブルタップズーム防止 */
}

.carousel_btn:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* 再生・停止ボタン */
.carousel_control {
  width: min(3.47vw, 50px);
  height: min(3.47vw, 50px);
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: min(1.38vw, 20px);
  transition: background-color 0.3s ease;
  touch-action: manipulation; /* ダブルタップズーム防止 */
}

.carousel_control:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.carousel_control .play_icon {
  display: none;
}

.carousel_control .pause_icon {
  display: block;
}

.carousel_control.paused .play_icon {
  display: block;
}

.carousel_control.paused .pause_icon {
  display: none;
}

/* 商品紹介のアニメーション内側設定 */
.product_card_wrapper {
  display: flex;
  gap: min(1.38vw, 20px);
  animation: scrollCards 40s linear infinite;
  transition: transform 0.5s ease;
}

.product_card_wrapper.paused {
  animation-play-state: paused;
}

.product_card_wrapper.manual-control {
  animation: none; /* 手動操作時はアニメーション無効 */
}

.product_card {
  flex-shrink: 0;
  width: min(20.83vw, 300px);
  background-color: white;
  border-radius: min(0.69vw, 10px);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.product_card:hover {
  transform: translateY(-5px);
}

.product_card img {
  width: 100%;
  height: min(20.83vw, 300px);
  object-fit: cover;
}

.product_card h3 {
  padding: min(1.38vw, 20px);
  font-size: min(1.38vw, 20px);
  font-weight: 700;
}

.detail_wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product_card p {
  padding: 0 min(1.38vw, 20px) min(1.38vw, 20px);
  font-size: min(1.11vw, 16px);
  color: #666;
}

/* 商品詳細ボタン */
.detail_pro a {
  color: var(--text-color);
  font-size: min(0.83vw, 12px);
  font-weight: 700;
  padding: min(0.69vw, 10px);
  border: 1px solid var(--text-color);
  border-radius: min(0.35vw, 5px);
  text-decoration: none;
}
@media screen and (max-width: 768px) {
  .detail_pro a {
    font-size: min(1.56vw, 12px);
    padding: min(1.3vw, 10px);
  }
  @media screen and (max-width: 430px) {
    .detail_pro a {
      font-size: min(2.32vw, 10px);
      padding: min(2.32vw, 10px);
    }
  }
}
.detail_pro a:hover {
  background-color: var(--black--);
  color: white;
}
/* ホバー可能なデバイスのみ（タッチパネル除外） */
@media (hover: hover) and (pointer: fine) {
  .detail_pro a:hover {
    background-color: var(--black--);
    color: white;
  }
}

.pt_black {
  color: var(--text-color);
  font-weight: 600;
}

/* カード枚数変更時: *4の部分をカード枚数に変更 (例: 5枚なら*5) */
@keyframes scrollCards {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(
      calc(-1 * (min(20.83vw, 300px) + min(1.38vw, 20px)) * 8) /* ←カード枚数 */
    );
  }
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
  .carousel_control_wrapper {
    margin-top: 30px;
    gap: 15px;
  }

  .carousel_btn,
  .carousel_control {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .product_card {
    width: 250px;
  }

  .product_card img {
    height: 250px;
  }

  .product_card h3 {
    padding: 15px;
    font-size: 18px;
  }

  .product_card p {
    padding: 0 15px 15px;
    font-size: 14px;
  }

  /* タブレット・スマホ用のアニメーション */
  .product_card_wrapper {
    gap: 20px; /* 固定値に変更 */
  }

  /* カード枚数変更時: (250px + 20px) × カード枚数 で再計算 */
  /* 例: 5枚なら (250px + 20px) × 5 = 1350px */
  @keyframes scrollCards {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(
        -2160px
      ); /* (250px + 20px) × 4枚 = 1080px ←再計算 */
    }
  }
}
