/* 手机轮播：完整展示客户横幅，文案自然排在图片下方，不能用电脑固定高度裁掉产品或图片中文字。 */
@media (max-width: 720px) {
    body[class*="theme-"] {
        --cms-mobile-hero-bg: var(--td-dark_bg, #202329);
        --cms-mobile-hero-ink: var(--td-hero_text, #fff);
    }

    /* 浅色信息卡主题保留自己的配色；深色、婚纱和服装主题继续使用图片文案色。 */
    body.theme-lumetra {
        --cms-mobile-hero-bg: var(--td-page_bg, #fff);
        --cms-mobile-hero-ink: var(--td-hero_text, #073f66);
    }
    body.theme-studio {
        --cms-mobile-hero-bg: var(--td-page_bg, #f7f2e9);
        --cms-mobile-hero-ink: color-mix(in srgb, var(--td-text, #28241f) calc(100% - var(--td-use-hero_text, 0%)), var(--td-hero_text, #28241f) var(--td-use-hero_text, 0%));
    }

    /* 部分主题在轮播外层也设了整屏高度，必须连同舞台一起解除，隐藏文案后不留下空白。 */
    body[class*="theme-"] :is(.bio-hero, .eco-hero, .pol-hero, .mt-hero),
    body[class*="theme-"] [data-carousel] {
        position: relative;
        inset: auto;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
    }
    body[class*="theme-"] [data-carousel] [data-slide] {
        position: relative;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        margin: 0;
        /* 医疗等旧主题曾用 padding 为绝对定位图片占位，现在图片已在自然流中。 */
        padding: 0;
    }
    /* 与轮播 JS 的 hidden/inert 契约一致；不能把其他幻灯片排进页面高度。 */
    body[class*="theme-"] [data-carousel] [data-slide][hidden] { display: none !important; }
    body[class*="theme-"] [data-carousel] [data-slide] > img {
        position: relative;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        aspect-ratio: auto;
        object-fit: contain;
        object-position: center;
        transform: none;
        animation: none;
        z-index: 0;
    }
    body[class*="theme-"] [data-carousel] [data-slide]::before,
    body[class*="theme-"] [data-carousel] [data-slide]::after,
    body[class*="theme-"] [data-carousel] :is(.bio-hero__wash, .eco-hero__wash, .aurelle-hero__shade) { display: none; }

    /* 不改变文案自身的 display，保留用户隐藏、医疗纯图片横幅和可视化编辑的显示规则。 */
    body[class*="theme-"] :is(.carousel-copy, .bio-hero__copy, .eco-hero__copy, .pol-hero__copy, .aurelle-hero__content, .stone-hero__copy, .velora-slide__copy, .aerion-slide__copy, .lumetra-slide__copy, .mt-hero__copy) {
        position: relative;
        inset: auto;
        width: 100%;
        max-width: none;
        height: auto;
        min-height: 0;
        margin: 0;
        padding: 24px 20px;
        transform: none;
        background: var(--cms-mobile-hero-bg);
        color: var(--cms-mobile-hero-ink);
        overflow-wrap: anywhere;
    }
    body[class*="theme-"] :is(.carousel-copy, .bio-hero__copy, .eco-hero__copy, .pol-hero__copy, .aurelle-hero__content, .stone-hero__copy, .velora-slide__copy, .aerion-slide__copy, .lumetra-slide__copy, .mt-hero__copy) :is(h1, h2, p, small, .kicker) {
        max-width: 100%;
        color: inherit;
    }
    body[class*="theme-"] .lumetra-slide__container {
        position: relative;
        inset: auto;
        display: block;
        width: 100%;
        height: auto;
        padding: 0;
    }
    /* 咨询主题的图片舞台和文案是同级，保持先图后文；不再让绝对定位背景覆盖整段内容。 */
    body.theme-consulting .mt-hero__backdrop { position: relative; inset: auto; }
    /* 固定页头的 68px 避让保留在轮播外，不能被误算成纯图片轮播的额外高度。 */
    body.theme-consulting .mt-hero { margin-block-start: 68px; padding-block-start: 0; }
    /* 指示条叠在轮播内部，不另起一整条空白。文案可见时仅在卡片内部预留触控区。 */
    body[class*="theme-"] [data-carousel]:has([data-carousel-controls]:not([hidden])) :is(.carousel-copy, .bio-hero__copy, .eco-hero__copy, .pol-hero__copy, .aurelle-hero__content, .stone-hero__copy, .velora-slide__copy, .aerion-slide__copy, .lumetra-slide__copy, .mt-hero__copy) { padding-block-end: 64px; }
    body[class*="theme-"] [data-carousel] [data-carousel-controls] {
        position: absolute;
        inset: auto;
        inset-inline: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        min-height: 44px;
        margin: 0;
        padding: 0 16px;
        transform: none;
        justify-content: center;
        background: transparent;
        color: var(--cms-mobile-hero-ink);
        z-index: 4;
        pointer-events: none;
    }
    body[class*="theme-"] [data-carousel] [data-goto] { min-width: 44px; min-height: 44px; pointer-events: auto; }
    /* 指示条保持原有编号，空按钮也有可见细条；44px 是触控命中区而非大色块。 */
    body[class*="theme-"] [data-carousel] [data-carousel-controls] [data-goto] {
        position: relative;
        display: grid;
        place-items: center;
        padding: 0 0 10px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--cms-mobile-hero-ink);
        font-size: 10px;
    }
    body[class*="theme-"] [data-carousel] [data-carousel-controls] [data-goto] > span:empty { display: none; }
    body[class*="theme-"] [data-carousel] [data-carousel-controls] [data-goto]::after {
        content: "";
        position: absolute;
        inset: auto;
        inset-inline-start: calc(50% - 12px);
        bottom: 8px;
        width: 24px;
        height: 3px;
        background: currentColor;
        box-shadow: 0 1px 3px #0004;
        opacity: .35;
    }
    body[class*="theme-"] [data-carousel] [data-carousel-controls] [data-goto][aria-current="true"]::after { opacity: 1; }

    /* 无人机主题电脑端的突出卡片依赖高权重 :has；手机自然布局不再上移指示条与下一板块。 */
    body.theme-aerion .aerion-hero[data-aerion-overlap]:has(+ .aerion-promotions:not([hidden]):not(.fe-off)) .aerion-carousel-controls { bottom: 0; }
    body.theme-aerion .aerion-hero[data-aerion-overlap]:not([hidden]):not(.fe-off) + .aerion-promotions:not([hidden]):not(.fe-off) { margin-top: 0; }
}
