.woocommerce .yith-wcwl-add-to-wishlist,
.woocommerce .button.yith-compare-button,
.woocommerce .button.quick-view-button {
    display: none !important;
}


html, body {
  scroll-behavior: auto !important;
  overscroll-behavior: auto !important;
}



/* 讓購物車按鈕能夠定位徽章 */
li.fm-item:nth-child(1) {
    /* 這是購物車按鈕的父容器，用於定位徽章 */
    position: relative; 
}

/* 顯示購物車數量徽章 */
.has-cart-items li.fm-item:nth-child(1)::after { 
    /* 選擇器解釋：
       - .has-cart-items: 確認購物車有東西 (來自我們新增的PHP程式碼)
       - li.fm-item: 鎖定 Float Menu Lite 的項目
       - :nth-child(1): 鎖定第一個項目 (也就是您的購物車) 
    */
    
    background-color: #e2401c; /* 紅色背景 */
    color: #ffffff; /* 白色文字 */
    border-radius: 50%; /* 圓形 */
    padding: 3px 6px; 
    font-size: 11px;
    font-weight: bold;
    line-height: 1; /* 修正行高 */
    text-align: center;
    
    /* 定位到按鈕的右上角 */
    position: absolute;
    top: -5px; 
    right: -5px;
    z-index: 100;
}

/* --- 根據不同的數量，設定不同的 content --- */
/* 我們利用 CSS content 屬性顯示數量 */
.cart-count-1 li.fm-item:nth-child(1)::after { content: '1'; }
.cart-count-2 li.fm-item:nth-child(1)::after { content: '2'; }
.cart-count-3 li.fm-item:nth-child(1)::after { content: '3'; }
.cart-count-4 li.fm-item:nth-child(1)::after { content: '4'; }
.cart-count-5 li.fm-item:nth-child(1)::after { content: '5'; }
.cart-count-6 li.fm-item:nth-child(1)::after { content: '6'; }
.cart-count-7 li.fm-item:nth-child(1)::after { content: '7'; }
.cart-count-8 li.fm-item:nth-child(1)::after { content: '8'; }
.cart-count-9 li.fm-item:nth-child(1)::after { content: '9'; }
/* 如果數量超過 9 個，只顯示 9+ */
.cart-count-10 li.fm-item:nth-child(1)::after, 
.cart-count-11 li.fm-item:nth-child(1)::after,
.cart-count-12 li.fm-item:nth-child(1)::after {
    content: '9+'; 
}




/* 針對 WooCommerce Blocks 的「前往結帳」按鈕 */
.wc-block-cart__submit-button.wc-block-components-button.contained {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;

    padding: 14px 32px !important;
    border: 2px solid #000 !important;
    background-color: #ffffff !important;
    color: #000 !important;

    border-radius: 6px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    text-decoration: none !important;

    box-shadow: none !important;
}

/* 內部文字強制改色 */
.wc-block-cart__submit-button .wc-block-components-button__text {
    color: #000 !important;
}

/* hover 效果 */
.wc-block-cart__submit-button.wc-block-components-button.contained:hover {
    background-color: #f0f0f0 !important;
    color: #000 !important;
    border-color: #000 !important;
}

/* 按鈕置中 */
.wc-block-cart__submit-button {
    margin: 20px auto !important;
    display: flex !important;
}


.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* 修正 WooCommerce 結帳欄位在手機版 placeholder 被切掉的問題 */
@media screen and (max-width: 480px) {
    
    /* 讓 placeholder 可以換行 */
    .woocommerce form .form-row input::placeholder,
    .woocommerce form .form-row textarea::placeholder {
        white-space: normal !important;
        line-height: 1.5em !important;
    }

    /* 強制增加高度避免被裁切 */
    .woocommerce form .form-row input.input-text {
        min-height: 54px !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }

    /* 避免 overflow: hidden 把文字卡掉 */
    .woocommerce form .form-row {
        overflow: visible !important;
    }
}


/* 調整付款方式描述（例如：信用卡付款說明）的文字大小 */
.woocommerce-checkout .payment_box p,
.woocommerce-checkout .payment_box {
    font-size: 12px !important;  /* 想更小可改成 12px、11px */ 
    line-height: 1.5em !important;
	
}










/* 結帳頁面運送方式字體縮小 僅針對手機版 (螢幕寬度小於或等於 768px) */
@media screen and (max-width: 768px) {

    /* 針對運費行 (tr.shipping) 內的第二個儲存格 (td:last-child) */
    /* 這是包含「宅配運費、優惠訊息、NT$100」的區域 */
    .woocommerce-checkout-review-order-table tr.shipping td:last-child, 
    
    /* 同時針對該儲存格內的所有文字元素進行縮小 */
    .woocommerce-checkout-review-order-table tr.shipping td:last-child * {
        
        /* 調整字體大小到 98%，非常接近正常大小 */
        font-size: 0.98em !important; 
        
        /* 保持緊湊行高 (這個設定可以讓文字更緊湊) */
        line-height: 1.5 !important; 
        
        /* 不加入 padding/margin 歸零，避免位置跑掉 */
    }

}










/* 關閉商品圖片 hover/active 變透明（Bridge 主題） */
.product img,
.woocommerce ul.products li.product img,
.qodef-pl-image img,
.qodef-product-image img {
    opacity: 1 !important;
    transition: none !important;
}

.product:hover img,
.product:active img,
.woocommerce ul.products li.product:hover img,
.woocommerce ul.products li.product:active img,
.qodef-pl-image:hover img,
.qodef-pl-image:active img,
.qodef-product-image:hover img,
.qodef-product-image:active img {
    opacity: 1 !important;
}
