/* 底部广告开启时：内容区收缩、广告占文档流底部（配合 ad-banner-layout.js） */

main.flex.h-full.overflow-hidden > main.flex-1.h-full.flex.flex-col.p-3.relative:has(
    > section.absolute.left-0.bottom-0.z-100
  ) {
  overflow: hidden !important;
  min-height: 0 !important;
  padding-bottom: 12px !important;
}

main.flex.h-full.overflow-hidden
  > main.flex-1.h-full.flex.flex-col.p-3.relative:has(
    > section.absolute.left-0.bottom-0.z-100
  )
  > section.overflow-y-auto {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
}

main.flex.h-full.overflow-hidden
  > main.flex-1.h-full.flex.flex-col.p-3.relative:has(
    > section.absolute.left-0.bottom-0.z-100
  )
  > section.absolute.left-0.bottom-0.z-100 {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  flex-shrink: 0 !important;
  width: calc(100% + 24px) !important;
  margin-left: -12px !important;
  margin-right: -12px !important;
  margin-bottom: -12px !important;
}

main.flex.h-full.overflow-hidden
  > main.flex-1.h-full.flex.flex-col.p-3.relative:has(
    > section.absolute.left-0.bottom-0.z-100
  )
  > section.overflow-y-auto
  .min-h-full:not(.flex-col) {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

/* 多 SKU 计算器：占满内容区高度并垂直居中，超出时滚动 */
main.flex.h-full.overflow-hidden
  > main.flex-1.h-full.flex.flex-col.p-3.relative:has(
    > section.absolute.left-0.bottom-0.z-100
  )
  > section.overflow-y-auto
  .min-h-full.flex-col {
  min-height: 100% !important;
  height: auto !important;
  max-height: none !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
