/* ==========================================================================
   mpf-home.css — 首页模块：Hero / 信任条 / 分类卡 / 产品卡 / 故事横幅 / 博客卡 / 订阅
   同时支持 Gutenberg/Kadence 区块与自定义 .mpf-* 类（配置清单给出搭建步骤）。
   ========================================================================== */

/* ---------- Hero ---------- */
.mpf-hero {
  background: linear-gradient(120deg, var(--mpf-cream) 0%, #fff 55%, var(--mpf-mist) 100%);
  border-radius: var(--mpf-radius-xl);
  padding: 64px 56px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  overflow: hidden;
}
.mpf-hero .mpf-eyebrow { color: var(--mpf-sage); }
.mpf-hero h1 { font-size: 52px; line-height: 1.06; font-weight: 800; margin: 0 0 18px; }
.mpf-hero h1 .accent { color: var(--mpf-coral-deep); }
.mpf-hero p.lead { font-size: 18px; line-height: 1.65; color: var(--mpf-ink-700); margin: 0 0 28px; max-width: 520px; }
.mpf-hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.mpf-hero-media { position: relative; }
.mpf-hero-media img { width: 100%; border-radius: var(--mpf-radius-xl); box-shadow: var(--mpf-shadow-lg); object-fit: cover; aspect-ratio: 4/3; }
.mpf-hero-float {
  position: absolute; background: #fff; border-radius: var(--mpf-radius-lg); box-shadow: var(--mpf-shadow-md);
  padding: 12px 16px; font-size: 13px; font-weight: 700; color: var(--mpf-ink); display: flex; gap: 10px; align-items: center;
}
.mpf-hero-float.f1 { left: -18px; bottom: 28px; }
.mpf-hero-float.f2 { right: -14px; top: 24px; }
.mpf-hero-float .dot { width: 34px; height: 34px; border-radius: 50%; background: var(--mpf-sage-soft); color: var(--mpf-sage); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }

/* ---------- 信任条 ---------- */
.mpf-trust-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  background: var(--mpf-cream); border: 1px solid var(--mpf-line); border-radius: var(--mpf-radius-xl);
  padding: 26px 28px; margin: 36px 0;
}
.mpf-trust-item { display: flex; gap: 14px; align-items: center; }
.mpf-trust-item .ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; background: #fff; color: var(--mpf-sage); display: flex; align-items: center; justify-content: center; font-size: 21px; box-shadow: var(--mpf-shadow-sm); }
.mpf-trust-item b { display: block; color: var(--mpf-ink); font-size: 15px; font-weight: 700; }
.mpf-trust-item span { font-size: 13px; color: var(--mpf-ink-500); }

/* ---------- 分类大卡 ---------- */
.mpf-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mpf-cat-card {
  position: relative; display: block; border-radius: var(--mpf-radius-xl); overflow: hidden;
  min-height: 300px; box-shadow: var(--mpf-shadow-sm); isolation: isolate;
}
.mpf-cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mpf-cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(44,62,80,.05) 30%, rgba(44,62,80,.78) 100%); z-index: 1; }
.mpf-cat-card:hover img { transform: scale(1.06); }
.mpf-cat-card .body { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; color: #fff; }
.mpf-cat-card .body h3 { color: #fff; font-size: 24px; font-weight: 800; margin: 0 0 4px; }
.mpf-cat-card .body span { font-size: 14px; color: rgba(255,255,255,.85); font-weight: 500; }
.mpf-cat-card .arrow { display: inline-flex; margin-top: 10px; font-weight: 700; font-size: 14px; color: var(--mpf-sun); }

/* ---------- 产品卡（WC 循环） ---------- */
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
  background: #fff; border: 1px solid var(--mpf-line); border-radius: var(--mpf-radius-lg);
  padding: 14px; box-shadow: var(--mpf-shadow-sm); transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: var(--mpf-shadow-md); }
.woocommerce ul.products li.product .woocommerce-loop-product__link { display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__thumbnail,
.woocommerce ul.products li.product img { border-radius: var(--mpf-radius-md); aspect-ratio: 1/1; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15.5px; font-weight: 700; color: var(--mpf-ink) !important; margin: 12px 0 6px; line-height: 1.35;
}
.woocommerce ul.products li.product .price { color: var(--mpf-ink) !important; font-weight: 800; font-size: 17px; }
.woocommerce ul.products li.product .price del { color: var(--mpf-ink-400); font-weight: 500; font-size: 13px; margin-right: 6px; }
.woocommerce ul.products li.product .star-rating { font-size: 13px; margin: 4px 0; }
.woocommerce ul.products li.product .button { width: 100%; margin-top: 10px; }
.woocommerce ul.products li.product .onsale, .woocommerce span.onsale {
  background: var(--mpf-coral) !important; color: var(--mpf-ink) !important; font-weight: 800;
  border-radius: var(--mpf-radius-pill); padding: 4px 12px; font-size: 12px; min-height: 0; line-height: 1.4;
}
/* 心愿按钮（YITH） */
.woocommerce ul.products li.product .yith-wcwl-add-to-wishlist { margin-top: 8px; }
.woocommerce ul.products li.product .yith-wcwl-add-button a,
.woocommerce ul.products li.product .yith-wcwl-wishlistaddedbrowse a {
  font-size: 13px; font-weight: 600; color: var(--mpf-ink-500);
}

/* ---------- 品牌故事横幅 ---------- */
.mpf-story-banner {
  background: var(--mpf-ink); color: #fff; border-radius: var(--mpf-radius-xl);
  padding: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; overflow: hidden;
}
.mpf-story-banner .mpf-eyebrow { color: var(--mpf-coral); }
.mpf-story-banner h2 { color: #fff; font-size: 34px; font-weight: 800; margin: 0 0 14px; }
.mpf-story-banner p { color: rgba(255,255,255,.82); line-height: 1.7; margin: 0 0 24px; }
.mpf-story-banner img { border-radius: var(--mpf-radius-lg); width: 100%; aspect-ratio: 4/3; object-fit: cover; }

/* ---------- 博客卡 ---------- */
.mpf-blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mpf-blog-card { background: #fff; border: 1px solid var(--mpf-line); border-radius: var(--mpf-radius-lg); overflow: hidden; box-shadow: var(--mpf-shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
.mpf-blog-card:hover { transform: translateY(-4px); box-shadow: var(--mpf-shadow-md); }
.mpf-blog-card .thumb { aspect-ratio: 16/10; overflow: hidden; }
.mpf-blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.mpf-blog-card:hover .thumb img { transform: scale(1.05); }
.mpf-blog-card .body { padding: 20px 22px 24px; }
.mpf-blog-card .cat { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mpf-coral-deep); }
.mpf-blog-card h3 { font-size: 18px; font-weight: 700; margin: 8px 0 8px; line-height: 1.35; }
.mpf-blog-card p { font-size: 14px; color: var(--mpf-ink-500); line-height: 1.6; margin: 0 0 14px; }
.mpf-blog-card .more { font-weight: 700; font-size: 14px; color: var(--mpf-ink); }
.mpf-blog-card .more:hover { color: var(--mpf-coral-deep); }

/* ---------- 订阅 ---------- */
.mpf-newsletter {
  background: var(--mpf-cream); border: 1px solid var(--mpf-line); border-radius: var(--mpf-radius-xl);
  padding: 48px 56px; text-align: center;
}
.mpf-newsletter h2 { font-size: 30px; font-weight: 800; margin: 0 0 10px; }
.mpf-newsletter p { color: var(--mpf-ink-500); margin: 0 auto 22px; max-width: 520px; }
.mpf-newsletter form { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.mpf-newsletter input { flex: 1; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .mpf-hero { grid-template-columns: 1fr; padding: 44px 36px; }
  .mpf-hero h1 { font-size: 42px; }
  .mpf-trust-bar { grid-template-columns: repeat(2, 1fr); }
  .mpf-cat-grid, .mpf-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .mpf-story-banner { grid-template-columns: 1fr; padding: 40px 32px; }
}
@media (max-width: 560px) {
  .mpf-hero { padding: 32px 22px; }
  .mpf-hero h1 { font-size: 32px; }
  .mpf-hero-cta .button { width: 100%; }
  .mpf-hero-float { display: none; }
  .mpf-trust-bar { grid-template-columns: 1fr; padding: 22px; }
  .mpf-cat-grid, .mpf-blog-grid { grid-template-columns: 1fr; }
  .mpf-newsletter { padding: 32px 22px; }
  .mpf-newsletter form { flex-direction: column; }
}
