/* =========================================
   ドリンクページ専用CSS
   ========================================= */

/* 人気ランキングセクション */
.popular-ranking {
  background-color: #ffffff;
  padding: 60px 0;
}

.popular-ranking .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* セクションタイトル（人気ランキング） */
.popular-ranking .ranking-section-title {
  font-size: 32px;
  text-align: left;
  color: #000000;
  margin-bottom: 0px;
  font-weight: 900;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.popular-ranking .ranking-section-title::before {
  content: '';
  position: absolute;
  top: 63%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 235px;
  height: 28px;
  background-color: #FFEF00;
  z-index: -1;
  display: block;
}


.popular-ranking .ranking-content {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
}

/* ランキングカード */
.popular-ranking .ranking-cards {
  display: flex;
  gap: 38px;
  margin-top: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 35px;
  padding-top: 20px; /* バッジ分の上部余白を追加 */
  max-width: 1239px; /* (387px * 3) + (30px * 2) = 1161px + 余白 */
  margin-left: auto;
  margin-right: auto;
}

/* スクロールバーを非表示 */
.popular-ranking .ranking-cards::-webkit-scrollbar {
  display: none;
}

/* Firefox対応 */
.popular-ranking .ranking-cards {
  scrollbar-width: none;
}

/* IE/Edge対応 */
.popular-ranking .ranking-cards {
  -ms-overflow-style: none;
}

.popular-ranking .ranking-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: visible; /* 画像がはみ出せるようにする */
  text-align: left;
  position: relative;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  flex: 0 0 320px;
  min-width: 320px;
  width: 320px;
  height: 308px;
  box-shadow:7px 18px 17px rgba(0, 0, 0, 27%);
  z-index: 1; /* カード全体のz-indexを設定 */
}

.popular-ranking .ranking-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-4px);
  z-index: 10; /* ホバー時にz-indexを上げる */
}

/* ランキングバッジ */
.popular-ranking .ranking-badge {
  position: absolute;
  top: -10px; /* 上の位置を調整して切れないように */
  left: -10px; /* 左の位置を調整して切れないように */
  width: 50px;
  height: 50px;
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ランキング画像 */
.popular-ranking .ranking-image {
  width: 100%;
  height: 220px;
  position: relative;
  overflow: hidden; /* 画像がはみ出さないように変更 */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px 12px 0 0;
}

/* 背景色はPHPで動的に設定されます */

.popular-ranking .ranking-image img {
  width: 100%; /* レスポンシブに対応するため100%に変更 */
  height: auto;
  max-width: 300px; /* 最大幅を設定して大きくなりすぎないように */
  max-height: 284px; /* コンテナの高さに合わせる */
  object-fit: contain;
  position: relative;
  left: 0; /* 左右位置調整: 負の値で左、正の値で右 */
  top: 37px; /* 上下位置調整: 負の値で上、正の値で下 */
  z-index: 1; /* 画像を前面に表示 */
}

/* カード下部のコンテンツ */
.popular-ranking .ranking-content-wrapper {
  padding: 16px;
  background-color: #ffffff;
  border-radius: 0 0 12px 12px;
}

/* カード内の商品名 */
.popular-ranking .ranking-card h3.ranking-title {
  font-size: 28px;
  margin: 0;
  color: #000;
  font-weight: 900;
  line-height: 1.2;
  display: inline;
}

/* ALC表示 */
.popular-ranking .ranking-alc {
  font-size: 16px;
  color: #393939;
  display: inline;
  margin-left: 8px;
}

/* ランキング価格 */
.popular-ranking .ranking-price {
  color: #FF0000;
  font-size: 19px;
  margin: 8px 0 0 0;
}

.popular-ranking .ranking-price .tax-included {
  font-size: 12px;
  color: #FF0000;
  font-weight: normal;
}

/* ランキングなしメッセージ */
.popular-ranking .no-ranking {
  text-align: center;
  color: #999;
  font-size: 16px;
  padding: 40px 0;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .popular-ranking .ranking-card {
    flex: 0 0 280px;
    min-width: 280px;
    width: 280px;
    height: 270px;
  }
  
  .popular-ranking .ranking-image {
    height: 190px;
  }
}

@media (max-width: 768px) {
  .popular-ranking {
    padding: 40px 0;
    margin-bottom: 20px;
  }
  
  /* 768px以下での画像調整 */
  .popular-ranking .ranking-image img {
    width: 92%; /* 画像を少し小さく */
    max-width: 291px;
    top:26px;
  }
  
  /* ランキングバッジのレスポンシブ対応 */
  .popular-ranking .ranking-badge {
    width: 45px;
    height: 45px;
    font-size: 24px;
    top: -12px;
    left: -12px;
  }
  
  .popular-ranking .ranking-section-title {
    font-size: 2rem;
    margin-bottom: 0px;
    font-weight: 900;
  }
  
  /* 品名とALCの間で改行 */
  .popular-ranking .ranking-card h3.ranking-title {
    display: block;
    margin-bottom: 4px;
  }
  
  .popular-ranking .ranking-alc {
    display: block;
  }
  
  .popular-ranking .ranking-content {
    font-size: 1rem;
  }
  
  .popular-ranking .ranking-cards {
    gap: 15px;
  }
  
  .popular-ranking .ranking-card {
    flex: 0 0 240px;
    min-width: 240px;
    width: 240px;
    height: 250px;
  }
  
  .popular-ranking .ranking-image {
    height: 160px;
  }
  
  .popular-ranking .ranking-card h3.ranking-title {
    font-size: 24px;
  }
  
  .popular-ranking .ranking-price {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .popular-ranking .ranking-cards {
    gap: 31px;
  }
  
  .popular-ranking .ranking-card {
    flex: 0 0 192px;
    min-width: 192px;
    width: 192px;
    height: 215px;
    box-shadow: 3px 8px 3px rgba(0, 0, 0, 20%);
  }
  
  .popular-ranking .ranking-image {
    height: 120px;
    width: 192px;
  }
  
  .popular-ranking .ranking-content-wrapper {
    height: 95px;
    width: 192px;
    text-align: left;
    padding: 8px 16px;
  }
  
  /* 480px以下での画像調整 */
  .popular-ranking .ranking-image img {
    width: 88%; /* さらに画像を小さく */
    max-width: 230px;
    max-height: 234px;
    top:24px;
  }
  
  /* ランキングバッジのレスポンシブ対応 */
  .popular-ranking .ranking-badge {
    width: 35px;
    height: 35px;
    font-size: 18px;
    top: -8px;
    left: -8px;
  }
  
  .popular-ranking .ranking-card h3.ranking-title {
    font-size: 20px;
    margin-bottom: 2px;
  }
  
  .popular-ranking .ranking-alc {
    margin-bottom: 2px;
    font-size: 12px;
    margin-left:1px ;
  }
  
  .popular-ranking .ranking-price {
    font-size: 14.4px;
    margin-top: 2px;
  }
}

/* =========================================
   商品一覧セクション
   ========================================= */
.all-drinks {
  background-color: #ffffff;
  padding: 60px 0;
}

.all-drinks .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.all-drinks .section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
}

.all-drinks .title-area {
  display: flex;
  align-items: baseline;
  gap: 43px;
  position: absolute;
  left: 0;
  top: -66px;
}

.all-drinks .section-title {
  font-size: 32px;
  text-align: left;
  color: #000000;
  margin: 0;
  font-weight: 900;
  position: relative;
  display: inline-block;
  z-index: 1;
}

.all-drinks .section-title::before {
  content: '';
  position: absolute;
  top: 72%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 20px;
  background-color: #FFEF00;
  z-index: -1;
  display: block;
}

.all-drinks .product-count {
  font-size: 20px;
  color: #000000;
}

.all-drinks .filter-area {
  position: absolute;
  right: 0;
  top: -66px;
  display: flex;
  align-items: center;
}

.all-drinks .sort-wrapper {
  position: relative;
}

/* カスタムドロップダウン */
.all-drinks .custom-dropdown {
  position: relative;
  width: 144px;
}

.all-drinks .dropdown-trigger {
  width: 100%;
  height: 35.64px;
  padding: 0 30px 0 12px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.2s;
}

.all-drinks .dropdown-trigger:hover {
  border-color: #999;
}

.all-drinks .custom-dropdown.active .dropdown-trigger {
  border-color: #999;
}

.all-drinks .dropdown-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s;
  pointer-events: none;
}

.all-drinks .custom-dropdown.active .dropdown-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.all-drinks .dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s;
  z-index: 50;
}

.all-drinks .custom-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.all-drinks .dropdown-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  color: #333;
}

.all-drinks .dropdown-option:hover {
  background-color: #f5f5f5;
}

.all-drinks .dropdown-option.active {
  background-color: #FFEF00;
  font-weight: bold;
}

.all-drinks .dropdown-option:first-child {
  border-radius: 4px 4px 0 0;
}

.all-drinks .dropdown-option:last-child {
  border-radius: 0 0 4px 4px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .all-drinks .custom-dropdown {
    width: 144px;
  }
  
  .all-drinks .dropdown-trigger {
    font-size: 12px;
    height: 35.64px;
    padding: 0 25px 0 10px;
  }
  
  .all-drinks .dropdown-option {
    font-size: 12px;
    padding: 10px 12px;
  }
}

/* 絞り込み機能関連のスタイルを削除 */

/* ドリンクグリッド */
.all-drinks .drinks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  justify-items: center;
}

.all-drinks .drink-item {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 17px rgba(0, 0, 0, 30%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 387px;
  height: 343px;
  max-width: 100%;
  position: relative;
}

.all-drinks .drink-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.all-drinks .drink-image {
  height: 208px;
  overflow: hidden;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.all-drinks .drink-image img {
  width: 74%;
  height: auto;
  max-height: none;
  object-fit: contain;
  position: relative;
  left: -1px; /* 左右位置調整: 負の値で左、正の値で右 */
  top: 37px; /* 上下位置調整: 負の値で上、正の値で下 */
}

.all-drinks .drink-content-wrapper {
  padding: 16px 24px;
  background-color: #ffffff;
  position: relative;
}

/* 商品コピー（簡易キャッチコピー） */
.all-drinks .drink-copy {
  font-size: 12px;
  color: #666;
  margin: 8px 0 4px 0;
  line-height: 1.4;
}

.all-drinks .drink-name {
  font-size: 24px;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
  display: inline;
}

.all-drinks .drink-name a {
  color: #000;
  text-decoration: none;
}

.all-drinks .drink-name a:hover {
  color: #333;
}

.all-drinks .drink-alc {
  font-size: 16px;
  color: #393939;
  display: inline;
  margin-left: 8px;
}

.all-drinks .drink-price {
  color: #FF0000;
  font-size: 20px;
  margin:12px 0 0 0;
}

.all-drinks .drink-price .tax-included {
  font-size: 12px;
  color: #FF0000;
  font-weight: normal;
}

/* 詳細ボタン */
.all-drinks .drink-detail-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 120px;
  height: 32px;
  background-color: rgba(255, 239, 0, 0.3); /* #FFEF00の30%不透明度 */
  color: #000;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  border: none;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 0 0 2px #FFEF00; /* 内側に2pxの黄色い縁 */
}

.all-drinks .drink-detail-btn:hover {
  background-color: rgba(255, 239, 0, 0.5); /* ホバー時は50%不透明度 */
  box-shadow: inset 0 0 0 2px #FFEF00; /* ホバー時も縁を維持 */
}

/* LEDバッジ */
.all-drinks .drink-led-badge {
  position: absolute;
  top: -22px;
  right: -35px;
  width: auto;
  height: 185px;
  z-index: 2;
  object-fit: contain;
}

/* ランキングバッジのスタイル */
.all-drinks .drink-ranking-badge {
  position: absolute;
  top: 21px;
  left: 32px;
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  padding: 4px 22px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
  white-space: nowrap;
}



/* レスポンシブデザイン */

@media (max-width: 1200px) {
  .all-drinks .drinks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .all-drinks .drink-item {
    width: 350px;
    height: 310px;
  }
  
  .all-drinks .drink-image {
    height: 220px;
  }
}

@media (max-width: 1200px) and (min-width: 769px) {
  .all-drinks .drink-item {
    width: 350px;
    height: 310px;
  }
  
  .all-drinks .drink-image {
    height: 190px;
  }
}

@media (max-width: 768px) {
  .all-drinks {
    padding: 40px 0;
  }
  
  .all-drinks .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .all-drinks .title-area {
    flex-direction: column;
    gap: 10px;
  }
  
  .all-drinks .section-title {
    font-size: 28px;
    font-weight: 900;
  }
  
  .all-drinks .product-count {
    font-size: 16px;
  }
  
  .all-drinks .filter-area {
    position: absolute;
    right: 0;
    top: -47px;
    width: auto;
  }
  
  .all-drinks .filter-options {
    flex-direction: column;
    gap: 20px;
  }
  
  .all-drinks .drinks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .all-drinks .drink-item {
    width: 342px;
    height: 343px;
  }
  
  .all-drinks .drink-image {
    height: 180px;
  }
  
  .all-drinks .drink-name {
    font-size: 24px;
  }
  
  .all-drinks .drink-price {
    font-size: 20px;
  }
  
  /* ランキングバッジのレスポンシブ対応 */
  .all-drinks .drink-ranking-badge {
    font-size: 15px;
    padding: 4px 23px;
    top: 22px;
    left: 18px;
  }
  
  /* LEDバッジのレスポンシブ対応 */
  .all-drinks .drink-led-badge {
    height: 175px;
  }
}

@media (max-width: 580px) {
  .all-drinks .drinks-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .all-drinks .drink-item {
    width: 342px;
    height: 343px;
  }
  
  .all-drinks .drink-image {
    height: 200px;
  }
}

/* =========================================
   商品詳細モーダル
   ========================================= */
/* オーバーレイ */
.product-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* モーダル本体 */
.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: #fff;
  border: 12px solid #FFEF00;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  width: 1000px;
  height: 746px;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
}

@media (max-width: 768px) {
  .product-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .product-modal.active {
    transform: translateX(-50%) scale(1);
  }
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 768px) {
  .product-modal.active {
    transform: translateX(-50%) scale(1);
  }
}

/* 閉じるボタン */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 46.67px;
  height: 46.67px;
  background-color: #fff;
  border: 4px solid #000000;
  border-radius: 50%;
  font-size: 39px;
  color: #000000;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.modal-close:hover {
  background-color: #f5f5f5;
  border-color: #999;
}

/* 下部の閉じるボタン（デフォルトは非表示） */
.modal-bottom-close {
  display: none;
}

/* モーダル内のランキングバッジ */
.modal-ranking-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #ffffff;
  color: #000;
  font-weight: bold;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 4px 32px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
}

.modal-led-badge {
  position: absolute;
  top: -13px;
  right: -24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ランキングバッジがない場合のLEDバッジ位置調整（モバイル） */
.modal-led-badge.no-ranking {
  top: -12px;
  left: -49px;
  right: auto;
}

.modal-led-badge.no-ranking .modal-led-image {
  width: 225px;
  height: 156px;
  margin: 0;
}

/* モバイル版（768px以下）のLEDバッジサイズ */
@media (max-width: 768px) {
  .modal-led-image {
    width: 180px;
    height: 171px;
    object-fit: contain;
    margin: 26px 198px 0px 0px;
  }
}

/* デスクトップ版（769px以上）のLEDバッジサイズ */
@media (min-width: 769px) {
  .modal-ranking-badge {
    top: 91px;
    left: 28px;
    width: 120px;
    font-size: 16px;
  }
  
  .modal-led-badge {
    top: 80px;
    right: 18px;
  }
  
  /* デスクトップ版のLED画像サイズ */
  .modal-led-image {
    width: 217px;
    height: 193px;
    object-fit: contain;
    margin: 30px 211px 0px 0px;
  }
  
  /* ランキングバッジがない場合のLEDバッジ位置調整 - ランキングバッジと同じ位置へ */
  .modal-led-badge.no-ranking {
    top: 52px;
    left: -25px;
    right: auto;
  }
  
  /* ランキングバッジがない場合のLED画像サイズ調整 */
  .modal-led-badge.no-ranking .modal-led-image {
    width: 214px;
    height: 182px;
    margin: 0;
  }
}

/* モーダルコンテンツ */
.modal-content {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 72px;
  box-sizing: border-box;
}

.modal-left {
  flex: 0 0 408px;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 0 0 0;
  position: relative;
  overflow: visible;
  top:-62px;
}

.modal-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 510px;
  background-color: #E9CF59;
  z-index: 1;
}

.modal-product-image {
  max-width: 136%;
  max-height: 100%;
  object-fit: contain;
  position: relative;
  left: -48px; /* 左右位置調整: 負の値で左、正の値で右 */
  top: 55px; /* 上下位置調整: 負の値で上、正の値で下 */
  z-index: 2;
}

.modal-right {
  flex: 0 0 468px;
  width: 408px;
  padding:  20px 12px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  max-height: 100%;
  position: relative;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Chrome, Safari対応 */
.modal-right::-webkit-scrollbar {
  display: none;
}

.modal-header {
  margin-bottom: 11px;
  text-align: left;
  margin-left: 23px;
  margin-top: -21px;
}

.modal-subtitle {
  color: #393939;
  font-size: 16px;
  display: block;
  margin-bottom: 8px;
  margin-top: 15px;
  text-align: left;
}

.modal-title {
  font-size: 24px;
  font-weight: bold;
  color: #000;
  margin: 0;
  display: inline;
}

.modal-alc {
  font-size: 12px;
  color: #393939;
  margin-left: 8px;
  display: inline;
}

.modal-description {
  color: #333;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 15px;
  margin-left: 23px;
}

/* モーダルタグ */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 20px;
  justify-content: flex-start;
  margin-left: 23px;
  align-items: center;
}

.modal-tag {
  display: inline-block;
  padding: -1px 12px;
  color: #666;
  font-size: 12px;
  border-radius: 16px;
  font-weight: 500;
}

.modal-price-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0px;
  margin-left: 2px;
  margin-right: 2px;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid #000;
}

.modal-price {
  color: #FF0000;
  font-size: 24px;
  font-weight: bold;
}

.modal-price .tax-included {
  font-size: 12px;
  color: #FF0000;
  font-weight: normal;
}

.modal-detail-link {
  color: #000;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 188px;
  height: 40px;
  padding: 0px 12px 2px 22px;
  background-color: rgba(255, 239, 0, 0.3);
  border-radius: 4px;
  transition: background-color 0.3s ease;
  box-shadow: inset 0 0 0 2px #FFEF00;
  text-align: center;
  white-space: nowrap;
  line-height: 40px;
}

.modal-detail-link .arrow-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-detail-link .arrow-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-detail-link:hover {
  background-color: rgba(255, 239, 0, 0.5);
  box-shadow: inset 0 0 0 2px #FFEF00;
}

/* 味わいチャート */
.taste-chart {
  margin-bottom: 30px;
  margin-left: -45px;
  position: relative;
  padding: 19px; /* パディングを追加 */
  width: 100%; /* 親要素の幅を全て使用 */
  border-radius: 8px; /* 角を丸くする */
}

.taste-chart-header {
  margin-bottom: 15px;
  position: relative;
}

.taste-chart h3 {
  font-size: 16px;
  margin-bottom: 0;
  margin-left: 164px;
  color: #000;
  position: relative;
  display: inline-block;
  z-index: 5;
}

.taste-chart h3::before {
  content: '';
  position: absolute;
  top: 73%;
  left: 49%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 19px;
  background-color: #FFEF00;
  z-index: -1;
  display: block;
}

.chart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%; /* 親要素の幅を全て使用 */
  padding-right: 0; /* 右側の余白を削除（親要素のパディングで十分） */
  margin-top: 33px; /* 見出しとの間隔を追加 */
  padding-left: 23px; /* 他の要素と同じ左余白を追加 */
}

.chart-item {
  display: grid;
  grid-template-columns: 126px 214px 35px; /* 中央を214px固定に変更 */
  align-items: center;
  gap: 10px;
  width: 100%; /* 親要素の幅を全て使用 */
}

.chart-label {
  font-size: 14px;
  color: #333;
  text-align: left;
  line-height: 15px; /* chart-barの高さに合わせる */
  font-weight: 500; /* 少し太くして読みやすく */
  padding-left: 0; /* 左パディングを削除して・の位置で揃える */
  display: block;
  width: 100%;
  justify-self: start;
}

.chart-bar {
  height: 15px; /* 20px → 15px に変更 */
  background-color: #e0e0e0; /* 背景色を少し濃いグレーに */
  border-radius: 7.5px; /* 高さに合わせて角丸を調整 */
  overflow: hidden;
  position: relative;
  width: 214px; /* 固定幅214pxに変更 */
  min-width: 214px; /* 最小幅も214pxに設定 */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); /* 内側に影を追加 */
}

.chart-fill {
  height: 100%;
  /* グラデーションで立体感を追加 */
  background: linear-gradient(to bottom, #FFF44F 0%, #FFEF00 50%, #FFD700 100%);
  width: 0; /* 初期幅を0に戻す */
  transition: width 0.5s ease 0.2s;
  /* 要素の存在を保証 */
  min-height: 15px; /* 高さに合わせて調整 */
  display: block;
  /* 左から右に伸びるように設定 */
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 7.5px; /* 高さに合わせて角丸を調整 */
  /* 影を追加して立体感を出す */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chart-value {
  font-size: 14px;
  color: #666;
  text-align: right;
  font-weight: 600; /* 数値を太くして見やすく */
  line-height: 15px; /* chart-barの高さに合わせる */
}

/* LINEボタン */
.modal-line-button {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 460px;
  height: 56px;
  padding: 0;
  background-color: #75B769;
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  max-width: calc(100% - 60px);
  z-index: 10;
}

.modal-line-button:hover {
  background-color: #5da351;
}

/* レスポンシブ */
@media (max-width: 900px) {
  .product-modal {
    width: 90%;
    height: auto;
    max-height: 90vh;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .product-modal {
    overflow: hidden;
    height: 746px !important;
    max-height: 746px !important;
  }
  
  .modal-content {
    overflow: hidden;
    flex-wrap: nowrap;
  }
  
  .modal-left {
    flex: 0 0 408px;
    flex-shrink: 0;
    min-width: 408px;
  }
  
  .modal-right {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: hidden;
    min-width: 0;
  }
  
  /* 右側コンテンツを横スクロール可能にするためのラッパー */
  .modal-right > * {
    flex-shrink: 0;
  }
  
  /* 右側コンテンツの各要素のマージンを削除して右に切れるようにする */
  .modal-header {
    margin-left: 23px !important;
    margin-right: 23px !important;
    flex-shrink: 0;
    min-width: 300px;
    white-space: normal;
  }
  
  .modal-subtitle {
    white-space: normal;
  }
  
  .modal-title {
    white-space: normal;
  }
  
  .modal-description {
    margin-left: 23px !important;
    margin-right: 23px !important;
    flex-shrink: 0;
    min-width: 400px;
  }
  
  .modal-tags {
    margin-left: 23px !important;
    margin-right: 23px !important;
    flex-wrap: wrap;
    flex-shrink: 0;
    min-width: 400px;
  }
  
  .modal-price-wrapper {
    margin-left: 23px !important;
    margin-right: 23px !important;
    flex-wrap: nowrap;
    flex-shrink: 0;
    min-width: 400px;
  }
  
  .taste-chart {
    margin-left: -45px !important;
    margin-right: 23px !important;
    width: auto !important;
    min-width: 500px;
    flex-shrink: 0;
  }
  
  .chart-items {
    padding-left: 0 !important;
    padding-right: 0 !important;
    flex-shrink: 0;
  }
  
  /* 狭い画面でLINEボタンと閉じるボタンを非表示 */
  @media (max-width: 850px) {
    .modal-line-button,
    .modal-bottom-close {
      display: none;
    }
  }
}

@media (max-width: 768px) {
  .product-modal-overlay {
    position: fixed;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOSでスムーズスクロール */
  }
  
  .product-modal-overlay.active {
    height: 100vh; /* オーバーレイの高さを画面高さに固定 */
    overflow-y: auto;
  }
  
  .product-modal {
    width: 95%;
    height: auto;
    min-height: auto; /* 最小高さを解除 */
    border-width: 8px;
    position: absolute;  /* absoluteに戻す（JavaScriptで位置制御） */
    top: 20px;  /* デフォルト位置 */
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    margin-bottom: 40px; /* 下部マージン */
    overflow-y: visible;  /* オーバーフローを visible に */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  /* Chrome, Safari対応 - モバイルモーダル */
  .product-modal::-webkit-scrollbar {
    display: none;
  }
  
  .product-modal.active {
    transform: translateX(-50%) scale(1); /* JavaScriptで位置制御されるため、X軸の中央配置は維持 */
  }
  
  .modal-content {
    flex-direction: column;
    padding: 20px;
    align-items: center;
    height: auto;
  }
  
  .modal-left {
    flex: none;
    width: 310px;
    height: 308px;
    padding: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
  }
  
  .modal-left::after {
    width: 310px;
    height: 308px;
  }
  
  .modal-product-image {
    max-width: 100%;
    left: 0;
    top: 0;
  }
  
  .modal-right {
    width: 100%;
    padding: 20px;
    padding-bottom: 100px;
    overflow-y: visible;
    max-height: none;
  }
  
  .modal-header,
  .modal-description,
  .modal-tags,
  .modal-price-wrapper {
    margin-left: -14px;
    margin-right: -29px;
  }
  
  .modal-price-wrapper {
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  
  .modal-price {
    white-space: nowrap;
    font-size: 20px;
  }
  
  .modal-price .tax-included {
    white-space: nowrap;
  }
  
  .modal-detail-link {
    white-space: nowrap;
    font-size: 12px;
    width: 147px;
    height: 28px;
    padding: 0px 11px 1px 20px;
  }
  
  .taste-chart {
    margin-left: 0;
    width: 100%;
    padding: 15px;
  }
  
  .taste-chart h3 {
    margin-left: 0;
    margin-top: 10px;
    text-align: center;
    display: block;
    width: auto;
    margin-bottom: 20px;
  }
  
  .chart-items {
    padding-left: 0;
    padding-right: 0;
    align-items: flex-start;
    gap: 8px;
  }
  
  .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 40px;
    background-color: #ffffff;
    border: 2.8px solid #000;
    position: absolute;
    z-index: 11;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: Arial, sans-serif;
    font-weight: normal;
  }
  
  .modal-left {
    position: relative;
  }
  
  .chart-item {
    grid-template-columns:111px 163px 25px;
    gap: 8px;
    justify-content: center;
    margin: 0 auto;
    max-width: 284px;
  }
  
  .chart-label {
    text-align: left;
    padding-left: 0;
    font-size: 12px;
    display: block;
    width: 100%;
    justify-self: start;
  }
  
  .chart-bar {
    width: 163px;
    min-width: 163px;
    height: 11px;
    border-radius: 5.5px;
  }
  
  .chart-fill {
    min-height: 11px;
    border-radius: 5.5px;
  }
  
  .chart-value {
    font-size: 12px;
    text-align: right;
  }
  
  .modal-line-button {
    width: calc(100% - 40px);
    max-width: 400px;
    height: 40px;
    font-size: 14px;
    bottom: 99px;
  }
  
  .modal-bottom-close {
    display: flex !important;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 2.8px solid #000000;
    border-radius: 50%;
    font-size: 24px;
    line-height: 40px;
    color: #000000;
    cursor: pointer;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: Arial, sans-serif;
    font-weight: normal;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    z-index: 10;
  }
  
  .modal-bottom-close:hover {
    background-color: #f5f5f5;
    border-color: #999;
  }
}

@media (max-width: 768px) {
  /* モバイル版の料金表を見るボタンのアイコンサイズ調整 */
  .modal-detail-link .arrow-icon {
    width: 14px;
    height: 14px;
    margin-bottom: 0;
  }
  
  /* 391px-768pxと390px以下で共通のスタイルを適用 */
  .product-modal {
    min-height: auto;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  
  .modal-content {
    overflow: visible;
    flex-wrap: wrap;
  }
  
  .modal-left {
    width: 100%;
    max-width: 310px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    min-width: auto;
  }
  
  .modal-left::after {
    width: 100%;
    max-width: 310px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .modal-right {
    overflow: visible;
    overflow-x: visible;
    overflow-y: visible;
    min-width: 100%;
    flex: none;
  }
  
  .modal-tags {
    gap: 4px;
    flex-wrap: wrap;
    overflow-x: visible;
    scrollbar-width: auto;
    -ms-overflow-style: auto;
    justify-content: flex-start;
  }
  
  .modal-tags::-webkit-scrollbar {
    display: none;
  }
  
  .modal-tag {
    flex-shrink: 0;
    padding: 0px 2px;
    font-size: 11px;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* 各要素のマージンをリセット */
  .modal-header,
  .modal-description,
  .modal-tags,
  .modal-price-wrapper {
    margin-left: -14px;
    margin-right: -29px;
    min-width: auto;
    flex-shrink: 1;
    white-space: normal;
  }
  
  .taste-chart {
    margin-left: 0;
    margin-right: -29px;
    width: 100%;
    min-width: auto;
    flex-shrink: 1;
    white-space: normal;
  }
  
  .chart-items {
    padding-left: 0;
    padding-right: 0;
  }
}