/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child-timix
Template: astra


/* =========================================================
   1. Product Image Anti-Jump (CLS) + Full Display (No Crop)
   ========================================================= */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important; 
    height: auto !important;
    display: block !important;
    overflow: hidden !important;
    background-color: #f8f9fa !important; 
    margin-bottom: 0px !important; 
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap > a.woocommerce-LoopProduct-link {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    display: block !important;
    z-index: 1 !important;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
    width: 100% !important; height: 100% !important;
    max-width: 100% !important; max-height: 100% !important;
    object-fit: contain !important; 
    margin: 0 !important;
    position: absolute !important;
    top: 0 !important; left: 0 !important;
}

/* =========================================================
   2. Text Area Adjustments
   ========================================================= */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    position: relative !important;
    z-index: 99 !important; 
    padding-top: 10px !important; 
    margin-top: 0 !important;
}

/* 商品标题 (h2) */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important; 
    line-height: 1.4 !important;

    background: transparent !important;
    border: none !important;
}

/* 纯文本分类样式（灰色小字） */
.custom-loop-category-text {
    display: block !important;
    color: #0466f9 !important; 
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
}

/* 确保商品标题的链接颜色正常 */
.woocommerce ul.products li.product .woocommerce-loop-product__title a {
    text-decoration: none !important;
    color: #1e293b !important; 
}

.woocommerce ul.products li.product .woocommerce-loop-product__title a:hover {
    color: #046bd2 !important; 
    text-decoration: underline !important;
}

/* 锁定搜索结果页图片容器比例，防止变形 */
.search-results .astra-shop-thumbnail-wrap {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    display: block !important;
    overflow: hidden !important;
}

.search-results .astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* =========================================================
   【终极降维打击】专治 Astra 搜索页博客网格变形问题
   ========================================================= */

/* 1. 强制搜索页的卡片使用 Flex 布局 */
.search-results .ast-row article.product {
    display: flex !important;
    flex-direction: column !important;
    background: #fff !important;
    border: 1px solid #eee !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 100% !important;
    padding: 0 !important;
}

.search-results .ast-row article.product .ast-article-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 2. 锁定博客图片容器为 1:1 正方形 */
.search-results .ast-row article.product .ast-blog-featured-section {
    position: relative !important;
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    display: block !important;
    overflow: hidden !important;
    background-color: #f8f9fa !important;
    margin: 0 !important;
}

.search-results .ast-row article.product .ast-blog-featured-section a {
    position: absolute !important;
    top: 0 !important; 
    left: 0 !important;
    width: 100% !important; 
    height: 100% !important;
    display: block !important;
}

/* 3. 强制图片完整居中显示（不拉伸、不裁切） */
.search-results .ast-row article.product .ast-blog-featured-section img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important; 
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* 4. 调整文字区域的内边距 */
.search-results .ast-row article.product .post-content {
    padding: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* 5. 标题样式 */
.search-results .ast-row article.product .entry-title {
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 15px !important;
    font-weight: 600 !important;
}

.search-results .ast-row article.product .entry-title a {
    color: #1e293b !important;
    text-decoration: none !important;
}

.search-results .ast-row article.product .entry-title a:hover {
    color: #046bd2 !important;
}

/* 6. 【核心破解】因为 Astra 博客模板根本不输出价格和按钮，我们用伪元素画一个“查看详情”按钮，推到卡片最底部 */
.search-results .ast-row article.product .post-content::after {
    content: "View Details \2192"; /* 箭头符号 */
    display: block !important;
    width: 100% !important;
    padding: 10px 0 !important;
    margin-top: auto !important; /* 强力推到底部 */
    background-color: #046bd2 !important;
    color: #ffffff !important;
    text-align: center !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.search-results .ast-row article.product:hover .post-content::after {
    background-color: #045cb4 !important;
}