/* Sticky footer — body flex column, main grows, footer stays at bottom */
html {
  height: 100%;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

.features-strip,
.chhes-site-footer {
  flex-shrink: 0;
}

/* 桥接：chhes-* 变量 → 原型 design tokens；顶栏覆盖 core 的 fixed header */
:root,
[data-theme="dark"] {
  --chhes-bg-primary: var(--bg-primary);
  --chhes-bg-secondary: var(--bg-secondary);
  --chhes-bg-card: var(--bg-card);
  --chhes-text-primary: var(--text-primary);
  --chhes-text-secondary: var(--text-secondary);
  --chhes-text-muted: var(--text-muted);
  --chhes-border: var(--border-color);
  --chhes-shadow-soft: var(--shadow-soft);
  --chhes-shadow-lift: var(--shadow-lift);
}

.chhes-site-nav.header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: color-mix(in srgb, var(--bg-card) 96%, transparent);
  border-bottom: 1px solid var(--border-color);
}

.chhes-site-nav.header.scrolled,
.chhes-site-nav.header.is-scrolled {
  background: color-mix(in srgb, var(--bg-card) 94%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}

/* 内页收紧 core 默认大留白（原型 header sticky，无需 100px+ 顶距） */
body[data-page="goods"] .product-detail,
.chhes-goods-page.product-detail {
  padding-top: 0;
}

body[data-page="user"] .user-center,
.chhes-user-page.user-center {
  padding: 28px 0 56px;
}

body[data-template="category"] .page-header,
.chhes-list-page-header.page-header {
  padding: 28px 0 16px;
}

body[data-template="category"] main.chhes-list-page.section {
  padding-top: 0;
}

body[data-template="category"] .chhes-cat-hero + main.chhes-list-page .chhes-list-page-head {
  padding-top: 12px;
}

.page-header--compact {
  padding: 24px 0 16px !important;
}

.page-header--compact .page-title::after {
  margin-top: 12px;
}

body[data-page="home"] .index-collection {
  padding-top: 40px;
  padding-bottom: 40px;
}

.chhes-ur-here-wrap {
  padding: 8px 0;
}
