/* ============================================================
   PAIIKO · 女性生活厨具
   白色简洁温馨风格 · 响应式移动端优先
   版本：v1.7.0
   ============================================================ */
:root {
  --c-bg: #FFFBF8;
  --c-surface: #FFFFFF;
  --c-surface-alt: #FAF5F1;
  --c-ink: #3D3028;
  --c-ink-soft: #A09088;
  --c-line: #EDE8E3;
  --c-primary: #4A3D35;
  --c-accent: #C88B6E;
  --c-accent-hover: #B07558;
  --c-accent-light: #F5E8E0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 2px 12px rgba(60,40,30,.05);
  --shadow-md: 0 4px 20px rgba(60,40,30,.08);
  --shadow-lg: 0 8px 32px rgba(60,40,30,.10);
  --maxw: 1200px;
  --header-h: 60px;
}

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

html { scroll-behavior: smooth; }
html, body { height: 100%; overflow-x: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 导航栏 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--header-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--c-line);
}
.site-header .container {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; letter-spacing: .5px; color: var(--c-primary);
}
.brand .logo {
  width: 32px; height: 32px;
  background: var(--c-accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; border-radius: 8px;
}
.brand .brand-logo { height: 38px; width: auto; display: block; }
.brand .sub {
  font-size: 10px; font-weight: 400; color: var(--c-ink-soft);
  letter-spacing: 1px; text-transform: uppercase;
}

.nav-links {
  display: flex; align-items: center; gap: 28px; list-style: none;
}
.nav-links a {
  color: var(--c-ink-soft); font-size: 14px; font-weight: 500;
  transition: color .2s; position: relative;
}
.nav-links a:hover { color: var(--c-ink); }
.nav-links a.active { color: var(--c-accent); font-weight: 600; }

.lang-switch { display: flex; align-items: center; margin-left: 4px; }
.lang-switch select {
  padding: 4px 6px; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-ink-soft);
  font-size: 12px; font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.lang-switch select:focus { outline: none; border-color: var(--c-accent); }

.cart-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--c-accent); color: #fff !important;
  padding: 7px 16px; border-radius: 20px;
  font-weight: 600; font-size: 13px; transition: background .2s;
}
.cart-link:hover { background: var(--c-accent-hover) !important; color: #fff !important; }
.cart-link .badge {
  background: #fff; color: var(--c-accent);
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.hamburger span {
  width: 22px; height: 2px; background: var(--c-ink);
  border-radius: 1px; transition: .25s;
}

/* 侧边栏遮罩（仅移动端） */
.nav-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 98;
  background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .25s;
}
.nav-backdrop.show {
  display: block; opacity: 1;
}

/* 侧边栏关闭按钮（仅移动端） */
.nav-close {
  display: none;
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border: none; background: none;
  font-size: 22px; color: var(--c-ink-soft); cursor: pointer;
  align-items: center; justify-content: center; z-index: 2;
}
.nav-close:hover { color: var(--c-ink); }

/* 侧边栏打开时禁止背景滚动 */
body.nav-open { overflow: hidden; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border: 1px solid transparent;
  border-radius: 24px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  letter-spacing: .02em; background: var(--c-primary); color: #fff;
}
.btn:hover { background: #3A2F28; }
.btn-accent { background: var(--c-accent); color: #fff; }
.btn-accent:hover { background: var(--c-accent-hover); }
.btn-outline { background: transparent; color: var(--c-primary); border-color: #D0C8C0; }
.btn-outline:hover { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn-ghost { background: transparent; color: var(--c-ink-soft); border-color: var(--c-line); }
.btn-ghost:hover { background: var(--c-surface-alt); color: var(--c-ink); border-color: #D0C8C0; }
.btn-danger { background: #D4847A; color: #fff; }
.btn-danger:hover { background: #C07066; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- 通用区块 ---------------- */
.page { padding: 48px 0 80px; min-height: calc(100vh - var(--header-h)); }
.section-title {
  font-size: 26px; font-weight: 700; margin-bottom: 8px;
  color: var(--c-primary); letter-spacing: .02em;
}
.section-sub { color: var(--c-ink-soft); margin-bottom: 36px; font-size: 15px; }

.breadcrumb { color: var(--c-ink-soft); font-size: 13px; margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { margin: 0 6px; color: #D0C8C0; }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}

/* ---------------- 表单 ---------------- */
.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
  color: var(--c-ink); letter-spacing: .02em;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #E0D8D0;
  border-radius: var(--radius-sm); font-size: 14px; font-family: inherit;
  background: #fff; transition: border-color .2s; color: var(--c-ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(200,139,110,.12);
}
.field textarea { resize: vertical; min-height: 90px; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%; border-collapse: collapse; background: #fff; font-size: 13px;
}
.data-table th, .data-table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line);
}
.data-table th {
  background: var(--c-surface-alt); font-weight: 600;
  color: var(--c-ink-soft); white-space: nowrap;
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
}
.data-table tr:hover td { background: #FFFBF8; }

/* 标签 */
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; letter-spacing: .02em;
}
.tag-gold { background: var(--c-accent-light); color: var(--c-accent-hover); }
.tag-green { background: #E8F0E8; color: #5A7A5A; }
.tag-gray { background: #F5F0ED; color: #8A7D75; }
.tag-red { background: #FBE8E6; color: #C07066; }

/* 空状态 */
.empty { text-align: center; padding: 80px 20px; color: var(--c-ink-soft); }
.empty .big { font-size: 44px; margin-bottom: 12px; opacity: .5; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: var(--c-primary); color: #fff; padding: 10px 24px;
  border-radius: 20px; box-shadow: var(--shadow-lg); z-index: 1000;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  font-size: 13px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
.toast.err { background: #D4847A; }

/* 页脚 */
.site-footer {
  background: var(--c-surface-alt); color: var(--c-ink-soft);
  padding: 48px 0 36px; font-size: 13px; margin-top: auto;
  border-top: 1px solid var(--c-line);
}
.site-footer a { color: var(--c-ink-soft); transition: color .2s; }
.site-footer a:hover { color: var(--c-accent); }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 32px; align-items: start; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { font-size: 13px; }
.footer-contact { text-align: right; line-height: 2; }
.footer-contact .contact-label { color: var(--c-ink); font-weight: 600; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-contact { text-align: left; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 16px; }
  .footer-contact { text-align: left; }
}

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(40,30,20,.4);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius); width: 100%;
  max-width: 480px; padding: 28px; box-shadow: var(--shadow-lg);
  animation: pop .2s;
}
.modal h3 { margin-bottom: 18px; font-size: 18px; color: var(--c-primary); font-weight: 700; }
@keyframes pop { from { transform: scale(.97); opacity: .7; } to { transform: scale(1); opacity: 1; } }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .brand { font-size: 16px; }
  .brand .sub { display: none; }
  .brand .brand-logo { height: 30px; }

  .hamburger { display: flex; }
  .nav-backdrop.show { display: block; }
  .nav-links.open .nav-close { display: inline-flex; }
  .nav-links {
    position: fixed; top: var(--header-h); right: 0;
    width: 75%; max-width: 300px;
    height: calc(100vh - var(--header-h));
    background: #fff; flex-direction: column;
    align-items: flex-start; gap: 0; padding: 16px;
    transform: translateX(100%); transition: transform .25s;
    box-shadow: -2px 8px 24px rgba(0,0,0,.08);
    border-left: 1px solid var(--c-line);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--c-line); }
  .nav-links a { display: block; padding: 14px 4px; font-size: 15px; color: var(--c-ink); }
  .cart-link { margin-top: 12px; }

  .section-title { font-size: 22px; }
  .page { padding: 32px 0 60px; }
  .modal { max-width: 95vw; padding: 20px; }
  .btn { padding: 10px 18px; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .container { padding: 0 20px; }
}

/* ============================================================
   悬浮功能栏 —— 右侧固定
   ============================================================ */
.float-bar {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-bar__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* 按钮 */
.float-bar__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
  color: var(--c-ink-soft);
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.float-bar__btn:hover {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateX(-2px);
}
.float-bar__btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .25s;
}
.float-bar__btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* 返回顶部按钮 —— 默认隐藏 */
.float-bar__item--top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .3s, visibility .3s, transform .3s;
}
.float-bar__item--top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 购物车按钮 */
.float-bar__item--cart { border-top: 1px solid #EDE8E3; margin-top: 2px; padding-top: 2px; }
.float-bar__item--cart .float-bar__btn { position: relative; }
.float-bar__cart-badge {
  position: absolute; top: 0; right: 0;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--c-accent); color: #fff;
  border-radius: 8px; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transform: translate(30%, -30%);
}

/* 提示条 */
.float-bar__tip {
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s, transform .25s;
  box-shadow: var(--shadow-md);
  z-index: 1;
}
.float-bar__tip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: var(--c-primary);
  border-right: none;
}
.float-bar__tip-label {
  font-size: 11px;
  opacity: .75;
  margin-bottom: 1px;
}
.float-bar__tip-info {
  font-weight: 600;
  letter-spacing: .02em;
}

/* 可复制提示条（电话/邮箱）：允许鼠标进入与选中文本 */
.float-bar__tip--copyable {
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}

/* 提示条标题行（电话/邮箱），复制按钮跟在标题后面 */
.float-bar__tip-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 1px;
}
.float-bar__tip-head .float-bar__tip-label {
  margin-bottom: 0;
}

/* 复制按钮 */
.float-bar__tip-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 8px;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 10px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
  transition: background .2s;
}
.float-bar__tip-copy:hover {
  background: rgba(255,255,255,.28);
}

/* 桌面端 hover 显示提示 */
.float-bar__item:hover .float-bar__tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(-4px);
}

/* 微信二维码 tooltip */
.float-bar__tip--qrcode {
  padding: 8px;
  min-width: 130px;
  text-align: center;
}
.float-bar__tip--qrcode .float-bar__tip-label {
  margin-bottom: 6px;
}
.float-bar__tip-qr {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  display: block;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .float-bar {
    right: 21px;
    gap: 6px;
  }
  .float-bar__btn {
    width: 38px;
    height: 38px;
  }
  .float-bar__btn svg {
    width: 17px;
    height: 17px;
  }
  .float-bar__btn img {
    width: 17px;
    height: 17px;
  }
  .float-bar__tip {
    right: 48px;
    font-size: 12px;
    padding: 6px 12px;
  }
  .float-bar__tip--qrcode {
    min-width: 110px;
  }
  .float-bar__tip-qr {
    width: 100px;
    height: 100px;
  }
}
