/* 「商品を探す」(/products/list) 用。list.twig でカテゴリ未指定のときだけ読み込む */

/* 旧チェックボックス型の検索フォームは使わない（プルダウンに置き換え） */
.all-item-list .original-tag-wrapper { display: none !important; }
.ps-has-sort #result_info_box__order_menu { display: none; }

.ps-search, .ps-hub, .ps-all { color: #2b2b2b; font-size: 14px; line-height: 1.6; }
.ps-search *, .ps-hub *, .ps-all * { box-sizing: border-box; }

.ps-h2 { margin: 0 0 14px; font-size: 22px; font-weight: 700; line-height: 1.4; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ps-h2-note { font-size: 13px; font-weight: 400; color: #5e5e5e; }
.ps-h3 { margin: 0 0 12px; font-size: 17px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ps-h3-note { font-size: 12px; font-weight: 400; color: #5e5e5e; }
.ps-hub ul, .ps-hub ol { list-style: none; margin: 0; padding: 0; }
.ps-hub a { text-decoration: none; }

/* キーワード検索 */
.ps-search { background: #fff8ec; border: 1px solid #f5d7a6; border-radius: 10px; padding: 18px 20px; margin: 0 0 40px; }
.ps-search-label { display: block; margin: 0 0 10px; font-size: 14px; font-weight: 700; }
.ps-search-row { display: flex; gap: 8px; }
.ps-search-row input[type="search"] { flex: 1 1 auto; min-width: 0; height: 52px; padding: 0 16px; border: 2px solid #c25e00; border-radius: 8px; font-size: 16px; background: #fff; -webkit-appearance: none; appearance: none; }
.ps-search-row input[type="search"]:focus { outline: 3px solid rgba(243, 152, 0, .35); outline-offset: 1px; }
.ps-search-btn { flex: 0 0 auto; height: 52px; padding: 0 28px; border: 0; border-radius: 8px; background: #c25e00; color: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.ps-search-btn:hover { background: #a84f00; }
.ps-suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ps-suggest-label { font-size: 12px; color: #5e5e5e; }
.ps-chip { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid #d9c3a0; border-radius: 16px; background: #fff; color: #2b2b2b !important; font-size: 13px; text-decoration: none !important; }
.ps-chip:hover { border-color: #c25e00; color: #a84f00 !important; }

/* 名入れ／オリジナルの分岐 */
.ps-hub { display: flex; flex-direction: column; gap: 40px; margin-bottom: 48px; }
.ps-branch-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ps-branch-card { display: flex; flex-direction: column; gap: 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 14px; border-radius: 10px; background: #fff; border: 1px solid #cfcfcf; transition: border-color .15s, box-shadow .15s; }
.ps-branch-card:hover { border-color: #c25e00; }
.ps-branch-card.is-active { background: #fff8ec; border: 3px solid #c25e00; padding: 12px; box-shadow: 0 2px 8px rgba(194, 94, 0, .15); }
.ps-branch-img { display: block; aspect-ratio: 48 / 25; border-radius: 6px; overflow: hidden; background: #eee; }
.ps-branch-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ps-branch-name { font-size: 20px; font-weight: 700; }
.ps-branch-catch { font-size: 14px; font-weight: 700; color: #8a4500; }
.ps-branch-desc { font-size: 13px; line-height: 1.7; color: #4a4a4a; }
.ps-branch-uses { font-size: 12px; color: #5e5e5e; }
.ps-branch-mark { align-self: flex-start; margin-top: 4px; }
.ps-branch-mark > span { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 6px; font-size: 14px; font-weight: 700; }
.ps-branch-mark .on { display: none; background: #c25e00; color: #fff; }
.ps-branch-mark .off { background: #fff; color: #9a4a00; border: 1px solid #c25e00; }
.ps-branch-card.is-active .ps-branch-mark .on { display: inline-flex; }
.ps-branch-card.is-active .ps-branch-mark .off { display: none; }
.ps-branch-help { margin: 16px 0 0; font-size: 13px; color: #4a4a4a; background: #f7f8f9; border-radius: 6px; padding: 10px 14px; }

/* 選んだ側のパネル */
.ps-panel { display: flex; flex-direction: column; gap: 28px; border-top: 3px solid #f39800; padding-top: 20px; }
.ps-panel[hidden] { display: none; }
.ps-panel-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.ps-panel-head .ps-h2 { margin: 0; }
.ps-more, .ps-sublink { font-size: 14px; color: #b35a00 !important; text-decoration: underline !important; }
.ps-sublink { display: inline-block; margin-top: 12px; font-size: 13px; }

/* 人気ランキング */
.ps-ranking-list { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ps-ranking-item a { position: relative; display: flex; flex-direction: column; gap: 6px; color: #2b2b2b !important; }
.ps-ranking-item a:hover .ps-ranking-name { color: #a84f00; text-decoration: underline; }
.ps-ranking-img { display: block; aspect-ratio: 1 / 1; border-radius: 6px; overflow: hidden; background: #f2f2f2; border: 1px solid #eee; }
.ps-ranking-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ps-ranking-name { font-size: 13px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ps-rank { position: absolute; top: -6px; left: -6px; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; background: #8c8c8c; }
.ps-rank-1 { background: #c9a227; }
.ps-rank-2 { background: #9aa4ad; }
.ps-rank-3 { background: #b07a4a; }

/* 種類・サイズ */
.ps-type-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ps-type { display: flex; gap: 12px; align-items: center; height: 100%; color: #2b2b2b !important; border: 1px solid #e8e8e8; border-radius: 8px; padding: 10px; background: #fff; }
.ps-type:hover { border-color: #c25e00; }
.ps-type-icon { flex: 0 0 50px; width: 50px; height: 50px; }
.ps-type-icon img { display: block; width: 50px; height: 50px; object-fit: contain; }
.ps-type-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ps-type-name { font-size: 14px; font-weight: 700; }
.ps-type-note { font-size: 12px; color: #5e5e5e; line-height: 1.5; }

/* 生地 */
.ps-pills { display: flex !important; flex-wrap: wrap; gap: 8px; }
.ps-pill { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid #cfcfcf; border-radius: 20px; color: #2b2b2b !important; font-size: 14px; background: #fff; }
.ps-pill:hover { border-color: #c25e00; color: #a84f00 !important; }

/* シーン */
.ps-scene-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.ps-scene { display: flex; flex-direction: column; gap: 6px; color: #2b2b2b !important; }
.ps-scene-img { display: block; aspect-ratio: 29 / 18; border-radius: 8px; overflow: hidden; background: #eee; }
.ps-scene-img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.ps-scene:hover .ps-scene-img img { transform: scale(1.04); }
.ps-scene-name { font-size: 14px; font-weight: 700; }

/* 特集 */
.ps-feature-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ps-feature { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; height: 100%; padding: 8px 14px; border-radius: 8px; background: #f7f8f9; color: #2b2b2b !important; font-size: 14px; font-weight: 700; }
.ps-feature span { color: #8a4500; }
.ps-feature:hover { background: #fff1db; }

/* 迷ったら */
.ps-help { border: 2px solid #f39800; border-radius: 10px; padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; background: #fff8ec; }
.ps-help-txt { display: flex; flex-direction: column; gap: 4px; }
.ps-help-title { font-size: 16px; font-weight: 700; }
.ps-help-desc { font-size: 13px; color: #4a4a4a; }
.ps-help-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-btn { height: 44px; display: inline-flex; align-items: center; padding: 0 20px; border-radius: 6px; font-weight: 700; text-decoration: none !important; }
.ps-btn-primary { background: #c25e00; color: #fff !important; }
.ps-btn-primary:hover { background: #a84f00; }
.ps-btn-secondary { border: 1px solid #c25e00; color: #9a4a00 !important; background: #fff; }

/* 全商品一覧の絞り込み */
.ps-all { border-top: 1px solid #e8e8e8; padding-top: 24px; margin-bottom: 16px; scroll-margin-top: 80px; }
.ps-filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.ps-filter { display: flex; flex-direction: column; gap: 4px; }
.ps-filter label { margin: 0; font-size: 12px; font-weight: 400; color: #4a4a4a; }
.ps-filter select { height: 44px; min-width: 180px; padding: 0 10px; border: 1px solid #bdbdbd; border-radius: 6px; font-size: 14px; background-color: #fff; color: #2b2b2b; }
.ps-filter-sort { margin-left: auto; }
.ps-filter-sort select { min-width: 140px; }
.ps-filter-status { margin: 12px 0 0; font-size: 13px; color: #4a4a4a; }
.ps-filter-reset { margin-left: 10px; color: #b35a00 !important; text-decoration: underline !important; }

@media (max-width: 991px) {
    .ps-ranking-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ps-search { padding: 14px; margin-bottom: 28px; }
    .ps-search-row input[type="search"] { height: 48px; font-size: 16px; padding: 0 12px; }
    .ps-search-btn { height: 48px; padding: 0 18px; }
    .ps-hub { gap: 32px; }
    .ps-h2 { font-size: 19px; }
    .ps-branch-cards { gap: 10px; }
    .ps-branch-card { padding: 10px; gap: 6px; }
    .ps-branch-card.is-active { padding: 8px; }
    .ps-branch-name { font-size: 16px; }
    .ps-branch-catch { font-size: 12px; }
    .ps-branch-desc, .ps-branch-uses { display: none; }
    .ps-branch-mark > span { height: 32px; padding: 0 10px; font-size: 12px; }
    .ps-branch-mark .on { font-size: 0; }
    .ps-branch-mark .on::after { content: "選択中"; font-size: 12px; }
    .ps-ranking-list { display: flex !important; overflow-x: auto; gap: 10px; padding: 6px 0 6px 6px; scroll-snap-type: x mandatory; }
    .ps-ranking-item { flex: 0 0 38%; scroll-snap-align: start; }
    .ps-type-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ps-type { gap: 8px; padding: 8px; }
    .ps-type-icon, .ps-type-icon img { width: 40px; height: 40px; flex-basis: 40px; }
    .ps-type-note { display: none; }
    .ps-scene-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .ps-feature-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ps-help { padding: 16px; }
    .ps-help-btns, .ps-btn { width: 100%; justify-content: center; }
    .ps-filter { flex: 1 1 calc(50% - 6px); }
    .ps-filter select { min-width: 0; width: 100%; }
    .ps-filter-sort { margin-left: 0; }
}
