/* 商品一覧ページのクリーンアップ */

/* 商品ボックス内の不要な要素を非表示 */
.ec-shelfGrid__item .ec-productRole__actions {
    display: none !important;
}

/* 数量入力エリアを非表示 */
.ec-shelfGrid__item .ec-numberInput {
    display: none !important;
}

/* 規格選択を非表示（商品一覧では不要） */
.ec-shelfGrid__item .ec-select {
    display: none !important;
}

/* カートボタンをきれいに */
.ec-shelfGrid__item .ec-productRole__btn {
    margin-top: 10px !important;
}

.ec-shelfGrid__item .ec-blockBtn--action {
    background-color: #ff6600 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    width: 100% !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    font-weight: 500 !important;
}

.ec-shelfGrid__item .ec-blockBtn--action:hover {
    background-color: #ff4400 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

.ec-shelfGrid__item .ec-blockBtn--action:active {
    transform: translateY(0) !important;
    box-shadow: none !important;
}

.ec-shelfGrid__item .ec-blockBtn--action:disabled {
    background-color: #cccccc !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* カートに追加アイコン */
.ec-shelfGrid__item .ec-blockBtn--action:before {
    content: "🛒";
    margin-right: 5px;
    font-size: 14px;
}

/* 在庫切れボタン */
.ec-shelfGrid__item .ec-blockBtn--action:disabled:before {
    content: "❌";
    margin-right: 5px;
    font-size: 12px;
}

/* フォームの余白調整 */
.ec-shelfGrid__item form {
    margin: 0 !important;
    padding: 0 !important;
}

/* 商品価格の表示改善 */
.ec-shelfGrid__item .price02-default {
    color: #ff0000 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
    text-align: left !important;
}

/* 商品タイトルの改善 */
.ec-shelfGrid__item p:nth-of-type(2) {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    height: 36px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* 商品説明文を非表示（一覧では不要） */
.ec-shelfGrid__item p:nth-of-type(3):not(.price02-default) {
    display: none !important;
}

/* 商品画像のホバーエフェクト */
.ec-shelfGrid__item-image {
    overflow: hidden !important;
    border-radius: 4px !important;
    background-color: #f8f8f8 !important;
    background-image: url('/template/default/assets/img/no-image-icon.svg') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 60px 60px !important;
}

.ec-shelfGrid__item-image img {
    transition: transform 0.3s ease !important;
    background-color: white !important;
    position: relative !important;
    z-index: 1 !important;
}

.ec-shelfGrid__item:hover .ec-shelfGrid__item-image img {
    transform: scale(1.05) !important;
}

/* 商品ボックス全体のスタイル調整 */
.ec-shelfGrid__item {
    background-color: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 4px !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
}

.ec-shelfGrid__item:hover {
    border-color: #ff6600 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}

/* モーダルのカートボタンも調整 */
.ec-modal .ec-inlineBtn--action {
    background-color: #ff6600 !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
}

.ec-modal .ec-inlineBtn--action:hover {
    background-color: #ff4400 !important;
}

/* 商品詳細ページでは数量選択を表示 */
.product_detail .ec-numberInput {
    display: block !important;
}

.product_detail .ec-productRole__actions {
    display: block !important;
}