/* ============================================================
   KCONE 全站统一框架样式 (site.css)
   包含：设计变量 / 基础排版 / 导航 / 移动菜单 / 页脚 / 通用工具类
   页面专属样式请写在各页 <style> 里（在 site.css 之后加载）
   ============================================================ */

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

:root {
  --black: #0f0f0f;
  --white: #fafaf8;
  --off: #f2f1ed;
  --warm: #e8e6e1;
  --gray: #8a8880;
  --gray-light: #b8b6b2;
  --border: rgba(15,15,15,0.1);
  --border-strong: rgba(15,15,15,0.18);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--white);
  color: var(--black);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}



/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: 64px;
  background: rgba(250,250,248,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.06); }

.nav-logo {
  text-decoration: none; flex-shrink: 0; display:flex; align-items:center;
}

.nav-center { display: flex; align-items: center; gap: 0; margin: 0 auto; }

.nav-item {
  position: static;
}

.nav-link {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; letter-spacing: 0.08em; color: var(--gray);
  text-decoration: none; padding: 0 18px; height: 64px;
  transition: color 0.2s;
  cursor: pointer; user-select: none;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--black); }

.nav-link svg {
  width: 8px; height: 8px; flex-shrink: 0;
  transition: transform 0.2s;
}
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* ── SHOP DROPDOWN ── */
.shop-dropdown {
  position: absolute; top: 64px; left: 2px; right: auto;
  transform: none; width: 780px; max-width: calc(100vw - 4px);
  max-height: calc(100vh - 84px); overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white); border: 1px solid var(--border); border-top: none;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.nav-item:hover .shop-dropdown {
  opacity: 1; visibility: visible; pointer-events: all;
  transform: translateY(0);
}

.dropdown-inner {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
}

.dropdown-col {
  padding: 28px 28px 24px;
  border-right: 1px solid var(--border);
}
.dropdown-col:last-child { border-right: none; }

.dropdown-col-label {
  font-size: 9px; letter-spacing: 0.25em; color: var(--gray-light);
  margin-bottom: 14px; text-transform: uppercase;
}

.dropdown-img-card {
  display: block; text-decoration: none; color: inherit;
  cursor: pointer;
}
.dropdown-img-card:hover .dropdown-img-wrap img {
  transform: scale(1.03);
}
.dropdown-img-card:hover .dropdown-item-name {
  color: var(--black);
}

.dropdown-img-wrap {
  width: 100%; aspect-ratio: 4/3; overflow: hidden;
  background: var(--warm); margin-bottom: 10px;
}
.dropdown-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.dropdown-item-name {
  font-size: 12px; font-weight: 500; color: var(--gray);
  transition: color 0.2s; margin-bottom: 2px;
}
.dropdown-item-sub {
  font-size: 10px; color: var(--gray-light); letter-spacing: 0.05em;
}

.dropdown-list {
  display: flex; flex-direction: column; gap: 0;
}
.dropdown-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--gray);
  font-size: 12px;
  transition: color 0.15s, padding-left 0.15s;
  cursor: pointer;
}
.dropdown-list-item:last-child { border-bottom: none; }
.dropdown-list-item:hover {
  color: var(--black); padding-left: 4px;
}
.dropdown-list-item-code {
  font-size: 10px; color: var(--gray-light); letter-spacing: 0.06em;
}

.dropdown-footer {
  border-top: 1px solid var(--border);
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.dropdown-footer-text {
  font-size: 11px; color: var(--gray-light);
}
.dropdown-footer-link {
  font-size: 11px; letter-spacing: 0.08em; color: var(--black);
  text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.dropdown-footer-link:hover { opacity: 0.6; }

/* ── NAV RIGHT ── */
.nav-right {
  display: flex; align-items: center; gap: 20px;
  flex-shrink: 0;
}
.nav-cta {
  font-size: 11px; letter-spacing: 0.1em;
  padding: 8px 20px;
  background: var(--black); color: var(--white);
  border: none; border-radius: 1px; cursor: pointer;
  text-decoration: none; transition: opacity 0.2s;
  white-space: nowrap;
}
.nav-cta:hover { opacity: 0.78; }



/* ── SHARED SECTION ── */
section { padding: 56px 48px; }

.section-eyebrow {
  font-size: 9px; letter-spacing: 0.28em; color: var(--gray-light);
  margin-bottom: 40px; display: flex; align-items: center; gap: 14px;
}
.section-eyebrow::before {
  content: ''; display: block; width: 24px; height: 1px; background: var(--gray-light);
}



/* ── FOOTER（4 列布局，浅色米白）── */
footer {
  display: block;
  background: var(--off);
  color: rgba(15,15,15,0.55);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  border-top: 1px solid rgba(15,15,15,0.08);
  padding: 31px 48px 16px;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
  gap: 44px;
  text-align: left;
}
.footer-brand img { height: 30px; width: auto; display: block; }
.footer-brand .brand-name {
  font-family: 'Inter', sans-serif; font-size: 15px; letter-spacing: 0.1em;
  color: rgba(15,15,15,0.85); margin-top: 12px;
}
.footer-brand p {
  font-size: 12px; line-height: 1.75; color: rgba(15,15,15,0.5);
  margin-top: 10px; margin-bottom: 0; max-width: 260px;
}
.footer-brand .brand-links { margin-top: 12px; font-size: 12px; }
.footer-brand .brand-links a { color: rgba(15,15,15,0.6); text-decoration: none; }
.footer-brand .brand-links a:hover { color: #0f0f0f; }
.footer-col h4 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(15,15,15,0.88); margin-bottom: 11px; font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; }
.footer-col a, .footer-col li {
  color: rgba(15,15,15,0.55); font-size: 13px; text-decoration: none; line-height: 1.5;
}
.footer-col a:hover { color: #0f0f0f; }
.footer-col .contact-line { word-break: break-word; }
.footer-col li { margin-bottom: 0; }

/* 社媒：纯图标（浅底深色） */
.footer-social { display: flex; align-items: center; margin-top: 18px; margin-left: -6px; }
.footer-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; color: rgba(15,15,15,0.45);
  margin-right: 3px;
  transition: color .22s ease, transform .22s ease;
}
.footer-social a:hover { color: #0f0f0f; transform: translateY(-1px); }
.footer-social svg { width: 18px; height: 18px; display: block; }

/* 底部声明：全宽居中 */
.footer-bottom {
  display: block;
  width: 100%;
  max-width: none;
  margin: 20px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(15,15,15,0.08);
  font-size: 11px;
  color: rgba(15,15,15,0.38);
  text-align: center;
  line-height: 1.7;
  letter-spacing: 0.01em;
  box-sizing: border-box;
}

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* Hamburger + mobile menu — hidden on desktop by default */
.hamburger { display: none; }
.mobile-menu { display: none; }



/* ── 移动端（导航 / 菜单 / 页脚）── */
@media (max-width: 900px) {
  /* Navigation */
  nav { padding: 0 16px; }
  .nav-center { display: none; }
  .nav-cta { display: none; }
  /* Hamburger button */
  .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px;
    background: none; border: none; cursor: pointer;
    padding: 4px; z-index: 300; }
  .hamburger span { display: block; width: 100%; height: 2px;
    background: var(--black); border-radius: 1px;
    transition: -webkit-transform 0.3s ease, transform 0.3s ease, opacity 0.3s ease; }
  .hamburger.active span:nth-child(1) { -webkit-transform: rotate(45deg) translate(5px, 5px); transform: rotate(45deg) translate(5px, 5px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { -webkit-transform: rotate(-45deg) translate(5px, -5px); transform: rotate(-45deg) translate(5px, -5px); }
  /* Mobile menu overlay */
  .mobile-menu { display: none;
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 250;
    background: var(--white);
    overflow-y: auto;
    padding-top: 80px; }
  .mobile-menu.open { display: block; }
  .mobile-menu-inner { padding: 16px 24px 40px;
    display: flex; flex-direction: column; gap: 28px; }
  .mobile-menu-section { display: flex; flex-direction: column; gap: 0; }
  .mobile-menu-label { font-size: 9px; letter-spacing: 0.25em; color: var(--gray-light);
    text-transform: uppercase; margin-bottom: 12px; }
  .mobile-menu-link { font-size: 15px; color: var(--gray); text-decoration: none;
    padding: 12px 0; border-bottom: 1px solid var(--border);
    transition: color 0.2s, padding-left 0.2s; }
  .mobile-menu-link:hover, .mobile-menu-link:active { color: var(--black); padding-left: 8px; }
  .mobile-menu-cta { display: block; text-align: center;
    background: var(--black); color: var(--white);
    padding: 14px 0; font-size: 12px; letter-spacing: 0.12em;
    text-decoration: none; border-radius: 2px;
    margin-top: 8px; }
  /* Footer */
  .footer-links { order: 1; }
}

/* ── WHATSAPP FLOAT ── */
.wa-float {
  position: fixed; left: 20px; top: 50vh; top: 50dvh; bottom: auto; z-index: 999;
  height: 52px; padding: 0 20px 0 16px; border-radius: 26px;
  background: #25D366; color: #fff;
  display: flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  text-decoration: none; box-shadow: 0 8px 24px rgba(37,211,102,0.38);
  transition: transform 0.2s ease;
}
.wa-float .wa-ring { display: none; }
@keyframes waPulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}
.wa-float svg { width: 19px; height: 19px; flex-shrink: 0; display: block; }
.wa-float-tip {
  position: absolute; left: 70px; top: 50%; transform: translateY(-50%);
  background: var(--black); color: var(--white);
  font-size: 11px; letter-spacing: 0.06em; white-space: nowrap;
  padding: 8px 14px; border-radius: 2px; opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.wa-float:hover .wa-float-tip { opacity: 1; }
@media (max-width: 700px) {
  .wa-float { left: 14px; height: 46px; padding: 0 16px 0 13px; font-size: 12.5px; }
  .wa-float-tip { display: none; }
}
/* 手机竖屏（≤430px）：两颗胶囊再收一档，减少遮挡正文 */
@media (max-width: 430px) {
  .wa-float { left: 12px; height: 38px; padding: 0 12px 0 10px; font-size: 11px; gap: 7px; border-radius: 19px; }
  .wa-float svg { width: 16px; height: 16px; }
}
}


/* ── 无衬线字重与对比度补偿（原 CSS 为细衬线设计）── */
:root {
  --gray: #6b6963;        /* 原 #8a8880：浅灰小字加深一档 */
  --gray-light: #9c9a92;  /* 原 #b8b6b2 */
}
body { font-weight: 500; }
.shop-heading, .about-heading, .features-heading, .contact-heading, .rx-heading { font-weight: 500; }
.product-card-name, .feature-title { font-weight: 600; }
.section-eyebrow, .form-group label, .hero-tag, .dropdown-col-label { font-weight: 600; }
.hero-desc, .contact-sub, .feature-desc, .shop-intro { font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { font-weight: 500; }

/* ── 返回箭头（子页面通用）── */
.back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: 0.14em; font-weight: 500;
  color: var(--gray); text-decoration: none;
  margin-bottom: 18px; transition: color .2s, transform .2s;
}
.back-link:hover { color: var(--black); transform: translateX(-2px); }
.back-link svg { flex-shrink: 0; }
.hero .back-link, .dark .back-link { color: #ffffff; }
.hero .back-link:hover { color: #ffffff; opacity: 0.7; transform: translateX(-2px); }

/* ── FOOTER 响应式 ── */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  footer { padding: 30px 20px 18px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand p { max-width: none; }
}

@media (max-width: 540px) {
  footer { padding: 24px 16px 15px; }
}

/* ============================================================
   移动端常驻询盘栏 (2026-10-27)
   与 .wa-float 互斥：出现咨询栏时，手机上隐藏左侧 WhatsApp 浮标，
   避免同屏两个 WhatsApp 入口 + AI 助手共三个浮层。
   ============================================================ */
.mobile-quote-bar { display: none; }

@media (max-width: 700px) {
  .mobile-quote-bar {
    display: flex; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(250, 250, 248, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    transition: transform 0.25s ease;
    will-change: transform;
  }
  .mobile-quote-bar.is-hidden { transform: translateY(110%); }

  .mobile-quote-bar a {
    display: flex; align-items: center; justify-content: center;
    height: 44px; border-radius: 2px;
    font-family: 'Inter', sans-serif; font-size: 12px;
    font-weight: 600; letter-spacing: 0.06em;
    text-decoration: none; white-space: nowrap;
  }
  .mqb-primary {
    flex: 1.35; background: var(--black); color: var(--white);
  }
  .mqb-wa {
    flex: 1; gap: 7px;
    background: #25D366; color: #fff;
  }
  .mqb-wa svg { width: 16px; height: 16px; flex-shrink: 0; }

  /* 咨询栏存在时让出底部空间，并收掉左侧 WhatsApp 浮标 */
  body.has-mqb { padding-bottom: calc(62px + env(safe-area-inset-bottom, 0px)); }
  body.has-mqb .wa-float { display: none; }
}

@media (max-width: 380px) {
  .mobile-quote-bar a { font-size: 11px; height: 42px; }
}
