/* 2026-11-12 社内対応：トップのカテゴリー丸画像をスマホで5列に */
@media screen and (max-width: 768px) {
  body .jj-catlist:not(.jj-catlist--slider) { grid-template-columns: repeat(5, 1fr); }
}

/* 2026-11-12 社内対応：カテゴリーページのランキングを5件に（AIレコメンド jj-group-ranking のクラス pc5sp2-3 用）PC：5列／スマホ：1・2位は2列、3〜5位は3列 */
body .fs-c-productList__list--pc5sp2-3 { display: grid; grid-template-columns: repeat(5, 1fr); }
@media screen and (max-width: 768px) {
  body .fs-c-productList__list--pc5sp2-3 { grid-template-columns: repeat(6, 1fr); }
  body .fs-c-productList__list--pc5sp2-3 > * { grid-column: span 2; }
  body .fs-c-productList__list--pc5sp2-3 > *:nth-child(-n+2) { grid-column: span 3; }
}

/* 2026-11-16 社内対応：カテゴリーなどの商品一覧の見た目
   ①サイズ表示を復活 ②ハートを画像下の行の左端へ ③NEW・P10倍などをハートの右へ ④商品の上下の間隔を狭く */
body .fs-c-productList__list__item .jj-marksize { display: flex !important; }
body .fs-c-productList__list__item.fs-c-productListItem { position: relative; }
body .fs-c-productList__list__item .fs-c-productListItem__control { position: absolute; left: 0; top: 0; margin-top: calc(100% + 8px); }
body .fs-c-productList__list__item form .fs-c-productMarks { position: absolute; left: 30px; right: 24px; top: 0; margin-top: calc(100% + 10px); overflow: hidden; white-space: nowrap; }
body .fs-c-productList__list { row-gap: 24px; }

/* 2026-11-16 社内対応：トップの新着商品（カルーセル）
   ①ハートをカラーの行の右端へ ②サイズ表示を復活（カラーが多いときは2行に折り返す） */
body .fs-c-productListCarousel__list__item.fs-c-productListItem { position: relative; }
body .fs-c-productListCarousel__list__item .fs-c-productListItem__control { position: absolute; right: 0; top: 0; margin-top: calc(100% + 4px); }
body .fs-c-productListCarousel__list__item .jj-markcolor { height: auto !important; flex-wrap: wrap; row-gap: 2px; align-items: flex-start; margin-top: -6px; padding: 6px 28px 6px 0; min-height: 22px; }
body .fs-c-productListCarousel__list__item .jj-marksize { display: flex !important; }

/* 2026-11-16 社内対応：二重価格と%OFFの札（共通スクリプト3015の「%OFF表示」と一組）
   定価＞販売価格 → 販売価格の右に「○%OFF」（淡い黄色・黒文字）
   定価＝販売価格 → 定価を隠し、価格を普段の黒字に戻す */
body .jj-off { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 2px; background: #FFF176; color: #1a1a1a; font-size: 10px; font-weight: 700; line-height: 1.5; vertical-align: middle; }
body .jj-price-same .fs-c-productPrice--listed { display: none !important; }
body .jj-price-same .fs-c-productPrice--selling,
body .jj-price-same .fs-c-productPrice--selling * { color: #2A2A2A !important; }
body .jj-price-same .fs-c-productPrice__addon__label { color: #5e666e !important; }

/* 2026-11-16 社内対応②：商品一覧の文字部分を詰める（カテゴリー一覧・トップ新着など共通）
   ①サイズタグを小さく1行に（入りきらない分は右端で切れる） ②写真の段と段の間を20pxに */
body .jj-marksize { flex-wrap: nowrap !important; gap: 2px !important; overflow: hidden; }
body .jj-marksize .jj-size { padding: 1px 4px !important; font-size: 9px !important; line-height: 1.4 !important; flex-shrink: 0; }
body .jj-marksize .jj-size .fs-c-productMark__label { font-size: 9px !important; }
body .fs-c-productList__list { row-gap: 20px; }
body .fs-c-productListCarousel__list__itemTrack { row-gap: 20px !important; }

/* 2026-11-16 社内対応②：トップ新着など横並び（カルーセル）の商品
   ③余白を詰める ④NEW・P10倍・送料無料を価格の右に並べる（入りきらないときは印ごと次の行へ） */
body .fs-c-productListCarousel__list__item.fs-c-productListItem { display: flex !important; flex-wrap: wrap; align-items: center; align-content: flex-start; }
body .fs-c-productListCarousel__list__item > * { flex: 0 0 100%; min-width: 0; }
body .fs-c-productListCarousel__list__item .fs-c-productListItem__imageContainer { margin-bottom: 6px !important; }
body .fs-c-productListCarousel__list__item .jj-markcolor { margin-bottom: 2px !important; }
body .fs-c-productListCarousel__list__item .jj-marksize { margin: 2px 0 !important; }
body .fs-c-productListCarousel__list__item > .fs-c-productListItem__prices { flex: 0 1 auto; margin-top: 0 !important; padding-right: 6px; }
body .fs-c-productListCarousel__list__item > .fs-c-productMarks { flex: 0 1 auto; margin: 0 0 0 auto !important; display: flex !important; flex-wrap: nowrap !important; gap: 3px; width: auto !important; }
body .fs-c-productListCarousel__list__item > .fs-c-productMarks > * { flex: none !important; width: auto !important; margin: 0 !important; }

/* 2026-11-18 社内対応③：商品ページの画像
   ①メイン画像の枠をすべて正方形にそろえる（縦長の写真で枠の高さが変わり、スワイプ時に上下にブレるのを防ぐ。縦長の写真は左右に余白）
   ②スマホの下の小さい画像（サムネイル）を45px→72pxに */
body .fs-c-productCarouselMainImage__image { aspect-ratio: 1 / 1; }
body .fs-c-productCarouselMainImage__image img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 767px) {
  body .fs-c-productCarouselMainImage__thumbnailList { overflow-y: hidden !important; } /* ③の追加：小さい画像の列が縦に動かないように */
  body .fs-c-productCarouselMainImage__thumbnailList > li { flex: 0 0 72px !important; width: 72px !important; }
  body .fs-c-productCarouselMainImage__thumbnail, body .fs-c-productCarouselMainImage__thumbnail__img { width: 72px !important; height: 72px !important; }
  body .fs-c-button--viewExtendedImage { width: 44px; height: 44px; } /* ③の追加：スマホの虫眼鏡を大きく */
  body .fs-c-button--viewExtendedImage::before { font-size: 34px !important; }
}

/* 2026-11-18 社内対応④：スマホで各段の見出しを日本語1行に（英字は右で折り返す） */
@media (max-width: 767px) {
  body .jj-sec__header__title { white-space: nowrap; flex-shrink: 0; }
  body .jj-sec__header__title-en { min-width: 0; line-height: 1.2; }
}

/* 2026-11-18 社内対応⑤：トップ「サイズから探す」「お悩みから探す」（パーツ3065）。トップの検索窓は隠す（ヘッダーの「検索」はそのまま） */
body .jj-sec--search .jj-search-form { display: none; }
body .jj-findby__btns { display: flex; flex-wrap: wrap; gap: 8px; }
body .jj-findby--size .jj-findby__btns { display: grid; grid-template-columns: repeat(5, 1fr); }
body .jj-findby__btns a { display: flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #22AEC3; background: #fff; color: #2A2A2A; text-decoration: none; line-height: 1.3; }
body .jj-findby--size .jj-findby__btns a { border-radius: 6px; font-size: 14px; font-weight: 700; }
body .jj-findby--worry .jj-findby__btns a { border-radius: 20px; padding: 6px 12px; font-size: 13px; }
body .jj-findby__btns a:hover { background: #22AEC3; color: #fff; }
body .jj-sec--search .jj-findby { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
body .jj-search .jj-findby { display: none; } /* ヘッダーの「検索」画面ではサイズ・お悩みのボタンを出さない */
@media (max-width: 767px) {
  body .jj-sec--search .jj-findby { grid-template-columns: 1fr; gap: 28px; }
  body .jj-findby--worry .jj-findby__btns a { font-size: 12.5px; padding: 6px 10px; }
}

/* 2026-11-18 社内対応⑥：「検索する」ボタンの文字と虫眼鏡を中央にまとめる */
body .jj-btn--search { justify-content: center !important; gap: 12px; }

/* 2026-11-19 社内対応⑦：「あなたへのおすすめ」（パーツ3042）は商品グループのページだけに出す。商品ページでは隠す */
body.fs-body-product .jj-sec--foryou { display: none; }

/* 2026-11-19 社内対応⑧：お悩みのページの見出し（パーツ3038のスクリプト）。上に小さく「お悩みから探す」、下に大きくグループ名 */
body .jj-page__header--benefit { flex-direction: column; align-items: flex-start; gap: 2px; }
body .jj-page__header--benefit .jj-page__header__label { font-size: 13px; font-weight: 700; color: #22AEC3; letter-spacing: 0.05em; }

/* 2026-11-19 社内対応⑨：一覧の件数（〇件中 〇-〇件表示）とページ数を10px→12pxに。「〇件中」は太字 */
body .fs-c-listControl__status, body .fs-c-listControl__status span { font-size: 12px; }
body .fs-c-listControl__status__total { font-weight: 700; }
body .fs-c-pagination__item { font-size: 12px; }

/* 2026-11-19 社内対応⑩：カテゴリーのサブカテゴリーを丸いボタンに（トップ「お悩みから探す」と同じ形）。スマホは「絞り込む＋」をやめて常に表示し、1列で横に送る。あわせて商品一覧の下の「〇〇に戻る」ボタン（パーツ3038） */
body .jj-sort { display: none !important; }
body .jj-sort__target { display: block !important; height: auto !important; }
body.fs-body-category .fs-c-subgroupList { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; margin: 0 0 12px !important; padding: 0 !important; }
body.fs-body-category .fs-c-subgroupList__item { flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin: 0 !important; border: none !important; }
body.fs-body-category .fs-c-subgroupList__link { display: flex !important; align-items: center; min-height: 34px; padding: 6px 12px !important; border: 1px solid #22AEC3 !important; border-radius: 20px !important; background: #fff; white-space: nowrap; box-sizing: border-box; text-decoration: none; }
body.fs-body-category .fs-c-subgroupList__label { font-size: 13px !important; width: auto !important; color: #2A2A2A; line-height: 1.3; }
body.fs-body-category .fs-c-subgroupList__link::before, body.fs-body-category .fs-c-subgroupList__link::after { display: none !important; }
body .jj-backcat-bottom { text-align: center; margin: 24px 0 8px; }
body .jj-backcat-bottom a { display: inline-block; min-width: 240px; padding: 10px 20px; border: 1px solid #22AEC3; border-radius: 6px; background: #fff; color: #2A2A2A; font-size: 14px; text-decoration: none; }
@media (max-width: 767px) {
  body .jj-sort__target { margin: 0 !important; }
  body.fs-body-category .fs-c-subgroupList { flex-wrap: nowrap !important; overflow-x: auto; margin: 0 -16px 8px !important; padding: 4px 16px 10px !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  body.fs-body-category .fs-c-subgroupList::-webkit-scrollbar { display: none; }
  body.fs-body-category .fs-c-subgroupList__label { font-size: 12.5px !important; }
}

/* 2026-11-19 社内対応⑩の修正：押したとき（スマホ）・マウスを乗せたとき（パソコン）は、宮青の背景に白い文字。背景の指定が効かず白×白になっていたのを直した */
body.fs-body-category .fs-c-subgroupList__link:hover, body.fs-body-category .fs-c-subgroupList__link:active { background: #22AEC3 !important; }
body.fs-body-category .fs-c-subgroupList__link:hover .fs-c-subgroupList__label, body.fs-body-category .fs-c-subgroupList__link:active .fs-c-subgroupList__label { color: #fff !important; }
body .jj-backcat-bottom a:hover, body .jj-backcat-bottom a:active { background: #22AEC3 !important; color: #fff !important; }
body.fs-body-category .fs-c-subgroupList__link, body.fs-body-category .fs-c-subgroupList__label, body .jj-backcat-bottom a { transition: none !important; -webkit-tap-highlight-color: transparent; } /* 色をゆっくり変える効果を切る（スマホで押すと薄い水色に見えていたため） */
/* 2026-11-19 社内対応⑩の修正：ページを開いた一瞬、元の四角いボタンが見えていたため、丸いボタンの指定の目印を「スクリプトで作る囲み（.jj-sort__target）」から「カテゴリーのページ（body.fs-body-category）」に変更 */

/* 2026-11-19 社内対応⑪：ページ数。商品一覧の下は15px・押せる範囲40px四方（上は12pxのまま）。数字は上下とも「今のページと前後1つ」の最大3つだけ出す */
body .fs-c-productList__list ~ .fs-c-productList__controller .fs-c-pagination { gap: 6px; margin-top: 8px; }
body .fs-c-productList__list ~ .fs-c-productList__controller .fs-c-pagination__item { font-size: 15px !important; min-width: 40px; height: 40px; line-height: 40px; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
body .fs-c-pagination__item:not(.is-active):not(.fs-c-pagination__item--prev):not(.fs-c-pagination__item--next) { display: none !important; }
body .fs-c-pagination .fs-c-pagination__item.is-active + .fs-c-pagination__item:not(.fs-c-pagination__item--next), body .fs-c-pagination .fs-c-pagination__item:has(+ .is-active):not(.fs-c-pagination__item--prev) { display: inline-flex !important; }

/* 2026-11-19 社内対応⑫：商品一覧の下、「〇〇に戻る」の上のサブカテゴリーの丸いボタン（パーツ3038）。子のページでは兄弟のサブカテゴリーを出し、今いるページを宮青に */
body .jj-subgroup-bottom { margin: 28px 0 0; }
body.fs-body-category .jj-subgroup-bottom .fs-c-subgroupList { margin-bottom: 0 !important; }
body.fs-body-category .fs-c-subgroupList__link.is-current { background: #22AEC3 !important; }
body.fs-body-category .fs-c-subgroupList__link.is-current .fs-c-subgroupList__label { color: #fff !important; font-weight: 700; }
body .jj-subgroup-bottom + .jj-backcat-bottom { margin-top: 16px; }

/* 2026-11-20 社内対応⑬：トップの「カテゴリーから探す」丸画像（パーツ3037）をスマホで1段5個ぴったり＋横スクロールに（アリノマ型）。下に宮青の細線（.jj-catlist-bar、3037のプログラムで追加）で横に動かせることを示す。上の「スマホで5列」（11/12）を上書き */
body .jj-catlist-bar { display: none; }
@media screen and (max-width: 768px) {
  body .jj-catlist:not(.jj-catlist--slider) { grid-template-columns: repeat(6, calc((100% - 32px) / 5)); justify-content: start; overflow-x: auto; scrollbar-width: none; overflow-y: hidden; padding-bottom: 4px; overscroll-behavior-x: contain; touch-action: pan-x pan-y; } /* 11/20 縦ブレ防止 */
  body .jj-catlist:not(.jj-catlist--slider)::-webkit-scrollbar { display: none; }
  /* 11/20 スマホだけ並び替え：右に隠れるのをセットアップにして、タイツ・レギンスを下の段の左端に */
  body .jj-catlist:not(.jj-catlist--slider) > .jj-catlist__item:has(a[href="/c/legwear"]), body .jj-catlist:not(.jj-catlist--slider) > .jj-catlist__item:has(a[href="/c/legwear"]) ~ .jj-catlist__item { order: 1; }
  body .jj-catlist:not(.jj-catlist--slider) > .jj-catlist__item:has(a[href="/c/legwear"]) ~ .jj-catlist__item:has(a[href="/c/setup"]) { order: 0; }
  body .jj-catlist-bar { display: block; position: relative; width: 64px; height: 3px; margin: 14px auto 0; background: #E3EEF1; border-radius: 3px; overflow: hidden; }
  body .jj-catlist-bar span { position: absolute; top: 0; left: 0; width: 50%; height: 100%; background: #22AEC3; border-radius: 3px; transition: left .1s; }
}

/* 2026-11-20 社内対応⑭：PCヘッダーの検索窓とカテゴリーの帯（パーツ「PCヘッダー 検索窓・カテゴリー帯（社内）」）。スマホ（768px以下）では出さない */
body .jj-hsearch, body .jj-hcat { display: none; }
@media screen and (min-width: 769px) {
  body .jj-header .jj-hsearch { display: flex; align-items: center; margin-left: auto; margin-right: 16px; width: 340px; max-width: 28vw; height: 48px; padding: 4px; border: 0; border-radius: 24px; background: #fff; box-shadow: none; } /* 11/20 外線なし・影なし（ぼかしは試したが外した） */
  body .jj-hsearch input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 12px 0 16px; font-size: 13px; color: #2A2A2A; background: transparent; }
  body .jj-hsearch input, body .jj-hsearch input:focus { box-shadow: none !important; outline: none !important; border-radius: 20px; transition: none; -webkit-appearance: none; appearance: none; } /* 11/20 入力時に四角い枠が出る（残像）のを消す */
  body .jj-hsearch input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #fff inset !important; }
  body .jj-hsearch button { flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: #22AEC3; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .15s; } /* 丸いボタン */
  body .jj-hsearch button:hover { opacity: .85; }
  body .jj-header .jj-nav__item--search { display: none; }
  body .jj-header .jj-hcat { display: block; position: absolute; left: 0; right: 0; top: 100%; z-index: -1; background: #fff; border-top: 1px solid #E3EEF1; border-bottom: 1px solid #E3EEF1; transition: transform .25s ease, opacity .2s ease; }
  body .jj-header .jj-hcat.is-hide { transform: translateY(-100%); opacity: 0; pointer-events: none; }
  body .jj-hcat__list { display: flex; flex-wrap: nowrap; justify-content: center; gap: 0; margin: 0; padding: 0; list-style: none; }
  body .jj-hcat__list a { display: block; padding: 12px clamp(5px, calc((100vw - 900px) / 24), 16px); font-size: 13px; font-weight: 500; line-height: 1.5; color: #2A2A2A; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; } /* 11/20 帯を細く、反転は帯の高さいっぱい・角なし */
  body .jj-hcat__list a:hover { background: #E8F6F8; color: #22AEC3; } /* 11/20 マウスを乗せると薄い宮青地に宮青文字 */
  body .jj-hcat__list a.is-current, body .jj-hcat__list a.is-current:hover { color: #fff; font-weight: 700; background: #22AEC3; } /* 今いるカテゴリーは宮青地に白文字（11/20 乗せたときと入れ替え） */
  /* 帯（約46px）の分だけページ全体を下げる（トップのメインビジュアルも隠れないように） */
  /* 11/20 ヘッダー1段目（ロゴの段）の上下の余白を詰める：90px→68px */
  html body .jj-header { height: 68px; }
  html body { padding-top: 68px; }
  html body.jj-has-hcat { padding-top: 114px; }
}

/* 2026-11-20 社内対応⑮：カテゴリーページの余白。PCは上のサブカテゴリーの丸いボタンと並び順の列の間を広げる（12px→28px）。下の「〇〇に戻る」ボタンとその下の区切りの間を広げる（8px→48px、スマホも） */
@media screen and (min-width: 769px) {
  body.fs-body-category .jj-sort__target .fs-c-subgroupList { margin-bottom: 28px !important; }
}
body .jj-backcat-bottom { margin-bottom: 48px; }

/* 2026-11-20 社内対応⑯：カテゴリーページ（PC）。見出し「大きいサイズ 〇〇」の上の余白を下と同じ40pxに（60px→40px）。人気ランキングの上下を60px→40pxに。上の「〇〇に戻る」をパンくずに（パーツ3038） */
@media screen and (min-width: 769px) {
  body.fs-body-category .fs-l-main { margin-top: 40px; }
  body.fs-body-category .jj-sec--group-ranking { padding-top: 40px; padding-bottom: 40px; }
}
body .jj-bc { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: 13px; line-height: 1.6; color: #888; }
body .jj-bc a { color: #22AEC3; text-decoration: none; }
body .jj-bc a:hover { text-decoration: underline; }
body .jj-bc__sep { margin: 0 8px; color: #bbb; }
body .jj-bc__cur { color: #2A2A2A; }
