/**
 * モバイル用商品グリッド修正
 * CategoryProduct用の2列レイアウトを強制
 */

@media screen and (max-width: 767px) {
    /* CategoryProductエリア全体 */
    #CategoryProduct-product_area.ec-shelfRole {
        width: 100% !important;
        overflow: visible !important;
    }
    
    /* グリッドコンテナ */
    #CategoryProduct-product_area .ec-shelfGrid {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0 !important;
        justify-content: space-between !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }
    
    /* グリッドアイテム - 基本スタイル */
    #CategoryProduct-product_area .ec-shelfGrid .ec-shelfGrid__item {
        width: 48% !important;
        flex: 0 0 48% !important;
        max-width: 48% !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: block !important;
        float: none !important;
        flex-direction: column !important;
    }
    
    /* 奇数番目(左側) */
    #CategoryProduct-product_area .ec-shelfGrid .ec-shelfGrid__item:nth-child(2n+1) {
        margin-right: 2% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 偶数番目(右側) */
    #CategoryProduct-product_area .ec-shelfGrid .ec-shelfGrid__item:nth-child(2n) {
        margin-left: 2% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    /* 画像エリア */
    #CategoryProduct-product_area .ec-shelfGrid__item-image {
        margin-bottom: 10px !important;
        text-align: center !important;
    }
    
    /* 画像 */
    #CategoryProduct-product_area .ec-shelfGrid__item-image img {
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }
}
