/**
 * 製品詳細ページの図解ブロック（c-product-visual.php）
 * - 主な仕様のアイコン表示（.p-pv-keyspecs）
 * - つなぎ方・使い方の図（.p-pv-flow）
 * 製品 JSON に visual がある製品だけ読み込む。配色はサイトのアクセント（#9c0071）に合わせる。
 */

.p-pv-icon {
  display: block;
  width: 100%;
  height: 100%;
}

/* 主な仕様のアイコン表示 */
.p-pv-keyspecs {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (width >= 768px) {
  .p-pv-keyspecs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (width >= 1100px) {
  .p-pv-keyspecs {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}
.p-pv-keyspecs__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px 18px;
  background: #fff;
  border: 1px solid #e3dde1;
  border-radius: 10px;
  text-align: center;
}
.p-pv-keyspecs__icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  padding: 10px;
  color: #9c0071;
  background: #f7e8f2;
  border-radius: 50%;
  box-sizing: border-box;
}
.p-pv-keyspecs__value {
  color: #05192d;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.p-pv-keyspecs__label {
  color: #4a5563;
  font-size: 13px;
  line-height: 1.5;
}
.p-pv-keyspecs__note {
  margin: 12px 0 0;
  color: #4a5563;
  font-size: 13px;
  text-align: right;
}

/* 製品写真 */
.p-pv-photos {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (width >= 900px) {
  .p-pv-photos--n3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .p-pv-photos--n4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.p-pv-photos__figure {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  background: #fff;
  border: 1px solid #e3dde1;
  border-radius: 10px;
  overflow: hidden;
}
.p-pv-photos__figure img,
.p-pv-photos__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}
.p-pv-photos__caption {
  padding: 10px 12px 12px;
  border-top: 1px solid #f0ecef;
  color: #05192d;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}
.p-pv-photos__credit {
  margin: 10px 0 0;
  color: #6b7280;
  font-size: 12px;
  text-align: right;
}

/* 利用イメージ */
.p-pv-scene {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (width >= 900px) {
  .p-pv-scene {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
  }
}
.p-pv-scene__figure {
  margin: 0;
}
.p-pv-scene__figure img,
.p-pv-scene__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.p-pv-scene__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}

/* つなぎ方・使い方の図 */
.p-pv-flow__lead {
  max-width: 880px;
  margin: 0 auto 2rem;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}
.p-pv-flow {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  max-width: 1080px;
}
@media (width >= 900px) {
  .p-pv-flow {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
}
.p-pv-flow__node {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 22px 14px 18px;
  background: #fff;
  border: 2px solid #e3dde1;
  border-radius: 14px;
  text-align: center;
}
.p-pv-flow__icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  padding: 12px;
  color: #05192d;
  background: #eef2f6;
  border-radius: 16px;
  box-sizing: border-box;
}
.p-pv-flow__node:first-child .p-pv-flow__icon {
  color: #fff;
  background: #9c0071;
}
.p-pv-flow__label {
  color: #05192d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.p-pv-flow__sub {
  color: #4a5563;
  font-size: 13px;
  line-height: 1.6;
}
.p-pv-flow__link {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  color: #9c0071;
  text-align: center;
}
@media (width >= 900px) {
  .p-pv-flow__link {
    width: 130px;
  }
}
.p-pv-flow__link-icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
}
.p-pv-flow__link-label {
  color: #05192d;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}
.p-pv-flow__arrow {
  display: inline-flex;
  width: 30px;
  height: 30px;
  transform: rotate(90deg);
}
@media (width >= 900px) {
  .p-pv-flow__arrow {
    transform: none;
  }
}
.p-pv-flow__note {
  max-width: 1080px;
  margin: 16px auto 0;
  color: #4a5563;
  font-size: 13px;
  line-height: 1.7;
}
