/* =====================================================
 *  購物車 / 結帳頁 專屬手機版底部工具列
 * ===================================================== */

/* 購物車/結帳頁隱藏預設工具列 */
body[data-page="cart"] .Default-toolbar,
body[data-page="order"] .Default-toolbar {
    display: none !important;
}

/* 購物車/結帳頁底部 padding，避免內容被 toolbar 遮蓋 */
@media (max-width: 991.98px) {
    body[data-page="cart"] .page-wrapper,
    body[data-page="order"] .page-wrapper {
        padding-bottom: 80px;
    }
}

/* ===== 購物車 Toolbar ===== */
.Cart-toolbar {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .1);
    z-index: 1030;
    padding: 10px 16px;
}

/* 三欄：左=折扣資訊 | 中=金額 | 右=按鈕 */
.cart-toolbar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-toolbar-info {
    flex: 1;
    min-width: 0;
}

.cart-toolbar-total {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #373f50;
    text-align: center;
    white-space: nowrap;
}

.cart-toolbar-discount {
    font-size: 0.8rem;
}

.cart-toolbar-next {
    font-size: 0.78rem;
}

.cart-toolbar-action {
    flex: 1;
    text-align: right;
}

/* ===== 結帳 Toolbar ===== */
.Checkout-toolbar {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .1);
    z-index: 1030;
    padding: 10px 16px;
}

/* 三欄：左=折扣/運費 | 中=總計 | 右=按鈕 */
.checkout-toolbar-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-toolbar-info {
    flex: 1;
    min-width: 0;
}

.checkout-toolbar-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    gap: 6px;
}

.checkout-toolbar-total {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #373f50;
    text-align: center;
    white-space: nowrap;
}

.checkout-toolbar-action {
    flex: 1;
    text-align: right;
}

/* ===== 手機版顯示控制 ===== */
@media (max-width: 991.98px) {
    body[data-page="cart"] .Cart-toolbar {
        display: block;
    }

    body[data-page="order"] .Checkout-toolbar {
        display: block;
    }

    /* 結帳頁原有的手機版建立訂單按鈕隱藏 */
    body[data-page="order"] .checkout-mobile-btn-original {
        display: none !important;
    }

    /* ===== 結帳頁手機版緊湊排版 ===== */
    /* 各區塊：縮小 padding、圓角、陰影 */
    body[data-page="order"] section > .bg-white {
        padding: 16px 14px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06) !important;
        border-radius: 8px !important;
    }

    /* 區塊標題縮小 */
    body[data-page="order"] section > .bg-white > h4 {
        font-size: 1rem;
        padding-top: 0 !important;
        padding-bottom: 8px !important;
        margin-bottom: 10px !important;
    }

    /* <p></p> 間距縮小 */
    body[data-page="order"] section > p {
        margin-bottom: 6px !important;
    }
}
