/* =====================================================================
   bySENSE — product-detail.css （商品詳細 /shop/products/<sku> の意匠差分）
   ────────────────────────────────────────────────────────────────────────
   対象テンプレート（テーマ直編集・安定レイヤ＝build.sh 非生成）:
     theme/shop/sections/products_show_content.liquid
       ← ec-force 標準テンプレート（sample_theme_1.30.4 の同名ファイル。1.30.1 から内容同一）を
         丸ごとコピーして安定レイヤ化したもの。このCSSを <link> している。
         マークアップの差分は2箇所のみ：
           1) このCSSの <link> 追加
           2) 「レビューを見る」ボタン `<button class="c-product_info__show-review">`
              に装飾用クラス `p-review-cta` を追加（js-modal__open / data-target-modal-id
              などJSフック・フォーム部品は一切変更していない）
   ────────────────────────────────────────────────────────────────────────
   1. 「レビューを見る」をテキストリンクからボタンリンクへ（.p-review-cta）
     背景色は購入ボタン（u-color__btn--bg＝テーマカスタマイザ color_btn_bg、
     現行値 #393c41＝var(--ink) の濃色塗り）と被らない、明るい配色にした：
       背景 var(--white) / 文字・アイコン・枠線 var(--ink)。
     「個人の勝手な色」を発明せず、base.css（_head でグローバル読込済）の
     既存トークンのみを再利用している。角丸 2px は本テーマの他ボタン
     （購入ボタン・line-guidance.css・account/contact系）と統一。
     ホバーは購入ボタン自身と同じ「opacity:.4」（bundle.css の
     .c-product_info__form__submit:hover と同一の手法）を踏襲。
   ────────────────────────────────────────────────────────────────────────
   2. 商品本文（product.description）内のインラインリンク装飾
     products_show_content.liquid の detail capture（.c-product_info__description,
     id="product-description"）は product.description / description_mobile を
     エスケープ・strip_html なしでそのまま出力＝管理画面の商品説明にHTML（<a>等）を
     書けば描画される。ブラウザ既定の青文字下線のままだとブランドトーンから外れる
     ため、本文内リンクにブランドの文字色・下線意匠を与える。
     同じクラスは「SKU詳細」(#description) にも使われるため、そちらにも同様に効く
     （どちらも管理画面から自由入力される説明文的テキストであり、スコープ外への
     波及ではない）。
   ────────────────────────────────────────────────────────────────────────
   3. レビュー投稿UI（投稿権限のある会員にだけ出る部分）
     レビュー欄は ec-force 標準セクション products_show_review（テーマで上書きして
     いない＝sample_theme の同名ファイルがそのまま描画）。同じページの別セクション
     だが、このCSSは products_show_content から <link> されているので効く。
     check_review_writing_rule が true の会員（購入済み等）にだけ
       ・投稿ボタン .p-review__inner__entry__btn と投稿フォーム #review-form
       ・投稿結果の flash（.control-alert）
       ・レビューモーダルの「この商品のレビューを投稿する」リンク
     が出る。非購入者では確認できず、標準の見た目のまま残っていた（2026-10 の
     「購入者が #product_review を開くと崩れる」報告を受けて洗い出し）。
     方針:
       ・マークアップ／validate[...]／name・id／JSフックは一切変えない（標準逐語）
       ・#review-form の display には触らない（bundle.js の slideToggle が開閉する）
       ・書体はページ内の他要素と同じカスタマイザ値（u-text--* の !important）に乗る。
         入力欄だけは account/contact と同じ var(--sans) 16px に揃える（標準は
         名前・メールが 13px、タイトル・コメントが 16px とバラバラで、16px 未満は
         iOS Safari がフォーカス時に画面を拡大する）。u-text--input が font-size /
         font-family を !important で出すため、この2つだけ !important で取り返す
       ・星の色（#f1cb6b）はレビュー一覧・平均評価と揃えるため標準のまま
       ・ボタンは 1. の .p-review-cta と同じ白地＋ink 枠／角丸 2px／hover opacity .4
       ・flash は account.css のフラッシュ（赤系 / 白地）と同じ配色
   ────────────────────────────────────────────────────────────────────────
   4. 併売（単品／定期の切り替え）— 2026-11（同月 本番プレビューの指摘で作り直し）
     単品 bySENSE_set_once と定期 bySENSE_set_sub1 を併売として紐づけると、価格の下に
     「単品購入」「定期購入」の2つの label（中に radio name="co_selling_product"）が出る
     （ショップの機能設定「併売商品複数設定」が無効＝ラジオ方式。テーマのカスタマイズで
     「併売商品」を表示し、かつ管理画面で紐づけたとき（またはカスタマイズのプレビュー中）に描画される）。
     標準の見た目は ec-force 既定色の青緑のラジオ（#386f81）＋高さ 42px の白ボタン2つで、
     ブランドから外れているため、ラジオの丸つきの2つ並びのボタンにした:
       ・幅：2つでカートボタン（#btn-add）と同じ幅をちょうど 1/2 ずつ（間 8px）。PC・SP 共通
       ・高さ：カートボタンと同じ 60px・角丸 2px
       ・選択前：白地・文字 var(--ink)・枠 var(--line)・丸＝var(--ink-muted) の輪だけ
       ・選択中：塗り var(--ink-muted) #707476・文字と枠と丸（輪＋点）は白
         （カートボタンの塗り var(--ink) #393c41 より軽いグレーにして、カートボタンと重みがぶつからない
          ようにする。白文字とのコントラスト比は約 4.7:1）
       ・ホバー（選んでいない側だけ）：うすい ink の塗り
       ・どちらが選ばれているかは「丸の点の有無」と「塗り」の両方で示す
       ・色は下の --cosell-* で調整する（#386f81 は使わない）
     方針:
       ・Liquid・input の name/id/value・label の ID とクラスは一切変えない（CSS だけ）。
         切り替え時の value 設定や商品の切り替えは ec-force 本体の JS
         （/assets/shop/products-*.js の ShowView#switchProduct。テーマ外。bundle.js ではない）が行う。
       ・本体 JS は切り替えのたびに、選んだ側の radio を disabled にし、label にインラインで
         opacity（選んだ側 1／反対側 0.6）を書き込む。標準の .c-product_lable（opacity .6）と合わせて
         ID セレクタ＋!important の opacity:1 で打ち消す（状態は塗りと丸で示すため、薄くしない）。
         disabled の radio でも見た目・カーソルは変えない。
       ・選択中の判定はブラウザ標準の radio の checked。標準の装飾 span .frame
         （input の直後の兄弟）を「ボタン全面の塗り」に、.label の ::before / ::after を「ラジオの丸」
         （輪／点）に使い、input:checked + .frame / input:checked ~ .label で塗る＝:has() に頼らない。
       ・radio 自体は見えなくするが、フォーカスとキーボード操作（矢印キーでの切替）は残す。
       ・幅は wrapper（3クラスの複合セレクタ）を width:100%、label を flex:1 1 0 で等分。
         本番プレビューで「全体の約2/3・左寄せ」と報告された（2026-11）が、テーマの CSS・本番 HTML の
         どの組み合わせでも再現しなかったため、wrapper と label の width / max-width / margin /
         flex を !important で明示し、外から何が入っても 1/2×2 に戻るようにしている。
       ・文字色・枠・書体サイズは theme_customize.css の .u-text--btn--reverse /
         .u-color__btn--bg--reverse が !important で出すため、ID セレクタ＋!important で取り返す
         （他のボタンには波及しない）。
       ・色のトークン --cosell-* は §5（タブ方式）と共通。
   ────────────────────────────────────────────────────────────────────────
   5. 併売（タブ方式）— 2026-11
     ショップの機能設定「併売商品複数設定」が有効のときは、§4 のラジオではなく、購入フォームの外
     （カートボタン・お気に入りの下）に「通常購入」「定期購入」のタブ（ul.c-product_info__co_selling__nav
     ＞ li ＞ a）と、タブごとの商品カード（それぞれにカートボタン）が出る。2026-11 の本番プレビューで
     出ていたのはこちらで、「約2/3幅・左寄せ」は標準 bundle.css の li { float:left; width:33.3% }
     （関連商品タブを含む3つ並び前提）、「カートボタンより濃い黒」は .active a { background:#000 } が原因。
     ラジオ方式と同じ見た目にした:
       ・幅：タブ2つ（関連商品タブを出す設定なら3つ）で、カートボタンと同じ幅を等分（間 8px）
       ・高さ 60px・角丸 2px・書体と色は §4 と同じ（--cosell-*）
       ・ラジオの丸：a::before 1つで描く（a の中身が文字だけで、点を中心に置く要素がないため、
         点は inset の box-shadow で塗り色を内側に敷き、中心 6px の白を残す）
     方針:
       ・Liquid・クラス・href・ID（#co-selling-*-tab）は変えない（CSS だけ）。
       ・選択中は ec-force 本体 JS（CoSellingProductView。テーマ外）が付ける .active で判定する。
         標準 CSS の「.c-product_info__co_selling__nav .active a」に合わせ、li.active ＞ a を基本にし、
         a.active でも同じに見えるようにした。タブの中身（商品カード）は標準のまま。
   ────────────────────────────────────────────────────────────────────────
   デザイントークンは base.css（_head でグローバル読込）の :root を使う:
     --ink #393c41 / --ink-60 #4b4e54 / --ink-muted #707476 / --white #fff / --bg #d0d0d0 /
     --line / --sans / --ease
   ===================================================================== */

/* ============ 1. 「レビューを見る」ボタン化 ============ */
.p-review-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 18px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 2px;
  transition: opacity .3s var(--ease);
}
.p-review-cta:hover {
  opacity: .4;
}
.p-review-cta img {
  width: 16px;
  height: 16px;
}
.p-review-cta span {
  text-decoration: none;
  white-space: nowrap;
}

/* ============ 2. 商品説明本文中のインラインリンク ============ */
.c-product_info__description a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--ink-60);
  text-underline-offset: 3px;
  transition: opacity .3s var(--ease);
}
.c-product_info__description a:visited {
  color: var(--ink);
}
.c-product_info__description a:hover {
  opacity: .4;
}

/* ============ 3. レビュー投稿UI（投稿権限のある会員のみ） ============ */
/* 投稿ボタン（button）／「ログインしてレビューを書く」（a）／モーダルの投稿リンク。
   標準は 13px の下線テキストで、レビュー欄の中で見落とされやすかった */
.p-review__inner__entry__btn,
.p-review_modal__add-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 240px;
  padding: 14px 28px;
  background: var(--white);
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  letter-spacing: .08em;
  cursor: pointer;
  transition: opacity .3s var(--ease);
}
.p-review__inner__entry__btn:hover,
.p-review_modal__add-review:hover {
  opacity: .4;
}
.p-review_modal__add-review {
  margin-top: 10px;
}

/* 投稿フォームの器：薄い背景（#F4F8FA）の上で入力欄が浮かないよう白いカードにする。
   display は bundle.js（slideToggle）の担当なので指定しない */
.p-review__inner__entry__content {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.p-review__inner__entry__content__notes {
  margin: 10px 0 32px;
}

/* 入力テーブル：ラベル列の幅を固定して入力欄の左端を揃える */
.p-review .c-form_table {
  width: 100%;
}
.p-review .c-form_table > tbody > tr > th {
  width: 9em;
  padding-top: 15px;
  letter-spacing: .04em;
}
.p-review .c-form_table > tbody > tr > th .u-color__text--alert {
  margin-left: 4px;
  color: #b23a2e;
}
.p-review .c-form_table > tbody > tr > td {
  padding: 8px 0;
}
.p-review .c-form_table input[type="text"],
.p-review .c-form_table textarea {
  width: 100%;
  border-width: 1px;
  border-style: solid;
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans) !important;
  font-size: 16px !important;
  font-weight: 400;
  transition: box-shadow .3s var(--ease);
}
.p-review .c-form_table input[type="text"] {
  height: 50px;
  padding: 0 16px;
}
.p-review .c-form_table textarea {
  min-height: 140px;
  padding: 14px 16px;
  line-height: 1.8;
  resize: vertical;
}
/* 枠色は u-color__border--input（!important）が持つので、フォーカスは box-shadow で示す */
.p-review .c-form_table input[type="text"]:focus,
.p-review .c-form_table textarea:focus {
  outline: none;
  box-shadow: 0 0 0 1px var(--ink);
}
/* ログイン会員はメール欄が disabled（会員のメールアドレスを表示するだけ） */
.p-review .c-form_table input:disabled {
  color: var(--ink-60);
  opacity: .6;
  cursor: not-allowed;
}
.p-review .c-review_star {
  gap: 4px;
  padding-top: 6px;
}
.p-review .c-review_star__item {
  cursor: pointer;
}

/* 送信・キャンセル：標準のマークアップ順（キャンセル → 投稿）のまま、表示だけ
   「投稿」を上・「キャンセル」をその下の補助リンクにする（order のみ。DOM は不変） */
.p-review__inner__entry__content__form {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.p-review__inner__entry__content__form > .c-form_table {
  align-self: stretch;
}
.p-review__inner__entry__content__form__submit {
  order: 1;
  margin: 32px auto 0;
  letter-spacing: .12em;
}
.p-review__inner__entry__content__form__cancel {
  order: 2;
  margin-top: 20px;
  padding-bottom: 1px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

/* 投稿結果の flash（.control-alert > .text）：account.css のフラッシュと同じ配色 */
.p-review .control-alert {
  max-width: 720px;
  margin: 24px auto 32px;
  padding: 0;
}
.p-review .control-alert > .text {
  padding: 14px 18px;
  border-radius: 2px;
  font-size: 14px;
  line-height: 1.6;
}
.p-review .alert-danger > .text {
  background: rgba(192, 57, 43, .07);
  border: 1px solid rgba(192, 57, 43, .38);
  color: #b23a2e;
}
.p-review .alert-success > .text {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* ============ 4. 併売（単品／定期の切り替え） ============ */
/* 色は §4（ラジオ方式）と §5（タブ方式）で共通。ここを変えると両方に効く */
.c-product_info__form__buttons.btn-flex.c-product_info__form__subsdetail__input__inputwrap,
.c-product_info__co_selling {
  --cosell-on: var(--ink-muted);            /* 選択中の塗り（カートボタン --ink より軽いグレー） */
  --cosell-on-text: var(--white);
  --cosell-off: var(--white);               /* 選択前の地 */
  --cosell-off-text: var(--ink);
  --cosell-off-line: var(--line);
  --cosell-off-ring: var(--ink-muted);      /* 選択前のラジオの輪 */
  --cosell-hover: rgba(57, 60, 65, .06);
}
.c-product_info__form__buttons.btn-flex.c-product_info__form__subsdetail__input__inputwrap {
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: space-between;           /* 標準の flex-end / 1080px 以下 flex-start を打ち消す */
  align-items: stretch;
  column-gap: 8px;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 20px auto 0 !important;           /* 万一 幅を広げられない祖先の中でも中央に置く */
  padding: 0 !important;
}
#label-single-product,
#label-recurring-product {
  position: relative;
  box-sizing: border-box;
  flex: 1 1 0 !important;                   /* 2つで等分（標準 .fix-hover の width:100% は使わない） */
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  height: 60px;                             /* カートボタン（.fix-hover）と同じ */
  margin: 0 !important;                     /* 標準 label:not(:first-child) の margin-left 10px / 6px を打ち消す */
  padding: 0 12px;
  justify-content: center;
  align-items: center;
  border-radius: 2px;
  background: var(--cosell-off) !important;
  border: 1px solid var(--cosell-off-line) !important;
  cursor: pointer;
  opacity: 1 !important;                    /* 標準 .c-product_lable（.6）と本体 JS のインライン opacity（.6）を打ち消す */
  transition: none;
}
#label-single-product:hover,
#label-recurring-product:hover {
  opacity: 1 !important;                    /* 標準 .btn-half:hover（.4）を打ち消す。ホバーは下の .frame で示す */
}
/* radio は見えなくする（クリック・キーボード操作・送信値はそのまま）。本体 JS が disabled にしても見た目は変えない */
#label-single-product input[type=radio],
#label-recurring-product input[type=radio] {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
/* 標準の .frame（ラジオの丸）＝ボタン全面の塗りの層に転用。inset -1px で枠線も覆う
   （label 自身は :checked を見られないため、選択中の枠はこの塗りで塗りと同じ色になる） */
#label-single-product > .frame,
#label-recurring-product > .frame {
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: inherit;
  background: transparent !important;
  transition: background-color .3s var(--ease);
}
#label-single-product > .frame::before,
#label-recurring-product > .frame::before {
  content: none;                            /* 標準の青緑の点（丸は .label 側で描く） */
}
#label-single-product > .label,
#label-recurring-product > .label {
  position: relative;
  z-index: 2;                               /* 塗りの層（.frame・フォーカス時 z-index 1）より前 */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  white-space: nowrap;
  color: var(--cosell-off-text);
  transition: color .3s var(--ease);
}
/* ラジオの丸：::before＝輪（16px）／::after＝点（6px・輪の中心） */
#label-single-product > .label::before,
#label-recurring-product > .label::before {
  content: "";
  flex: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cosell-off-ring);
  border-radius: 50%;
  transition: border-color .3s var(--ease);
}
#label-single-product > .label::after,
#label-recurring-product > .label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 5px;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--cosell-on-text);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
/* 選択中 */
#label-single-product > input[type=radio]:checked + .frame,
#label-recurring-product > input[type=radio]:checked + .frame {
  background: var(--cosell-on) !important;
}
#label-single-product > input[type=radio]:checked ~ .label,
#label-recurring-product > input[type=radio]:checked ~ .label {
  color: var(--cosell-on-text);
}
#label-single-product > input[type=radio]:checked ~ .label::before,
#label-recurring-product > input[type=radio]:checked ~ .label::before {
  border-color: var(--cosell-on-text);
}
#label-single-product > input[type=radio]:checked ~ .label::after,
#label-recurring-product > input[type=radio]:checked ~ .label::after {
  opacity: 1;
}
/* ホバー（選んでいない側だけ・マウス操作の端末） */
@media (hover: hover) and (pointer: fine) {
  #label-single-product:hover > input[type=radio]:not(:checked) + .frame,
  #label-recurring-product:hover > input[type=radio]:not(:checked) + .frame {
    background: var(--cosell-hover) !important;
  }
}
/* キーボード操作時のフォーカス表示 */
#label-single-product > input[type=radio]:focus-visible + .frame,
#label-recurring-product > input[type=radio]:focus-visible + .frame {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  z-index: 1;
}

/* ============ 5. 併売（タブ方式）— §4 と同じ見た目 ============ */
.c-product_info__co_selling {
  margin: 20px 0 0;
}
.c-product_info__co_selling__nav {
  display: flex !important;
  flex-wrap: nowrap;
  justify-content: space-between;
  column-gap: 8px;
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.c-product_info__co_selling__nav::before,
.c-product_info__co_selling__nav::after {
  content: none;                            /* 標準の clearfix（float をやめたので不要。残すと flex の間隔が増える） */
}
.c-product_info__co_selling__nav__list {
  float: none !important;                   /* 標準 float:left＋width:33.3%（関連商品タブを含む3つ前提）を打ち消す */
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  border: 0 !important;                     /* 枠は a 側で描く */
  border-radius: 2px;
}
.c-product_info__co_selling__nav__list > a {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 60px;                             /* カートボタンと同じ */
  padding: 0 12px;
  border: 1px solid var(--cosell-off-line);
  border-radius: 2px;
  background: var(--cosell-off);
  color: var(--cosell-off-text);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .1em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
/* ラジオの丸：::before 1つで輪（16px）と点（inset の box-shadow で塗り色を内側に敷き、中心 6px だけ白を残す）を描く */
.c-product_info__co_selling__nav__list > a::before {
  content: "";
  flex: none;
  box-sizing: border-box;
  width: 16px;
  height: 16px;
  border: 1px solid var(--cosell-off-ring);
  border-radius: 50%;
  background: transparent;
  transition: border-color .3s var(--ease);
}
/* 選択中（ec-force 本体 JS が li に .active を付ける。a に付く場合も同じにする） */
.c-product_info__co_selling__nav .active > a,
.c-product_info__co_selling__nav__list > a.active {
  background: var(--cosell-on);
  border-color: var(--cosell-on);
  color: var(--cosell-on-text);
}
.c-product_info__co_selling__nav .active > a::before,
.c-product_info__co_selling__nav__list > a.active::before {
  border-color: var(--cosell-on-text);
  background: var(--cosell-on-text);
  box-shadow: inset 0 0 0 4px var(--cosell-on);
}
/* 選べないタブ（標準 a.disabled） */
.c-product_info__co_selling__nav__list > a.disabled {
  color: var(--ink-muted);
  cursor: default;
}
/* ホバー（選んでいない側だけ・マウス操作の端末） */
@media (hover: hover) and (pointer: fine) {
  .c-product_info__co_selling__nav__list:not(.active) > a:not(.active):not(.disabled):hover {
    background: var(--cosell-hover);
    opacity: 1;
  }
}
.c-product_info__co_selling__nav__list > a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* =====================================================================
   スマホ (<768) — 他コンポーネント（items/contact/account/line-guidance）と
   同じブレークポイントを踏襲。レビュー行（.c-product_info__review）は
   星評価とボタンを横並びにしている bundle.css の flex(nowrap) のままだと
   幅の狭い端末で1行に収まらないため、折り返しのみ許可する。
   ===================================================================== */
@media (max-width: 767px) {
  .c-product_info__review {
    flex-wrap: wrap;
  }
  .p-review-cta {
    padding: 7px 16px;
  }
  /* 3. レビュー投稿UI：ラベルは入力欄の上に積む（bundle の SP 縦積みに合わせる） */
  .p-review__inner__entry__content {
    padding: 32px 20px;
  }
  .p-review .c-form_table > tbody > tr > th {
    width: auto;
    padding-top: 0;
  }
  .p-review .c-form_table > tbody > tr > td {
    padding: 0;
  }
  .p-review__inner__entry__content__form__submit {
    margin-top: 28px;
  }
}
