/* トップページ専用スタイル */

/* メインコンテンツエリアの調整 */
.front_page .ec-mainContent__main {
    max-width: 900px;
    margin: 0 auto;
}

/* トップページの商品グリッド */
.front_page .ec-shelfGrid {
    display: grid !important;
    grid-template-columns: repeat(2, 280px) !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-content: center !important;
}

/* トップページの商品ボックス */
.front_page .ec-shelfGrid__item {
    width: 280px !important;
    background-color: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 12px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    min-height: 350px !important;
    max-height: 380px !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
}

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

/* 商品画像エリア */
.front_page .ec-shelfGrid__item-image {
    width: 100% !important;
    height: 200px !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: 80px 80px !important;
    border-radius: 4px !important;
    margin-bottom: 10px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.front_page .ec-shelfGrid__item-image img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
    background-color: white !important;
    position: relative !important;
    z-index: 1 !important;
}

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

/* 商品情報 */
.front_page .ec-shelfGrid__brand {
    font-size: 11px !important;
    color: #888 !important;
    margin-bottom: 4px !important;
}

.front_page .ec-shelfGrid__title {
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    margin-bottom: 6px !important;
    height: 36px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    color: #333 !important;
}

/* 価格表示 */
.front_page .ec-shelfGrid__price {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #ff0000 !important;
    margin-bottom: 8px !important;
}

.front_page .ec-shelfGrid__price--normal {
    font-size: 14px !important;
    color: #999 !important;
    text-decoration: line-through !important;
    margin-right: 8px !important;
}

/* 在庫状況 */
.front_page .ec-shelfGrid__stock {
    font-size: 11px !important;
    margin-bottom: 6px !important;
}

.front_page .ec-shelfGrid__stock--in {
    color: #4caf50 !important;
}

.front_page .ec-shelfGrid__stock--few {
    color: #ff9800 !important;
}

.front_page .ec-shelfGrid__stock--out {
    color: #f44336 !important;
}

/* カートボタン */
.front_page .ec-blockBtn--action {
    background-color: #ff6600 !important;
    color: white !important;
    border: none !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-weight: 500 !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;
}

/* カートアイコンの確実な表示 */
.front_page .ec-blockBtn--action:before {
    content: "🛒" !important;
    font-size: 14px !important;
}

.front_page .ec-blockBtn--action:hover {
    background-color: #ff4400 !important;
}

.front_page .ec-blockBtn--action:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
}

/* リンクエリア */
.front_page .ec-shelfGrid__item > a {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* フォーム調整 */
.front_page .ec-shelfGrid__item form {
    margin: 0 !important;
    margin-top: auto !important;
}

/* レスポンシブ対応 */
@media (max-width: 992px) {
    .front_page .ec-shelfGrid {
        grid-template-columns: repeat(2, 280px) !important;
    }
}

@media (max-width: 650px) {
    .front_page .ec-shelfGrid {
        grid-template-columns: 280px !important;
        gap: 15px !important;
    }
    
    .front_page .ec-shelfGrid__item-image {
        height: 180px !important;
    }
}

/* セクションタイトル */
.front_page .ec-secHeading {
    font-size: 28px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    padding-bottom: 15px !important;
    position: relative !important;
}

.front_page .ec-secHeading:after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 60px !important;
    height: 3px !important;
    background-color: #ff6600 !important;
}

/* カテゴリセクション間の余白 */
.front_page .ec-categorySection {
    margin-bottom: 60px !important;
}

/* タブコンテンツの余白 */
.front_page .ec-tabContent {
    padding: 30px 0 !important;
}

/* バッジのスタイル */
.front_page .ec-shelfGrid__badge {
    position: absolute !important;
    top: -10px !important;
    left: -10px !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 11px !important;
    font-weight: bold !important;
    z-index: 999 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    transform: rotate(-5deg) !important;
}

.front_page .ec-shelfGrid__badge--new {
    background-color: #4caf50 !important;
    color: white !important;
}

.front_page .ec-shelfGrid__badge--sale {
    background-color: #ff0000 !important;
    color: white !important;
}