/*!
 * [二开] 分类列表页版式层 (PLP / Product Listing Page)
 * 依据用户保存的 xiaoguo_html/cate.html + cate_files/global.css + search-result.css 校准：
 *   - content-width 1400px，左侧 refinement_nav 278px，右侧三列 product-tile（32.2% / margin-right 12px）
 *   - 商品卡白底 + box-shadow:0 0 5px #ededed，图片区 3:4 (padding-bottom:133.13%)，浅灰 #ededed 底
 *   - 黑色右圆角折扣胶囊 (product-promotion)，绿色 "Selling fast!" 徽章 (lc-lov1488-badge)
 *   - 紫色星级 #571dae、红色现价 #ff274d、灰色划线原价、紫色全宽 Add to cart 胶囊
 *   - 工具栏 N products / Sort By 描边胶囊下拉；跨两行的黑五竖版促销卡
 *   - Load More 进度条（You've viewed X of Y products）
 *   - 筛选栏为手风琴：Category / Brand / Color / Price / Customer Rating / Deals / Product Type
 * 仅实现结构与视觉，不引用参考站任何图片、Logo 或营销图片资源。
 * 本文件在 lh.css / ref.css 之后加载。
 */

/* ---------- 基础与容器 ---------- */
.rf-plp {
  background: #f7f7f7;
  color: #161615;
  padding: 0 0 56px;
  font-family: var(--lh-font);
  font-size: 14px;
}
.rf-plp-wrap { width: min(1400px, calc(100% - 32px)); margin: 0 auto; }
.rf-plp-hidden { display: none; }
.rf-plp a { color: inherit; text-decoration: none; }
.rf-plp a:hover { color: var(--lh-brand); }

/* ---------- 面包屑 + 大标题 ---------- */
.rf-plp-top { background: #fff; padding: 18px 0 22px; }
.rf-crumbs { font-size: 12px; color: #545454; line-height: 1.4; margin-bottom: 14px; }
.rf-crumbs a { text-decoration: underline; text-underline-offset: 2px; color: #545454; }
.rf-crumbs a:hover { color: var(--lh-brand); }
.rf-crumb-sep { display: inline-block; margin: 0 7px; color: #bdbdbd; }
.rf-crumb-current { color: #161615; }
.rf-plp-title { font-size: 26px; line-height: 1.2; font-weight: 800; margin: 0; color: #161615; letter-spacing: -.01em; }
.rf-plp-desc { margin-top: 10px; font-size: 13px; color: #545454; max-width: 900px; }
.rf-plp-catimg { display: block; width: 100%; max-height: 220px; object-fit: cover; margin: 0 0 16px; }

/* ---------- 季节促销条（对应存档 H1 下方 banner slot） ---------- */
.rf-plp-promo { background: #161615; color: #fff; }
.rf-plp-promo-inner {
  min-height: 68px; display: flex; align-items: center; justify-content: center;
  gap: 18px; flex-wrap: wrap; text-align: center;
}
.rf-plp-promo-kicker { font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--lh-pink); text-transform: uppercase; }
.rf-plp-promo-title { font-size: 17px; font-weight: 700; }
.rf-plp .rf-plp-promo-btn {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  color: #161615; background: #fff; border-radius: 999px; padding: 8px 18px;
}
.rf-plp .rf-plp-promo-btn:hover { background: var(--lh-pink); color: #fff; }
.rf-plp-promo-btn i { font-size: 10px; }

/* ---------- 主体两栏 ---------- */
/* 存档实测：容器 1400 / 侧栏 278 / 商品区起始 x=373 → 间距 75px，三列各约 341px */
.rf-plp-layout { display: flex; align-items: flex-start; gap: 75px; padding-top: 34px; }
.rf-plp-main { flex: 1 1 auto; min-width: 0; }

/* ---------- 左侧筛选 ---------- */
.rf-filters { flex: 0 0 278px; width: 278px; background: #f7f7f7; }
.rf-filters-head { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; }
.rf-filters-title { font-size: 14px; font-weight: 700; }
.rf-filters-clear {
  margin-left: auto; border: 0; background: transparent; padding: 0;
  font-size: 11.5px; color: var(--lh-brand); text-decoration: underline; cursor: pointer;
}
.rf-filters-close { display: none; border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.rf-fgroup { border-bottom: 1px solid #e2e2e2; }
.rf-fgroup-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 8px 16px 0; border: 0; background: transparent; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: #161615; text-align: left;
}
.rf-fgroup-head i { font-size: 12px; color: #161615; }
.rf-fgroup-body { display: none; padding: 0 8px 16px 0; max-height: 290px; overflow-y: auto; }
.rf-fgroup.is-open .rf-fgroup-body { display: block; }
.rf-fgroup-body::-webkit-scrollbar { width: 5px; }
.rf-fgroup-body::-webkit-scrollbar-thumb { background: #cfcfcf; border-radius: 3px; }
.rf-fcat-current { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 0; color: #161615; }
.rf-fcat-current i { font-size: 9px; color: #545454; }
.rf-flist { list-style: none; margin: 4px 0 0; padding: 0 0 0 16px; }
.rf-flist li { font-size: 12.5px; padding: 5px 0; }
.rf-flist a:hover { text-decoration: underline; }
.rf-fcheck { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: 12.5px; cursor: pointer; }
.rf-fcheck input { position: absolute; opacity: 0; width: 0; height: 0; }
.rf-fbox {
  flex: 0 0 16px; width: 16px; height: 16px; border: 1px solid #bdbdbd; border-radius: 2px;
  background: #fff; position: relative; transition: all .15s ease;
}
.rf-fcheck input:checked + .rf-fbox { background: var(--lh-brand); border-color: var(--lh-brand); }
.rf-fcheck input:checked + .rf-fbox::after {
  content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(42deg);
}
.rf-fcheck input:focus-visible + .rf-fbox { outline: 2px solid var(--lh-brand); outline-offset: 2px; }
.rf-flabel { color: #161615; }
.rf-fcount { margin-left: auto; color: #737373; font-size: 11.5px; }
.rf-fdot { flex: 0 0 15px; width: 15px; height: 15px; border: 1px solid #d3d3d3; border-radius: 50%; background: var(--sw); }
.rf-fstars { color: var(--lh-brand); letter-spacing: 1px; }
.rf-fstars i { font-size: 11px; }
.rf-filters-foot { padding: 20px 0 0; }
.rf-filters-view {
  display: none; width: 100%; border: 0; border-radius: 999px; background: var(--lh-brand);
  color: #fff; font-size: 13px; font-weight: 700; padding: 12px 16px; cursor: pointer;
}

/* ---------- 工具栏 ---------- */
.rf-plp-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 22px; }
.rf-plp-count { font-size: 14px; color: #161615; }
.rf-plp-toolbar-right { display: flex; align-items: center; gap: 14px; }
.rf-sort { display: flex; align-items: center; gap: 10px; }
.rf-sort label { margin: 0; font-size: 13px; font-weight: 400; color: #161615; white-space: nowrap; }
.rf-sort-select {
  appearance: none; -webkit-appearance: none; border: 1px solid #161615; border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23161615' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 16px center;
  padding: 8px 38px 8px 17px; min-width: 150px; font-size: 13px; color: #161615; cursor: pointer;
}
.rf-sort-select:focus { border-color: var(--lh-brand); outline: 2px solid rgba(87,29,174,.15); }
.rf-filter-toggle {
  display: none; align-items: center; gap: 7px; border: 1px solid #161615; border-radius: 999px;
  background: #fff; font-size: 12.5px; padding: 8px 16px; cursor: pointer;
}

/* ---------- 商品网格 ---------- */
.rf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; align-items: stretch; }
.rf-tile-item { min-width: 0; display: flex; }
.rf-tile {
  width: 100%; display: flex; flex-direction: column; background: #fff; border-radius: 4px;
  box-shadow: 0 0 5px 0 #ededed; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
}
.rf-tile:hover { box-shadow: 0 8px 22px rgba(22,22,21,.12); transform: translateY(-2px); }

/* 图片区 3:4 */
.rf-tile-media { position: relative; display: block; width: 100%; background: #ededed; overflow: hidden; }
.rf-tile-media::before { content: ""; display: block; padding-bottom: 133.13%; }
.rf-tile-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  padding: 12px; background: #ededed; mix-blend-mode: multiply; transition: transform .35s ease;
}
.rf-tile:hover .rf-tile-media img { transform: scale(1.035); }
.rf-tile-badge {
  position: absolute; top: 12px; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px 0 13px; border-radius: 0 15px 15px 0;
  background: #161615; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap;
}
.rf-tile-badge i { font-size: 8px; opacity: .9; }
.rf-tile-fast {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 5px; background: #fff;
  border: 1px solid #d9d9d9; border-radius: 2px; padding: 3px 9px 3px 4px;
  font-size: 11px; font-weight: 700; color: #161615; white-space: nowrap;
}
.rf-tile-fast i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 2px; background: #37a706; color: #fff; font-size: 9px; }

/* 信息区 */
.rf-tile-body { display: flex; flex-direction: column; flex: 1; padding: 25px 20px; }
.rf-tile-rating { display: flex; align-items: center; gap: 5px; height: 17px; margin-bottom: 19px; }
.rf-tile-stars { display: inline-flex; gap: 1px; color: var(--lh-brand); font-size: 11px; }
.rf-tile-reviews { font-size: 11px; color: #545454; }
.rf-tile-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 13.5px; line-height: 1.48; min-height: 40px; margin-bottom: 10px; color: #161615;
}
.rf-tile-name:hover { text-decoration: underline; color: var(--lh-brand); }
.rf-tile-info { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.rf-tile-price { min-width: 0; }
.rf-price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.rf-price-now { color: var(--lh-red); font-size: 17px; font-weight: 700; line-height: 1.2; }
.rf-price-was { color: #545454; font-size: 12.5px; text-decoration: line-through; }
.rf-price-save { margin-top: 4px; font-size: 11px; color: #161615; }
.rf-price-tax { margin-top: 3px; font-size: 10.5px; color: #737373; }
.rf-tile-wishlist {
  flex: 0 0 24px; width: 24px; height: 25px; border: 0; background: transparent;
  color: #545454; font-size: 17px; cursor: pointer; padding: 0;
}
.rf-tile-wishlist:hover { color: var(--lh-red); }
.rf-swatches { display: flex; align-items: center; gap: 7px; margin: -2px 0 12px; }
.rf-swatch {
  width: 17px; height: 17px; padding: 0; border-radius: 50%; border: 1px solid #d3d3d3;
  background: var(--sw); cursor: pointer; position: relative;
}
.rf-swatch.is-active::after { content: ""; position: absolute; inset: -4px; border: 1.5px solid #161615; border-radius: 50%; }
.rf-tile-add {
  margin-top: auto; width: 100%; min-height: 42px; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--lh-brand); color: #fff; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .2s ease;
}
.rf-plp a.rf-tile-add, .rf-plp a.rf-tile-add:hover { color: #fff; text-decoration: none; }
.rf-tile-add:hover { background: var(--lh-red); }

/* ---------- 跨两行的黑五竖版促销卡 ---------- */
.rf-promo-item { grid-row: span 2; }
.rf-promo-card {
  width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 6px; padding: 40px 16px 34px; background: #161615; color: #fff; text-align: center;
  border-radius: 4px; overflow: hidden;
}
.rf-promo-card::before { content: ""; width: 64px; height: 4px; border-radius: 2px; background: var(--lh-pink); }
/* 覆盖 .rf-plp a{color:inherit}，否则卡片内文字会继承页面深色而不可见 */
.rf-plp a.rf-promo-card, .rf-plp a.rf-promo-card:hover { color: #fff; }
.rf-promo-off, .rf-promo-btn { color: #fff; }
.rf-promo-kicker {
  font-size: clamp(30px, 3.6vw, 52px); line-height: 1; font-weight: 900; letter-spacing: -.02em;
  color: var(--lh-pink); text-transform: uppercase;
}
.rf-promo-up {
  display: inline-block; background: var(--lh-pink); color: #fff; font-size: 12px; font-weight: 800;
  letter-spacing: .12em; padding: 3px 10px; border-radius: 3px; text-transform: uppercase; margin-top: 6px;
}
.rf-promo-off { font-size: clamp(58px, 7vw, 100px); line-height: .98; font-weight: 900; letter-spacing: -.04em; }
.rf-promo-note {
  width: calc(100% + 32px); margin: 0 -16px; background: var(--lh-pink); color: #161615;
  font-size: 13px; font-weight: 800; letter-spacing: .06em; padding: 10px 4px; text-transform: uppercase;
}
.rf-promo-btn {
  margin-top: 4px; border: 1px solid #fff; border-radius: 999px; color: #fff;
  padding: 10px 30px; font-size: 13px; font-weight: 700;
}
.rf-promo-card:hover .rf-promo-btn { background: #fff; color: #161615; }

/* ---------- Load More ---------- */
.rf-loadmore { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 44px 0 10px; }
.rf-loadmore.is-hidden { display: none; }
.rf-loadmore-text { font-size: 12px; color: #545454; }
.rf-loadmore-bar { width: 200px; height: 6px; border-radius: 3px; background: #dfd2ee; overflow: hidden; }
.rf-loadmore-bar span { display: block; height: 100%; border-radius: 3px; background: var(--lh-brand); transition: width .35s ease; }
.rf-loadmore-btn {
  min-width: 130px; border: 1px solid #161615; border-radius: 999px; background: #fff;
  color: #161615; font-size: 13px; font-weight: 600; padding: 9px 24px; cursor: pointer;
}
.rf-loadmore-btn:hover { background: var(--lh-brand); border-color: var(--lh-brand); color: #fff; }
.rf-loadmore-btn[disabled] { opacity: .55; cursor: default; }
.rf-plp-empty { text-align: center; padding: 60px 20px; color: #545454; }
.rf-plp-empty i { font-size: 42px; color: #c9b9dc; display: block; margin-bottom: 12px; }
.rf-plp-empty .rf-loadmore-btn { display: inline-block; text-decoration: none; }
.rf-plp-fallback { display: none; }
.rf-plp-noresult { display: none; text-align: center; padding: 40px 0; font-size: 13px; color: #545454; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .rf-plp-layout { gap: 12px; }
  .rf-filters { flex-basis: 240px; width: 240px; }
  .rf-tile-body { padding: 18px 15px 20px; }
}
@media (max-width: 1023px) {
  .rf-plp-layout { gap: 0; }
  .rf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rf-promo-item { grid-row: span 1; }
  .rf-promo-card { min-height: 420px; }
  .rf-filters {
    position: fixed; top: 0; bottom: 0; left: -320px; z-index: 1200; width: 300px;
    flex-basis: 300px; background: #fff; padding: 18px 20px 24px; overflow-y: auto;
    box-shadow: 6px 0 24px rgba(0,0,0,.16); transition: left .28s ease;
  }
  body.rf-filter-open .rf-filters { left: 0; }
  body.rf-filter-open::after {
    content: ""; position: fixed; inset: 0; z-index: 1190; background: rgba(22,22,21,.42);
  }
  .rf-filters-close { display: inline-flex; }
  .rf-filters-view { display: inline-block; }
  .rf-filter-toggle { display: inline-flex; }
}
@media (max-width: 700px) {
  .rf-plp-wrap { width: calc(100% - 20px); }
  .rf-plp-layout { padding-top: 20px; }
  .rf-plp-title { font-size: 22px; }
  .rf-plp-promo-inner { min-height: 76px; gap: 8px; padding: 10px 0; }
  .rf-plp-promo-title { font-size: 14px; }
  .rf-plp-toolbar { flex-wrap: wrap; padding-bottom: 16px; }
  .rf-plp-toolbar-right { width: 100%; justify-content: space-between; }
  .rf-sort label { display: none; }
  .rf-tiles { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .rf-tile-media::before { padding-bottom: 118%; }
  .rf-promo-card { min-height: 340px; }
  .rf-loadmore { padding-top: 30px; }
}
