@charset "UTF-8";
/* ==========================================================================
   home_banner_luxe — 首页 Hero 轮播 / 分类宫格 Luxe 皮肤
   --------------------------------------------------------------------------
   加载：只由 `common/html_header_css_loader.php` 在首页（$this_is_home_page）追加。
   回滚：删本文件 + 移除 loader 里那一段（同时把
         `stylesheet_luxury_sideboxes.css` 的 `.hero-banner h1,h2,h3` 改回 h1,h3）。

   ⚠⚠ 核心发现（2026-10-14）
   --------------------------------------------------------------------------
   Hero 的「又高又裁图」是**同一条规则**造成的：

     common/html_header.php:458  ← 首屏关键 CSS 骨架（critical CSS）
       .carousel-item img{width:100%;height:auto;display:block;
                          aspect-ratio:16/9;object-fit:cover}

   而三张 hero banner 的真实尺寸是 **1920×500 / 1200×313 ≈ 3.84:1**（不是 16:9）。
   ⇒ 16:9 的占位框 + object-fit:cover 把 3.84:1 的图放大到覆盖 16:9，
     左右各裁掉约 24.5%（合计 49%），同时把高度撑到 1440×9/16 = 810px。
   这条骨架规则本是「首屏防抖（CLS）」用的占位，后续没有真实样式覆盖它。

   本文件用 `#tsHomeSlider`（ID 级，稳赢 0,1,1）把桌面端的 aspect-ratio 解除，
   让 banner 按原比例完整显示 —— 既不再裁图，高度也自然回落到 ~365px。

   A 批（修 bug）
   A1. caption 是 <h2>，而旧规则只写了 `.hero-banner h1, .hero-banner h3`
       ⇒ 那条「白字+阴影」从来没生效过（已在源文件补上 h2；本文件再给完整外观）。
   A2. 左右箭头不在全站 `carousel-control-*` 规则的选择器列表里
       （那批规则只覆盖 #featuredProducts / #specialsDefault / #whatsNew /
       .centerBoxWrapper / .multi-carousel），hero 一直在用裸 Bootstrap 控件。
       本文件按全站规格补齐（深色半透明圆钮、hover 加深），尺寸 46px
       （站内小轮播 36px，hero 体量大，放大一档）。**全站若调整该规格，此处需同步。**
   A3. 分类宫格的 pill 内联 `opacity:.9` 已从模板移除（改在 tpl_index_default.php）。
   A4. 分类宫格补标题（模板新增 `.home-cat-title`，取配置 TS_MODERN_HOME_CATEGORY_TITLE）。

   B 批（视觉改版）
   B1. 桌面：解除 16:9 占位 ⇒ 完整显示 banner，高度自然（1440 宽下约 365px）。
   B2. 移动端：3.84:1 的图在 360px 宽下只有 94px 高，太矮 ⇒ 保留 16:9 框 +
       `object-fit:cover`（得到 ~202px 的 mobile hero），并去掉
       `stylesheet_zzz_mobile_pad_fixes.css` 强加的 min-height:300px
       （那会把框压成 1.2:1，多裁掉近一半宽度）。
   B3. 标题遮罩条：caption 原来是自由浮在图片底部、颜色跟主题走
       （浅色主题深色字压在深色图上会看不清）⇒ 改成底部渐变遮罩 + 白字 + 宽字距，
       指示条移到最底部，文字让开。
   ========================================================================== */

/* ==========================================================================
   A2. 轮播左右箭头（与站内其它轮播同一视觉语言）
   ========================================================================== */
#tsHomeSlider .carousel-control-prev,
#tsHomeSlider .carousel-control-next {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: 46px !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(0, 0, 0, .42) !important;
    border-radius: 50% !important;
    opacity: .85 !important;
    z-index: 10 !important;
    transition: opacity .2s ease, background-color .2s ease;
}

#tsHomeSlider .carousel-control-prev { left: 18px !important; right: auto !important; }
#tsHomeSlider .carousel-control-next { right: 18px !important; left: auto !important; }

#tsHomeSlider .carousel-control-prev:hover,
#tsHomeSlider .carousel-control-next:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, .72) !important;
}

#tsHomeSlider .carousel-control-prev-icon,
#tsHomeSlider .carousel-control-next-icon {
    width: 18px !important;
    height: 18px !important;
}

/* ==========================================================================
   B3. 标题遮罩条（A1 的最终外观）
   ========================================================================== */
#tsHomeSlider .carousel-caption {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 58px 24px 44px !important;
    background: linear-gradient(to top,
        rgba(0, 0, 0, .78) 0%,
        rgba(0, 0, 0, .46) 45%,
        rgba(0, 0, 0, 0) 100%) !important;
    text-align: center !important;
}

#tsHomeSlider .carousel-caption h2 {
    margin: 0 !important;
    color: #FFFFFF !important;
    font-size: var(--lx-fs-h2) !important;   /* 21px，与全站 h2 同档 */
    font-weight: 400 !important;
    line-height: 1.3 !important;
    letter-spacing: .14em !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5) !important;
}

/* 指示条：挪到最底部（文字已让出 44px 内边距），做成小横条 */
#tsHomeSlider .carousel-indicators {
    bottom: 0 !important;
    margin-bottom: 14px !important;
}

#tsHomeSlider .carousel-indicators li {
    width: 26px !important;
    height: 3px !important;
    border: 0 !important;
    border-radius: 2px !important;
    background-color: #FFFFFF !important;
    opacity: .5 !important;
    transition: opacity .2s ease, width .2s ease;
}

#tsHomeSlider .carousel-indicators li.active {
    width: 38px !important;
    opacity: 1 !important;
}

/* ==========================================================================
   B1. 桌面：完整显示 banner（解除 critical CSS 的 16:9 占位框）
   --------------------------------------------------------------------------
   模板内联 <style> 还给 .hero-banner / #tsHomeSlider / .carousel-inner / img
   设了 `min-height:600px`（无 !important）⇒ 必须用 !important 解掉，
   否则高度回不到图片的自然高度。
   ========================================================================== */
@media (min-width: 768px) {
    .hero-banner,
    #tsHomeSlider,
    #tsHomeSlider .carousel-inner,
    #tsHomeSlider .carousel-item {
        min-height: 0 !important;
    }

    #tsHomeSlider .carousel-item img {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;   /* ← 关键：解掉 16:9 占位，按 3.84:1 原比例显示 */
        object-fit: cover !important;    /* 比例已一致，实际不产生裁切 */
        object-position: center !important;
    }
}

/* ==========================================================================
   B2. 移动端：保留 16:9 框（否则 3.84:1 只剩 ~94px 高），但去掉 300px 强制高度
   --------------------------------------------------------------------------
   需要压过 `stylesheet_zzz_mobile_pad_fixes.css` 里那批通用规则：
     .carousel-item{max-height:400px!important;min-height:300px!important}
     .carousel-item img{...min-height:300px!important;object-fit:cover!important}
   它们的选择器是 (0,1,1)，本文件带 `#tsHomeSlider` ⇒ (1,1,1) 稳赢。
   ========================================================================== */
@media (max-width: 767px) {
    .hero-banner,
    #tsHomeSlider,
    #tsHomeSlider .carousel-inner,
    #tsHomeSlider .carousel-item {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    #tsHomeSlider .carousel-item img {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    /* 手机上按钮缩一档，离边近一点 */
    #tsHomeSlider .carousel-control-prev,
    #tsHomeSlider .carousel-control-next {
        width: 34px !important;
        height: 34px !important;
        opacity: .75 !important;
    }

    #tsHomeSlider .carousel-control-prev { left: 8px !important; }
    #tsHomeSlider .carousel-control-next { right: 8px !important; }

    #tsHomeSlider .carousel-control-prev-icon,
    #tsHomeSlider .carousel-control-next-icon {
        width: 13px !important;
        height: 13px !important;
    }

    #tsHomeSlider .carousel-caption {
        padding: 44px 16px 40px !important;
    }
}

/* ==========================================================================
   2026-11-10 CLS 治理（本文件最后生效，压过前面所有 hero 规则）
   --------------------------------------------------------------------------
   背景：内联骨架已锁 hero 高度，但本文件 B1 段的
     `#tsHomeSlider .carousel-item img{height:auto!important;aspect-ratio:auto!important}`
   会在异步到达时把高度改回"由图片自然比例决定"，造成二次跳变。
   这里在文件末尾统一收口：hero 容器按 1920:500 锁高，各层 100% 撑满，
   img 用 object-fit:cover 填充。无论轮播如何切换、CSS 何时到达，高度恒定。
   ========================================================================== */
.hero-banner{position:relative!important;overflow:hidden!important;aspect-ratio:1920 / 500!important}
#tsHomeSlider,
.hero-banner > #tsHomeSlider,
#tsHomeSlider .carousel-inner,
#tsHomeSlider .carousel-item{height:100%!important;min-height:0!important}
#tsHomeSlider .carousel-item img{
    width:100%!important;
    height:100%!important;
    max-height:none!important;
    min-height:0!important;
    aspect-ratio:auto!important;
    object-fit:cover!important;
    object-position:center!important;
}
@media (max-width: 767.98px){
    .hero-banner{aspect-ratio:16 / 9!important}
}
