/* ============================================================
   蓝瑞 LANRUI 落地页 · style.css（minimal 简约中性风）
   米白底 + 墨色 + 藏青主色 + 驼色点缀，细线边框、大量留白
   手机端优先（375px 基准），桌面端 432px 列居中
   DOM 契约（id / class / data-*）与 y2k 包完全一致，js 通用
   ============================================================ */

:root {
  --bg: #FAF9F7;
  --bg-outer: #EFECE6;
  --card: #FFFFFF;
  --ink: #191919;
  --navy: #2B3A55;
  --navy-deep: #222E45;
  --camel: #C9B896;
  --camel-soft: #F0EADC;
  --line: #E4E1D9;
  --muted: #8A867C;
  --wa: #25D366;
  --radius: 10px;
  --font-display: "Playfair Display", "Songti SC", "STSong", "SimSun", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-outer);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { text-decoration: none; color: inherit; }
img { display: block; }
.is-hidden { display: none !important; }

:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 2px; }

/* 桌面端：内容列居中，两侧露出底色 */
.app {
  max-width: 432px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100dvh;
  box-shadow: 0 0 48px rgba(25, 25, 25, .10);
}

/* ============ 1. Hero ============ */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 12px;
}
.topbar-logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ink);
}
.lang-toggle {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  transition: border-color .15s ease, color .15s ease;
}
.lang-toggle:hover { border-color: var(--navy); color: var(--navy); }

.hero-media { position: relative; margin: 0 14px; border-radius: 14px; overflow: hidden; }
.hero-media img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20, 26, 39, .66) 6%, rgba(20, 26, 39, .10) 46%, transparent 68%);
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  padding: 26px 22px;
}
.hero-kicker {
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px;
  color: #F0EADC;
  background: rgba(20, 26, 39, .38);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px; padding: 5px 12px;
  margin-bottom: 12px;
}
.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(52px, 15vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 6px;
  color: #fff;
}
.hero-slogan {
  font-size: 14px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, .85);
  margin: 10px 0 18px;
}
.hero-socials { display: flex; gap: 10px; margin-bottom: 18px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%;
  backdrop-filter: blur(4px);
  transition: background .15s ease, transform .15s ease;
}
.social-btn:hover { background: rgba(255, 255, 255, .24); }
.social-btn:active { transform: scale(.94); }
.social-btn svg { width: 18px; height: 18px; }
.social-btn-dark { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .22); }

.btn-cta {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: #fff; background: var(--navy);
  border: 1px solid var(--navy); border-radius: 999px;
  padding: 12px 28px;
  transition: background .15s ease, transform .15s ease;
}
.btn-cta:hover { background: var(--navy-deep); }
.btn-cta:active { transform: scale(.97); }
.btn-small { font-size: 12px; padding: 9px 22px; }

/* ============ 2. 跑马灯（细窄条） ============ */
.marquee {
  margin-top: 18px;
  background: var(--bg);
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 7px 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 26s linear infinite; }
.mq-group { display: flex; align-items: center; gap: 26px; padding-right: 26px; }
.mq-item {
  font-size: 10.5px; font-weight: 600; letter-spacing: 2.5px;
  color: var(--muted); white-space: nowrap; text-transform: uppercase;
}
.mq-star { color: var(--camel); font-size: 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ 通用 section ============ */
.section { padding: 34px 18px 6px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.section-title {
  font-family: var(--font-display);
  font-size: 25px; font-weight: 600; letter-spacing: 1px;
  color: var(--ink);
}
.section-sparkle { color: var(--camel); font-size: 14px; }
.section-sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ============ 3. 搜索框 + 分类筛选 ============ */
.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 4px; }
.search-ico { position: absolute; left: 15px; color: var(--muted); display: inline-flex; pointer-events: none; }
.search-ico svg { width: 16px; height: 16px; }
#searchInput {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 40px 10px 40px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
#searchInput:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(43, 58, 85, .10); }
.search-clear {
  position: absolute; right: 10px; width: 26px; height: 26px;
  font-size: 14px; line-height: 1;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 50%;
}
.search-clear[hidden] { display: none; }

/* 猜你喜欢 */
.recommend-wrap { margin-top: 6px; }
.recommend-wrap[hidden] { display: none; }
.recommend-title {
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  margin: 20px 0 12px;
}

.chips-wrap {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 12px 18px 12px;
  margin: 0 -18px 12px;
  background: rgba(250, 249, 247, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
}
.chips-wrap::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  font-size: 12.5px; font-weight: 500;
  background: transparent; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ============ 商品网格 ============ */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(25, 25, 25, .08); }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; border-bottom: 1px solid var(--line); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.badge {
  position: absolute; top: 8px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 1.5px;
  border-radius: 4px;
  padding: 3px 8px;
}
.badge-new { left: 8px; background: var(--camel-soft); color: #8A7648; border: 1px solid var(--camel); }
.badge-hot { right: 8px; background: var(--navy); color: #fff; }
.card.is-soldout .card-media img { filter: grayscale(.8); opacity: .6; }
.soldout-stamp {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 14px; white-space: nowrap;
}
.card-body { padding: 11px 12px 13px; }
.card-name {
  font-size: 13px; font-weight: 500; line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; gap: 6px; }
.price { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--navy); letter-spacing: .5px; }
.btn-buy {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; letter-spacing: .5px;
  color: #fff; background: var(--wa);
  border-radius: 999px;
  padding: 7px 11px;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}
.btn-buy:hover { filter: brightness(.94); }
.btn-buy:active { transform: scale(.96); }
.btn-buy .btn-ico svg { width: 13px; height: 13px; }
.btn-ico { display: inline-flex; }
.btn-ico svg { width: 16px; height: 16px; }
.btn-buy.is-disabled { background: #EDEBE5; color: var(--muted); cursor: default; }

/* 骨架屏 */
.skeleton-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.skeleton-grid[hidden] { display: none; }
.skel-card {
  aspect-ratio: 3 / 4.9;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(100deg, #F3F1EC 40%, #FAF9F6 50%, #F3F1EC 60%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* 空状态 / 错误态 */
.notice-box {
  margin-top: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 20px; text-align: center;
}
.notice-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.notice-desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; }

/* ============ 4. 下单指引 ============ */
.steps { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px;
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  color: var(--navy); background: transparent;
  border: 1px solid var(--navy); border-radius: 50%;
  margin-bottom: 10px;
}
.step-title { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.step-desc { font-size: 12px; line-height: 1.6; color: var(--muted); }

.payments { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.payments-label { font-size: 13px; font-weight: 600; }
.pay-chip {
  font-size: 12px; font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px;
}

.contact-box {
  margin-top: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 14px; text-align: center;
}
.contact-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 14px; }
.contact-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.btn-contact {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: #fff;
  border: 0; border-radius: 999px;
  padding: 10px 18px;
  transition: filter .15s ease, transform .15s ease;
}
.btn-contact:hover { filter: brightness(.94); }
.btn-contact:active { transform: scale(.96); }
.btn-wa { background: var(--wa); }
.btn-tg { background: #29A9EB; }
.btn-wc { background: #07C160; }

/* ============ 5. 好评轮播 ============ */
.reviews-track {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 4px 2px 12px;
  margin: 0 -2px;
}
.reviews-track::-webkit-scrollbar { display: none; }
.review-card {
  flex: 0 0 82%;
  scroll-snap-align: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 16px 14px;
}
.review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.review-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.review-name { font-size: 13px; font-weight: 600; }
.review-item { font-size: 11px; color: var(--muted); }
.review-stars { margin-left: auto; color: var(--camel); font-size: 13px; letter-spacing: 2px; }
.review-text { font-size: 13px; line-height: 1.65; }
.swipe-hint { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }

/* 信任标签 */
.trust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trust-badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 12px;
}
.trust-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  color: var(--navy); background: var(--camel-soft);
  border-radius: 50%;
}
.trust-ico svg { width: 19px; height: 19px; }
.trust-text { font-size: 12px; font-weight: 600; line-height: 1.35; }

/* ============ 6. 页脚 ============ */
.footer {
  margin-top: 40px;
  background: var(--navy-deep);
  padding: 30px 18px 46px;
  text-align: center;
}
.footer-socials { justify-content: center; margin-bottom: 16px; }
.footer-line { font-size: 11px; letter-spacing: 1px; color: rgba(255, 255, 255, .5); }

/* ============ 微信弹窗 ============ */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 26, 39, .5); backdrop-filter: blur(3px); }
.modal-card {
  position: relative;
  width: min(320px, 86vw);
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(20, 26, 39, .25);
  padding: 26px 22px; text-align: center;
}
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 16px; }
.modal-qr { width: 200px; height: 200px; margin: 0 auto 14px; border: 1px solid var(--line); border-radius: 10px; }
.modal-desc { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.modal-id { display: block; font-size: 15px; color: var(--ink); letter-spacing: .5px; margin-top: 2px; }

/* ============ 跳转心理缓冲浮层 ============ */
.jump-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; }
.jump-overlay[hidden] { display: none; }
.jump-backdrop { position: absolute; inset: 0; background: rgba(20, 26, 39, .45); backdrop-filter: blur(3px); }
.jump-card {
  position: relative;
  width: min(300px, 84vw);
  background: var(--bg);
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(20, 26, 39, .22);
  padding: 32px 24px 24px; text-align: center;
  animation: jump-pop .18s ease-out;
}
@keyframes jump-pop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.jump-spinner {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid var(--camel-soft);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: jump-spin .8s linear infinite;
  margin-bottom: 14px;
}
@keyframes jump-spin { to { transform: rotate(360deg); } }
.jump-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.jump-desc { font-size: 12.5px; color: var(--muted); margin-bottom: 16px; line-height: 1.55; }
.jump-fallback {
  display: inline-block;
  font-size: 13px; font-weight: 600; color: #fff;
  background: var(--wa);
  border-radius: 999px;
  padding: 10px 20px;
}
.jump-fallback:active { transform: scale(.96); }
.jump-close {
  position: absolute; top: 10px; right: 12px;
  width: 30px; height: 30px;
  font-size: 17px; line-height: 1;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 50%;
}

/* ============ 滚动入场 ============ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ 桌面端微调 ============ */
@media (min-width: 760px) {
  .app { border-inline: 1px solid var(--line); }
}
