/*! ============================================================================
 *  lp-goods.css  —  動的商品ラインナップ（lp-goods.js）用の追加スタイル
 *  ----------------------------------------------------------------------------
 *  既存 lp-style.css の .products / .product / .product-tabs / .btn を流用し、
 *  本ファイルでは「不足分の補完」のみを行う（lp-style.css の後に読み込む）。
 *  色・角丸などは既存のデザイントークン（:root 変数）を継承。
 * ========================================================================== */

/* --- カテゴリ絞り込みタブ：件数が増えても破綻しないよう折り返し可に --------- */
.lp-goods__tabs {
  flex-wrap: wrap;
}
.lp-goods__tabs .product-tab {
  flex: 0 1 auto;          /* 既存の flex:1（均等幅）を上書き。内容幅で並べる */
  padding: 10px 14px;
}

/* --- 画像リンク（カードのサムネイルを商品詳細へ） ------------------------- */
.product__img-link {
  display: block;
  flex: none;
}
.product__img-link .product__img {
  display: block;
}

/* --- 商品名リンク：色は本文色を継承、ホバーで下線 ------------------------- */
.product__name a {
  color: inherit;
  text-decoration: none;
}
.product__name a:hover {
  text-decoration: underline;
}

/* --- ★評価の差込口（ReviCo 星ウィジェット） ----------------------------- */
.product__rating {
  margin: 2px 0 8px;
  line-height: 1;
}
.product__rating:empty {
  display: none;            /* mode:'off' や ReviCo 未描画時は詰める（空き防止） */
}

/* --- 詳細ボタンを <a> で使う際の体裁（.btn/.product__btn を継承しつつ補正） - */
a.product__btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

/* --- ⑤「カートに入れる」ボタン（<button class="btn product__btn">）------- */
/*     .btn 側で border:none / cursor:pointer / font 継承済み。状態表現のみ追加 */
button.product__btn:disabled {
  opacity: .65;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.product__btn.is-added {
  background: linear-gradient(180deg, #2FA36B, #1F8A57);   /* 投入完了の視覚フィードバック */
  box-shadow: 0 8px 18px rgba(47, 163, 107, .35);
  opacity: 1;
}

/* --- ⑤ 投入完了の吹き出し「カートに入れました」 --------------------------- */
.product__body { position: relative; }        /* 吹き出しの配置基準 */
.product__cart-tip {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -100%) translateY(6px);   /* top=ボタン上端-8px に下端が付く */
  padding: 9px 16px;
  border-radius: 999px;
  background: #2FA36B;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(47, 163, 107, .4);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  z-index: 10;
}
.product__cart-tip::after {                   /* 下向きのしっぽ */
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #2FA36B;
  border-bottom: 0;
}
.product__cart-tip.is-show {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .product__cart-tip { transition: none; }
}

/* --- 状態表示（読み込み中 / 空 / エラー） -------------------------------- */
.lp-goods__status {
  margin: 16px 0 0;
  padding: 18px 12px;
  text-align: center;
  font-size: 14px;
  color: var(--c-ink-sub);
}
.lp-goods__status[hidden] {
  display: none;
}
.lp-goods__status.is-error {
  color: var(--c-accent-dark, #D9531B);
}

/* 読み込み中インジケータ（CSSのみ。テキスト前にスピナー） */
.lp-goods__status.is-loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2px solid var(--c-line, #E0E8E6);
  border-top-color: var(--c-primary, #0B7A6B);
  border-radius: 50%;
  animation: lp-goods-spin 0.8s linear infinite;
}

@keyframes lp-goods-spin {
  to { transform: rotate(360deg); }
}

/* モーションを抑える設定の利用者にはスピナー回転を止める（既存方針に合わせる） */
@media (prefers-reduced-motion: reduce) {
  .lp-goods__status.is-loading::before {
    animation: none;
  }
}

/* ===========================================================================
 *  ③-b  ReviCo「お客様の声」(multicomment) スライダー外部調整スタイル
 *  ---------------------------------------------------------------------------
 *  lp-goods.js が ReviCo 描画後に .revico-comment-main 直下のスライド
 *  (.revico-review-comment-row-wrapper) を .lp-revico-track に包み直す。ここでは
 *  その横スクロール(scroll-snap)スライダーとカードの体裁を、LP（.voiceカード／
 *  デザイントークン）に合わせて整える。色はテーマ変数を継承（未定義時のフォール
 *  バック値を併記）。トップページ .revico-multicomment-inner 準拠。
 * ========================================================================== */

/* 親要素の固定幅/フレックスを解除し、ヘッダ→スライダー→フッタを素直に縦積み */
.revico-multicomment-top,
.revico-multicomment-top .revico-multicomment-inner { width: 100% !important; max-width: 100% !important; }
.revico-multicomment-top .revico-comment-main {
  display: block !important;      /* flex(row)でスライドが潰れる/フッタが横に流れるのを回避 */
  overflow: visible !important;
  width: 100% !important; max-width: 100% !important;
  padding: 0 !important;
}
.revico-back, .revico-next{display: none !important;}
.revico-multicomment-top .revico-review-comment-row-wrapper { background-color: transparent !important;}

/* スライダー外殻（矢印の絶対配置基準）※ReviCoの後勝ちCSS対策で防御的に !important */
.revico-multicomment-top .lp-revico-shell { position: relative !important; width: 100% !important; }

/* スクロールビューポート（横スワイプ＋スナップ） */
.revico-multicomment-top .lp-revico-track {
  display: flex !important; flex-wrap: nowrap !important; align-items: stretch !important; gap: 14px;
  overflow-x: auto !important; overflow-y: hidden !important;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  margin: 0 !important; padding: 4px 2px 12px;
  scrollbar-width: thin;
}
.lp-revico-track::-webkit-scrollbar { height: 6px; }
.lp-revico-track::-webkit-scrollbar-thumb { background: var(--c-line, #E0E8E6); border-radius: 3px; }

/* スライド（1カード）＝ .revico-review-comment-row-wrapper
   ① 商品画像が約197px固定（object-fit:contain・拡大しない）なので、カード幅も
   固定200pxに統一し、SP/PCとも画像幅にぴったり合わせる（画像が中央寄せで両脇に
   余白ができるのを防止）。SPは約1〜2枚＋次カードチラ見せ、PC(最大640px枠)で約3枚。 */
.revico-multicomment-top .revico-review-comment-row-wrapper {
  flex: 0 0 200px !important;
  width: auto !important; max-width: none !important; min-width: 0 !important;
  height: auto !important; margin: 0 !important;
  display: flex !important;       /* 中の row を縦伸長させ、カード等高を実現 */
  scroll-snap-align: start;
}

.revico-multicomment-top .revico-review-comment-row {
  display: flex !important; flex-direction: column;
  width: 100% !important; height: auto !important; margin: 0 !important;
}

/* カード本体 */
.revico-multicomment-top .revico-review-comment-detail {
  flex: 1 1 auto;
  width: auto !important; max-width: none !important; height: auto !important; min-height: 0 !important;
  box-sizing: border-box; display: flex !important; flex-direction: column !important;
  background: #fff; border: 1px solid var(--c-line, #E0E8E6); border-radius: var(--radius, 14px);
  padding: 14px; overflow: hidden !important;
}

/* 商品画像 */
.revico-multicomment-top .revico-review-comment-detail--product-name-image img {
  height: auto !important;
  aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 10px; display: block;
}
/* 商品名（2行クランプ） */
.revico-multicomment-top .revico-review-comment-detail--product-name p {
  font-size: 14px !important; font-weight: 800 !important; line-height: 1.45 !important;
  color: var(--c-ink, #1B2A28) !important;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin: 10px 0 6px !important;
}
/* コメント（4行クランプ。溢れ/重なり防止） */
.revico-multicomment-top .revico-review-comment-detail--comment--content {
  font-size: 13px !important; line-height: 1.7 !important; color: var(--c-ink-sub, #5C6B68) !important;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
}

/* フッタ（もっと見る等）との余白 */
.revico-multicomment-top .revico-comment-footer { margin-top: 8px; }

/* ---- 追加微調整：テキスト左右余白 / 詳細リンク / 星の右寄せ ---- */
/* ② 商品名・コメントに左右10pxの余白（カードの左右paddingがReviCo側CSSで0になるため個別付与） */
.revico-multicomment-top .revico-review-comment-detail--product-name p,
.revico-multicomment-top .revico-review-comment-detail--comment--content {
  padding-left: 10px !important; padding-right: 10px !important;
}
/* ③ 「詳細を見る ›」：カード下部に右寄せで絶対配置＋矢印画像をインライン化して1行に。
   ReviCo は product-name 基準で bottom:-184px に固定するが、カード縮小(①)でコメントに
   重なるため、product 系の position を解除してカード基準に再ピン留めし、カードに下余白
   (42px)を確保してコメントと重ならないようにする（詳細度を上げて ReviCo の card padding に勝つ）。 */
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail {
  position: relative !important; padding-bottom: 42px !important;
}
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--product,
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--product > a,
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--product-name {
  position: static !important;
}
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--product > a span {
  position: absolute !important; right: 10px !important; bottom: 12px !important;
  top: auto !important; left: auto !important; margin: 0 !important; white-space: nowrap !important;
}
.revico-multicomment-top .revico-review-comment-detail--product > a span img {
  display: inline-block !important; vertical-align: middle !important; width: auto !important; margin-left: 4px;
}
/* ④ 星評価を右寄せ＋右10px。
   star-rate には ReviCo が transform:scale(.6) を当てており、原点が中央(=見た目が内側に約30px寄る)。
   transform-origin:right に変更して、縮小後も右端に揃うようにする。 */
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--star {
  display: flex !important; justify-content: flex-end !important; align-items: center !important;
  padding-right: 10px !important;
}
.revico-multicomment-top .revico-multicomment-inner .revico-review-comment-detail--star-rate {
  margin: 0 !important; width: auto !important; flex: 0 0 auto !important;
  transform-origin: right center !important;
}

/* ⑤ category絞り込み（top-multicommentレイアウト）時の商品画像サイズ補正。
   ReviCoのtop-multicomment用CSSは商品画像を小さなサムネイル
   （img max-height:60px・カードpadding左右40px・商品名横並び）で描画するため、
   goods（slide-review）と同じ「カード幅いっぱいの4:3画像＋縦積み」に揃える。
   スコープは lp-goods.js ③-c が category 時にVOICEセクションへ付与する
   .lp-voice-category 配下に限定（goods時のLPには影響しない）。 */
.lp-voice-category .lp-revico-shell .revico-review-comment-detail {
  padding: 14px 14px 42px !important;
}
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--product {
  width: 100% !important;
}
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--product > a {
  display: block !important; width: 100% !important;
}
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--product-name {
  display: block !important; width: 100% !important;
}
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--product-name-image {
  width: 100% !important; max-width: none !important;
  height: auto !important; max-height: none !important;
}
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--product-name-image img {
  width: 100% !important; max-width: 100% !important;
  height: auto !important; max-height: none !important;
  aspect-ratio: 4 / 3 !important; object-fit: cover !important;
  border-radius: 10px; display: block !important; margin: 0 !important;
}
/* コメント本文の左寄せ（top-multicomment用CSSは text-align:center を継承させるため、
   goods（slide-review）と同じ左寄せに揃える） */
.lp-voice-category .lp-revico-shell .revico-review-comment-detail--comment--content {
  text-align: left !important;
}

/* prev / next 矢印（円形・LPのプライマリ色のシェブロン）
   ※ReviCoのbutton用CSSが「実行時注入＝後勝ち」で width:100px 等を当てるため、
     詳細度(0,3,0)＋!important で寸法・形・余白・枠を確実に上書きする。 */
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow {
  position: absolute !important; top: 33%; transform: translateY(-50%);
  width: 38px !important; height: 38px !important;
  min-width: 38px !important; max-width: 38px !important; min-height: 38px !important;
  margin: 0 !important; padding: 0 !important;
  border: 1px solid var(--c-line, #E0E8E6) !important; border-radius: 50% !important;
  background: rgba(255, 255, 255, .95) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12) !important;
  display: flex !important; align-items: center; justify-content: center;
  flex: none !important; cursor: pointer; z-index: 3;
}
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow::before {
  content: ""; display: block; width: 10px; height: 10px;
  border-top: 2px solid var(--c-primary, #0B7A6B); border-right: 2px solid var(--c-primary, #0B7A6B);
}
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow--prev { left: -4px !important; right: auto !important; }
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow--prev::before { transform: rotate(-135deg); margin-left: 4px; }
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow--next { right: -4px !important; left: auto !important; }
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow--next::before { transform: rotate(45deg); margin-right: 4px; }
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow:focus-visible { outline: 3px solid var(--c-primary, #0B7A6B); outline-offset: 2px; }
.revico-multicomment-top .lp-revico-shell .lp-revico-arrow[disabled] { opacity: .35; cursor: default; box-shadow: none !important; }
/* スクロール不要（カードが収まる）ときは矢印を出さない */
.lp-revico-shell:not(.lp-revico-shell--has-nav) .lp-revico-arrow { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .lp-revico-track { scroll-behavior: auto; }
}

/* ===========================================================================
 *  商品カード 追加フィールド（goodsapi 由来）
 *  ② attr1（発送時期等）／③ icon_name1〜8（枠線ラベル）／④ ReviCo 星差込口
 *  ※ ① 販売終了（sales_period_message）は lp-goods.js 側でカード自体を生成しない。
 * ========================================================================== */

/* ③ アイコン（icon_name1〜8）：商品名の上。各 span に個別の icon_name{N} クラスを付与。
   枠線ラベルのスタイルはご提示の .block-icon--text を参考に統合。 */
.product__icons { display: flex; flex-wrap: wrap; margin: 0 0 4px; }
.product__icons span {
  display: inline-block; line-height: 1.0; letter-spacing: 0; margin: 3px 3px 0 0;
  text-align: center; border-radius: 3px; background-color: #fff; border: 1px solid #443829;
  padding: 3px 4px 2px; font-size: 11px; color: #443829;
}

/* ② attr1（発送時期等）：価格の下。NULL/空は JS 側で非表示。 */
.product__attr1 { font-size: 12px; line-height: 1.5; color: var(--c-ink-sub, #5C6B68); margin: 2px 0 8px; }

/* ④ ReviCo 商品レビュー★：価格の下。JS がカード生成時に
   <div style="height:35px"><div data-revico-goods="{商品コード}" data-revico-layout="list-starsimple" style="display:none"></div></div>
   を直接埋め込む（旧 .revico-star-zone 差込口は廃止）。高さはインラインの 35px 固定で確保。 */
