/* ================================================
   FESN ONLINE SHOP &#8212; 商品一覧ページ CSS
   ================================================ */

/* --- Page-level top spacing (商品一覧専用) --- */
.l-main.product_list {
  padding-top: 20px;
}

/* --- Category HERO（フリーページHEROスタイルに統一） --- */
.p-cat-hero {
  margin-bottom: 32px;
}
.p-cat-hero__title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  position: static;
  text-wrap: balance;
}
.p-cat-hero__title:before { display: none; }
.p-cat-hero__parent-link {
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: border-color 0.2s;
}
.p-cat-hero__title .p-cat-hero__parent-link:hover {
  color: var(--color-text);
  text-decoration: none;
  border-bottom-color: var(--color-text);
}
.p-cat-hero__sub {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 8px 0 14px;
}
.p-cat-hero__rule {
  height: 1px;
  background: var(--color-border);
  margin: 8px 0 12px;
}
/* サブカテゴリナビ */
.p-cat-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}
.p-cat-subnav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px solid var(--color-text);
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.p-cat-subnav__link:hover {
  background: var(--color-text);
  color: #fff;
  text-decoration: none;
}
.p-cat-subnav__link.is-active {
  background: var(--color-text);
  color: #fff;
}
@media screen and (max-width: 768px) {
  .p-cat-subnav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .p-cat-subnav__link {
    white-space: normal;
    text-align: center;
  }
}

/* --- フィルターUI --- */
.p-filter {
  margin-bottom: 24px;
  border: 1px solid var(--color-text);
}

/* ヘッダー行：トグル + クリアボタン */
.p-filter__head {
  display: flex;
  align-items: center;
  padding: 0 16px 0 0;
  border-bottom: 1px solid var(--color-text);
  background: #ebebeb;
}
/* アコーディオントグルボタン */
.p-filter__toggle {
  display: flex;
  align-items: baseline;
  gap: 10px 14px;
  flex: 1;
  flex-wrap: wrap;
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}
.p-filter__toggle:hover .p-filter__title { opacity: 0.7; }
.p-filter__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.p-filter__desc {
  font-size: 11px;
  color: var(--color-text-muted);
  flex: 1;
  transition: color 0.2s;
}
.p-filter__desc.is-active-label {
  color: var(--color-text);
  font-weight: 600;
}
/* 開閉シェブロン */
.p-filter__chevron {
  flex-shrink: 0;
  margin-left: 6px;
  font-size: 9px;
  color: var(--color-text-muted);
  transition: transform 0.25s ease;
}
.p-filter__chevron::before { content: '▼'; }
.p-filter.is-collapsed .p-filter__chevron { transform: rotate(-90deg); }
/* クリアボタン */
.p-filter__clear {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  padding: 3px 10px;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.p-filter__clear:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}
/* アコーディオン本体（高さはJSで制御・CSSはtransitionのみ） */
.p-filter__body {
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* チップ群コンテナ */
.p-filter__groups {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.p-filter__group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-text);
}
.p-filter__group:last-child {
  border-bottom: none;
}
.p-filter__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
}
.p-filter__label::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 12px;
  background: var(--color-text);
  flex-shrink: 0;
}
.p-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.p-filter__chip {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 5px 14px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.p-filter__chip:hover { border-color: var(--color-text); }
.p-filter__chip.is-active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}
@media screen and (max-width: 768px) {
  .p-filter__head { padding: 0 14px 0 0; }
  .p-filter__toggle { padding: 10px 14px; }
  .p-filter__desc { font-size: 10px; }
  .p-filter__group { padding: 12px 14px; gap: 8px; }
  .p-filter__chip { font-size: 10px; padding: 6px 12px; }
}

/* --- Category freespace --- */
.p-category-free {
  font-size: 13px;
  line-height: 2;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

/* --- Item count & Sort --- */
/* --- 商品数 & ソート行 --- */
.p-item-list-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 28px;
}

/* 商品数：数字を大きく */
.p-item-list-num {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.p-item-list-num__n {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  line-height: 1;
}
.p-item-list-num__u {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* SOLD OUT 除外トグル */
.p-soldout-toggle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: none;
  cursor: pointer;
  padding: 6px 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.p-soldout-toggle:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}
.p-soldout-toggle.is-active {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
}

/* ソートコントロール */
.p-item-sort {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.p-item-sort__label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.p-item-sort-list {
  display: flex;
  border: 1px solid var(--color-border);
  gap: 0;
}
.p-item-sort-list__item { margin: 0; }
.p-item-sort-list__btn {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 6px 14px;
  border-right: 1px solid var(--color-border);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  cursor: pointer;
  background: none;
}
.p-item-sort-list__item:last-child .p-item-sort-list__btn { border-right: none; }
.p-item-sort-list__btn:hover { background: #f5f5f5; color: var(--color-text); text-decoration: none; }
.p-item-sort-list__btn.is-active {
  background: var(--color-text);
  color: #fff;
}

@media screen and (max-width: 768px) {
  .p-item-list-head { padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  .p-item-list-num__n { font-size: 18px; }
  .p-item-sort__label { display: none; }
  .p-item-sort-list__btn { font-size: 10px; padding: 6px 10px; }
}

/* --- Product list の3カラム表示（サイドバーあり） --- */
.l-contents-main .c-item-list {
  grid-template-columns: repeat(3, 1fr);
}
@media screen and (max-width: 1024px) {
  .l-contents-main .c-item-list { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 768px) {
  .l-contents-main .c-item-list { grid-template-columns: repeat(2, 1fr); }
}

/* --- フィルター ローディング状態 --- */
.p-filter--loading {
  border: 1px solid var(--color-border);
  padding: 12px 16px;
  margin-bottom: 24px;
}
.p-filter__loading-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  animation: p-filter-pulse 1.2s ease-in-out infinite;
}
@keyframes p-filter-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* --- Recommend area (商品一覧ページ下部) --- */
#recommend-area-h,
#recommend-area-p {
  margin-top: 32px;
}
