/*
Theme Name: Hello Biz Child
Template: hello-biz
*/

/* --------------------------------
全站防止左右滑動、自適應圖片/區塊
-------------------------------- */
html, body {
    overflow-x: hidden;
    width: 100%;
}

img, iframe, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container, .site, .main, .content, #menu-123 {
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box;
}

p, span, li, a {
    word-wrap: break-word;
    word-break: break-word;
}

table, .wide-block {
    max-width: 100%;
    overflow-x: auto;
}

/* ----------------------------
手機選單
---------------------------- */
@media (max-width: 767px) {
    #menu-123 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    #menu-123 > li {
        flex: 0 1 auto;
        margin: 5px;
    }

    #menu-123 li.menu-item-has-children > ul.sub-menu {
        display: none;
    }

    #menu-123 li.menu-item-has-children.open > ul.sub-menu {
        display: block;
    }

    #menu-123 li.menu-item-has-children > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #menu-123 li.menu-item-has-children > a::after {
        content: '▼';
        margin-left: 5px;
        font-size: 0.7em;
    }
}

/* ----------------------------
固定 Line / Telegram 按鈕
---------------------------- */
.fixed-line-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9999;
}

.fixed-line-btn svg {
    width: 100%;
    height: 100%;
}

.fixed-line-btn .line-text {
    display: none;
}

.fixed-line-btn .tooltip-text {
    display: none;
    position: absolute;
    right: 70px;
    background: #00b900;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
}

.fixed-line-btn:hover .tooltip-text {
    display: block;
}

/* ----------------------------
手機版商品列表調整 (max-width: 767px)
---------------------------- */
@media (max-width: 767px) {
    /* 商品列表容器 */
    ul.products {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between; /* 左右間距平均 */
        margin: 0 -5px; /* 修正間距 */
    }

    /* 每個商品項目 */
    ul.products li.product {
        flex: 0 0 48%; /* 每行 2 個商品，可改成 100% 單列或 32% 三列 */
        margin: 5px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }

    /* 商品圖片統一高度 */
    ul.products li.product img {
        width: 100%;
        height: 200px; /* 固定高度，可根據需求調整 */
        object-fit: cover; /* 裁切圖片填滿容器 */
        display: block;
        border-radius: 5px; /* 可選，增加美觀 */
    }

    /* 商品標題置中 */
    ul.products li.product .woocommerce-loop-product__title {
        text-align: center;
        margin-top: 8px;
        font-size: 14px;
        line-height: 1.2;
    }

    /* 商品價格置中 */
    ul.products li.product .price {
        text-align: center;
        margin-top: 4px;
        font-size: 13px;
        color: #333;
    }
}



