@charset "utf-8";

/* ========================================
   モバイルフローティングCTA・ボトムナビゲーション
   ======================================== */

@media screen and (max-width: 767px) {
    /* ========================================
       1. フローティングCTAボタン (商品詳細ページ)
       ======================================== */
    
    /* 商品詳細ページでのみ表示 */
    .product_page .ec-productRole {
        padding-bottom: 80px; /* フローティングボタン分のスペース確保 */
    }
    
    /* フローティングCTAコンテナ */
    .mobile-floating-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 10px 16px;
        z-index: 1000;
        display: none; /* デフォルトは非表示 */
        border-top: 1px solid #e0e0e0;
    }
    
    /* 商品詳細ページでのみ表示 */
    .product_page .mobile-floating-cta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    
    /* 価格表示 */
    .mobile-floating-cta__price {
        flex: 0 0 auto;
        font-size: 18px;
        font-weight: bold;
        color: #333333;
    }
    
    /* CTAボタン */
    .mobile-floating-cta__button {
        flex: 1;
        min-height: 48px;
        padding: 12px 24px;
        background: #28a745;
        color: #ffffff;
        border: none;
        border-radius: 4px;
        font-size: 16px;
        font-weight: bold;
        text-align: center;
        cursor: pointer;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: background 0.2s ease;
    }
    
    .mobile-floating-cta__button:hover,
    .mobile-floating-cta__button:active {
        background: #218838;
    }
    
    /* お気に入りボタン */
    .mobile-floating-cta__favorite {
        flex: 0 0 auto;
        min-height: 48px;
        min-width: 48px;
        padding: 12px;
        background: #ffffff;
        color: #333333;
        border: 1px solid #cccccc;
        border-radius: 4px;
        font-size: 20px;
        text-align: center;
        cursor: pointer;
        transition: background 0.2s ease;
    }
    
    .mobile-floating-cta__favorite:hover,
    .mobile-floating-cta__favorite:active {
        background: #f8f9fa;
    }
    
    /* ========================================
       2. ボトムナビゲーション (全ページ)
       ======================================== */
    
    /* ボディに下部パディングを追加 */
    body {
        padding-bottom: 60px;
    }
    
    /* 商品詳細ページではフローティングCTA分も追加 */
    .product_page body {
        padding-bottom: 140px;
    }
    
    /* ボトムナビゲーションコンテナ */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 60px;
        border-top: 1px solid #e0e0e0;
    }
    
    /* ナビゲーションアイテム */
    .mobile-bottom-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 8px;
        text-decoration: none;
        color: #666666;
        transition: color 0.2s ease;
        min-height: 48px;
        position: relative;
    }
    
    .mobile-bottom-nav__item:hover,
    .mobile-bottom-nav__item:active,
    .mobile-bottom-nav__item--active {
        color: #007bff;
    }
    
    /* アイコン */
    .mobile-bottom-nav__icon {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    /* ラベル */
    .mobile-bottom-nav__label {
        font-size: 10px;
        line-height: 1.2;
    }
    
    /* カートバッジ */
    .mobile-bottom-nav__badge {
        position: absolute;
        top: 4px;
        right: 50%;
        transform: translateX(8px);
        background: #dc3545;
        color: #ffffff;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 10px;
        font-weight: bold;
        min-width: 18px;
        text-align: center;
        line-height: 1.2;
    }
    
    /* ========================================
       3. 既存のヘッダーナビゲーション調整
       ======================================== */
    
    /* 既存のヘッダーカートアイコンは非表示 */
    .ec-headerRole__cart {
        display: none !important;
    }
    
    /* ========================================
       4. スクロール時の挙動
       ======================================== */
    
    /* スクロールダウン時に隠す場合 */
    .mobile-bottom-nav.is-hidden {
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-floating-cta.is-hidden {
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
}
