@charset "UTF-8";

/* ===========================================
  product.css
  -------------------------------------------
  single-product 用の新規スタイル。
  style.css には干渉しない（functions.php で
  is_singular('product') の時のみ読み込み）。
   =========================================== */

/* ===========================================
  DESIGN TOKENS（CSS変数）
  ※ 色・フォントサイズ・余白はここで一括管理
   =========================================== */
.single-product {
  /* --- カラー --- */
  --c-primary: #80243c; /* テーマ赤 */
  --c-text: #333;
  --c-bg-light: #f5f5f5; /* 薄いグレー（カード背景） */
  --c-bg-spec-th: #f4f1e8; /* テーブル見出し背景 */
  --c-border: #b9b9b9;
  --c-white: #fff;

  /* --- フォントサイズ（数値トークン） --- */
  --fs-24: 24px;
  --fs-22: 22px;
  --fs-21: 21px;
  --fs-18: 18px;
  --fs-17: 17px;
  --fs-16: 16px;
  --fs-15: 15px;
  --fs-14: 14px;
  --fs-13: 13px;

  /* --- 余白（数値トークン） --- */
  --mg-100: 100px;
  --mg-80: 80px;
  --mg-60: 60px;
  --mg-40: 40px;
  --mg-30: 30px;
}

@media screen and (max-width: 767px) {
  .single-product {
    --fs-24: 18px;
    --fs-22: 18px;
    --fs-21: 17px;
    --fs-18: 15px;
    --fs-17: 15px;
    --fs-16: 14px;
    --fs-15: 14px;
    --fs-14: 13px;
    --fs-13: 12px;

    --mg-100: 60px;
    --mg-80: 50px;
    --mg-60: 40px;
    --mg-40: 25px;
    --mg-30: 20px;
  }
}

/* ===========================================
    SECTION ラッパ
   =========================================== */

.pr-content {
  margin-bottom: var(--mg-80);
}

.pr-section + .pr-section {
  margin-top: var(--mg-80);
}

.pr-section > * + *,
.pr-spec__inner > * + *,
.pr-box > * + * {
  margin-top: var(--mg-30);
}

/* WordPressのwpautopが挿入する空pを非表示に */
.single-product p:empty {
  display: none;
}

/* ===========================================
  01. ラッパ
   =========================================== */
.pro-main.inner {
  width: 100%;
  max-width: calc(1100px + 6vw * 2);
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;

  padding: var(--mg-100) 6vw;
}

/* ===========================================
  02. セクション見出し
   =========================================== */
.pr-heading {
  font-size: var(--fs-24);
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 var(--mg-20);
  line-height: 1.5;
}

/* ===========================================
   グレーボックス（主な使用用途 / 接続例 / 汎用）
   ※ 背景・余白・タイトルは .pr-box で共通管理
   =========================================== */
.pr-box {
  padding: 30px 50px 40px;
  background: var(--c-bg-light);

  @media screen and (max-width: 767px) {
    padding: 30px 20px;
  }
}

.pr-box__title {
  font-size: var(--fs-18);
  font-weight: 700;
  text-align: center;
  color: var(--c-primary);
  margin: 0;
}

/* タイトル直下の本文は詰める */
.pr-box__title + .pr-text {
  margin-top: 10px;
}

.pr-box__sub {
  display: inline-block;
  font-size: var(--fs-18);
  font-weight: 400;
  margin-left: 8px;
  color: var(--c-text);

  @media screen and (max-width: 767px) {
    display: block;
    margin: 5px 0 0;
  }
}

/* ===========================================
   03. 主な使用用途（4カラム）
   =========================================== */

.pr-uses__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;

  @media screen and (max-width: 767px) {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

.pr-uses__item {
  text-align: center;
}

.pr-uses__img {
  width: 70px;
  margin: 0 auto 15px;

  img {
    width: 100%;
    height: auto;
    display: block;
  }
}

.pr-uses__name {
  font-size: var(--fs-21);
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 5px;
}

.pr-uses__desc {
  font-size: var(--fs-14);
  line-height: 1.6;
  margin: 0;
}

/* ===========================================
   04. テキスト + 画像（2カラム）
   =========================================== */
.pr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mg-30);

  @media screen and (max-width: 767px) {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* 画像を左、テキストを右に */
.pr-row--reverse .pr-row__img {
  order: -1;
}

@media screen and (max-width: 767px) {
  .pr-row--reverse .pr-row__img {
    order: 0;
  }
}

.pr-row__text p {
  font-size: var(--fs-16);
  line-height: 1.8;
  margin: 0;
}

.pr-row__text p + p {
  margin-top: 1em;
}

.pr-row__img img {
  width: 100%;
  height: auto;
  display: block;
}

/* 単独の本文段落 */
.pr-text {
  font-size: var(--fs-16);
  line-height: 1.8;
  margin: 0;
}

.pr-text + .pr-text {
  margin-top: 1em;
}

/* 単独の全幅画像 */
.pr-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===========================================
   リード文（赤枠・赤文字の強調ボックス）
   =========================================== */
.pr-lead {
  text-align: center;
  color: var(--c-primary);
  font-weight: 700;
  font-size: var(--fs-18);
  line-height: 1.7;
  border: 1px solid var(--c-primary);
  padding: 25px 30px;
  margin: 0;

  @media screen and (max-width: 767px) {
    padding: 20px 15px;
  }
}

.pr-lead__note {
  display: inline-block;
  font-size: var(--fs-13);
  font-weight: 400;
  margin-top: 8px;
}

/* ===========================================
   丸ポイントリスト（●赤）
   =========================================== */
.pr-list {
  list-style: none;
  padding: 0;
  margin: 0;

  li {
    font-size: var(--fs-16);
    line-height: 1.7;
    padding-left: 1.3em;
    position: relative;
  }

  li::before {
    content: "●";
    color: var(--c-primary);
    position: absolute;
    left: 0;
  }

  li + li {
    margin-top: 0.5em;
  }
}

/* ===========================================
   05. メリットリスト（Merit.01〜04）
   =========================================== */
.merit-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--mg-40);

  @media screen and (max-width: 991px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media screen and (max-width: 520px) {
    grid-template-columns: 1fr;
  }

  .merit-list__item {
    background-color: var(--c-bg-light);
    padding: 10px 20px 20px;
  }

  .merit-list__num {
    color: var(--c-primary);
    font-size: var(--fs-16);
    font-weight: 500;
    margin: 0 0 0.8em;
  }

  .merit-list__img {
    margin: 0 0 15px;

    img {
      width: 100%;
      height: auto;
      display: block;
    }
  }

  .merit-list__ttl {
    color: var(--c-primary);
    font-size: var(--fs-21);
    font-weight: 700;
    text-align: center;
    margin: 0 0 5px;
    line-height: 1.4;
  }

  .merit-list__desc {
    font-size: var(--fs-16);
    line-height: 1.5 !important;
    text-align: center;
    margin: 0;

    .small {
      display: inline-block;
      font-size: var(--fs-13);
      margin-top: 5px;
    }
  }
}

/* ===========================================
   06. SDK機能リスト（2列カード）
   =========================================== */
.sdk-feature-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--mg-30);
  background-color: var(--c-bg-light);
  padding: 30px;

  @media screen and (max-width: 767px) {
    grid-template-columns: 1fr;
    gap: 15px;
  }
}

.sdk-feature-list__item {
  background-color: var(--c-white);
  border: 1px solid var(--c-border);
}

.sdk-feature-list__ttl {
  background-color: var(--c-primary);
  color: var(--c-white);
  font-size: var(--fs-17);
  font-weight: 700;
  padding: 10px 20px;
  margin: 0 !important;
}

.sdk-feature-list__body {
  list-style: none;
  padding: 25px;
  margin: 0;

  li {
    color: var(--c-primary);
    font-size: var(--fs-21);
    font-weight: 700;
    line-height: 1.6;
    padding-left: 1.2em;
    position: relative;

    &::before {
      content: "●";
      position: absolute;
      left: 0;
    }

    & + li {
      margin-top: 4px;
    }
  }
}

/* ===========================================
   07. 接続例
   =========================================== */
.pr-connection__img img {
  width: 100%;
  height: auto;
  display: block;
  max-width: 850px;
  margin: 0 auto;
}

/* 複数図（背面・コントローラー等）を横並び */
.pr-connection__figs {
  display: flex;
  justify-content: center;
  gap: var(--mg-40);

  @media screen and (max-width: 767px) {
    flex-direction: column;
    align-items: center;
    gap: var(--mg-30);
  }
}

.pr-connection__fig {
  margin: 0;
  text-align: center;

  img {
    width: 100%;
    height: auto;
    display: block;
  }

  figcaption {
    margin-top: 8px;
    font-size: var(--fs-13);
    color: var(--c-text);
  }
}

/* ===========================================
   08. ボタン
   =========================================== */
.pr-btns {
  display: flex;
  justify-content: center;
  margin-top: var(--mg-60);
}

/* 既存 .btn .a と同じ設定 */
.pr-btn {
  display: block;
  width: 280px;
  text-align: center;
  font-size: var(--fs-15);
  line-height: 60px;
  color: var(--c-white) !important;
  background-color: var(--c-primary);
  border: 1px solid var(--c-primary);
  border-radius: 40px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: 0.3s;
  text-decoration: none;

  &::before {
    content: "";
    width: 120%;
    height: 200%;
    position: absolute;
    top: -50%;
    right: 0;
    z-index: -1;
    background: var(--c-white);
    border-radius: 0 100% 100% 0;
    transform: translateX(-100%);
    transition: transform ease 0.3s;
  }

  &:hover {
    color: var(--c-primary) !important;

    &::before {
      transform: translateX(10%);
    }
  }
}

/* ===========================================
   09. 製品仕様セクション
   =========================================== */
.pr-spec {
  background-color: var(--c-bg-light);
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);

  .pr-heading {
    margin-bottom: var(--mg-40);
  }
}

.pr-spec__caption {
  font-size: var(--fs-17);
  color: var(--c-white);
  text-align: center;
  background-color: #333;
  padding: 8px 0;
  margin: 0;
}

/* ===========================================
   10. サブタイトル
   =========================================== */
.pr-sub {
  font-size: var(--fs-16);
  color: var(--c-text);
  line-height: 1.5;
  margin: 0.5em 0 var(--mg-30);

  &::before {
    content: "―― ";
    letter-spacing: -0.1em;
    margin-right: 0.2em;
  }
}

/* ===========================================
  11. LISr仕様表（横スクロール）
  ※ style.css から移動
   =========================================== */
.table_lisr-101 {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

  table {
    width: 1600px;
    border-collapse: collapse;
    background-color: var(--c-white);
    font-size: var(--fs-15);

    th,
    td {
      box-sizing: border-box;
      padding: 10px;
      border: 1px solid var(--c-border);
      vertical-align: middle;
    }

    th {
      width: 120px;
      background-color: var(--c-bg-spec-th);
      text-align: center;
    }

    tr td.gr {
      width: 120px;
      background-color: var(--c-bg-light);
      font-weight: 500;
    }

    tr td:not(.gr) {
      width: calc((1600px - 240px) / 8);
      word-break: break-word;
    }
  }
}

/* ===========================================
  12. ソフト仕様表（3列・全幅）
   =========================================== */
.table-spec {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;

  table {
    width: 100%;
    min-width: 900px;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: var(--c-white);
    font-size: var(--fs-15);

    th,
    td {
      box-sizing: border-box;
      padding: 10px 12px;
      border: 1px solid var(--c-border);
      vertical-align: middle;
      word-break: break-word;
    }

    th {
      background-color: var(--c-bg-spec-th);
      text-align: center;
    }

    td.gr {
      background-color: var(--c-bg-light);
      font-weight: 500;
    }

    /* 1列目=大項目 / 2列目=小項目 を固定し、残り4列を均等幅に */
    colgroup col:nth-child(1) {
      width: 105px;
    }

    colgroup col:nth-child(2) {
      width: 130px;
    }
  }
}
