/* ============================================================
   LUNQHAL — Unified Header & Footer (White Theme)
   Applies to: outdoor, sl016, sl015, support, about, privacy, terms
   Style: Apple-inspired compact spacing
   ============================================================ */

/* === CSS Variables (self-contained) === */
:root {
  --lf-black: #000000;
  --lf-dark: #1a1a1a;
  --lf-charcoal: #333333;
  --lf-gray: #666666;
  --lf-light-gray: #999999;
  --lf-border: #e5e5e7;
  --lf-off-white: #f5f5f7;
  --lf-accent: #0071e3;
  --lf-white: #ffffff;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--lf-border);
  z-index: 1000;
  padding: 0;
}
.nav-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 20px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  height: 24px;
}
.nav-logo img {
  height: 24px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--lf-charcoal);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
  text-decoration: none;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--lf-black);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--lf-black); }
.nav-links a.active::after { width: 100%; }
.nav-link-disabled {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--lf-gray);
  cursor: not-allowed;
  padding-bottom: 4px;
  user-select: none;
}
.nav-toggle { display: none; }

/* === Footer === */
.footer {
  background: var(--lf-off-white);
  color: var(--lf-gray);
  padding: 40px 40px 40px;
  border-top: 1px solid var(--lf-border);
}
.footer-inner {
  max-width: 1260px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.footer-brand {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}
.footer-brand .footer-logo {
  display: block;
  margin-bottom: 6px;
}
.footer-brand .footer-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.footer-brand p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--lf-light-gray);
  line-height: 1.47;
  font-weight: 300;
}
.footer-col h4 {
  color: var(--lf-dark);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
  line-height: 1.4;
}
.footer-col li {
  margin-bottom: 5px;
}
.footer-col a {
  font-size: 12px;
  color: var(--lf-gray);
  transition: color 0.3s;
  text-decoration: none;
}
.footer-col a:hover { color: var(--lf-accent); }
.footer-bottom {
  border-top: 1px solid var(--lf-border);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom span {
  font-size: 12px;
  color: var(--lf-light-gray);
}

/* === Responsive: Tablet (<=768px) === */
@media (max-width: 768px) {
  /* Navigation */
  .nav-inner {
    padding: 0 20px;
    height: 48px;
  }
  .nav-logo { height: 24px; }
  .nav-logo img { height: 24px; }
  /* 移动端下拉菜单（修改：苹果风——从上往下滑出、满铺到屏幕底部、左对齐大行距、左边距48px） */
  .nav-links {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity .35s ease, transform .35s ease, visibility .35s;
    flex-direction: column;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px); /* 修改：满铺到屏幕底部（苹果官网风格） */
    background: var(--lf-white);
    padding: 20px 24px 40px;
    padding-left: 48px; /* 修改：左边空出约2.5个字符宽度（48px），避免贴边 */
    gap: 8px;
    border-bottom: 1px solid var(--lf-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    list-style: none;
    margin: 0;
    z-index: 99;
  }
  .nav-links.active { visibility: visible; opacity: 1; transform: translateY(0); }
  .nav-links li { width: 100%; }
  .nav-links li a,
  .nav-links li .nav-link-disabled {
    display: block;
    font-size: 18px; /* 修改：与首页确认版一致，放大行距 */
    padding: 14px 0; /* 修改：行距加大（苹果风） */
    border-bottom: 1px solid var(--lf-border);
    text-align: left;
    color: var(--lf-dark);
  }
  /* Lighting 禁用项：与其他菜单项同字号/同横线，仅灰色不可点击（修改：统一） */
  .nav-links li .nav-link-disabled {
    color: var(--lf-gray);
    cursor: not-allowed;
    user-select: none;
  }
  /* 汉堡按钮（修改：三横改二横，展开时二横旋转交叉成中心对称X） */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--lf-dark);
    border-radius: 1px;
    transition: transform .3s ease, opacity .3s ease;
    transform-origin: center;
  }
  /* X 中心对称：两线中心汇聚于按钮中心 */
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  /* Footer */
  .footer { padding: 32px 20px 24px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
  .footer-brand .footer-logo img { height: 28px; }
  .footer-brand p { font-size: 14px; }
  .footer-col h4 {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .footer-col a { font-size: 12px; }
  .footer-col li { margin-bottom: 4px; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 6px;
    padding-top: 10px;
  }
  .footer-bottom span { font-size: 12px; }
}

/* === Responsive: Small phones (<=480px) === */
@media (max-width: 480px) {
  .footer { padding: 24px 16px 20px; }
  .footer-top {
    grid-template-columns: 1fr 1fr;  /* 修改：从1fr单列改为1fr 1fr两列，与首页lhq-footer移动端排版一致（Shop左列/Support右列/Company在Shop下方） */
    gap: 16px;
  }
  .footer-col h4 { margin-bottom: 6px; }
  .footer-col li { margin-bottom: 4px; }
}

/* ===== iPhone 安全区适配（修改：新增，仅刘海屏/底部横条设备生效，桌面与普通设备env()为0不受影响） ===== */
@supports (padding: max(0px)) {
  /* 顶部固定导航避开刘海（内容下移，导航高度 = 原高度 + 安全区） */
  .nav {
    padding-top: env(safe-area-inset-top);
  }
  /* 手机端下拉菜单同步下移，跟随导航增高后的位置（修改：满铺高度同步减去安全区，避免溢出） */
  @media (max-width: 768px) {
    .nav-links {
      top: calc(48px + env(safe-area-inset-top));
      height: calc(100vh - 48px - env(safe-area-inset-top));
      height: calc(100dvh - 48px - env(safe-area-inset-top));
    }
  }
  /* 页脚底部避开iPhone底部横条 */
  .footer {
    padding-bottom: calc(env(safe-area-inset-bottom));
  }
}
