/* ユーティリティ */
.u-ml-sm {
  margin-left: 0.5em;
}

/* JANコード */
.jan-bubble-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.jan-bubble-title {
  font-size: 12px;
  color: #ADADAD;
}

.jan-code-bubble-icon {
  margin-left: 10px;
  height: 17px;
}

.jan-bubble {
  font-size: 12px;
  color: #FFFFFF;
}

.jan-code-section {
  overflow: visible;
}
.jan-code-info {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.2s;
  position: relative;
}

.jan-code-explanation {
  border-radius: 4px;
  position: absolute;
  top: 35px;
  left: 35px;
  z-index: 1000;
  width: 268px;
  font-size: 12px;
}

.jan-code-explanation p {
  letter-spacing: 0;
}

.jan-code-explanation-content {
  padding: 8px 8px 10px 8px;
  background-color: #333333;
  border-radius: 4px;
  width: 268px;
  font-size: 12px;
}

.jan-code-explanation-content p {
  margin: 0 0 8px 0;
}

.jan-code-header {
  display: flex;
}

.jan-code-info svg {
  margin: auto 2px auto 16px;
}

.jan-code-info p {
  font-size: 12px;
  display: block;
  margin: auto 0;
  font-family: "YuGothic";
}

.jan-font { 
  font-size: 16px;
  font-weight: 700;
  font-family: "YuGothic";
  color: #333333;
  padding-left: 16px;
  letter-spacing: 0;
}

/* モーダル */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  max-width: 90%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-sizing: border-box;
  width: 90%;
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

.-mb0 {
  margin-bottom: 0;
}

.jan-font {
  font-size: 16px;
  font-weight: 700;
  font-family: "YuGothic";
  color: #333333;
  padding-left: 16px;
}

#jan-modal .-allergie {
  margin-top: 0;
}

#jan-modal .accordion-header {
  border-top: none;
}

#jan-modal .accordion-header.-nutrition {
  border-bottom: 1px solid #CCCCCC;
}

#jan-modal .accordion-header.-nutrition.active {
  border-bottom: none;
}

#jan-modal .-nutrition .Panel__body.accordion-content.active {
  border-bottom: 1px solid #CCCCCC;
}

.modal-body {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.modal-button:hover {
  background-color: #555555;
}

.modal-close {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.modal-close:hover {
  opacity: 0.7;
}
.Image.-takeout {
  margin-bottom: -6%;
  margin-top: -12%;
}

/* セレクト時 */
#jan-modal .-allergie-text-wrapper.modal-selected, 
#jan-modal .-allergie-pic-container.modal-selected {
  background-color: #333333;
}

#jan-modal .-allergie-text-wrapper.modal-selected p {
  color: #FFFFFF;
}

#jan-modal .-allergie-pic-container.modal-selected svg path {
  fill: #FFFFFF;
}

#jan-modal .egg-path.modal-selected .egg-path {
  fill: #333333;
  stroke: #FFFFFF;
}

#jan-modal .egg-path.modal-selected circle {
  fill: #FFFFFF;
  stroke:#FFFFFF;
}

#jan-modal .walnut.modal-selected svg path.walnut {
  stroke: #333333;
  fill: #FFFFFF;
}

#jan-modal .nut-path.modal-selected path {
  fill: #333333;
  stroke: #333333;
}

#jan-modal .search-font.modal-selected {
  color: #333333;
}

svg {
  fill: none;
}

.Dataset.-columns {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0 16px;
  width: 40%;
}

.Dataset.-columns .Dataset__item {
  border: none;
  padding: 8px 0;
  text-align: left;
}

.Dataset.-columns .Dataset__item::before {
  display: none;
}

.-allergie {
  margin-top: 40px;
}

.-center {
  text-align: center;
}

.-allergie-pic-container {
  border: solid 1px #CCCCCC;
  height: 4.5rem;
  width: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.1875rem;
}

.-allergie-text-wrapper.selected, 
.-allergie-pic-container.selected {
  background-color: #333333;
}

.-allergie-text-wrapper.selected p {
  color: #FFFFFF;
}

.-allergie-pic-container.selected svg path {
  fill: #FFFFFF;
}

.egg-path.selected .egg-path {
  fill: #333333;
  stroke: #FFFFFF;
}

.egg-path.selected circle  {
  fill: #FFFFFF;
  stroke:#FFFFFF;
}

.nut-path.selected path {
  fill: #333333;
  stroke: #333333;
}

.search-font.selected {
  color: #333333;
}

.walnut.selected .walnut {
  stroke: #333333;
  fill: #FFFFFF;
}

.search-font {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  font-family: "Noto Sans JP";
  color: #CCCCCC;
}

.-search-font {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  font-family: "Noto Sans JP";
  margin-top: 0;
}

.AllergieGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 32px;
}

.AllergieFlex {
  display: flex;
  gap: 4px;
}

.-allergie-text-wrapper {
  border: solid 1px #CCCCCC;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  height: 52px;
  width: calc((100% - 36px) / 10);
  text-align: center;
  transition: all 0.3s ease;
}

.discontinued-container {
  display: inline-block;
  border: solid 1px #CCCCCC;
  background-color: #F8F8F8;
  color: #333333B8;
  font-size: 16px;
  font-weight: 500;
  padding: 8px;
  font-family: YuMincho;
  margin-bottom: 16px;
}

.accordion-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  padding: 16px;
  border-top: 1px solid #CCCCCC;
}

.accordion-icon {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.accordion-header.active, .accordion-content.active {
  background-color: #F8F8F8;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 16px;
}

.accordion-content.active {
  max-height: 1000px;
  padding: 16px;
  transition: transform 0.3s ease;
}
.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.-m {
  margin: 20px 0 -15px 20px;
}

.ProductDetail__image {
  z-index: -1;
}

@media (max-width: 768px) {
  .jan-font {
    margin-bottom: 0;
  }

  .jan-code-info {
    padding: 0;
    margin: 4px 0 8px 0;
  }

  .jan-code-header {
    display: block;
  }
  .jan-code-explanation-content {
    width: 220px;
  }
  .jan-code-explanation {
    top: 15px;
  }

  .-mb0 {
    margin: 0;
    font-size: 18px;
  }

  .Dataset.-columns {
    display: block;
    width: auto;
  }

  .AllergieGrid__item {
    padding: 0.75rem;
  }
  
  .AllergieGrid__image {
    width: 50px;
    height: 50px;
  }
  
  .AllergieGrid__label {
    font-size: 0.8rem;
  }

  .allergie-container {
    height: 358px;
    padding: 16px;
  }
  .grid_menu {
      display: block;
  }

  .AllergieFlex {
    display: grid;
    grid-template-columns: repeat(4, 0fr);
    gap: 4px;
    justify-content: center;
  }

  .AllergieGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 24px;
  }

  .-allergie-pic-container {
    border: solid 1px #CCCCCC;
    height: calc((100vw - 7rem - -33px) / 4);
    width: calc((100vw - 7rem - -33px) / 4);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.1875rem;
  }

  .-allergie-text-wrapper {
    width: calc((100% - 12px) / 3);
  }

  .icon {
    height: auto;
    width: calc(40 / 390 * 100vw);
  }
}
@media (max-width: 480px) {
  .ProductDetail__title {
    margin-bottom: 0;
  }
  
  .ProductDetail__title.-fixed {
    position: fixed;
    top: 4.25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    background-color: #fff;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
}

/* 印刷時の色を正確に表示するためのスタイル */
@media print {
  /* モーダルが開いている時：ページの他の部分を非表示、モーダルのみ表示 */
  body.modal-open {
    /* ページのメインコンテンツを非表示 */
    main,
    header,
    footer,
    aside {
      display: none;
    }
    
    /* モーダルを表示 */
    .modal-overlay,
    #jan-modal {
      display: block;
      visibility: visible;
      position: static;
      background-color: transparent;
      width: 100%;
      height: auto;
      top: 0;
      left: 0;
      transform: none;
    }
    
    .modal-content {
      position: static;
      transform: none;
      max-width: 100%;
      max-height: none;
      width: 100%;
      box-shadow: none;
      overflow: visible;
      height: auto;
    }
    
    /* モーダルボディのスクロール制限を解除 */
    .modal-body {
      max-height: none;
      overflow: visible;
      height: auto;
    }
  }
  
  /* 色を正確に印刷するための設定 */
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* ページの余白を調整 */
  @page {
    margin: 1cm;
  }
}