/* =========================================
   1. 基础排版 & 独立组件
   ========================================= */

/* 强调文本粗细统一 */
.entry-content strong, b {
    font-weight: 500;
}

/* 轮播图分页尺寸 */
.blockslider-pagination.blockslider-pagination-square span {
    width: 45px;
    margin: 5px 10px !important; 
}

/* 聊天气泡位置微调 */
.woot-widget-bubble {
    bottom: 80px !important; 
}

/* 博客网格默认间距 */
.ct-query-template-grid {
    gap: 20px 30px !important; 
}
/* =========================================
   2. WooCommerce 商品卡片定制
   ========================================= */

/* 卡片外框：移除内边距，开启圆角与溢出隐藏 */
.woocommerce ul.products li.product,
.ct-product-card {
    padding: 0 !important;
    overflow: hidden; 
    border: 1px solid #eaeaea; 
    border-radius: 8px; 
    background-color: #ffffff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* 卡片鼠标悬停动效 */
.woocommerce ul.products li.product:hover,
.ct-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* 图片区域：全宽贴边显示 */
.woocommerce ul.products li.product img,
.ct-product-card .ct-image-container,
.ct-product-card img {
    margin: 0 !important;
    border-radius: 0 !important; 
    width: 100%;
    display: block;
}

/* 文本区域：左右缩进统一控制 */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .star-rating,
.ct-product-card .woocommerce-loop-product__title,
.ct-product-card .price,
.ct-product-card .star-rating {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* 标题区域：两行截断与上下间距 */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.ct-product-card .woocommerce-loop-product__title {
    margin-top: -5px !important;
    margin-bottom: 8px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 星星评价：独立成行及外边距调整 */
.woocommerce ul.products li.product .star-rating,
.ct-product-card .star-rating {
    display: block !important;
    margin-bottom: 15px !important;
    margin-left: 15px !important; 
    margin-right: 15px !important; 
}


/* =========================================
   3. 移动端适配 (Max-width: 688px)
   ========================================= */
/* 商品详情页相册与标题的间距 */
@media (max-width: 999.98px) {
    body.single-product div.woocommerce-product-gallery {
        margin-bottom: 1em !important; /* 你可以根据视觉效果修改 1em，比如改成 15px 或 0.5em */
    }
}

@media (max-width: 688px) {
    
    /* 缩小博客网格间距 */
    .ct-query-template-grid {
        gap: 15px !important; 
    }

    /* 3. 卡片内部文字的左右缩进 */
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product .price,
    .woocommerce ul.products li.product .star-rating,
    .ct-product-card .woocommerce-loop-product__title,
    .ct-product-card .price,
    .ct-product-card .star-rating {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* --- 页脚精简与网格重塑 --- */
    
    /* 隐藏小部件1 (品牌介绍) */
    .ct-footer [data-row="middle"] [data-column="widget-area-1"] {
        display: none !important;
    }

    /* 重设页脚网格为 2 列 */
    .ct-footer [data-row="middle"] > .ct-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px 10px !important;
    }

    /* 小部件4 (联系方式) 横跨两列并居中 */
    .ct-footer [data-row="middle"] [data-column="widget-area-4"] {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        padding-top: 15px !important;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
}