/* キッズ商品カード CPT 化に伴う追加スタイル */

/* サイズタブが1つだけのときは横100%にする */
.all_item_size_tabs_inner:only-child {
  width: 100%;
}

/* 「商品を見る」アンカーで飛んできたとき、固定ヘッダーに被らないオフセット */
.all_item {
  scroll-margin-top: 100px;
}

/* JoyCart 生フォームを slot に流し込んだとき、form 自体が flex 親になり
   選択肢同士に 10px の gap が効くようにする */
[data-kp-modal-joycart-slot] > form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 寸法図ポップアップ（小さめのダイアログ） */
.template_dimension {
  position: fixed;
  inset: 0;
  z-index: 200;
  box-sizing: border-box;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  overscroll-behavior: contain;
  background: transparent;
}
.template_dimension.is-active {
  opacity: 1;
  visibility: visible;
}
.template_dimension .modal_overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.template_dimension_container {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  padding: 36px 28px 28px;
  box-sizing: border-box;
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-green) transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.template_dimension_container::-webkit-scrollbar {
  width: 6px;
}
.template_dimension_container::-webkit-scrollbar-track {
  background: transparent;
}
.template_dimension_container::-webkit-scrollbar-thumb {
  background: var(--accent-green);
  border-radius: 3px;
}
.template_dimension .modal_close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  z-index: 2;
}
.template_dimension_image {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

@media screen and (max-width: 768px) {
  .template_dimension_container {
    padding: 32px 16px 20px;
    max-width: 92vw;
  }
}

/* カード内フリーテキスト（画像上・価格上の任意メモ） */
.all_item_note {
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-word;
}
.all_item_note--middle {
  margin-top: 4px;
  text-align: center;
}
.all_item_note--price {
  margin-top: -8px;
  margin-bottom: -8px;
  text-align: left;
}
.all_item_note--emphasis {
  color: #d63638;
  font-weight: 600;
}

/* ラベル未入力時は価格テキストで inner 全幅を埋め、ラベル有り時と同じ高さを確保 */
.all_item_info_inner--no-title {
  justify-content: center;
}
.all_item_info_inner--no-title .all_item_info_text {
  width: 100%;
  padding: 10px 6px;
}

/* 注文ボタン + note_middle を1グループにし、カード全体の gap(20px) より密に */
.all_item_order_group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
