/* ------------------------------------------------------------------
 * 短内容页面底部留白处理 —— 方案 A（footer 贴底）
 *
 * 问题：page 模板内容少时（/sell-with-us/、/careers/ 等），页面总高小于视口，
 *      footer 结束位置在视口中间，下方露出一段 body 白底。
 *
 * 做法（经典 sticky footer）：
 *   1) body 改纵向 flex + min-height:100vh，页面总高至少撑满一屏；
 *   2) #main 按自身内容高度，不拉伸；
 *   3) footer 加 margin-top:auto，被推到视口底部，保持它的原生高度
 *      （浅蓝 CTA 条 + 深蓝链接栏 + 版权），比例不变形。
 *   → 剩余空白留在正文与 footer 之间（白色），footer 整体贴底。
 *
 * 对照 —— 方案 B（浅蓝 CTA 区块吸收空白）已停用，需要时把下面注释解开、
 *        并注释掉方案 A 的 footer 规则即可：
 *
 *   body.page-template-default > footer { flex: 1 0 auto; display: flex;
 *       flex-direction: column; margin-top: 0; }
 *   body.page-template-default > footer > .wal-foot-feedback {
 *       flex: 1 0 auto; display: flex; flex-direction: column;
 *       align-items: center; justify-content: center; }
 *
 * 范围：只用 body.page-template-default 限定，首页 / 产品页 / 归档 / 购物车 /
 *       结算都不受这段样式影响。内容本来就长的页面无剩余空间，表现不变。
 * ------------------------------------------------------------------ */
body.page-template-default {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100dvh; /* 移动端浏览器地址栏收起时更准 */
}

/* 正文按自身内容高度，不参与拉伸。
   width: 100% 必须有：flex 交叉轴上的 auto margin（#main 带 mx-auto）会取消
   stretch，容器被压成内容宽度 —— 表单类页面（contact / give-feedback）表单
   网格 max-content 只有 420px，于是 #main 只剩 468px，比 about 的 800px 窄一半。
   必须排除账户/登录两种 #main：它们靠 width:min(640px,100%) / max-width:420px
   定宽，被这条（#main 是 ID，优先级更高）覆盖会撑满整屏。 */
body.page-template-default > #main:not(.wal-account-main):not(.wal-auth-main) {
	flex: 0 0 auto;
	width: 100%;
}

/* footer 保持原生高度，用 auto margin 顶到视口底部 */
body.page-template-default > footer {
	flex: 0 0 auto;
	margin-top: auto;
}

/* 不参与布局的元素（脚本 / 弹窗 / 购物车 live region）保持原样 */
body.page-template-default > script,
body.page-template-default > dialog,
body.page-template-default > .widget_shopping_cart_live_region {
	flex: 0 0 auto;
}

/* 登录/注册页（body.wal-auth-page）是全屏独立布局：#main 需要按 420px 定宽居中，
   不能被上面的 flex 布局压成内容宽度（会窄掉约 80px）。这里退回 block。 */
body.page-template-default.wal-auth-page {
	display: block;
	min-height: 0;
}

