/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://yourwebsite.com/hello-elementor-child
 Description:  Hello Elementor 的子主题
 Author:       Soar
 Author URI:   https://yourwebsite.com
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* 这里可以添加你的自定义 CSS */
#seach_box input{
	min-height:35px!important;
}

.pewc-checkbox-group-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pewc-checkbox-group-wrapper li {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pewc-radio-form-label {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 40px;
    cursor: pointer;
    text-align: center;
}

.pewc-radio-form-label span {
    display: inline-block;
    width: 100%;
    text-align: center;
}


/*
 * 首页 Blog / Buying Guide 手机端防重叠
 * 不依赖 Elementor 自动 ID 或自定义类
 */
@media (max-width: 767px) {

    /* 自动识别包含 Posts 组件的首页区块 */
    body.home .e-con-boxed:has(.elementor-widget-posts) {
        display: flex !important;
        position: relative !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        clear: both !important;
        isolation: isolate;
    }

    /*
     * 区块布局：
     * 第一行：标题 + See More
     * 第二行：文章列表
     */
    body.home
    .e-con-boxed:has(.elementor-widget-posts)
    > .e-con-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: auto auto !important;
        grid-auto-flow: row !important;
        align-items: center !important;
        align-content: start !important;
        column-gap: 12px !important;
        row-gap: 20px !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }

    /* 标题容器 */
    body.home
    .e-con-boxed:has(.elementor-widget-posts)
    > .e-con-inner
    > :nth-child(1) {
        grid-column: 1 !important;
        grid-row: 1 !important;
        justify-self: start !important;
        align-self: center !important;
        position: relative !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* See More 按钮容器 */
    body.home
    .e-con-boxed:has(.elementor-widget-posts)
    > .e-con-inner
    > :nth-child(2) {
        grid-column: 2 !important;
        grid-row: 1 !important;
        justify-self: end !important;
        align-self: center !important;
        position: relative !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }

    /* Posts 组件的外层容器 */
    body.home
    .e-con-boxed:has(.elementor-widget-posts)
    > .e-con-inner
    > :nth-child(3) {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
        transform: none !important;
    }

    body.home .elementor-widget-posts,
    body.home .elementor-widget-posts > .elementor-widget-container {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        transform: none !important;
    }

    /* 手机端文章列表固定为一列 */
    body.home
    .elementor-widget-posts
    .elementor-posts-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-auto-flow: row !important;
        grid-auto-rows: auto !important;
        gap: 35px 0 !important;
        position: relative !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        align-items: stretch !important;
        transform: none !important;
    }

    /* 清除 Elementor Masonry 遗留的定位和位移 */
    body.home
    .elementor-widget-posts
    .elementor-post {
        display: block !important;
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;
        float: none !important;
        transform: none !important;
        translate: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
    }

    body.home
    .elementor-widget-posts
    .elementor-post__card {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 !important;
        transform: none !important;
        overflow: hidden;
    }
}