/* 移动端专用样式修复文?*/

/* 移动端商品网格优?- 只在小屏幕生效，不影响PC?*/
@media (max-width: 575.98px) {
    /* 只针对包含商品的区域，使用更精确的选择?*/

    /* 首页商品区域 - 强制一行两?*/
    .featured-product-area .col-lg-3,
    .new-product-area .col-lg-3,
    .best-seller-area .col-lg-3,
    .special-offer-area .col-lg-3 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    /* 商品列表页面 - 强制一行两?*/
    .shop-product-area .col-lg-4,
    .shop-product-area .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    /* 移动端商品容器间距优?*/
    .featured-product-area .row,
    .new-product-area .row,
    .best-seller-area .row,
    .special-offer-area .row,
    .shop-product-area .row {
        margin-left: -7.5px;
        margin-right: -7.5px;
    }

    .featured-product-area [class*="col-"],
    .new-product-area [class*="col-"],
    .best-seller-area [class*="col-"],
    .special-offer-area [class*="col-"],
    .shop-product-area [class*="col-"] {
        padding-left: 7.5px !important;
        padding-right: 7.5px !important;
    }
}
    
    /* 商品项内部优?*/
    .single-product {
        margin-bottom: 20px;
        border: 1px solid #f0f0f0;
        border-radius: 5px;
        overflow: hidden;
    }
    
    .single-product .product-img {
        position: relative;
        overflow: hidden;
    }
    
    .single-product .product-img img {
        width: 100%;
        height: auto;
        transition: transform 0.3s ease;
    }
    
    .single-product:hover .product-img img {
        transform: scale(1.05);
    }
    
    .single-product .product-content {
        padding: 10px 8px;
        text-align: center;
    }
    
    .single-product .product-content h4 {
        font-size: 12px;
        line-height: 1.3;
        margin-bottom: 5px;
        height: 32px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .single-product .product-content h4 a {
        color: #333;
        text-decoration: none;
    }
    
    .single-product .product-content h4 a:hover {
        color: #31abec;
    }
    
    .single-product .product-content .pro-price {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    .single-product .product-content .pro-price .new-price {
        color: #31abec;
    }
    
    .single-product .product-content .pro-price .old-price {
        color: #999;
        text-decoration: line-through;
        margin-left: 5px;
        font-size: 11px;
    }
    
    /* 商品操作按钮优化 */
    .product-action {
        position: absolute;
        top: 10px;
        right: 10px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .single-product:hover .product-action {
        opacity: 1;
    }
    
    .product-action ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .product-action ul li {
        margin-bottom: 3px;
    }
    
    .product-action ul li a {
        display: block;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        background: rgba(255, 255, 255, 0.9);
        color: #333;
        border-radius: 50%;
        font-size: 12px;
        text-decoration: none;
        transition: all 0.3s ease;
    }
    
    .product-action ul li a:hover {
        background: #31abec;
        color: #fff;
    }
    
    /* 评分星级优化 */
    .pro-rating {
        margin-bottom: 5px;
    }
    
    .pro-rating i {
        font-size: 10px;
        margin-right: 1px;
    }

    .pro-rating .zmdi-star-outline {
        color: #31abec; /* 实心星为橙色 */
    }

    .pro-rating .zmdi-star {
        color: #ddd; /* 空心星为灰色 */
    }

    .pro-rating .zmdi-star-half {
        color: #31abec; /* 半星为橙?*/
    }
    
    /* 容器间距优化 */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .row {
        margin-left: -7.5px;
        margin-right: -7.5px;
    }
    
    /* 区块标题优化 */
    .section-title h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    /* 分页优化 */
    .shop-pagination {
        margin-top: 30px;
    }
    
    .shop-pagination > li > a {
        padding: 8px 12px;
        font-size: 12px;
        margin: 0 2px;
    }
    
    /* 筛选器优化 */
    .widget {
        margin-bottom: 20px;
        padding: 15px;
        background: #f9f9f9;
        border-radius: 5px;
    }
    
    .widget-title {
        font-size: 14px;
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    /* 价格筛选器 */
    .price-filter {
        margin-bottom: 15px;
    }
    
    .price-filter input {
        width: 100%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 12px;
    }
    
    /* 颜色筛选器 */
    .color-filter ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .color-filter ul li {
        width: 25px;
        height: 25px;
        border-radius: 50%;
        border: 2px solid #ddd;
        cursor: pointer;
        transition: transform 0.2s ease;
    }
    
    .color-filter ul li:hover {
        transform: scale(1.1);
    }
    
    /* 尺寸筛选器 */
    .size-filter ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .size-filter ul li {
        padding: 5px 8px;
        border: 1px solid #ddd;
        border-radius: 3px;
        font-size: 11px;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .size-filter ul li:hover,
    .size-filter ul li.active {
        background: #31abec;
        color: #fff;
        border-color: #31abec;
    }
}

/* 超小屏幕优化 (480px以下) */
@media (max-width: 480px) {
    .container {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .featured-product-area .row > [class*="col-"],
    .product-list .row > [class*="col-"],
    .shop-product-area .row > [class*="col-"],
    .new-product-area .row > [class*="col-"],
    .best-seller-area .row > [class*="col-"],
    .special-offer-area .row > [class*="col-"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    
    .single-product .product-content {
        padding: 8px 5px;
    }
    
    .single-product .product-content h4 {
        font-size: 11px;
        height: 28px;
    }
    
    .single-product .product-content .pro-price {
        font-size: 12px;
    }
    
    .product-action ul li a {
        width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 11px;
    }
    
    .section-title h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
}

/* 修复Shadow DOM中的Bootstrap网格问题 */
product-list {
    display: block;
    width: 100%;
}

product-item {
    display: block;
    width: 100%;
    height: 100%;
}

/* 确保product-item内部内容正确显示 */
@media (max-width: 767px) {
    product-item .single-product {
        margin-bottom: 15px;
    }
    
    product-item .product-content {
        padding: 8px;
    }
    
    product-item .product-content h4 {
        font-size: 12px;
        line-height: 1.2;
        margin-bottom: 5px;
    }
    
    product-item .pro-price {
        font-size: 13px;
        margin-bottom: 5px;
    }
}
