/* ===================================================================
 * #273 商品詳細 新レイアウト（3カラム）＋ お見積りCTAカード
 * Product/detail.twig のインライン <style> から分離したもの。
 * 読み込みは detail.twig の {% block stylesheet %}（custom.css の後）。
 * =================================================================== */

/* #273 新レイアウト: 見出し下のボーダーを削除（custom.css の .ldt02 border-bottom を打ち消す）*/
.pdInfo {
  margin: 0 0 8px;
}

/* MAP-003 担当者コメント（緑ボックス）*/
.pdInfo__comment {
  background: rgba(244, 249, 241, 1);
  border: 1px solid rgba(220, 235, 212, 1);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 0 18px;
}

.pdInfo__commentTtl {
  position: relative;
  padding-left: 16px;
  color: rgba(47, 107, 40, 1);
  font-weight: 700;
  font-size: 12px;
  margin: 0 0 6px;
  letter-spacing: 2%;
}

.pdInfo__commentTtl::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4e9a2f;
}

.pdInfo__commentBody {
  font-size: 12px;
  line-height: 18px;
  color: #111827;
  font-weight: 400;
}

/* MAP-004 タグ */
#wrapper article p.pdInfo__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 0 0 16px;
}

.pdInfo__tag {
  display: inline-block;
  border: 1px solid #b5b5b5;
  border-radius: 3px;
  padding: 3px 5px 1px;
  font-size: 11px;
  color: #333;
  text-decoration: none;
  min-width: 80px;
  text-align: center;
  border-width: 1px 1px 3px 1px;
  font-weight: bold;
  line-height: 16px;
}

/* MAP-002 商品コード */
#wrapper article p.pdInfo__code {
  font-size: 12px;
  color: #333;
  margin: 0 0 10px;
  font-weight: 400;
}

.pdInfo__code .code-min {
  font-size: 12px;
  color: #333;
  margin: 0 0 6px;
  font-weight: 400;
}

/* MAP-005 / MAP-006 価格 */
.pdInfo__price {
  margin: 0 0 6px;
  line-height: 1.4;
}

.pdInfo__priceLabel {
  font-size: 12px;
  color: #111827;
  font-weight: 400;
}

.pdInfo__priceMain {
  font-size: 24px;
  font-weight: 700;
}

.pdInfo__priceUnit {
  font-size: 14px;
  font-weight: 700;
}

.pdInfo__priceTax {
  font-size: 13px;
}

.pdInfo__priceSub {
  font-size: 14px;
}

.pdInfo__price--sale .pdInfo__priceMain,
.pdInfo__price--sale .pdInfo__priceTax,
.pdInfo__price--sale .pdInfo__priceSub {
  color: #D3163A;
  font-weight: bolder;
}

.pdInfo__price--rental .pdInfo__priceMain,
.pdInfo__price--rental .pdInfo__priceUnit,
.pdInfo__price--rental .pdInfo__priceTax,
.pdInfo__price--rental .pdInfo__priceSub {
  color: #531C86;
  font-weight: bolder;
}

/* 規格（class）が複数ある場合: ラベルと1件目を同じ行に置き、2件目以降は
   1件目の左端に揃えて縦に並べる（2カラムグリッド: 左=ラベル / 右=class別価格）*/
.pdInfo__price--multi {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 6px;
  align-items: baseline;
}

.pdInfo__price--multi .pdInfo__priceLabel {
  grid-column: 1;
  grid-row: 1;
  white-space: nowrap;
}

.pdInfo__price--multi .pdInfo__priceRow {
  grid-column: 2;
}

.pdInfo__priceRow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.pdInfo__priceRow + .pdInfo__priceRow {
  margin-top: 2px;
}

.pdInfo__priceClass {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  margin-right: 6px;
  color: rgba(211, 22, 58, 1);
}
.pdInfo__priceClass.pdInfo__priceClass__rental {
  color: rgba(83, 28, 134, 1)
}

/* MAP-007 / MAP-008 ボックス */
.pdInfo__boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 5px 0;
}

.pdInfo__box {
  flex: 1 1 0;
  min-width: 140px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px 10px;
  background: rgba(248, 250, 252, 1);
}

#wrapper article p.pdInfo__boxLabel {
  font-size: 16px;
  color: rgba(107, 114, 128, 1);
  margin: 0 0 8px;
  font-weight: 500;
}

.pdInfo__boxValue {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.3;
}

/* 保管場所（1つ目のボックス）の値: Figma 500/22px */
.pdInfo__box:first-child .pdInfo__boxValue {
  font-weight: 500;
}

/* 在庫数（規格なし）: 数字 700/24px ＋ 単位「台」700/12px を下揃え（Figma 391:288-290）*/
.pdInfo__stockWrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
}
.pdInfo__stockNum {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
}

.pdInfo__boxUnit {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

.pdInfo__stockClass {
  font-size: 16px;
}

.listDetailTop .ldt02 {
  border-bottom: none;
  padding-bottom: 4px;
}

/* #273 REQ-001~003: cột1=画像 / cột2=情報・スペック・運賃 / cột3=お見積りCTA。スティッキーは実装しない。
   見出し＋お気に入りは cột1+cột2 をまたぐ .pdMain__head（Figma準拠）。 */
.pdCols {
  display: flex;
  flex-wrap: nowrap;
  gap: 24px;
  align-items: flex-start;
}

.pdCol {
  min-width: 0;
}

.pdMain {
  flex: 1 1 0;
  min-width: 0;
}

.pdMain__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0 0 16px;
}

.pdMain__head .ldt02 {
  flex: 1 1 auto;
  margin: 0;
}

.pdMain__head form {
  flex: 0 0 auto;
  margin: 0;
}

/* お気に入りボタン（Figma: ♡ 枠線ピル）*/
.pdMain__head .ldt03 {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cfd4d9;
  border-radius: 999px;
  padding: 8px 18px;
  margin: 0;
  font-size: 14px;
  color: #333;
  background: #fff;
  cursor: pointer;
  white-space: nowrap;
}

.pdMain__head .ldt03::before {
  content: '';
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 16px;
  background: url('../img/common/heart.png') no-repeat center center;
  background-size: contain;
}

/* お気に入り登録済み: 画像アセットが未用意のため従来どおり文字♥（赤）*/
.pdMain__head .ldt03.active::before {
  content: '\2665';
  color: #e0245e;
  width: auto;
  height: auto;
  background: none;
  font-size: 16px;
  line-height: 1;
}

.pdMain__cols {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.pdCol--left {
  flex: 0 0 50%;
  max-width: 50%;
}

.pdCol--center {
  flex: 1 1 auto;
}

.pdCol--right {
  flex: 0 0 28%;
  max-width: 28%;
}

/* #273 ギャラリー（Figma準拠）: メイン画像の正方形(padding-top:100%)による余白を解消し
   画像の高さに合わせる。サムネイルは1行あたり最大3枚。 */
.pdCol--left .sliderFor {
  margin-bottom: 8px;
}

.pdCol--left .ldSliderWrap .sfList {
  padding-top: 0 !important;
  height: auto !important;
  overflow: visible;
}

.pdCol--left .ldSliderWrap .sfList img {
  position: static !important;
  transform: none !important;
  left: auto;
  top: auto;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  display: block;
  margin: 0 auto;
}

/* サムネイル: 顧客要望により従来の商品ページと同じ見た目に戻す
   （PC 1行4枚／SP 1行5枚・正方形トリミング・外枠なし、選択中のみ緑枠）。
   サイズ・枠は custom.css の .snList 系をそのまま使う。twig 側で clearfix を外しているため、
   float の代わりに flex で折り返す（float だと .pdCol--left がサムネイルの高さを持たない）。 */
.pdCol--left .sliderNav {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
}

.pdCol--left .sliderNav::before, .pdCol--left .sliderNav::after {
  content: none;
  display: none;
}

.pdCol--left .snList {
  float: none;
  cursor: pointer;
}

.pdCol--left .slick-slide {
  margin-bottom: 0;
}

@media screen and (min-width: 960px) {
  /* 旧レイアウトは .ldSliderWrap を absolute 配置し、.listDetailTop に padding-left で場所を確保していた。
     3カラム化に伴い解除して通常フローに戻す。 */
  .listDetailTop {
    padding-left: 0;
  }

  .pdCols .ldSliderWrap {
    position: static;
    width: 100%;
    max-width: 100%;
    float: none;
    margin: 0;
  }
}

/* ===== 販売／レンタル お見積りCTAカード（Figma 165:4519 / 165:4556）===== */
.pdCol--right .ctaCard {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
  padding: 20px;
  margin: 0
}

.pdCol--right .ctaCard__ttl {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  line-height: 1.2;
  margin: 0 0 15px;
}

.pdCol--right .ctaCard__body {
  padding: 30px 12px 0;
}

/* 価格（MAP-030 / MAP-034）
   ボックス自体は親（.ctaCard__body）の中央に、中の文字は右寄せ。
   幅を内容に合わせて縮め（fit-content）、margin auto で中央寄せする。
   margin は layout.css の `#wrapper article p{margin:0}`（ID 指定）に負けるため、
   同じく ID を含むセレクタで打ち消す。 */
#wrapper article .pdCol--right p.ctaPrice {
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 16px;
  text-align: right;
  line-height: 1.1;
}

.pdCol--right .ctaPrice__yen {
  font-size: 20px;
  font-weight: 400;
}

.pdCol--right .ctaPrice__main {
  font-size: 36px;
  font-weight: 700;
  line-height: 36px;
}

.pdCol--right .ctaPrice__unit, .pdCol--right .ctaPrice__tax {
  font-size: 13px;
  font-weight: 700;
}

.pdCol--right .ctaPrice__sub {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 19.5px;
  margin-top: 2px;
}

.pdCol--right .ctaCard--buy .ctaPrice {
  color: #D3163A;
}

.pdCol--right .ctaCard--rental .ctaPrice {
  color: #531C86;
}

/* 表（MAP-031/032 ボリューム値引き, MAP-035/036 レンタルタリフ） */
.pdCol--right .ctaSec {
  margin: 0 0 16px;
}

.pdCol--right .ctaSec__ttl {
  font-size: 12px;
  font-weight: 500;
  color: #000;
  margin: 0 0 10px;
}

.pdCol--right .ctaSec__sub {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  margin: 6px 0 2px;
}

/* 規格あり商品: class 名見出し（単体／連結 など） */
.pdCol--right .ctaSec__sub--lg {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  margin: 16px 0 4px;
}

.pdCol--right .ctaCard__body > .ctaSec__sub--lg:first-child {
  margin-top: 0;
}

.pdCol--right .ctaTbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  color: #374151;
}

.pdCol--right .ctaTbl th {
  padding: 10px 12px;
  font-weight: 400;
  color: #9CA3AF;
  white-space: nowrap;
}

.pdCol--right .ctaTbl td {
  padding: 10px 12px;
  white-space: nowrap;
  font-weight: 400;
}

.pdCol--right .ctaTbl th:first-child, .pdCol--right .ctaTbl td:first-child {
  text-align: left;
}

.pdCol--right .ctaTbl th:last-child, .pdCol--right .ctaTbl td:last-child {
  text-align: right;
}

.pdCol--right .ctaTbl tr.is-active td:first-child {
  border-radius: 6px 0 0 6px;
}

.pdCol--right .ctaTbl tr.is-active td:last-child {
  border-radius: 0 6px 6px 0;
}

.pdCol--right .ctaCard--buy .ctaTbl tr.is-active td {
  background: #FEF2F2;
  color: #DC2626;
}

.pdCol--right .ctaCard--rental .ctaTbl tr.is-active td {
  background: #E9F2FF;
}

.pdCol--right .ctaCard--rental .ctaTbl tr.is-active td:first-child {
  color: #214B8E;
}

/* 単体・連結（3列）タリフ表 */
.pdCol--right .ctaTbl--3col th, .pdCol--right .ctaTbl--3col td {
  text-align: right;
}

.pdCol--right .ctaTbl--3col th:first-child, .pdCol--right .ctaTbl--3col td:first-child {
  text-align: left;
}

.pdCol--right .ctaTbl--3col .ctaTbl__group {
  text-align: center;
  padding-bottom: 2px;
}

/* 数量・レンタル予定期間 入力 */
.pdCol--right .ctaQty {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0 0 8px;
  justify-content: center;
  align-items: baseline;
}

/* レンタルCTA: 数量ブロックと「レンタル予定期間」を縦積み＋左揃え
   （レンタル予定期間を ※運賃 の下に配置する） */
.pdCol--right .ctaQty--stack {
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

/* レンタルCTA（規格なし）: 数量 と レンタル予定期間 は同じ行（横並び）に。
   上の縦積みルールは規格あり（#rentalMultiForm）向けなので single では row に戻す。
   レンタル予定期間ラベルが折り返して入力がずれないよう nowrap にする。 */
#rentalSingleForm .ctaQty--stack {
  flex-direction: row;
}
#rentalSingleForm .ctaQty--stack > .ctaQty__item > .ctaQty__label {
  white-space: nowrap;
}

/* 規格あり数量の見出し「数量」（単体/連結 入力行の上・左揃え、Figma準拠） */
.pdCol--right .ctaQty__groupLabel {
  display: block;
  margin-bottom: 6px;
}

/* レンタルCTA/購入CTA（規格あり）: 単体/連結/レンタル予定期間(月) の文字色を #111827 に。
   （見出し「数量」・「※延長可」・「最小発注数」は対象外）#273 Figma準拠
   ※購入CTAは 最小発注数 も .ctaQty__label のため :first-child で単体/連結のみ対象 */
#rentalMultiForm .ctaQty__label:not(.ctaQty__groupLabel):not(.ctaQty__label2),
#rentalMultiForm .ctaQty--stack .ctaQty__unit,
#addCartMultiForm .ctaQty__item > .ctaQty__label:first-child {
  color: #111827;
}

/* 見出し「数量」のフォントサイズ 14px（id スコープで .ctaQty__label の 12px に勝たせる）*/
#rentalMultiForm .ctaQty__groupLabel,
#addCartMultiForm .ctaQty__groupLabel {
  font-size: 14px;
}

/* ※運賃は別途見積 と レンタル予定期間 が近すぎるため 10px 空ける */
#rentalMultiForm .ctaQty--stack {
  margin-top: 10px;
}

.pdCol--right .ctaQty__item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.pdCol--right .ctaQty__label {
  font-size: 12px;
  color: #868C93;
  font-weight: 400;
}
.pdCol--right .ctaQty__label.ctaQty__label2 {
  font-size: 12px;
  color: #000;
  font-weight: 400;
}

.pdCol--right .ctaQty__unit {
  font-size: 12px;
  font-weight: 600;
  color: #868C93;
  margin-left: 4px;
}

.pdCol--right .ctaQty input[type="number"], .pdCol--right .ctaQty input.inp {
  width: 120px;
  height: 43px;
  border: 1.5px solid #CBD5E1;
  border-radius: 4px;
  padding: 0 12px;
  text-align: right;
  font-size: 16px;
  font-weight: 600;
  box-sizing: border-box;
  background: #fff;
}

/* レンタル期間: 単位「ヶ月」を入力ボックスの内側に表示する（Figma準拠）。
   枠線・サイズは外側の .ctaQty__inputUnit が持ち、input 自体は枠なしにする。*/
.pdCol--right .ctaQty__inputUnit {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  width: 120px;
  height: 43px;
  border: 1.5px solid #CBD5E1;
  border-radius: 4px;
  padding: 0 12px;
  box-sizing: border-box;
  background: #fff;
}

.pdCol--right .ctaQty__inputUnit input[type="number"],
.pdCol--right .ctaQty__inputUnit input.inp {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.pdCol--right .ctaQty__inputUnitTxt {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: #000;
}

/* 注記（MAP-033 / MAP-037）
   .ctaPrice と同様、ボックス自体は親の中央に、中の文字は右寄せ。
   （div なので `#wrapper article p{margin:0}` の影響は受けない）*/
/* 数量＋注記を1つの中央寄せ fit-content グループにまとめ、中の要素は左揃え
   （規格なし＝入力1つ／規格あり＝入力複数 のどちらでも注記が入力行の左端に揃う）*/
.pdCol--right .ctaQtyGroup {
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
}

.pdCol--right .ctaNote-box {
  margin: 0;
  text-align: left;
}

.pdCol--right .ctaNote {
  font-size: 12px;
  color: #868C93;
  margin: 0 0 4px;
  text-align: left;
  font-weight: 400;
}

.pdCol--right .ctaNote--dark {
  color: #000;
}
.pdCol--right .ctaNote--dark span.special-chara{
  color: #000;
  font-size: 10px;
  font-weight: bolder;
}

/* CTAボタン */
.pdCol--right .ctaBtn {
  margin: 35px 0 0 !important;
}

.pdCol--right .ctaBtn button {
  display: block;
  width: 100%;
  height: 60px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 60px;
  padding: 0;
  cursor: pointer;
}

.pdCol--right .ctaCard--buy .ctaBtn button {
  background: #D3163A;
  box-shadow: 0 4px 4px rgba(0, 0, 0, .25);
}

.pdCol--right .ctaCard--rental .ctaBtn button {
  background: #531C86;
}

.pdCol--right .ctaBtn button[disabled] {
  background: #9CA3AF;
  box-shadow: none;
  cursor: default;
}


/* Figma 準拠のカード表現（#273 MAP-009~029） */
.productSpec {
  margin: 29px 0 20px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 21px 25px;
}

.productSpec__ttl {
  font-size: 18px;
  font-weight: 700;
  color: #333333;
  margin: 0 0 16px;
}

.productSpec__list {
  display: grid;
  grid-template-columns: 135px minmax(0, 1fr);
  gap: 0;
  margin: 0;
}

.productSpec__dt, .productSpec__dd {
  border-bottom: 1px solid #E5E7EB;
  padding: 7px 8px;
  font-size: 16px;
  margin: 0;
  line-height: 1.4;
}

.productSpec__dt {
  color: #575E6B;
  font-weight: 500;
  padding-left: 16px;
  padding-right: 0;
}

.productSpec__dd {
  color: #333333;
  font-weight: 500;
  min-width: 0;
}

/* 備考（MAP-029 商品説明）: 長文/改行に対応。本文中のインライン色（貼付けHTML等）は値色 #333333 に統一 */
.productSpec__dd--note, .productSpec__dd--note * {
  color: #333333 !important;
}

.productSpec__dd--note {
  font-weight: 400;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

.productSpec__dd--note p {
  margin: 0 0 4px;
}

.productSpec__dd--note p:last-child {
  margin-bottom: 0;
}

.freightInfo {
  margin: 16px 0;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 0;
  padding: 20px;
}

.freightInfo__ttl {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px;
}

#wrapper article p.freightInfo__lead {
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
  color: #333333;
  margin: 0 0 20px;
}

.freightInfo__list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0;
  margin: 0 12px;
}

.freightInfo__dt, .freightInfo__dd {
  border-bottom: 1px solid #E5E7EB;
  padding: 4px 8px;
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}

.freightInfo__dt {
  color: #575E6B;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
  padding-right: 24px;
}

.freightInfo__dd {
  color: #333333;
  font-weight: 500;
}

.freightInfo__dt--head {
  color: #575E6B;
  font-weight: 500;
}

.freightInfo__dd--head {
  color: #000;
  font-weight: 600;
}

@media screen and (max-width: 959px) {
  .pdCols, .pdMain__cols {
    display: block;
  }

  .pdMain, .pdCol--left, .pdCol--center, .pdCol--right {
    max-width: none;
    width: auto;
    flex: none;
  }

  .pdMain__head {
    flex-wrap: nowrap;
    align-items: end;
    padding-bottom: 8px;
    border-bottom: solid 1px rgba(218, 218, 218, 1);
    margin-bottom: 10px;
  }
  .pdMain__head .ldt03 {
    display: flex !important;
    flex-wrap: wrap;
    max-width: 40px;
    border: none !important;
    text-align: center;
    justify-content: center;
    font-size: 8px;
    gap: 3px;
    font-weight: 600;
    padding-bottom: 10px;
  }
  .pdMain__head .ldt03::before {
    width: 14px;
    height: 12px;
  }
  .ldt02 {
    padding-right: 0;
  }
  .pdInfo__comment {
    margin-top: 10px;
  }
  .pdInfo__tag {
    min-width: 65px;
  }
  #wrapper article p.pdInfo__boxLabel {
    font-size: 14px;
  }
  .pdInfo__boxValue {
    font-size: 20px;
  }
  .pdInfo__stockNum {
    font-size: 22px;
  }
}
@media screen and (max-width: 959px) {
  .freightInfo__dt, .freightInfo__dd {
    font-size: 15px;
  }
  .pdInfo__priceSub {
    font-size: 13px;
  }
}
