/* ========== 隐藏产品右上角 SALE ========== */
.wc-block-grid__product-onsale,
.wc-block-components-product-sale-badge,
.wp-block-woocommerce-product-image-gallery span.onsale {
    display: none !important;
}

/* ========== 产品描述与评价选项卡标签 ========== */
.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    text-decoration: none !important;
}

/* ========== 相关产品 ========== */
.related-products h2 {
    font-size: var(--wp--preset--font-size--x-large) !important;
}
.related-products .wp-block-woocommerce-product-collection {
	margin: 2em 0;
    padding: 0;
}
.related-products .wp-block-button {
	display: none;
}



/* ========== 首页产品 和 商店(Shop) 产品图片网格布局 ========== */
/* 1. 统一图片容器高度 */
/* 针对 product-collection 内的 product-image 块 */
.wc-block-product-template .wc-block-components-product-image {
    width: 100%;
    height: 280px;                /* 桌面端固定高度 */
    background-color: #fff;    /* 留白区域的填充底色 */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;            /* 让图片完整可见 */
}

/* 2. 覆盖 WooCommerce 默认的强制正方形比例 */
.wc-block-product-template .wc-block-components-product-image--aspect-ratio-1-1 {
    aspect-ratio: auto !important;
}

/* 3. 图片完整显示，不裁剪 */
/* 让 a 标签也参与 flex 居中，确保图片在容器正中间 */
.wc-block-product-template .wc-block-components-product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* 4. 图片等比缩小，不超过容器边界 */
.wc-block-product-template .wc-block-components-product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
}

/* 5. 产品卡片纵向 Flex，确保按钮沉底 */
.wc-block-product-template > .wc-block-product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 6. 标题统一高度，超出省略 */
.wc-block-product-template .wp-block-post-title {
    min-height: 2.8em;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

/* 7. 价格与按钮间距 */
.wc-block-product-template .wp-block-woocommerce-product-price {
    margin-bottom: 0.5rem;
}

/* 8. 按钮始终沉底对齐 */
.wc-block-product-template .wp-block-woocommerce-product-button {
    margin-top: auto;
    width: 100%;
}

/* ========== 平板 (<= 1024px) ========== */
@media (max-width: 1024px) {
    .wc-block-product-template .wc-block-components-product-image {
        height: 240px;
    }
}

/* ========== 手机 (<= 768px) ========== */
@media (max-width: 768px) {
    .wc-block-product-template .wc-block-components-product-image {
        height: 200px;
    }
}

/* ========== 小屏手机 (<= 480px) ========== */
@media (max-width: 480px) {
    .wc-block-product-template .wc-block-components-product-image {
        height: 160px;
    }
}



/* ========== 服务区域 ========== */
.services-section {
    background: #f8f9fa;
    padding: 70px 24px;
}
.services-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.service-item {
    text-align: center;
    padding: 24px;
}
.service-icon {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    line-height: 1;
}
.service-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: #2a2a2a;
    font-weight: 500;
}
.service-item p {
    font-size: 0.95rem;
    color: #777;
    line-height: 1.7;
    margin: 0;
}


/* ========== CTA 区域 ========== */
.cta-section {
    background: #eef2f7;
    padding: 70px 24px;
    text-align: center;
}
.cta-section h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 0.75rem;
    color: #2a2a2a;
    font-weight: 400;
}
.cta-section p {
    color: #666;
    margin-bottom: 1.75rem;
    font-size: 1.05rem;
}
.cta-section a {
    display: inline-block;
    padding: 14px 36px;
    background: #2a2a2a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s;
}
.cta-section a:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}


/* ========== 区块标题 ========== */
.section-title {
    text-align: center;
    margin-bottom: 1rem;
}
.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #2a2a2a;
    font-weight: 400;
    margin-bottom: 0.5rem;
}
.section-title p {
    color: #888;
    font-size: 1rem;
    margin: 0;
}



/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .services-wrap { grid-template-columns: 1fr; gap: 20px; }
    .services-section, .cta-section { padding: 50px 20px; }
}

/* ========== Header 手机端：Logo 单独一行 ========== */
@media (max-width: 768px) {
    /* Header 主容器允许换行 */
    header .wp-block-group.alignwide {
        flex-wrap: wrap !important;
        gap: 8px;
    }
    
    /* Logo 容器占满整行并居中 */
    header .wp-block-group.alignwide > .wp-block-group:first-child {
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* Logo 图片手机端自适应缩小 */
    header .wp-block-image img {
    }
}

