/*!
 * [二开] 参考站版式层 (Reference Layout)
 * 依据用户保存的 xiaoguo_html/index.html 首页存档校准：
 *   - 容器 content-width = 1400px
 *   - 顶部 utility 细条 + 粉色促销公告轮播 (#ff387c / #ff274d)
 *   - 主色品牌紫 #571dae、通栏亮紫 #6a0ae8
 *   - 竖版 Banner 卡 375:600、通栏 1700:250
 *   - USP 浅灰细条 #ededed、糖果色卡 #f8b8ff / #fceca9 / #aff9f2
 *   - 描边矩形按钮 (对应参考站 b-stroke_button)
 * 仅实现结构与视觉，不使用参考站任何图片、Logo 或营销文案。
 * 本文件在 lh.css 之后加载；官方升级时保留本文件即可。
 */

/* ---------- 顶部 utility 细条 ---------- */
/* 语言/货币下拉在主头部之上：头部是 sticky z-index:1030，这里必须抬高层级，否则弹层被裁切遮挡 */
.rf-util {
  position: relative;
  z-index: 1060;
  background: #f7f7f7;
  border-bottom: 1px solid #ececef;
  font-size: 12px;
  color: #615b67;
}
.rf-util .dropdown-menu { z-index: 1061; }
.rf-util .container {
  min-height: 31px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.rf-util-group { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.rf-util a { color: #615b67; }
.rf-util a:hover { color: var(--lh-brand); }
.rf-util i { margin-right: 6px; color: var(--lh-brand); }
.rf-util-sep { width: 1px; height: 12px; background: #d9d5dc; }
.rf-util-lang { display: inline-flex; align-items: center; gap: 10px; }
.rf-util-lang .dropdown-toggle { font-size: 12px; color: #615b67; }

/* ---------- 粉色促销公告轮播 ---------- */
.lh-announce.rf-announce {
  background: var(--lh-pink);
  color: #fff;
  font-size: 13px;
}
.rf-announce .container { min-height: 42px; justify-content: center; }
.rf-announce .lh-announce-right { position: absolute; right: 0; }
.rf-announce .lh-announce-right a { color: #fff; }
.rf-announce .container { position: relative; }
.rf-announce-track {
  position: relative;
  flex: 1;
  height: 42px;
  overflow: hidden;
}
.rf-announce-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 700;
  letter-spacing: .015em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(9px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.rf-announce-item.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.rf-announce-item i { opacity: .92; }
.rf-announce-dots { display: flex; align-items: center; gap: 5px; }
.rf-announce-dots button {
  width: 6px; height: 6px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .5);
  transition: all .25s ease;
}
.rf-announce-dots button.is-active { width: 16px; border-radius: 3px; background: #fff; }

/* ---------- 头部 / 导航对齐 ---------- */
.lh-header.rf-header { box-shadow: 0 2px 14px rgba(43, 18, 64, .06); }
.rf-header .lh-logo h1 a { color: var(--lh-brand); font-weight: 800; letter-spacing: -.02em; }
.rf-header .lh-logo-mark { background: var(--lh-pink); }
.lh-nav.rf-nav { background: #fff; border-bottom: 1px solid #ece7ef; }
/* 官方 stylesheet 给 #menu 自身加了蓝色渐变；参考站导航为白底深色字，这里显式覆盖 */
.lh-nav.rf-nav #menu {
  background: #fff !important;
  background-image: none !important;
  border: 0 !important;
  border-bottom: 1px solid #f0ecf2 !important;
  box-shadow: none !important;
}
.lh-nav.rf-nav #menu .navbar-nav > li > a {
  color: var(--lh-ink) !important;
  text-shadow: none !important;
}
.lh-nav.rf-nav #menu .navbar-nav > li > a:hover {
  background: var(--lh-blush) !important;
  color: var(--lh-brand) !important;
}
.lh-nav.rf-nav #menu .navbar-toggler i {
  color: var(--lh-ink) !important;
  border-color: var(--lh-ink) !important;
}
.lh-nav.rf-nav #menu #category { color: var(--lh-ink) !important; }

/* ---------- 通用：参考站的描边矩形按钮 ---------- */
.rf-stroke-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 26px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.rf-stroke-btn:hover { transform: translateY(-2px); }
.rf-stroke-btn i { font-size: 12px; }
.rf-stroke-light { color: #fff; }
.rf-stroke-light:hover { background: #fff; color: var(--lh-brand); }
.rf-stroke-dark { color: var(--lh-ink); }
.rf-stroke-dark:hover { background: var(--lh-ink); color: #fff; }
.rf-btn-solid {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: 0 28px; border-radius: 2px;
  background: var(--lh-brand); color: #fff; font-size: 13px;
  font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  transition: background .2s ease, transform .2s ease;
}
.rf-btn-solid:hover { background: var(--lh-brand-dark); color: #fff; transform: translateY(-2px); }

/* ---------- 区块通用 ---------- */
.rf-home { overflow: hidden; }
.rf-sec { padding: 44px 0; }
.rf-sec-tight { padding: 26px 0; }
.rf-sec-head { text-align: center; margin-bottom: 26px; }
.rf-sec-head h2 { font-size: 27px; margin: 0 0 7px; font-weight: 800; }
.rf-sec-head p { margin: 0; color: var(--lh-muted); font-size: 13.5px; }
.rf-sec-head-line { width: 44px; height: 3px; border-radius: 3px; background: var(--lh-pink); margin: 12px auto 0; }

/* ---------- 主促销通栏 (对应 l-sales_banner) ---------- */
.rf-sales {
  position: relative;
  overflow: hidden;
  background: var(--lh-pink);
  color: #fff;
}
.rf-sales::before {
  content: ''; position: absolute; width: 660px; height: 660px;
  border-radius: 50%; background: rgba(255, 255, 255, .09);
  right: -180px; top: -260px;
}
.rf-sales::after {
  content: ''; position: absolute; width: 360px; height: 360px;
  border-radius: 50%; border: 60px solid rgba(255, 255, 255, .07);
  left: -170px; bottom: -220px;
}
.rf-sales-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr;
  align-items: center; gap: 30px; min-height: 330px;
  /* 保留容器左右内边距，避免 <1400px 时文案贴屏幕边缘 */
  padding: 34px 12px;
}
.rf-sales-copy { max-width: 660px; }
.rf-sales-eyebrow {
  display: inline-block; font-size: 11.5px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 5px 13px; border: 1px solid rgba(255, 255, 255, .65); border-radius: 2px;
  margin-bottom: 16px;
}
.rf-sales h1 { color: #fff; font-size: 46px; line-height: 1.2; font-weight: 800; margin: 0 0 12px; letter-spacing: -.02em; }
.rf-sales h2.rf-sales-title-sm { color: #fff; font-size: 34px; line-height: 1.2; font-weight: 800; margin: 0 0 12px; letter-spacing: -.02em; }
.rf-sales p { font-size: 15px; opacity: .95; margin: 0 0 24px; max-width: 520px; }
.rf-sales-art { display: flex; justify-content: center; align-items: center; }
/* 固定 1:1 画框：图片未加载/加载失败时仍保留高度并显示图标，版面不会塌陷 */
.rf-sales-media {
  position: relative; width: 100%; max-width: 390px; aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .16);
  box-shadow: 0 24px 50px rgba(90, 10, 55, .22);
}
.rf-sales-media img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; display: block; }
.rf-sales-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 110px; color: #fff; opacity: .9; }
.rf-sales-art-fallback {
  width: 100%; max-width: 390px; aspect-ratio: 1 / 1; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .16); font-size: 110px; color: #fff;
}

/* ---------- 首页主视觉轮播 ---------- */
.rf-hero { position: relative; display: grid; }
.rf-hero-slide {
  grid-area: 1 / 1;
  background: var(--rf-slide-bg, var(--lh-pink));
  opacity: 0; visibility: hidden;
  transition: opacity .55s ease, visibility .55s ease;
}
.rf-hero-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.rf-sales .rf-hero-h {
  color: #fff; font-size: 46px; line-height: 1.2; font-weight: 800;
  margin: 0 0 12px; letter-spacing: -.02em;
}
.rf-hero-nav { position: absolute; left: max(12px, calc((100% - 1400px) / 2 + 12px)); bottom: 22px; z-index: 3; display: flex; align-items: center; gap: 12px; }
.rf-hero-arrow {
  width: 34px; height: 34px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .72); background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.rf-hero-arrow:hover { background: #fff; border-color: #fff; color: var(--lh-ink); }
.rf-hero-dots { display: flex; align-items: center; gap: 6px; }
.rf-hero-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; cursor: pointer; border-radius: 50%;
  background: rgba(255, 255, 255, .48); transition: width .25s ease, background .25s ease;
}
.rf-hero-dots button.is-active { width: 20px; border-radius: 3px; background: #fff; }
@media (prefers-reduced-motion: reduce) {
  .rf-hero-slide { transition: none; }
}
.rf-sales-black { background: #161615; }
.rf-sales-black::before { background: rgba(176, 61, 218, .16); }
.rf-sales-black .rf-sales h1, .rf-sales-black h1 { color: #fff; }

/* ---------- USP 细条 (对应 #usps-outer，浅灰底) ---------- */
.rf-usp { background: #ededed; color: var(--lh-ink); }
.rf-usp-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; min-height: 58px; align-items: center;
}
.rf-usp-item {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 13px; font-weight: 600; padding: 12px 8px; text-align: center;
  border-right: 1px solid #dcd8df;
}
.rf-usp-item:last-child { border-right: 0; }
.rf-usp-item i { color: var(--lh-brand); font-size: 17px; }

/* ---------- 4 列竖版 Banner 卡 (对应 b-grid_block m-col_4 / 375x600) ---------- */
.rf-cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rf-bcard {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 375 / 600; border-radius: 3px;
  background: linear-gradient(155deg, var(--lh-purple-soft), var(--lh-brand));
  color: #fff;
}
.rf-bcard-2 { background: linear-gradient(155deg, #ff7aac, var(--lh-pink)); }
.rf-bcard-3 { background: linear-gradient(155deg, #6a0ae8, #3b0d80); }
.rf-bcard-4 { background: linear-gradient(155deg, #161615, #443a4d); }
.rf-bcard-media { position: absolute; inset: 0; }
.rf-bcard-media img { width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.rf-bcard::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .06) 25%, rgba(0, 0, 0, .62) 100%);
}
.rf-bcard-body {
  position: absolute; z-index: 2; inset: auto 0 0 0;
  padding: 26px 22px 28px; text-align: center;
}
.rf-bcard-kicker {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; opacity: .85; margin-bottom: 9px;
}
.rf-bcard-body h3 { color: #fff; font-size: 23px; font-weight: 800; margin: 0 0 18px; line-height: 1.2; }
.rf-bcard .rf-stroke-btn { min-height: 38px; padding: 0 20px; font-size: 11.5px; }

/* ---------- 分类图标行 (对应 slot3 的 24 图标) ---------- */
.rf-caticons {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px;
}
.rf-caticon { text-align: center; text-decoration: none; color: var(--lh-ink); }
.rf-caticon-media {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden;
  background: #f4f0f7; border: 1px solid #ece6f0;
  margin-bottom: 9px; transition: transform .2s ease, box-shadow .2s ease;
}
.rf-caticon-media img { width: 100%; height: 100%; object-fit: cover; }
.rf-caticon-media i { font-size: 27px; color: var(--lh-brand); }
.rf-caticon:nth-child(8n+2) .rf-caticon-media { background: #fdf0f6; }
.rf-caticon:nth-child(8n+3) .rf-caticon-media { background: #f2ecfa; }
.rf-caticon:nth-child(8n+4) .rf-caticon-media { background: #eefaf7; }
.rf-caticon:nth-child(8n+5) .rf-caticon-media { background: #fdf7e8; }
.rf-caticon:nth-child(8n+6) .rf-caticon-media { background: #f6eefb; }
.rf-caticon:nth-child(8n+7) .rf-caticon-media { background: #fff0f0; }
.rf-caticon:nth-child(8n+8) .rf-caticon-media { background: #eef4fd; }
.rf-caticon:hover .rf-caticon-media { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(87, 29, 174, .16); }
.rf-caticon span { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.rf-caticon:hover span { color: var(--lh-brand); }

/* ---------- 商品网格 / 品牌轮播位 ---------- */
.rf-surface { background: var(--lh-surface); }
.rf-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.rf-grid4 > div { min-width: 0; }
.rf-sec-more { text-align: center; margin-top: 24px; }

/* ---------- 评价条 (对应 Trustpilot 区) ---------- */
.rf-reviews { background: #fff; border-top: 1px solid var(--lh-line); border-bottom: 1px solid var(--lh-line); }
.rf-reviews-head { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.rf-stars { color: #00a76f; letter-spacing: 3px; font-size: 17px; }
.rf-reviews-score { font-weight: 800; color: var(--lh-ink); font-size: 15px; }
.rf-reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rf-review {
  background: #fff; border: 1px solid var(--lh-line); border-radius: 8px;
  padding: 20px 22px; box-shadow: 0 4px 16px rgba(43, 18, 64, .04);
}
.rf-review .rf-stars { font-size: 13px; letter-spacing: 2px; margin-bottom: 10px; }
.rf-review p { margin: 0 0 12px; font-size: 13.5px; color: var(--lh-body); }
.rf-review strong { font-size: 13px; color: var(--lh-ink); }
.rf-review small { color: var(--lh-muted); margin-left: 7px; font-size: 11.5px; }

/* ---------- 糖果色三卡 (对应 slot7 的 #f8b8ff / #fceca9 / #aff9f2) ---------- */
.rf-candy3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rf-candy {
  position: relative; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  min-height: 250px; padding: 30px 24px; border-radius: 3px; overflow: hidden;
  color: var(--lh-ink);
}
.rf-candy-1 { background: var(--lh-candy-pink); }
.rf-candy-2 { background: var(--lh-candy-yellow); }
.rf-candy-3 { background: var(--lh-candy-mint); }
.rf-candy-icon {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .62); font-size: 24px;
  color: var(--lh-brand); margin-bottom: 15px;
}
.rf-candy h3 { font-size: 21px; font-weight: 800; margin: 0 0 7px; }
.rf-candy p { margin: 0 0 18px; font-size: 13px; color: #4a424e; }

/* ---------- 亮紫通栏 (对应 1700x250 sales banner) ---------- */
.rf-band { background: var(--lh-purple); color: #fff; }
.rf-band-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 26px; min-height: 150px; padding: 24px 0; flex-wrap: wrap;
}
.rf-band-copy { max-width: 720px; }
.rf-band-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.rf-band h2 { color: #fff; font-size: 30px; font-weight: 800; margin: 8px 0 7px; }
.rf-band p { margin: 0; font-size: 14px; opacity: .92; }

/* ---------- 内容 / 指南区 (对应 UGC 内容区) ---------- */
.rf-content3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.rf-content-card {
  border: 1px solid var(--lh-line); border-radius: 8px; overflow: hidden;
  background: #fff; text-decoration: none; color: var(--lh-ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rf-content-card:hover { transform: translateY(-4px); box-shadow: var(--lh-shadow); color: var(--lh-ink); }
.rf-content-thumb {
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f2ecf8, #fce9f2); font-size: 42px; color: var(--lh-purple-soft);
}
.rf-content-body { padding: 18px 20px 22px; }
.rf-content-tag { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--lh-brand); }
.rf-content-body h3 { font-size: 16px; margin: 8px 0 0; font-weight: 700; }

/* ---------- 订阅条 / 页脚对齐参考站 ---------- */
.lh-newsletter.rf-newsletter { background: var(--lh-brand); padding: 38px 0; color: #fff; }
.rf-newsletter h3 { color: #fff; font-size: 25px; font-weight: 800; }
.rf-newsletter p { color: rgba(255, 255, 255, .82); font-size: 13px; }
.rf-newsletter .lh-newsletter-form .form-control { border-radius: 2px; border: 0; min-height: 44px; }
.rf-newsletter .lh-newsletter-form .btn { border-radius: 2px; background: var(--lh-pink); border-color: var(--lh-pink); min-height: 44px; }
.rf-newsletter .lh-newsletter-form .btn:hover { background: var(--lh-pink-dark); border-color: var(--lh-pink-dark); }

.lh-footer.rf-footer { background: var(--lh-surface); color: var(--lh-body); border-top: 1px solid #e8e3ea; }
.rf-footer .lh-footer-cols { grid-template-columns: 1.4fr repeat(4, 1fr); padding: 46px 0 30px; }
.rf-footer .lh-footer-brand h4 { color: var(--lh-brand); }
.rf-footer .lh-footer-brand p { color: var(--lh-muted); }
.rf-footer h5 { color: var(--lh-ink); font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.rf-footer li a { color: #625b68; }
.rf-footer li a:hover { color: var(--lh-brand); }
.rf-footer .lh-footer-bottom { border-top: 1px solid #e3dde6; color: var(--lh-muted); }
.rf-footer .lh-pay span {
  background: #fff; border: 1px solid #e3dde6; color: #5c5561;
  border-radius: 3px; padding: 3px 9px; font-size: 10.5px; font-weight: 700;
}
.rf-footer .lh-social a { border-color: #ded6e4; color: var(--lh-brand); }
.rf-footer .lh-social a:hover { background: var(--lh-brand); border-color: var(--lh-brand); color: #fff; }
.rf-footer-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; font-size: 11.5px; color: var(--lh-muted); }
.rf-footer-badges i { color: var(--lh-brand); margin-right: 5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .rf-caticons { grid-template-columns: repeat(6, 1fr); }
  .rf-cards4 { gap: 12px; }
  .rf-sales h1, .rf-sales .rf-hero-h { font-size: 38px; }
}
@media (max-width: 991px) {
  .rf-util .rf-util-group:first-child { display: none; }
  .rf-sales-inner { grid-template-columns: 1fr; min-height: 0; padding: 36px 12px; text-align: center; }
  .rf-sales-copy { margin: 0 auto; }
  .rf-sales p { margin-left: auto; margin-right: auto; }
  .rf-sales-art { margin-top: 20px; }
  .rf-sales-media, .rf-sales-art-fallback { max-width: 280px; }
  .rf-hero-nav { left: 16px; bottom: 12px; gap: 8px; }
  /* 单列布局下给轮播控件让出空间，避免压在商品图上 */
  .rf-hero .rf-sales-inner { padding-bottom: 64px; }
  .rf-usp-grid { grid-template-columns: repeat(2, 1fr); }
  .rf-usp-item:nth-child(2) { border-right: 0; }
  .rf-usp-item:nth-child(-n+2) { border-bottom: 1px solid #dcd8df; }
  .rf-cards4, .rf-grid4 { grid-template-columns: repeat(2, 1fr); }
  .rf-caticons { grid-template-columns: repeat(4, 1fr); }
  .rf-reviews-grid, .rf-candy3, .rf-content3 { grid-template-columns: 1fr 1fr; }
  .rf-footer .lh-footer-cols { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
  .rf-announce .lh-announce-right { display: none; }
  .rf-announce-item { font-size: 11.5px; padding: 0 12px; white-space: normal; text-align: center; }
  .rf-sec { padding: 30px 0; }
  .rf-sec-head h2 { font-size: 22px; }
  .rf-sales h1, .rf-sales .rf-hero-h { font-size: 30px; }
  .rf-cards4, .rf-grid4 { gap: 12px; }
  .rf-bcard { aspect-ratio: 3 / 4; }
  .rf-bcard-body { padding: 16px 12px 18px; }
  .rf-bcard-body h3 { font-size: 17px; margin-bottom: 10px; }
  .rf-caticons { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .rf-caticon span { font-size: 11px; }
  .rf-reviews-grid, .rf-candy3, .rf-content3 { grid-template-columns: 1fr; }
  .rf-candy { min-height: 190px; }
  .rf-band-inner { min-height: 0; }
  .rf-band h2 { font-size: 23px; }
  .rf-footer .lh-footer-cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .rf-newsletter .lh-newsletter-form { min-width: 0; width: 100%; }
  .rf-newsletter .lh-newsletter-form .form-control { min-width: 0; }
}
