/*
Theme Name: Astra Child
Theme URI: https://wpastra.com/
Template: astra
Author: Brainstorm Force
Author URI: https://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: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Tags: custom-menu, custom-logo, entertainment, one-column, two-columns, left-sidebar, e-commerce, right-sidebar, custom-colors, editor-style, featured-images, full-width-template, microformats, post-formats, rtl-language-support, theme-options, threaded-comments, translation-ready, blog
*/

/* 产品轮播样式 */
.product-carousel-container {
    margin-bottom: 40px;
}

/* 定位容器，确保Swiper正常工作 */
.product-carousel-container .woocommerce {
    overflow: hidden;
    position: relative;
    padding: 0 40px;
    margin-left: -15px;
    margin-right: -15px;
}

/* Swiper包裹层(ul.products) */
.product-carousel-container .woocommerce ul.products {
    display: flex;
    padding: 10px 0;
    list-style: none;
    margin: 0;
    /* 清除WooCommerce默认的网格样式干扰 */
    margin-left: 0 !important;
    margin-right: 0 !important;
    border: none !important;
}

/* Swiper滑块(li.product) */
.product-carousel-container .woocommerce ul.products li.product {
    flex-shrink: 0;
    width: 100%;
    height: auto;
    box-sizing: border-box;
    /* 清除WooCommerce默认的float和margin */
    float: none !important;
    margin: 0 !important;
    clear: none !important;
    /* 可以添加一些通用样式 */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-carousel-container .woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* 导航按钮样式 */
.product-carousel-container .swiper-button-prev,
.product-carousel-container .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, color 0.3s ease;
    z-index: 10;
}

.product-carousel-container .swiper-button-prev:hover,
.product-carousel-container .swiper-button-next:hover {
    background-color: #fff;
    color: #000;
}

/* 调整箭头图标大小 */
.product-carousel-container .swiper-button-prev::after,
.product-carousel-container .swiper-button-next::after {
    font-size: 16px;
    font-weight: bold;
}

/* 按钮位置微调 */
.product-carousel-container .swiper-button-prev {
    left: 0px;
}

.product-carousel-container .swiper-button-next {
    right: 0px;
}

/* 分页器样式 */
.product-carousel-container .swiper-pagination {
    position: relative;
    bottom: -10px;
    left: 0;
    width: 100%;
    text-align: center;
    margin-top: 20px;
}

.product-carousel-container .swiper-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #ccc;
    opacity: 0.8;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    margin: 0 5px;
}

.product-carousel-container .swiper-pagination .swiper-pagination-bullet-active {
    background-color: #555;
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 767px) {
    .product-carousel-container .woocommerce {
        padding: 0 15px;
    }

    .product-carousel-container .swiper-button-prev,
    .product-carousel-container .swiper-button-next {
        width: 30px;
        height: 30px;
    }

    .product-carousel-container .swiper-button-prev::after,
    .product-carousel-container .swiper-button-next::after {
        font-size: 14px;
    }
    
    .product-carousel-container .swiper-button-prev {
        left: -5px;
    }
    
    .product-carousel-container .swiper-button-next {
        right: -5px;
    }
}

/* 为WooCommerce产品网格中的每个产品添加灰色边框 */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    padding: 20px;
}



/* 产品悬停效果 */
.woocommerce ul.products li.product:hover,
.woocommerce-page ul.products li.product:hover {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* 产品悬停时显示添加到购物车按钮 */
.woocommerce ul.products li.product:hover .custom-add-to-cart-button,
.woocommerce-page ul.products li.product:hover .custom-add-to-cart-button,
.woocommerce ul.products li.product:hover a.custom-add-to-cart-button,
.woocommerce-page ul.products li.product:hover a.custom-add-to-cart-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 隐藏原有的添加到购物车按钮 */
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
    display: none;
}

/* 隐藏原有的伪元素添加到购物车按钮 */
.woocommerce ul.products li.product .astra-shop-summary-wrap:before,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap:before {
    display: none !important;
}

/* 自定义添加到购物车按钮样式 */
.custom-add-to-cart-button,
a.custom-add-to-cart-button {
    opacity: 0 !important; /* 默认隐藏按钮 */
    visibility: hidden !important;
    width: 80% !important;
    margin: 10px auto !important;
    padding: 8px 12px !important;
    text-align: center !important;
    background-color: #0274be !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    cursor: pointer !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    border: none !important;
    line-height: 1.5 !important;
}

/* 按钮悬停效果 */
.custom-add-to-cart-button:hover,
a.custom-add-to-cart-button:hover,
.woocommerce ul.products li.product a.custom-add-to-cart-button:hover,
.woocommerce-page ul.products li.product a.custom-add-to-cart-button:hover {
    background-color: #015293 !important;
    color: #ffffff !important;
}

/* 按钮加载状态 */
.custom-add-to-cart-button.loading {
    opacity: 0.5;
    padding-right: 2.618em !important;
}

.custom-add-to-cart-button.loading::after {
    font-family: WooCommerce;
    content: "\e01c";
    vertical-align: top;
    font-weight: 400;
    position: absolute;
    top: 8px;
    right: 10px;
    animation: spin 2s linear infinite;
}

/* 按钮已添加状态 */
.custom-add-to-cart-button.added::after {
    font-family: WooCommerce;
    content: "\e017";
    margin-left: 0.53em;
    vertical-align: bottom;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* 确保按钮位于标题和价格之间 */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    margin-bottom: 5px;
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
    margin-top: 5px;
}

/* 确保产品容器有相对定位以正确定位按钮 */
.woocommerce ul.products li.product, 
.woocommerce-page ul.products li.product {
    position: relative !important;
    overflow: hidden !important;
}

/* 确保产品摘要区域有相对定位 */
.woocommerce ul.products li.product .astra-shop-summary-wrap,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap {
    position: relative !important;
}

/* 产品分类标题样式 */
.woocommerce-products-header {
    text-align: center;
    margin: 20px 0 30px;
    position: relative;
}

.woocommerce-products-header__title.page-title {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background-color: #fff;
    z-index: 1;
    font-size: 24px;
    margin: 0;
}

.woocommerce-products-header__title.page-title:before,
.woocommerce-products-header__title.page-title:after {
    width: 90%;
    background-color: #d1d1d1;
    height: 1px;
    content: '';
    position: absolute;
    top: 50%;
    z-index: 0;
}

.woocommerce-products-header__title.page-title:before {
    left: -90%;
}

.woocommerce-products-header__title.page-title:after {
    right: -90%;
}
.footer-widget-area .ast-header-html {
    position: relative;
    padding: 0 15%;
    box-sizing: border-box;
}
.footer-widget-area .ast-header-html img {
    display: block !important;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.footer-widget-area .ast-header-html::before,
.footer-widget-area .ast-header-html::after {
    content: '';
    position: absolute;
    top: 50%;
    height: 1px;
    background: #d1d1d1;
    z-index: 1;
}

@media (max-width: 768px) {
    .footer-widget-area .ast-header-html {
        padding: 0 20%;
    }
    .footer-widget-area .ast-header-html::before,
    .footer-widget-area .ast-header-html::after {
        width: 20%;
    }
}

@media (min-width: 769px) {
    .footer-widget-area .ast-header-html::before,
    .footer-widget-area .ast-header-html::after {
        width: 38%;
    }
}
.footer-widget-area .ast-header-html::before {
    left: 0;
}
.footer-widget-area .ast-header-html::after {
    right: 0;
}


/* 产品轮播样式 */
.product-carousel-wrapper {
    position: relative;
    margin: 40px 0;
    padding: 0 40px;
}

/* 确保Swiper容器正确显示 */
.product-carousel-wrapper .woocommerce {
    overflow: hidden;
    position: relative;
}

/* 产品列表样式 */
.product-carousel-wrapper .woocommerce ul.products {
    display: flex !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    width: 100% !important;
    list-style: none !important;
}

/* 产品项样式 - 统一大小和边框 */
.product-carousel-wrapper .woocommerce ul.products li.product {
    flex: 0 0 auto !important;
    float: none !important;
    margin: 0 15px !important;
    width: calc(25% - 30px) !important;
    max-width: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background-color: #fff !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 产品图片容器样式 - 修复图片不显示问题 */
.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    position: relative !important;
    overflow: hidden !important;
    height: auto !important; /* 修改为auto而不是0 */
    padding-bottom: 0 !important; /* 移除百分比padding */
    min-height: 200px !important; /* 添加最小高度确保容器可见 */
}

/* 产品图片样式 - 修复定位问题 */
.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
    position: relative !important; /* 修改为相对定位而不是绝对定位 */
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important; /* 允许图片保持原始比例 */
    object-fit: contain !important; /* 修改为contain确保整个图片可见 */
    max-height: 200px !important; /* 限制最大高度 */
    display: block !important; /* 确保图片显示为块级元素 */
    margin: 0 auto !important; /* 居中显示 */
}

/* 确保hover图片也能正确显示 */
.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .show-on-hover {
    position: absolute !important; /* hover图片使用绝对定位 */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap:hover .show-on-hover {
    opacity: 1 !important;
}

/* 产品信息区域样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    min-height: 180px;
    position: relative;
    padding: 15px;
}

/* 产品标题样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1em;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 2.6em;
}

/* 产品分类样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .ast-woo-product-category {
    font-size: 12px !important;
    color: #777 !important;
    margin-bottom: 5px !important;
    display: block !important;
    height: 16px !important; /* 固定高度 */
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

/* 产品价格样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .price {
    margin: 5px 0;
    order: 2;
}

/* 删除价格样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .price del {
    font-size: 13px !important;
    opacity: 0.6 !important;
}

/* 按钮样式统一 */
.product-carousel-wrapper .woocommerce ul.products li.product .ast-on-card-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* 统一销售标签样式 */
.product-carousel-wrapper .woocommerce ul.products li.product .ast-onsale-card {
    top: 10px !important;
    left: 10px !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
    z-index: 10 !important;
}

/* 导航按钮样式 - 调整箭头大小 */
.product-carousel-wrapper .swiper-button-prev,
.product-carousel-wrapper .swiper-button-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 调整箭头图标大小 */
.product-carousel-wrapper .swiper-button-prev:after,
.product-carousel-wrapper .swiper-button-next:after {
    font-size: 14px !important; /* 减小箭头大小 */
    font-weight: bold;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
}

.product-carousel-wrapper .swiper-button-prev {
    left: 0;
}

.product-carousel-wrapper .swiper-button-next {
    right: 0;
}

/* 分页器样式 */
.product-carousel-wrapper .swiper-pagination {
    position: relative;
    bottom: 0;
    margin-top: 20px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .product-carousel-wrapper .woocommerce ul.products li.product {
        width: calc(33.33% - 30px) !important;
    }
}

@media (max-width: 768px) {
    .product-carousel-wrapper .woocommerce ul.products li.product {
        width: calc(50% - 30px) !important;
    }
    
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap {
        min-height: 160px;
        padding: 10px;
    }
    
    .product-carousel-wrapper .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.9em;
        -webkit-line-clamp: 2;
        max-height: 2.4em;
    }
    
    .product-carousel-wrapper .jdgm-widget.jdgm-preview-badge {
        margin: 3px 0;
    }
    
    .product-carousel-wrapper .buy-now-btn {
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .product-carousel-wrapper .woocommerce ul.products li.product {
        width: calc(100% - 30px) !important;
    }
    
    .product-carousel-wrapper {
        padding: 0 30px;
    }
}

/* 添加主内容区域间距调整 */
.ast-separate-container #primary,
.ast-separate-container.ast-left-sidebar #primary, 
.ast-separate-container.ast-right-sidebar #primary {
    margin: 1em 0;
    padding: 0;
}

/* 添加归档页面标题间距调整 */
body.archive .ast-archive-description {
    padding-top: 1em;
}

/* 添加面包屑导航样式 */
.ast-breadcrumbs {
    border-bottom: 1px solid #f3f3f3;
    padding-bottom: 10px;
}

/* 调整页脚小工具区域的内边距 - 提高优先级 */
body .footer-widget-area .ast-header-html {
    padding: 0 0 !important;
}

/* 修复Fluent表单输入框的边距 - 提高优先级 */
body .fluentform .ff-el-form-left .ff-el-input--content, 
body .fluentform .ff-el-form-right .ff-el-input--content {
    margin-left: 0 !important;
}

/* 自定义Fluent表单提交按钮样式 - 提高优先级 */
body form .ff-btn-submit:not(.ff_btn_no_style),
body form .ff-btn-submit.ff_btn_style {
    background-color: #ffffff !important;
    color: #0d0d0d !important;
    border: 1px solid #0d0d0d !important;
    padding: 10px 20px !important;
    font-weight: bold !important;
    border-radius: 3px !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-decoration: none !important;
    width: auto !important;
}

/* 按钮悬停效果 - 修改为黑色背景白色文本 */
body form .ff-btn-submit:not(.ff_btn_no_style):hover,
body form .ff-btn-submit.ff_btn_style:hover {
    background-color: #000000 !important; /* 黑色背景 */
    color: #ffffff !important; /* 白色文本 */
    border-color: #000000 !important; /* 黑色边框 */
}

/* 按钮加载状态 */
body form .ff-btn-submit.loading {
    opacity: 0.7 !important;
    cursor: wait !important;
}

/* 自定义页脚小工具区域文本颜色 */
.footer-widget-area[data-section="section-fb-html-1"] .ast-builder-html-element {
    color: #4d4d4d !important;
}

/* 调整页脚分隔线垂直位置 */
.footer-widget-area .ast-header-html::before, 
.footer-widget-area .ast-header-html::after {
    top: 33% !important;
}

/* 外层容器设置 */
.ast-mm-custom-content {
    display: flex;
    gap: 20px; /* 左右间距，可根据需要调整 */
    width: 100%;
  }
  
  /* 左侧图片容器 */
  .uagb-block-a92995c7 {
    flex: 1; /* 占据剩余空间的一半 */
  }
  
  /* 右侧两张图片的父容器 */
  .uagb-block-e805015e {
    flex: 1; /* 占据剩余空间的另一半 */
    display: flex;
    flex-direction: column;
    gap: 20px; /* 上下图片间距，与左右间距相同 */
  }
  
  /* 确保所有图片容器高度相同 */
  .uagb-block-a92995c7, 
  .uagb-block-2d9ea0ea, 
  .uagb-block-10f1d8a1 {
    height: 100%;
  }
  
  /* 图片样式设置 */
  .uagb-image__figure {
    height: 100%;
    margin: 0; /* 移除默认边距 */
  }
  
  .uagb-image__figure img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持图片比例同时填充容器 */
  }
  
  /* 确保右侧两个图片容器平分高度 */
  .uagb-block-2d9ea0ea, 
  .uagb-block-10f1d8a1 {
    flex: 1;
    min-height: 0; /* 防止flex项目溢出 */
  }

/* Megamenu菜单样式优化 - 增强版 */
/* 为顶级菜单项添加底部边线 */
body .jet-mega-menu-item--top-level .jet-mega-menu-item__inner {
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 10px 0 !important;
    transition: all 0.3s ease !important;
    margin-bottom: 5px !important;
}

/* 顶级菜单项悬停效果 */
body .jet-mega-menu-item--top-level .jet-mega-menu-item__inner:hover {
    background-color: #f8f8f8 !important;
    padding-left: 5px !important;
}

/* 优化菜单标题样式 */
body .jet-mega-menu-item__label {
    font-weight: 500 !important;
    color: #333333 !important;
}

/* 优化子菜单容器样式 */
body .jet-mega-menu-sub-menu {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 10px 0 !important;
}

/* 子菜单项样式 */
body .jet-mega-menu-item--sub-level .jet-mega-menu-item__inner {
    padding: 8px 15px !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

/* 子菜单项悬停效果 */
body .jet-mega-menu-item--sub-level .jet-mega-menu-item__inner:hover {
    background-color: #f0f0f0 !important;
}

/* 优化Category标题样式 */
body .uagb-block-7ccf5680 .uagb-heading-text {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    color: #222222 !important;
    border-bottom: 2px solid #d1d1d1 !important;
    padding-bottom: 8px !important;
    display: inline-block !important;
}

/* 整体容器样式优化 */
body .uagb-block-fb2700e2 {
    padding: 15px !important;
    background-color: #ffffff !important;
    border-radius: 5px !important;
}

/* 修改菜单中的 ">>" 文本 */
body .jet-mega-menu-item__label {
    position: relative !important;
}

/* 隐藏原始的 ">>" 文本 */
body .jet-mega-menu-item--top-level .jet-mega-menu-item__label {
    text-transform: none !important;
    padding-right: 25px !important; /* 为箭头符号留出空间 */
}

/* 使用Unicode箭头替代原有符号，并调整位置 */
body .jet-mega-menu-item--top-level .jet-mega-menu-item__label:after {
    content: ' \2192' !important; /* 右箭头Unicode */
    position: absolute !important;
    right: 0 !important;
    opacity: 0.7 !important;
    transition: transform 0.3s ease !important;
}

/* 修复子菜单位置问题 - 调整位置避免重叠 */
body .jet-mega-menu--sub-position-right .jet-mega-menu-sub-menu {
    top: 0 !important; 
    bottom: auto !important; 
    transform: none !important; 
    margin-left: 10px !important; /* 增加与父菜单的距离 */
    z-index: 999 !important; 
    left: 100% !important; /* 确保从父菜单的100%位置开始 */
}

/* 确保子菜单容器不会与父菜单重叠 */
body .jet-mega-menu-item-has-children:hover .jet-mega-menu-sub-menu {
    display: block !important;
    visibility: visible !important;
}

/* 移动端产品卡片优化 - 全面改进版 */
@media (max-width: 768px) {
    /* 调整产品卡片整体布局 */
    .woocommerce ul.products li.product, 
    .woocommerce-page ul.products li.product {
        display: flex !important;
        flex-direction: column !important; /* 改为纵向布局 */
        margin-bottom: 20px !important;
        padding: 0 !important; /* 移除内边距 */
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        max-height: none !important; /* 移除高度限制 */
    }
    
    /* 调整产品图片容器 */
    .woocommerce ul.products li.product .astra-shop-thumbnail-wrap,
    .woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap {
        width: 100% !important;
        height: 180px !important; /* 固定高度 */
        position: relative !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: #f8f8f8 !important;
    }
    
    /* 调整产品图片 */
    .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img,
    .woocommerce-page ul.products li.product .astra-shop-thumbnail-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        padding: 10px !important;
    }
    
    /* 销售标签位置调整 */
    .woocommerce ul.products li.product .onsale,
    .woocommerce-page ul.products li.product .onsale,
    .woocommerce ul.products li.product .ast-onsale-card,
    .woocommerce-page ul.products li.product .ast-onsale-card {
        top: 10px !important;
        left: 10px !important;
        right: auto !important;
        font-size: 12px !important;
        padding: 3px 8px !important;
        border-radius: 3px !important;
        z-index: 10 !important;
    }
    
    /* NEW标签位置调整 */
    .woocommerce ul.products li.product .ast-shop-product-out-of-stock,
    .woocommerce-page ul.products li.product .ast-shop-product-out-of-stock {
        top: 10px !important;
        right: 10px !important;
        left: auto !important;
        font-size: 12px !important;
        padding: 3px 8px !important;
        border-radius: 3px !important;
        z-index: 10 !important;
    }
    
    /* 调整产品信息区域 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap {
        width: 100% !important;
        padding: 12px 15px !important;
        display: flex !important;
        flex-direction: column !important;
        background-color: #fff !important;
    }
    
    /* 调整产品标题 */
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        height: auto !important;
        max-height: 36px !important;
        margin-bottom: 5px !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        color: #333 !important;
    }
    
    /* 调整产品分类 */
    .woocommerce ul.products li.product .ast-woo-product-category,
    .woocommerce-page ul.products li.product .ast-woo-product-category {
        font-size: 11px !important;
        color: #888 !important;
        margin-bottom: 5px !important;
    }
    
    /* 调整产品价格 */
    .woocommerce ul.products li.product .price,
    .woocommerce-page ul.products li.product .price {
        font-size: 15px !important;
        font-weight: 600 !important;
        margin: 5px 0 10px !important;
        color: #e91e63 !important; /* 价格使用醒目的颜色 */
    }
    
    /* 删除价格样式 */
    .woocommerce ul.products li.product .price del,
    .woocommerce-page ul.products li.product .price del {
        font-size: 12px !important;
        opacity: 0.6 !important;
        margin-right: 5px !important;
    }
    
    /* 按钮容器 */
    .woocommerce ul.products li.product .button-container,
    .woocommerce-page ul.products li.product .button-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-top: 5px !important;
        width: 100% !important;
    }
    
    /* 移动端默认显示Quick View按钮 */
    .woocommerce ul.products li.product .ast-quick-view-button,
    .woocommerce-page ul.products li.product .ast-quick-view-button {
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        transform: none !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        flex: 1 !important;
        text-align: center !important;
        border-radius: 4px !important;
        background-color: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
        margin: 0 !important;
        height: auto !important;
        line-height: 1.2 !important;
    }
    
    /* 调整添加到购物车按钮 */
    .woocommerce ul.products li.product .button,
    .woocommerce-page ul.products li.product .button,
    .woocommerce ul.products li.product .custom-add-to-cart-button,
    .woocommerce-page ul.products li.product .custom-add-to-cart-button {
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        transform: none !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        flex: 1 !important;
        text-align: center !important;
        border-radius: 4px !important;
        background-color: #333 !important;
        color: #fff !important;
        margin: 0 !important;
        height: auto !important;
        line-height: 1.2 !important;
    }
    
    /* 按钮悬停效果 */
    .woocommerce ul.products li.product .ast-quick-view-button:hover,
    .woocommerce-page ul.products li.product .ast-quick-view-button:hover {
        background-color: #e9e9e9 !important;
    }
    
    .woocommerce ul.products li.product .button:hover,
    .woocommerce-page ul.products li.product .button:hover,
    .woocommerce ul.products li.product .custom-add-to-cart-button:hover,
    .woocommerce-page ul.products li.product .custom-add-to-cart-button:hover {
        background-color: #000 !important;
    }
    
    /* 移除产品悬停效果，改为点击效果 */
    .woocommerce ul.products li.product:hover .astra-shop-thumbnail-wrap .show-on-hover,
    .woocommerce-page ul.products li.product:hover .astra-shop-thumbnail-wrap .show-on-hover {
        opacity: 0 !important; /* 移动端不使用悬停切换图片 */
    }
    
    /* 移动端产品网格调整 */
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* 小屏幕手机单列显示 */
@media (max-width: 480px) {
    .woocommerce ul.products,
    .woocommerce-page ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* 产品轮播移动端优化 */
@media (max-width: 768px) {
    .product-carousel-wrapper .woocommerce ul.products {
        display: flex !important; /* 保持轮播的flex布局 */
        grid-template-columns: none !important;
    }
    
    .product-carousel-wrapper .woocommerce ul.products li.product {
        flex-direction: column !important;
        width: calc(100% - 20px) !important;
        max-height: none !important;
        margin: 0 10px !important;
    }
    
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
        width: 100% !important;
        height: 180px !important;
    }
    
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap {
        width: 100% !important;
    }
    
    /* 调整轮播导航按钮位置 */
    .product-carousel-wrapper .swiper-button-prev {
        left: 5px !important;
    }
    
    .product-carousel-wrapper .swiper-button-next {
        right: 5px !important;
    }
}

/* 产品轮播移动端优化 - 全面改进版 */
@media (max-width: 768px) {
    /* 调整轮播容器样式 */
    .product-carousel-wrapper {
        padding: 0 !important;
        margin: 30px 0 !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    /* 确保轮播内容区域占满屏幕宽度 */
    .product-carousel-wrapper .woocommerce {
        padding: 0 !important;
        margin: 0 -10px !important;
        width: calc(100% + 20px) !important;
    }
    
    /* 保持轮播的flex布局 */
    .product-carousel-wrapper .woocommerce ul.products {
        display: flex !important;
        grid-template-columns: none !important;
        padding: 10px 0 !important;
    }
    
    /* 调整产品卡片样式 */
    .product-carousel-wrapper .woocommerce ul.products li.product {
        flex-direction: column !important;
        width: 100vw !important; /* 使用视口宽度 */
        max-width: calc(100vw - 40px) !important; /* 减去左右边距 */
        margin: 0 10px !important;
        padding: 0 !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        position: relative !important;
        overflow: hidden !important;
    }
    
    /* 调整产品图片容器 */
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
        width: 100% !important;
        height: 180px !important;
        position: relative !important;
        background-color: #f8f8f8 !important;
    }
    
    /* 调整产品图片 */
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        padding: 10px !important;
    }
    
    /* 调整产品信息区域 */
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap {
        padding: 12px 15px !important;
        background-color: #fff !important;
    }
    
    /* 调整产品标题 */
    .product-carousel-wrapper .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 14px !important;
        line-height: 1.3 !important;
        max-height: 36px !important;
        margin-bottom: 5px !important;
    }
    
    /* 调整产品价格 */
    .product-carousel-wrapper .woocommerce ul.products li.product .price {
        font-size: 15px !important;
        margin: 5px 0 10px !important;
        color: #e91e63 !important;
    }
    
    /* 按钮容器 */
    .product-carousel-wrapper .woocommerce ul.products li.product .button-container {
        display: flex !important;
        justify-content: space-between !important;
        gap: 8px !important;
        margin-top: 5px !important;
    }
    
    /* 移动端默认显示Quick View按钮 - 覆盖在产品卡片上 */
    .product-carousel-wrapper .woocommerce ul.products li.product .ast-quick-view-button {
        position: absolute !important;
        bottom: 60px !important;
        left: 15px !important;
        right: 15px !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        text-align: center !important;
        border-radius: 4px !important;
        background-color: rgba(255, 255, 255, 0.9) !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
        z-index: 10 !important;
        transform: none !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    /* 调整添加到购物车按钮 - 覆盖在产品卡片上 */
    .product-carousel-wrapper .woocommerce ul.products li.product .button,
    .product-carousel-wrapper .woocommerce ul.products li.product .custom-add-to-cart-button {
        position: absolute !important;
        bottom: 15px !important;
        left: 15px !important;
        right: 15px !important;
        opacity: 1 !important;
        visibility: visible !important;
        padding: 8px 12px !important;
        font-size: 12px !important;
        text-align: center !important;
        border-radius: 4px !important;
        background-color: rgba(0, 0, 0, 0.8) !important;
        color: #fff !important;
        z-index: 10 !important;
        transform: none !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    }
    
    /* 调整轮播导航按钮 - 覆盖在轮播两侧 */
    .product-carousel-wrapper .swiper-button-prev,
    .product-carousel-wrapper .swiper-button-next {
        width: 30px !important;
        height: 30px !important;
        background-color: rgba(255, 255, 255, 0.8) !important;
        border-radius: 50% !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
        top: 40% !important;
    }
    
    .product-carousel-wrapper .swiper-button-prev {
        left: 5px !important;
    }
    
    .product-carousel-wrapper .swiper-button-next {
        right: 5px !important;
    }
    
    .product-carousel-wrapper .swiper-button-prev:after,
    .product-carousel-wrapper .swiper-button-next:after {
        font-size: 12px !important;
    }
    
    /* 调整分页器位置 */
    .product-carousel-wrapper .swiper-pagination {
        bottom: -5px !important;
        margin-top: 10px !important;
    }
    
    /* 移除产品悬停效果，改为默认显示 */
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-thumbnail-wrap .show-on-hover {
        opacity: 0 !important; /* 移动端不使用悬停切换图片 */
    }
    
    /* 销售标签位置调整 */
    .product-carousel-wrapper .woocommerce ul.products li.product .onsale,
    .product-carousel-wrapper .woocommerce ul.products li.product .ast-onsale-card {
        top: 10px !important;
        left: 10px !important;
        font-size: 12px !important;
        padding: 3px 8px !important;
        border-radius: 3px !important;
    }
}

/* 小屏幕手机优化 */
@media (max-width: 480px) {
    .product-carousel-wrapper .woocommerce ul.products li.product {
        max-width: calc(100vw - 30px) !important;
        margin: 0 5px !important;
    }
    
    .product-carousel-wrapper .swiper-button-prev {
        left: 2px !important;
    }
    
    .product-carousel-wrapper .swiper-button-next {
        right: 2px !important;
    }
}
/* 移动端产品卡片底部添加购物车按钮 */
@media (max-width: 768px) {
    /* 确保产品信息区域有足够空间容纳按钮 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap {
        padding-bottom: 50px !important;
        position: relative !important;
        min-height: 100px !important;
    }
    
    /* 添加新的底部购物车按钮 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap:after,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap:after {
        content: "ADD TO CART";
        display: block !important;
        position: absolute !important;
        bottom: 10px !important;
        left: 15px !important;
        right: 15px !important;
        background-color: #333 !important;
        color: #fff !important;
        text-align: center !important;
        padding: 8px 12px !important;
        border-radius: 4px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        z-index: 999 !important;
        cursor: pointer !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }
    
    /* 按钮悬停效果 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap:hover:after,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap:hover:after {
        background-color: #555 !important;
    }
    
    /* 轮播中的产品卡片也添加按钮 */
    .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap:after {
        bottom: 15px !important;
    }
}
/* 移动端产品卡片底部添加购物车按钮 */
@media (max-width: 768px) {
    /* 确保产品信息区域有足够空间容纳按钮 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap {
        padding-bottom: 50px !important;
        position: relative !important;
        min-height: 100px !important;
    }
    
    /* 移除之前的伪元素按钮 */
    .woocommerce ul.products li.product .astra-shop-summary-wrap:after,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap:after {
        display: none !important;
        content: none !important;
    }
    
    /* 添加新的底部购物车按钮样式 */
    .mobile-add-to-cart-btn {
        display: block !important;
        position: absolute !important;
        bottom: 10px !important;
        left: 15px !important;
        right: 15px !important;
        background-color: #333 !important;
        color: #fff !important;
        text-align: center !important;
        padding: 8px 12px !important;
        border-radius: 4px !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        z-index: 999 !important;
        cursor: pointer !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
        transition: all 0.3s ease !important;
        text-decoration: none !important;
    }
    
    /* 按钮悬停效果 */
    .mobile-add-to-cart-btn:hover {
        background-color: #555 !important;
        color: #fff !important;
    }
    
    /* 按钮点击效果 */
    .mobile-add-to-cart-btn:active {
        transform: translateY(1px) !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
    
    /* 按钮加载状态 */
    .mobile-add-to-cart-btn.loading {
        opacity: 0.7 !important;
    }
    
    /* 成功消息样式 */
    .cart-added-msg {
        position: absolute !important;
        bottom: 45px !important;
        left: 15px !important;
        right: 15px !important;
        background-color: #4CAF50 !important;
        color: white !important;
        text-align: center !important;
        padding: 5px !important;
        border-radius: 3px !important;
        font-size: 12px !important;
        z-index: 1000 !important;
    }
}

.buy-now-btn {
    bottom: 5px !important;
}

/* 产品标题和评分布局优化 */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    min-height: 150px; /* 确保有足够的空间 */
    position: relative;
}

/* 产品标题样式 */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1em !important;
    line-height: 1.3;
    margin-bottom: 5px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.6em;
}

/* JudgeMe 评分容器样式 */
.jdgm-widget.jdgm-preview-badge {
    margin-top: auto;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* 购物车按钮容器样式 */
.woocommerce ul.products li.product .button-container,
.woocommerce-page ul.products li.product .button-container {
    margin-top: auto;
    position: relative;
    z-index: 2;
}

/* 确保评分显示 */
.jdgm-prev-badge {
    display: flex !important;
    align-items: center;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 价格样式 */
.woocommerce ul.products li.product .price {
    margin: 8px 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .astra-shop-summary-wrap {
        min-height: 130px;
    }
    
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.9em !important;
        height: 2.4em;
    }
    
    .jdgm-widget.jdgm-preview-badge {
        margin-bottom: 8px;
    }
}

/* 确保 JudgeMe 评分在产品卡片中正确显示 */
.woocommerce ul.products li.product .jdgm-widget.jdgm-preview-badge {
    display: block !important;
}

/* 调整产品信息的间距 */
.woocommerce ul.products li.product .astra-shop-summary-wrap > * {
    margin-bottom: 8px;
}

/* 确保最后一个元素没有底部间距 */
.woocommerce ul.products li.product .astra-shop-summary-wrap > *:last-child {
    margin-bottom: 0;
}

/* 确保评分显示在按钮上方 */
.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap > * {
    margin-bottom: 5px;
}

.product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap > *:last-child {
    margin-bottom: 0;
}

/* 修复 JudgeMe 评分显示问题 */
.product-carousel-wrapper .woocommerce ul.products li.product .jdgm-widget.jdgm-preview-badge {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 归档页面产品卡片布局优化 */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
}

/* 产品信息区域布局 */
.woocommerce ul.products li.product .astra-shop-summary-wrap,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    position: relative !important;
    padding-bottom: 60px !important; /* 为按钮留出空间 */
}

/* 产品标题样式 */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    height: auto !important;
    max-height: 2.6em !important;
    order: 1 !important;
}

/* JudgeMe 评分容器样式 */
.woocommerce ul.products li.product .jdgm-widget.jdgm-preview-badge,
.woocommerce-page ul.products li.product .jdgm-widget.jdgm-preview-badge {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 5px 0 15px !important;
    text-align: center !important;
    width: 100% !important;
    order: 3 !important;
}

/* Buy Now 按钮样式 */
.woocommerce ul.products li.product .buy-now-btn,
.woocommerce-page ul.products li.product .buy-now-btn {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 120px !important;
    max-width: calc(100% - 30px) !important;
    margin: 0 !important;
    padding: 8px 20px !important;
    text-align: center !important;
    background-color: #333 !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    z-index: 2 !important;
    order: 4 !important;
}

/* 价格样式 */
.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price {
    margin: 5px 0 !important;
    display: block !important;
    order: 2 !important;
}

/* 强制JudgeMe评论组件在价格之后显示 */
.woocommerce ul.products li.product .price + .jdgm-widget.jdgm-preview-badge,
.woocommerce-page ul.products li.product .price + .jdgm-widget.jdgm-preview-badge,
body .woocommerce ul.products li.product .price + .jdgm-widget.jdgm-preview-badge,
body .woocommerce-page ul.products li.product .price + .jdgm-widget.jdgm-preview-badge,
body .products .price + .jdgm-widget.jdgm-preview-badge,
body ul.products li.product .price + .jdgm-widget.jdgm-preview-badge,
/* 确保所有产品卡片中的评论组件都在价格后面 */
body .woocommerce ul.products li.product .astra-shop-summary-wrap .price ~ .jdgm-widget.jdgm-preview-badge,
body .woocommerce-page ul.products li.product .astra-shop-summary-wrap .price ~ .jdgm-widget.jdgm-preview-badge,
body .product-carousel-wrapper .woocommerce ul.products li.product .astra-shop-summary-wrap .price ~ .jdgm-widget.jdgm-preview-badge,
body .product-carousel-container .woocommerce ul.products li.product .astra-shop-summary-wrap .price ~ .jdgm-widget.jdgm-preview-badge,
body .woocommerce ul.products li.product .astra-shop-summary-wrap .jdgm-widget.jdgm-preview-badge,
body .woocommerce-page ul.products li.product .astra-shop-summary-wrap .jdgm-widget.jdgm-preview-badge {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 5px 0 15px !important;
    order: 3 !important;
    position: static !important;
    transition: none !important;
    animation: none !important;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .astra-shop-summary-wrap,
    .woocommerce-page ul.products li.product .astra-shop-summary-wrap {
        padding-bottom: 70px !important;
    }
    
    .woocommerce ul.products li.product .jdgm-widget.jdgm-preview-badge {
        margin: 5px 0 12px !important;
    }
    
    .woocommerce ul.products li.product .buy-now-btn {
        bottom: 12px !important;
        padding: 6px 15px !important;
        min-width: 100px !important;
    }
}

/* 产品卡片布局优化 */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
    margin-bottom: 30px !important; /* 增加产品卡片之间的垂直间距 */
    position: relative !important;
    overflow: hidden !important;
}

/* 产品信息区域布局 */
.woocommerce ul.products li.product .astra-shop-summary-wrap,
.woocommerce-page ul.products li.product .astra-shop-summary-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 10px 15px 80px !important;
    position: relative !important;
    z-index: 2 !important;
    background-color: #fff !important; /* 确保背景色遮挡图片，防止评论与图片重叠 */
}

/* Buy Now 按钮样式 */
.woocommerce ul.products li.product .buy-now-btn,
.woocommerce-page ul.products li.product .buy-now-btn {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    min-width: 120px !important;
    max-width: calc(100% - 30px) !important;
    margin: 0 !important;
    padding: 8px 20px !important;
    text-align: center !important;
    background-color: #333 !important;
    color: #fff !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    z-index: 2 !important;
    order: 4 !important;
}

/* JudgeMe 评分容器样式 */
.woocommerce ul.products li.product .jdgm-widget.jdgm-preview-badge,
.woocommerce-page ul.products li.product .jdgm-widget.jdgm-preview-badge {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 5px 0 15px !important;
    text-align: center !important;
    width: 100% !important;
    order: 3 !important;
}

/* 确保零评分的评分组件也显示 */
.jdgm-preview-badge[data-number-of-reviews="0"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 零评分时的文本样式 */
.jdgm-preview-badge[data-number-of-reviews="0"] .jdgm-prev-badge__text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 12px !important;
    color: #666 !important;
}

/* 确保评分星星也显示 */
.jdgm-preview-badge .jdgm-star {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 未评价产品的星星样式 */
.jdgm-preview-badge[data-number-of-reviews="0"] .jdgm-star,
.jdgm-preview-badge:not([data-number-of-reviews]) .jdgm-star,
.jdgm-preview-badge[data-average-rating="0"] .jdgm-star {
    color: #ddd !important;
}

/* 确保评分组件内的所有元素都显示 */
.jdgm-preview-badge * {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 产品卡片标题限制为两行 - 增强版 */
body .woocommerce ul.products li.product .woocommerce-loop-product__title,
body .woocommerce-page ul.products li.product .woocommerce-loop-product__title,
body .astra-shop-summary-wrap .woocommerce-loop-product__title,
body .woocommerce ul.products li.product h2,
body .woocommerce-page ul.products li.product h2,
body .product-carousel-wrapper .woocommerce ul.products li.product .woocommerce-loop-product__title,
body .product-carousel-container .woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-height: 2.8em !important; /* 根据行高调整 */
    line-height: 1.4 !important;
}

.woocommerce-js div.product form.cart .button {
    padding-top: 10px!important;
    padding-bottom: 10px!important;
    margin-left: 10px!important;
}
.woocommerce-js .cart .button, .woocommerce-js .cart input.button {
    margin-left: 10px!important;
}

/* Buy Now Button Styles */
.astra-buy-now-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background-color: #2c3e50;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.astra-buy-now-button:hover:not(:disabled) {
    background-color: #34495e;
    color: #ffffff;
}

.astra-buy-now-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.astra-buy-now-button .button-text {
    display: inline-block;
    line-height: 1;
}

/* Product Slider Buy Now Button Styles */
.my-product-slider-wrapper .astra-buy-now-button {
    margin: 10px 0;
    min-width: 120px;
}

/* Archive Page Buy Now Button Styles */
.woocommerce ul.products li.product .buy-now-button-wrapper,
.woocommerce-page ul.products li.product .buy-now-button-wrapper {
    margin: 10px 0;
    text-align: center;
    width: 100%;
}

.woocommerce ul.products li.product .astra-buy-now-button,
.woocommerce-page ul.products li.product .astra-buy-now-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 8px 20px;
    background-color: #2c3e50;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: auto;
    min-width: 120px;
    margin: 0 auto;
}

.woocommerce ul.products li.product .astra-buy-now-button:hover:not(:disabled),
.woocommerce-page ul.products li.product .astra-buy-now-button:hover:not(:disabled) {
    background-color: #34495e;
    color: #ffffff;
}

.woocommerce ul.products li.product .astra-buy-now-button:disabled,
.woocommerce-page ul.products li.product .astra-buy-now-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.woocommerce ul.products li.product .astra-buy-now-button .button-text,
.woocommerce-page ul.products li.product .astra-buy-now-button .button-text {
    display: inline-block;
    line-height: 1;
}

/* Product Slider Buy Now Button Styles */
.product-carousel-wrapper .astra-buy-now-button {
    margin: 10px 0;
    min-width: 120px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .woocommerce ul.products li.product .astra-buy-now-button,
    .woocommerce-page ul.products li.product .astra-buy-now-button {
        padding: 8px 16px;
        font-size: 13px;
        width: calc(100% - 30px);
    }
}

/* Reviews Styling */
.woocommerce #reviews {
    margin-top: 2em;
    padding: 20px;
    background-color: #f7f7f7;
    border-radius: 8px;
}

.woocommerce #reviews #comments h2 {
    font-size: 1.5em;
    margin-bottom: 1em;
    color: #333;
}

.woocommerce #reviews #comments ol.commentlist {
    padding: 0;
}

.woocommerce #reviews #comments ol.commentlist li {
    margin-bottom: 20px;
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.woocommerce #reviews #comments ol.commentlist li .comment-text {
    border: none;
    padding: 0;
    margin: 0;
}

.woocommerce #reviews #comments ol.commentlist li .meta {
    color: #666;
    font-size: 0.9em;
}

.woocommerce #review_form #respond {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.woocommerce #review_form #respond .comment-form-rating {
    margin: 1em 0;
}

.woocommerce #review_form #respond .comment-form-rating .stars {
    margin-top: 5px;
}

.woocommerce #review_form #respond .comment-form-comment label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.woocommerce #review_form #respond .form-submit input {
    background-color: #000;
    color: #fff;
    padding: 12px 25px;
    border-radius: 4px;
    border: none;
}

.woocommerce #review_form #respond .form-submit input:hover {
    background-color: #333;
}

/* Move reviews after product title */
.single-product div.product .woocommerce-tabs {
    order: 15;
}

.single-product div.product {
    display: flex;
    flex-direction: column;
}

