/*
Theme Name: Glozin Child
Theme URI: https://wpglozin.com/
Author: UIXThemes
Author URI: https://uix.store
Description: Multipurpose WooCommerce WordPress Theme
Version: 1.0.0
Requires at least: 5.0
Tested up to: 5.8
Requires PHP: 7.0
License: GNU General Public License v2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glozin
Tags: one-column, two-columns, left-sidebar, right-sidebar, full-width-template, post-formats, theme-options, threaded-comments, translation-ready
Template: glozin
*/

/* ========================================
   产品图片背景颜色设置
   严格限制只给图片元素添加背景,并添加边框分隔
   ======================================== */

/* 产品列表页 - 只给图片添加背景和边框 */
.woocommerce ul.products li.product .product-thumbnail img,
ul.products li.product .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 8px !important;
}

/* 产品详情页 - 移除大图的背景和边框,只保留缩略图 */
/* 主图不添加样式 */

/* 产品详情页缩略图 - 保留背景和边框 */
.flex-control-thumbs li img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
}

/* 产品快速查看弹窗 - 只给图片添加背景和边框 */
.product-quickview .product-thumbnail img,
.mfp-content .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 8px !important;
}

/* 购物车页面 - 只给产品图片添加背景和边框 */
.woocommerce-cart .cart_item .product-thumbnail img,
.woocommerce table.shop_table .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
}

/* 迷你购物车 - 只给产品图片添加背景和边框 */
.widget_shopping_cart .cart_list li img,
.woocommerce .widget_shopping_cart .cart_list li img,
.mini-cart .product-thumbnail img,
.woocommerce-mini-cart-item__thumbnail img,
.mini-cart-item .woocommerce-mini-cart-item__thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 5px !important;
}

/* 相关产品/推荐产品 - 只给图片添加背景和边框 */
.related.products ul.products li.product .product-thumbnail img,
.upsells.products ul.products li.product .product-thumbnail img,
.cross-sells ul.products li.product .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 8px !important;
}

/* Wishlist/对比列表 - 只给产品图片添加背景和边框 */
.wcboost-wishlist-page .product-thumbnail img,
.wcboost-products-compare .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 8px !important;
}

/* 订单详情页 - 只给产品图片添加背景和边框 */
.woocommerce-order-details .product-thumbnail img,
.order_details .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
}

/* Widget产品列表 - 只给图片添加背景和边框 */
.widget_products .product-thumbnail img,
.widget_recent_reviews .product-thumbnail img,
.widget_top_rated_products .product-thumbnail img {
    background-color: #edeff0 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 6px !important;
}

/* 产品变体图片 - 移除样式 */
/* 不需要添加背景和边框 */


/* ========================================
   移动端 Mega Menu 显示优化
   ======================================== */

/* 移动端确保 mega menu 子菜单显示 */
@media (max-width: 1024px) {
    /* 确保 mega menu 在移动端可见 */
    .mega-menu__row {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* 移动端列布局改为垂直堆叠 */
    .mega-menu__column {
        width: 100% !important;
        flex: 1 1 100% !important;
        margin-bottom: 15px;
    }

    /* 移动端 mega menu item 样式优化 */
    .mega-menu__column .menu-item {
        margin-bottom: 8px;
    }

    .mega-menu__column .menu-item a {
        padding: 10px 15px;
        display: flex !important;
        align-items: center;
        font-size: 14px;
    }

    /* 确保图标在移动端显示 */
    .mega-menu__column .DefaultMenuList_img__0yUEx {
        display: inline-flex !important;
        margin-right: 8px;
    }

    .mega-menu__column .DefaultMenuList_img__0yUEx img {
        width: 20px !important;
        height: 20px !important;
    }

    /* 隐藏标题分类以节省空间 */
    .mega-menu__column .menu-item-header {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 10px;
        padding-bottom: 5px;
        border-bottom: 1px solid #eee;
    }
}

/* 响应式优化 - 移动端图片添加背景和边框 */
@media (max-width: 768px) {
    /* 移动端产品列表图片 */
    .woocommerce ul.products li.product .product-thumbnail img {
        background-color: #edeff0 !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        padding: 8px !important;
    }

    /* 移动端产品详情页大图也添加背景和边框 */
    .woocommerce-product-gallery__image img,
    .flex-viewport img {
        background-color: #edeff0 !important;
        border: 1px solid #e0e0e0 !important;
        border-radius: 4px !important;
        padding: 8px !important;
    }
}
