/**
 * 商品ページの表示スタイル。
 * ポイント、特徴の枠、SC40Aの導入フローを定義する。
 */

/* 商品詳細ページのFVのポイント */
.product-point {
  border-radius: 1rem !important;
  box-shadow: 0px 1rem 1rem -0.5rem rgba(0, 0, 0, 0.1);
  --swl-box_padding: 1rem;
  padding-bottom: 0.5em !important;
}
@media screen and (max-width: 599px) {
  .product-point {
    padding: 0 0.5em 0.5em 0 !important;
  }
}

/* 商品詳細ページの特徴の枠 */
.product-feature {
  border-radius: 1rem;
  box-shadow: 0px 1rem 1rem -0.5rem rgba(0, 0, 0, 0.1);
  --swl-box_padding: 2rem;
  padding: 1.5rem !important;
}

@media screen and (max-width: 599px) {
  .product-feature {
    padding: 1.5rem 1rem !important;
  }
}

/* SC40Aの商品写真。共通のラベル・特徴枠はcomponents.cssで管理する。 */
/* SWELLの縦積み境界に合わせ、特徴カード内の文章を画像の左右端に揃える。 */
@media screen and (max-width: 600px) {
  .product-feature .wp-block-media-text.is-stacked-on-mobile > .wp-block-media-text__content {
    padding-inline: 0 !important;
  }
}

.page-id-2305 .sc40a-feature .wp-block-image img,
.page-id-2305 .sc40a-feature .wp-block-media-text__media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 360px;
  object-fit: contain;
  margin-inline: auto;
}

/* 比較用の横並びフロー。本文・見出しはWordPressの標準ブロック。 */
.page-id-2305 .sc40a-flow-cards {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
.page-id-2305 .sc40a-flow-card {
  position: relative;
  min-width: 0;
  margin: 0 !important;
  padding: 22px 14px;
  border: 1px solid #dce7ee;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}
.page-id-2305 .sc40a-flow-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 100px;
  right: -13px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--color_main);
  border-right: 2px solid var(--color_main);
  transform: rotate(45deg);
  z-index: 1;
}
.page-id-2305 .sc40a-flow-step {
  margin: 0 0 12px !important;
  color: var(--color_main);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.page-id-2305 .sc40a-flow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 16px !important;
  border-radius: 50%;
  background: #f2fafe;
}
.page-id-2305 .sc40a-flow-icon svg {
  display: block;
  width: 56px;
  height: 48px;
}
.page-id-2305 .sc40a-flow-card-title {
  margin: 0 !important;
  padding: 0 !important;
  color: #333;
  font-size: 16px !important;
  line-height: 1.5;
}
.page-id-2305 .sc40a-flow-card-title::before,
.page-id-2305 .sc40a-flow-card-title::after {
  display: none;
}
.page-id-2305 .sc40a-flow-card > p:not(.sc40a-flow-step):not(.sc40a-flow-tag) {
  margin: 12px 0 0 !important;
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}
.page-id-2305 .sc40a-flow-tag {
  display: inline-block;
  margin: 14px 0 0 !important;
  padding: 4px 9px;
  border-radius: 20px;
  background: #e9f5fc;
  color: #12619a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}
.page-id-2305 .sc40a-flow-note {
  margin: 24px 0 0 !important;
  font-size: 13px;
  text-align: center;
}
@media (min-width: 600px) and (max-width: 959px) {
  .page-id-2305 .sc40a-flow-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
  }
  .page-id-2305 .sc40a-flow-card:nth-child(3)::after {
    display: none;
  }
}
@media (max-width: 599px) {
  .page-id-2305 .product-point {
    min-height: 6.5rem;
  }
  .page-id-2305 .sc40a-flow-cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .page-id-2305 .sc40a-flow-card {
    padding: 24px;
  }
  .page-id-2305 .sc40a-flow-card:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -17px;
    left: calc(50% - 5px);
    transform: rotate(135deg);
  }
  .page-id-2305 .sc40a-flow-card > p:not(.sc40a-flow-step):not(.sc40a-flow-tag) {
    font-size: 14px;
  }
}

/* 配置・列数・余白はSWELL標準のリッチカラムで管理する。 */
/* 商品名リンクの操作範囲をカード全体に広げる。 */
.roboa-lineup-card {
  position: relative;
}
.roboa-lineup-card .roboa-lineup-name {
  position: static;
}
.roboa-lineup-name a {
  color: inherit;
  text-decoration: none;
}
.roboa-lineup-name a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.roboa-lineup-card:hover .roboa-lineup-name a {
  text-decoration: underline;
}
.roboa-lineup-name a:focus-visible {
  outline: none;
}
.roboa-lineup-name a:focus-visible::after {
  outline: 3px solid var(--color_main);
  outline-offset: 3px;
}
/* マウス操作時にカード全体をわずかに拡大する。 */
@media (hover: hover) and (pointer: fine) {
  .roboa-lineup-card {
    transition: transform 180ms ease;
  }
  .roboa-lineup-card:hover {
    transform: scale(1.02);
    z-index: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .roboa-lineup-card {
    transition: none;
  }
}

/* 埋め込み動画の右カラムを、標準カラムが縦積みになる幅では先に表示する。 */
@media (max-width: 781px) {
  .product-feature--media-first-mobile > .wp-block-column:last-child {
    order: -1;
  }
}
