/*
Theme Name: Twenty Twenty-Four Child
Theme URI: https://wordpress.org/themes/twentytwentyfour/
Template: twentytwentyfour
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Four is designed to be flexible, versatile and applicable to any website. Its collection of templates and patterns tailor to different needs, such as presenting a business, blogging and writing or showcasing work. A multitude of possibilities open up with just a few adjustments to color and typography. Twenty Twenty-Four comes with style variations and full page designs to help speed up the site building process, is fully compatible with the site editor, and takes advantage of new design tools introduced in WordPress 6.4.
Tags: one-column,custom-colors,custom-menu,custom-logo,editor-style,featured-images,full-site-editing,block-patterns,rtl-language-support,sticky-post,threaded-comments,translation-ready,wide-blocks,block-styles,style-variations,accessibility-ready,blog,portfolio,news
Version: 1.6.1789906723
Updated: 2026-09-20 20:18:43

*/

/* ============================================================
   修复：导航以下主内容容器在 Chrome 窄视口下贴左、不居中
   原因：GenerateBlocks / Stackable 容器被写死 width:1200px，
   缺少 max-width:100%；当视口小于 1200px 时固定宽度盒子溢出，
   Chrome 将剩余负空间全部分给右边距，导致整体靠左、右侧被裁切。
   页面结构有三种：① 有 main + entry-content（首页）；
   ② 有 main、无 entry-content（商品分类）；③ 无 main、有 entry-
   content（品牌馆/关于等静态页），选择器需同时覆盖。
   处理：
   1) 所有 GB 容器先限制 max-width:100%，不超出父级宽度；
   2) 外层主内容容器宽度 100%、上限 1200px、水平 auto 居中。
   宽屏保持 1200px 居中不变，窄屏自适应收缩并居中。
   ============================================================ */
.entry-content [class*="gb-element-"],
main [class*="gb-element-"],
.wp-site-blocks > [class*="gb-element-"],
main > .wp-block-group.alignwide,
main > .wp-block-woocommerce-product-collection,
main > .wc-block-store-notices {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.entry-content > div[class*="gb-element-"],
.entry-content > .wp-block-stackable-columns,
.entry-content > .wp-block-stackable-hero,
.entry-content > .stk-block-hero__content,
main > div[class*="gb-element-"],
main > .wp-block-group > div[class*="gb-element-"],
.wp-site-blocks > div[class*="gb-element-"],
main > .wp-block-group.alignwide,
main > .wp-block-woocommerce-product-collection,
main > .wc-block-store-notices {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
}

/* ============================================================
   修复：主导航菜单项在导航白条内上下不居中
   原因：右侧导航列 .stk-eda91cb 被 align-self:center + min-height:40px
   限制成 40px 高，未与整行（50px）等高；菜单项链接为 block、无垂直
   居中约束，文字贴在行高上，视觉偏上。
   处理：导航列拉伸到整行高度，导航条与菜单项链接垂直居中对齐。
   ============================================================ */
.stk-eda91cb {
    align-self: stretch !important;
    min-height: 50px !important;
}

.my-header-nav {
    height: 50px !important;
}

.my-header-nav .wp-block-navigation-item__content {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 50px !important;
}

/* ============================================================
   首页"销售排行榜"窄列表排版（参考样式图）：
   左方形产品图，右侧两行标题，底部价格行（左侧价格、右侧
   橙色"抢"按钮）。标题最多两行截断；条目高度统一、间距均匀，
   各板块等高整齐。
   区分依据：排行榜商品项内部是 Stackable 两列（左图右文），
   首页主商品网格卡片不含该结构，以下选择器只命中排行榜，
   不影响主网格商品卡片。
   ============================================================ */
.wc-block-product > .wp-block-stackable-columns .stk-row {
    gap: 10px !important;
    align-items: center !important;
}

.wc-block-product > .wp-block-stackable-columns .stk-column:first-child {
    flex: 0 0 52px !important;
}

.wc-block-product > .wp-block-stackable-columns .stk-column:first-child img {
    width: 52px !important;
    height: 52px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
}

.wc-block-product > .wp-block-stackable-columns .stk-column:last-child {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 0 !important;
}

.wc-block-product > .wp-block-stackable-columns h2 {
    font-size: 13px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    height: 2.7em !important;
    overflow: hidden !important;
}

.wc-block-product > .wp-block-stackable-columns h2 a {
    font-size: 13px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
}

.wc-block-product > .wp-block-stackable-columns .wp-block-woocommerce-product-price {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 0 !important;
}

.wc-block-product > .wp-block-stackable-columns .wc-block-components-product-price {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 5px !important;
    font-size: 11px !important;
    min-width: 0 !important;
}

.wc-block-product > .wp-block-stackable-columns del {
    color: #9aa0a6 !important;
    font-size: 10px !important;
}

.wc-block-product > .wp-block-stackable-columns ins {
    color: #e63946 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

/* 右侧单列销售排行榜（蓝底）：现价红色在蓝底上对比不明显，改为白色；
   划线原价一并调浅为半透明白，保证两行价格在蓝底上清晰可读。
   仅命中单列模板 columns-1，不影响中间主网格（columns-5）白底红字。 */
.wc-block-product-template__responsive.columns-1 .wc-block-product ins {
    color: #ffffff !important;
}

.wc-block-product-template__responsive.columns-1 .wc-block-product del {
    color: rgba(255, 255, 255, 0.72) !important;
}

.rank-grab {
    flex: 0 0 auto;
    margin-left: auto;
    background: #ff7a1a;
    color: #fff !important;
    border-radius: 12px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none !important;
    white-space: nowrap;
}

/* 排行榜条目纵向均分、拉伸占满整个蓝色板块高度：
   不再固定条目高度，列表沿板块剩余高度等分，条目内部内容垂直居中。
   选择器通过 Stackable 两列结构只命中排行榜，不影响主商品网格卡片。 */
.wp-block-woocommerce-product-collection:has(.wp-block-stackable-columns) {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.wc-block-product-template__responsive:has(> li > .wp-block-stackable-columns) {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
}

.wc-block-product:has(> .wp-block-stackable-columns) {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    height: auto !important;
    align-self: stretch !important;
    display: flex !important;
    margin: 0 !important;
}

.wc-block-product > .wp-block-stackable-columns {
    flex: 1 1 0% !important;
    height: 100% !important;
    min-height: 0 !important;
}

/* 首页轮播幻灯片：兼容旧版 Chrome（86 内核）。该内核不识别 :is()
   选择器与 inset 简写，Stackable 原本下发的图片高度、箭头定位规则
   被整条丢弃，导致 banner 按图片自然比例塌陷变矮、箭头错位到顶部。
   这里用普通类选择器 + 显式 top/right/bottom/left 兜底：
   1) 锁定容器/滑块/幻灯片列/包装层/figure 整条高度链，图片 cover 铺满；
   2) 箭头用四方位显式定位铺满参照层，flex 垂直居中、左右分列。
   不设置 flex-shrink:0、不改宽度，避免撑出横向滚动。 */
.home .wp-block-stackable-carousel,
.home .wp-block-stackable-carousel .stk-block-carousel__slider,
.home .wp-block-stackable-carousel .wp-block-stackable-column,
.home .wp-block-stackable-carousel .stk-img-wrapper,
.home .wp-block-stackable-carousel .stk-img-wrapper figure {
    height: 390px !important;
    min-height: 390px !important;
}

.home .wp-block-stackable-carousel .stk-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.home .wp-block-stackable-carousel .stk-block-carousel__buttons {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    bottom: 12px !important;
    left: 12px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    pointer-events: none;
    z-index: 9999;
}
