fix(header): stop homepage-only pull of header-slider-container

Align nav-fixed geometry with zibll: only .slide-header pulls under the bar; restore card container gutters so home overlay cards match other page types.
This commit is contained in:
2026-07-24 11:32:31 +08:00
parent a25feb4161
commit b8d6f70af3
4 changed files with 105 additions and 26 deletions
@@ -22,6 +22,20 @@ body.dark-theme .header-components-search__input {
position: relative;
margin-top: -40px;
z-index: 1;
/* Sit in normal flow after the slide shell; container is full-bleed */
width: 100%;
}
/* Ensure .container max-width + horizontal padding match site main (zibll .container) */
.header-slider-card.container,
.header-components-card.container {
width: 100%;
max-width: var(--container, var(--mian-max-width, 1200px));
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
box-sizing: border-box;
}
.header-slider-card .zib-widget,
@@ -29,10 +43,16 @@ body.dark-theme .header-components-search__input {
margin-bottom: 0;
}
/* Individual card surface = .zib-widget (from card-primitives); shared mode uses outer .zib-widget.padding-10 */
/* Match zibll widget surface so homepage and other page types look identical */
.header-slider-card .icon-cover-card.zib-widget,
.header-components-card .icon-cover-card.zib-widget {
margin-bottom: 0;
padding: var(--card-padding, 15px);
box-shadow: 0 0 10px var(--main-shadow, var(--shadow-sm, rgba(116, 116, 116, 0.08)));
border-radius: var(--main-radius, var(--radius, 8px));
background-color: var(--main-bg-color, var(--surface-1, #fff));
height: 100%;
box-sizing: border-box;
}
/* zibll filter-blur glass on card surfaces + search form */
@@ -11,15 +11,15 @@
}
}
/* CMS freeform modules only: hero as first module under nav.
* Prefer --nav-fixed-reserve when body.nav-fixed is present so the pull-up
* matches body padding-top (88/72/60), not just the 60px bar height. */
/* CMS freeform: do NOT pull the whole container — nav pull is only on .slide-header
* (zibll body.nav-fixed .slide-header). Whole-container pull made homepage cards
* differ from other page types that share the same component. */
.home-modules > .header-components-container:first-child,
.home-modules--fullbleed > .header-components-container:first-child {
margin-top: calc(var(--nav-fixed-reserve, var(--nav-height, 60px)) * -1);
margin-top: 0;
}
/* Fixed homepage hero under-nav is owned by nav/base.css (body.nav-fixed). */
/* Fixed homepage hero under-nav is owned by nav/zib-navbar-fixed.css (body.nav-fixed .slide-header). */
/* ============================================================
* Layer 1: Swiper shell — zibll .new-swiper.slide-header