/* ========================================
   フレーバーチャート CSS
   ======================================== */

.richill-flavor-chart-section {
  padding: 80px 80px;
  background-color: #FFFFFF;
}

.richill-flavor-chart-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.richill-flavor-chart-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  color: #1A1A1A;
  letter-spacing: 0.05em;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  grid-column: 1 / -1;
}

.richill-flavor-chart {
  position: relative;
  width: 100%;
  padding-left: 60px;
  padding-bottom: 60px;
}

/* 軸ラベル */
.richill-flavor-chart__axis-label {
  position: absolute;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: 0.1em;
  z-index: 2;
  padding: 8px 0;
  background-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.richill-flavor-chart__axis-label--vertical {
  top: 0;
  left: 0;
  writing-mode: vertical-rl;
  text-orientation: upright;
  flex-direction: column;
}

.richill-flavor-chart__axis-label--vertical::before {
  content: "↑";
  writing-mode: horizontal-tb;
  font-size: 1.2em;
  color: #666;
}

.richill-flavor-chart__axis-label--horizontal {
  bottom: 0;
  right: 0;
}

.richill-flavor-chart__axis-label--horizontal::after {
  content: "→";
  font-size: 1.2em;
  color: #666;
}

/* メンソール凡例 */
.richill-flavor-chart__legend {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.richill-flavor-chart__legend-icon {
  width: 20px;
  height: 20px;
}

.richill-flavor-chart__legend-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1A1A1A;
}

/* グリッド（5×5マス・横長） */
.richill-flavor-chart__grid {
  position: relative;
  aspect-ratio: 3 / 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  background-color: #FFFFFF;
  background-image:
    repeating-linear-gradient(
      to right,
      transparent,
      transparent calc(20% - 1px),
      #D0D0D0 calc(20% - 1px),
      #D0D0D0 20%
    ),
    repeating-linear-gradient(
      to bottom,
      transparent,
      transparent calc(20% - 1px),
      #D0D0D0 calc(20% - 1px),
      #D0D0D0 20%
    );
  border: 2px solid #D0D0D0;
  border-radius: 8px;
  padding: 40px;
}

/* 商品アイテム（5×5グリッド用） */
.richill-flavor-chart__item {
  position: absolute;
  left: calc((var(--x) - 0.5) * 20%);
  top: calc((var(--y) - 0.5) * 20%);
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* 商品カード */
.richill-flavor-chart__product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background-color: transparent;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.richill-flavor-chart__product:hover {
  transform: translateY(-4px);
}

.richill-flavor-chart__product-image {
  width: 35px;
  height: 53px;
  object-fit: cover;
  border-radius: 4px;
}

.richill-flavor-chart__product-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: #1A1A1A;
  text-align: center;
  margin: 0;
  white-space: nowrap;
}

/* メンソール度（葉っぱアイコン） */
.richill-flavor-chart__menthol {
  display: flex;
  gap: 2px;
  justify-content: center;
}

.richill-flavor-chart__menthol svg {
  width: 10px;
  height: 10px;
}

/* バナー画像エリア */
.richill-flavor-chart-banner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.richill-flavor-chart-banner img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* タブレット・スマホ対応 */
@media (max-width: 768px) {
  .richill-flavor-chart-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .richill-flavor-chart-section {
    padding: 60px 16px;
  }

  .richill-flavor-chart {
    padding-left: 0;
    padding-bottom: 50px;
  }

  .richill-flavor-chart-title {
    font-size: 1.75rem;
    margin-bottom: 30px;
  }

  .richill-flavor-chart__axis-label {
    font-size: 0.875rem;
    padding: 6px 0;
  }

  .richill-flavor-chart__axis-label--vertical {
    top: 10px;
    left: 10px;
  }

  .richill-flavor-chart__axis-label--horizontal {
    bottom: 0;
    right: 0;
  }

  .richill-flavor-chart__legend {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    gap: 6px;
  }

  .richill-flavor-chart__legend-icon {
    width: 16px;
    height: 16px;
  }

  .richill-flavor-chart__legend-text {
    font-size: 0.75rem;
  }

  .richill-flavor-chart__grid {
    padding: 30px 20px;
  }

  .richill-flavor-chart__product {
    padding: 6px;
    gap: 4px;
  }

  .richill-flavor-chart__product-image {
    width: 38px;
    height: 57px;
  }

  .richill-flavor-chart__product-name {
    font-size: 0.65rem;
  }

  .richill-flavor-chart__menthol svg {
    width: 8px;
    height: 8px;
  }
}

@media (max-width: 480px) {
  .richill-flavor-chart {
    padding-left: 0;
    padding-bottom: 40px;
  }

  .richill-flavor-chart-section {
    padding: 40px 16px;
  }

  .richill-flavor-chart-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
  }

  .richill-flavor-chart__axis-label {
    font-size: 0.75rem;
    padding: 4px 0;
  }

  .richill-flavor-chart__axis-label--vertical {
    top: 10px;
    left: 10px;
  }

  .richill-flavor-chart__grid {
    padding: 20px 15px;
  }

  .richill-flavor-chart__product {
    padding: 3px;
    gap: 3px;
  }

  .richill-flavor-chart__product-image {
    width: 24px;
    height: 36px;
  }

  .richill-flavor-chart__product-name {
    font-size: 0.5rem;
  }

  .richill-flavor-chart__menthol svg {
    width: 5px;
    height: 5px;
  }
}
