﻿/* ============================================================
   小咔子数字商城 · 首页样式（复刻 humkt.com）
   ============================================================ */

:root {
  --primary: #006fff;
  --primary-dark: #0058cc;
  --primary-soft: #e8f1ff;
  --bg: #f8f9fc;
  --card: #fff;
  --text: #0f172a;
  --muted: #64748b;
  --dim: #94a3b8;
  --border: #e6eaf0;
  --price: #e11d48;
  --warn: #f5a623;
  --ok: #22c55e;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, .14);
  --shadow-lg: 0 18px 40px -16px rgba(15, 23, 42, .22);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.wrap {
  width: 100%;
  max-width: 1230px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ 顶栏 ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand { flex-shrink: 0; display: flex; align-items: center; }
.brand__logo { height: 38px; width: auto; }

.searchbar {
  flex: 1;
  max-width: 620px;
  display: flex;
  align-items: stretch;
  height: 40px;
  border: 1.5px solid var(--primary);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.searchbar__cat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  font-size: 13px;
  color: var(--text);
  background: #f6f8fb;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.searchbar__cat:hover { background: #eef2f8; }
.searchbar input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--text);
  background: transparent;
}
.searchbar input::placeholder { color: var(--dim); }
.searchbar__btn {
  width: 54px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  transition: background .18s;
}
.searchbar__btn:hover { background: var(--primary-dark); }

.topbar__right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.locale {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 6px;
  transition: background .18s;
}
.locale:hover { background: #f4f7fb; color: var(--text); }
.locale__flag { font-size: 15px; line-height: 1; }

.btn-login {
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  transition: background .18s, transform .15s;
}
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ============ 导航 ============ */
.navbar {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
.navbar__inner {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.cat-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 6px;
  background: linear-gradient(180deg, #2b86ff, var(--primary));
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(0, 111, 255, .5);
  transition: filter .18s;
}
.cat-btn:hover { filter: brightness(1.06); }

.navmenu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.navmenu::-webkit-scrollbar { display: none; }
.navmenu li { flex-shrink: 0; }
.navmenu a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
  height: 52px;
  font-size: 13.5px;
  color: #475569;
  position: relative;
  transition: color .16s;
}
.navmenu a:hover { color: var(--primary); }
.navmenu a.is-active { color: var(--primary); font-weight: 600; }
.navmenu a.is-active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--primary);
}
.tag-new {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--primary);
  color: #fff;
}

.btn-seller {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffbb35, var(--warn));
  color: #3b2600;
  font-size: 13.5px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px -4px rgba(245, 166, 35, .6);
  transition: filter .18s;
}
.btn-seller:hover { filter: brightness(1.05); }

/* ============ Hero ============ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0 72px;
  background:
    repeating-linear-gradient(135deg, rgba(0, 111, 255, .028) 0 2px, transparent 2px 46px),
    radial-gradient(120% 80% at 50% -10%, #eaf2ff 0%, #f8f9fc 58%, #f8f9fc 100%);
}
.hero__inner { position: relative; z-index: 2; text-align: center; }

.trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 26px;
}
.trust b { color: var(--text); font-weight: 700; }
.trust__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}

.hero__title {
  font-size: clamp(28px, 4.8vw, 52px);
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.25;
  color: #0b1220;
}
.hero__title em {
  font-style: normal;
  color: var(--primary);
  background: linear-gradient(180deg, transparent 74%, #c9dcff 74%);
  padding: 0 2px;
}
.hero__sub {
  margin-top: 14px;
  font-size: 15px;
  color: var(--muted);
}
.hero__sub span { color: #475569; }

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 0;
  margin: 28px auto 0;
  font-size: 13.5px;
}
.platforms a {
  color: #475569;
  padding: 3px 12px;
  border-right: 1px solid #d7dee9;
  transition: color .16s;
  white-space: nowrap;
}
.platforms a:last-child { border-right: none; }
.platforms { max-width: 760px !important; }
.platforms a:hover { color: var(--primary); }

.hero__actions {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 34px;
  border-radius: var(--r-sm);
  font-size: 14.5px;
  font-weight: 600;
  transition: all .18s;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(0, 111, 255, .8);
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn--ghost {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid #b9d4ff;
}
.btn--ghost:hover { border-color: var(--primary); background: #f5f9ff; }
.btn--full { width: 100%; }

/* Hero 装饰图标 */
.hero__deco {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.deco {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 10px 26px -10px rgba(15, 23, 42, .45);
  animation: floaty 6.5s ease-in-out infinite;
}
/* 图标统一走 ::before，加白色滤镜，避免深色 SVG 落在深色底上看不见 */
.deco::before {
  content: "";
  position: absolute;
  inset: 22%;
  background: center / contain no-repeat;
  filter: brightness(0) invert(1);
}
.deco--ig { width: 56px; height: 56px; top: 12%; left: 5%; background: linear-gradient(45deg, #f9ce34, #ee2a7b 48%, #6228d7); animation-delay: 0s; }
.deco--ig::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/instagram.svg); }
.deco--dc { width: 48px; height: 48px; top: 36%; left: 11%; background: #5865f2; animation-delay: 1.1s; }
.deco--dc::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/discord.svg); }
.deco--tg { width: 44px; height: 44px; top: 12%; right: 11%; background: #29a9eb; animation-delay: .6s; }
.deco--tg::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/telegram.svg); }
.deco--sc { width: 46px; height: 46px; top: 42%; right: 9%; background: #fffc00; animation-delay: 1.7s; }
.deco--sc::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/snapchat.svg); filter: none; }
.deco--tt { width: 52px; height: 52px; bottom: 16%; left: 7%; background: #111; animation-delay: .9s; }
.deco--tt::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/tiktok.svg); }
.deco--x { width: 46px; height: 46px; bottom: 10%; left: 22%; background: #111; animation-delay: 2.2s; }
.deco--x::before { background-image: url(https://www.humkt.com/assets/images/brand-icons/twitter.svg); }
.deco--yt { width: 48px; height: 48px; bottom: 12%; right: 20%; background: #ff0033; animation-delay: 1.4s; }
.deco--yt::before { display: none; }
.deco--yt::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-42%, -50%);
  width: 0; height: 0;
  border-left: 12px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* ============ 区块通用 ============ */
.section { padding: 56px 0; }
.sec-center { text-align: center; margin-bottom: 40px; }
.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--primary);
  margin-bottom: 8px;
}
.h2 {
  font-size: clamp(21px, 3vw, 30px);
  font-weight: 800;
  letter-spacing: -.3px;
}
.h2 span { color: inherit; }
.sec-sub { margin-top: 8px; font-size: 13.5px; color: var(--muted); }

.sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.sec-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 800;
}
.sec-title i {
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--primary);
}
.sec-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--dim);
  margin-left: 2px;
}
.sec-more {
  font-size: 13px;
  color: var(--muted);
  transition: color .16s;
}
.sec-more span { font-size: 15px; }
.sec-more:hover { color: var(--primary); }

/* ============ 商品网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #c7dcff;
  box-shadow: var(--shadow-md);
}

.card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f4f6fa;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.card:hover .card__media img { transform: scale(1.04); }

.card__body { padding: 10px 11px 12px; display: flex; flex-direction: column; flex: 1; }
.card__name {
  font-size: 12.5px;
  line-height: 1.5;
  color: #1e293b;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.card__foot {
  margin-top: 8px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.card__price {
  font-size: 15px;
  font-weight: 800;
  color: var(--price);
  font-variant-numeric: tabular-nums;
}
.card__stock {
  font-size: 11px;
  color: var(--dim);
  white-space: nowrap;
}

/* ============ 购买流程 ============ */
.flow-sec { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}
.flow::before {
  content: "";
  position: absolute;
  top: 34px;
  left: 10%;
  right: 10%;
  height: 1px;
  background-image: linear-gradient(90deg, #cfd8e6 50%, transparent 50%);
  background-size: 10px 1px;
  z-index: 0;
}
.flow__step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 6px;
}
.flow__idx {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-34px);
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 0 0 3px #fff;
}
.flow__idx--ok { background: var(--ok); transform: translateX(14px); }
.flow__icon {
  width: 68px; height: 68px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.flow__icon svg { width: 30px; height: 30px; }
.flow__step h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.flow__step p { font-size: 12.5px; color: var(--muted); }

/* ============ 客户评价 ============ */
.review-sec { background: var(--bg); }

.stars {
  margin-top: 10px;
  color: #f59e0b;
  font-size: 17px;
  letter-spacing: 3px;
  line-height: 1;
}
.stars--sm { font-size: 13px; letter-spacing: 2px; margin: 0 0 12px; }

.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
}
.review {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 20px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.review:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.review__quote {
  position: absolute;
  top: 6px; left: 14px;
  font-size: 46px;
  line-height: 1;
  color: #e8eef7;
  font-family: Georgia, serif;
  pointer-events: none;
}
.review p {
  position: relative;
  font-size: 13px;
  line-height: 1.75;
  color: #475569;
  min-height: 92px;
}
.review__who {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  gap: 10px;
}
.review__avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cfe0ff, #9fc2ff);
  flex-shrink: 0;
}
.review__who b { display: block; font-size: 13px; font-weight: 700; }
.review__who small { font-size: 11.5px; color: var(--dim); }

/* ============ 页脚 ============ */
.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 44px 0 20px;
}
.footer__top {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.footer__brand .brand__logo { height: 36px; margin-bottom: 12px; }
.footer__brand p { font-size: 12.5px; color: var(--muted); max-width: 240px; }

.footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.footer__cols h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}
.footer__cols a {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0;
  transition: color .16s;
}
.footer__cols a:hover { color: var(--primary); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  font-size: 12px;
  color: var(--dim);
}
.footer__bottom > div { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__bottom a:hover { color: var(--primary); }

/* ============ 浮动按钮 ============ */
.fab {
  position: fixed;
  left: 22px;
  bottom: 26px;
  z-index: 60;
  width: 46px; height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 12px 28px -10px rgba(0, 111, 255, .85);
  transition: transform .18s, background .18s;
}
.fab:hover { transform: translateY(-2px) scale(1.04); background: var(--primary-dark); }

/* ============ 登录弹窗 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(3px);
}
.modal.is-open { display: flex; }
.modal__card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 26px 24px 22px;
  box-shadow: var(--shadow-lg);
  animation: pop .2s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute;
  top: 12px; right: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--dim);
  display: grid; place-items: center;
}
.modal__close:hover { background: #f1f5f9; color: var(--text); }
.modal__card h3 { font-size: 18px; font-weight: 800; }
.modal__sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }

.field { display: block; margin-bottom: 13px; }
.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 111, 255, .12); }
.modal__card .btn { height: 42px; margin-top: 6px; }
.modal__foot { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--muted); }
.modal__foot a { color: var(--primary); font-weight: 600; }

/* ============ toast ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 16px);
  z-index: 300;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 920px) {
  .navmenu { display: none; }
  .navbar__inner { justify-content: space-between; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .reviews { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; gap: 26px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 30px; }
  .flow::before { display: none; }
}
@media (max-width: 640px) {
  body { overflow-x: hidden; }
  /* 顶栏保持单行：logo + 搜索 + 登录，换行会顶掉导航栏 */
  .topbar__inner { height: 54px; gap: 8px; flex-wrap: nowrap; }
  .brand__logo { height: 28px; }
  .searchbar { flex: 1; min-width: 0; height: 34px; order: 0; flex-basis: auto; max-width: none; }
  .searchbar__cat { display: none; }
  .searchbar input { padding: 0 9px; font-size: 12.5px; }
  .searchbar__btn { width: 40px; }
  .topbar__right { gap: 6px; }
  .locale { display: none; }
  .btn-login { padding: 6px 14px; font-size: 12.5px; }
  /* 移动端导航不吸顶，避免和换行后的顶栏重叠 */
  .navbar { position: static; }
  .navbar__inner { height: 44px; gap: 8px; }
  .cat-btn { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
  .btn-seller { height: 30px; padding: 0 10px; font-size: 12px; gap: 4px; }
  .btn-seller svg { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .section { padding: 36px 0; }
  .hero { padding: 34px 0 44px; }
  .platforms { font-size: 12px; }
  .platforms a { padding: 3px 8px; }
  .btn { height: 42px; padding: 0 24px; font-size: 14px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .deco--dc, .deco--sc, .deco--x { display: none; }
  .fab { left: 14px; bottom: 16px; width: 42px; height: 42px; font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .deco { animation: none; }
  * { scroll-behavior: auto; }
}
